|
4 | 4 | * Licensed under the MIT License. See License.txt in the project root for license information. |
5 | 5 | *--------------------------------------------------------------------------------------------*/ |
6 | 6 |
|
7 | | -import React, { useState, useImperativeHandle, useRef } from 'react'; |
8 | | -import { useParams, useHistory } from 'react-router-dom'; |
9 | | -import { Input, Modal, Button, Form } from 'antd'; |
| 7 | +import React, { useImperativeHandle, useRef, useState } from 'react'; |
| 8 | +import { useHistory, useParams } from 'react-router-dom'; |
| 9 | +import { Button, Form, Input, Modal } from 'antd'; |
10 | 10 | import { Message } from '@/shared/utils/message'; |
11 | | -import { appPublish, updateFlowInfo, getVersion } from '@/shared/http/aipp'; |
| 11 | +import { appPublish, getVersion, updateFlowInfo } from '@/shared/http/aipp'; |
12 | 12 | import { versionStringCompare } from '@/shared/utils/common'; |
13 | 13 | import { useAppDispatch } from '@/store/hook'; |
14 | 14 | import { setChatId, setChatList } from '@/store/chatStore/chatStore'; |
15 | | -import { setTestStatus } from "@/store/flowTest/flowTest"; |
| 15 | +import { setTestStatus } from '@/store/flowTest/flowTest'; |
16 | 16 | import { useTranslation } from 'react-i18next'; |
17 | 17 | import { createEvaluate } from '../../shared/http/appEvaluate'; |
18 | 18 | import TextEditor from './text-editor'; |
@@ -48,7 +48,7 @@ const PublishModal = (props) => { |
48 | 48 | app_type: publishType !== 'app' ? 'waterflow' : appInfo.attributes?.app_type |
49 | 49 | }); |
50 | 50 | setIsModalOpen(true); |
51 | | - getVersion(tenantId, appId, null, 0, 1).then(res => { |
| 51 | + getVersion(tenantId, appId, publishType, 0, 1).then(res => { |
52 | 52 | if (res.code === 0) { |
53 | 53 | form.setFieldsValue({ |
54 | 54 | description: res.data[0]?.publishedDescription || '' |
@@ -143,6 +143,9 @@ const PublishModal = (props) => { |
143 | 143 | async function updateAppRunningFlow() { |
144 | 144 | setLoading(true); |
145 | 145 | let params = appInfo.flowGraph; |
| 146 | + if (window.agent) { |
| 147 | + params.appearance = window.agent.serialize(); |
| 148 | + } |
146 | 149 | const res = await updateFlowInfo(tenantId, appId, params); |
147 | 150 | if (res.code === 0) { |
148 | 151 | publishWaterFlow(); |
|
0 commit comments