fix(web): app file
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-03 16:27:39
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-03-26 13:41:44
|
||||
* @Last Modified time: 2026-03-27 17:59:07
|
||||
*/
|
||||
/**
|
||||
* Chat debugging component for application testing
|
||||
@@ -224,11 +224,11 @@ const Chat: FC<ChatProps> = ({
|
||||
if (loading || !id) return
|
||||
setLoading(true)
|
||||
setCompareLoading(true)
|
||||
const files = (fileList || []).filter(item => !['uploading', 'error'].includes(item.status))
|
||||
handleSave(false)
|
||||
.then(() => {
|
||||
const message = msg
|
||||
if (!message?.trim()) return
|
||||
const files = (toolbarRef.current?.getFiles() || []).filter(item => !['uploading', 'error'].includes(item.status))
|
||||
// Validate required variables before sending
|
||||
let isCanSend = true
|
||||
const params: Record<string, any> = {}
|
||||
@@ -427,11 +427,11 @@ const Chat: FC<ChatProps> = ({
|
||||
if (loading || !id) return
|
||||
setLoading(true)
|
||||
setCompareLoading(true)
|
||||
const files = (fileList || []).filter(item => !['uploading', 'error'].includes(item.status))
|
||||
handleSave(false)
|
||||
.then(() => {
|
||||
const message = msg
|
||||
if (!message || message.trim() === '') return
|
||||
const files = (toolbarRef.current?.getFiles() || []).filter(item => !['uploading', 'error'].includes(item.status))
|
||||
addUserMessage(message, files)
|
||||
setMessage(undefined)
|
||||
toolbarRef.current?.setFiles([])
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-03 16:27:52
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-03-24 15:58:23
|
||||
* @Last Modified time: 2026-03-27 17:33:44
|
||||
*/
|
||||
import { type FC, useRef, useMemo, useCallback } from 'react';
|
||||
import { useNavigate, useParams } from 'react-router-dom';
|
||||
@@ -212,7 +212,12 @@ const ConfigHeader: FC<ConfigHeaderProps> = ({
|
||||
</Flex>}
|
||||
extra={application?.type === 'workflow' && source !== 'sharing' && activeTab === 'arrangement'
|
||||
? <Flex align="center" justify="end" gap={10} className="rb:h-8">
|
||||
<FeaturesConfig source={application?.type} value={features as FeaturesConfigForm} refresh={handleSaveFeaturesConfig} />
|
||||
<FeaturesConfig
|
||||
source={application?.type}
|
||||
value={features as FeaturesConfigForm}
|
||||
refresh={handleSaveFeaturesConfig}
|
||||
chatVariables={(workflowRef.current?.chatVariables || []).map(v => ({ ...v, display_name: v.name }))}
|
||||
/>
|
||||
<Button onClick={clear}>{t('workflow.clear')}</Button>
|
||||
<Button onClick={addvariable}>{t('workflow.addvariable')}</Button>
|
||||
<Button onClick={run}>{t('workflow.run')}</Button>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: ZhaoYing
|
||||
* @Date: 2026-02-03 16:27:56
|
||||
* @Last Modified by: ZhaoYing
|
||||
* @Last Modified time: 2026-03-27 14:24:47
|
||||
* @Last Modified time: 2026-03-27 17:32:10
|
||||
*/
|
||||
/**
|
||||
* Copy Application Modal
|
||||
@@ -75,15 +75,15 @@ const FeaturesConfigModal = forwardRef<FeaturesConfigModalRef, FeaturesConfigMod
|
||||
|
||||
const formatFileTypeOptions = (fu: FeaturesConfigForm['file_upload']) => {
|
||||
let options = fu.document_enabled ? [{ type: 'document', enabled: fu.document_enabled, maxSize: fu.document_max_size_mb }] : []
|
||||
if (!capability) return options
|
||||
if (!capability && source !== 'workflow') return options
|
||||
|
||||
if ((capability.includes('vision') || source === 'workflow') && fu.image_enabled) {
|
||||
if ((capability?.includes('vision') || source === 'workflow') && fu.image_enabled) {
|
||||
options.push({ type: 'image', enabled: fu.image_enabled, maxSize: fu.image_max_size_mb })
|
||||
}
|
||||
if ((capability.includes('audio') || source === 'workflow') && fu.audio_enabled) {
|
||||
if ((capability?.includes('audio') || source === 'workflow') && fu.audio_enabled) {
|
||||
options.push({ type: 'audio', enabled: fu.audio_enabled, maxSize: fu.audio_max_size_mb })
|
||||
}
|
||||
if ((capability.includes('video') || source === 'workflow') && fu.video_enabled) {
|
||||
if ((capability?.includes('video') || source === 'workflow') && fu.video_enabled) {
|
||||
options.push({ type: 'video', enabled: fu.video_enabled, maxSize: fu.video_max_size_mb })
|
||||
}
|
||||
return options.filter(item => item.enabled)
|
||||
|
||||
Reference in New Issue
Block a user