From 7a1d6fe50984cb9b59a7f3275ace2eed49c98753 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Mon, 21 Oct 2024 10:32:37 +0800 Subject: [PATCH] Feat/attachments (#9526) Co-authored-by: Joel Co-authored-by: JzoNg --- .../[appId]/annotations/page.tsx | 2 +- .../(appDetailLayout)/[appId]/logs/page.tsx | 2 +- .../[appId]/overview/tracing/field.tsx | 6 +- web/app/(commonLayout)/apps/Apps.tsx | 11 +- web/app/(commonLayout)/datasets/Container.tsx | 2 +- .../app/annotation/empty-element.tsx | 6 +- web/app/components/app/annotation/filter.tsx | 32 +- web/app/components/app/annotation/index.tsx | 6 +- web/app/components/app/annotation/list.tsx | 31 +- .../app/annotation/style.module.css | 6 - .../app/app-publisher/features-wrapper.tsx | 86 ++++ .../base/feature-panel/index.tsx | 21 +- .../conversation-history/history-panel.tsx | 2 +- .../config-var/config-modal/field.tsx | 7 +- .../config-var/config-modal/index.tsx | 95 +++- .../config-var/config-string/index.tsx | 4 +- .../app/configuration/config-var/index.tsx | 2 +- .../config-var/select-type-item/index.tsx | 14 +- .../select-type-item/style.module.css | 40 -- .../app/configuration/config-vision/index.tsx | 116 +++-- .../config-vision/param-config-content.tsx | 219 +++++----- .../config-vision/param-config.tsx | 6 +- .../config-vision/radio-group/index.tsx | 40 -- .../radio-group/style.module.css | 24 -- .../config-voice/param-config-content.tsx | 220 ---------- .../config-voice/param-config.tsx | 41 -- .../config/agent/agent-tools/index.tsx | 2 +- .../config/automatic/get-automatic-res.tsx | 26 +- .../config/feature/add-feature-btn/index.tsx | 40 -- .../choose-feature/feature-item/index.tsx | 52 --- .../feature-item/preview-imgs/citation.png | Bin 29852 -> 0 bytes .../feature-item/preview-imgs/citation.svg | 150 ------- .../citations-and-attributions-preview@2x.png | Bin 20827 -> 0 bytes .../conversation-opener-preview@2x.png | Bin 14409 -> 0 bytes .../more-like-this-preview@2x.png | Bin 19839 -> 0 bytes .../preview-imgs/more-like-this.png | Bin 30202 -> 0 bytes .../preview-imgs/more-like-this.svg | 188 -------- .../next-question-suggestion-preview@2x.png | Bin 28325 -> 0 bytes .../preview-imgs/opening-statement.png | Bin 19955 -> 0 bytes .../opening-suggestion-preview@2x.png | Bin 24140 -> 0 bytes .../speech-to-text-preview@2x.png | Bin 16929 -> 0 bytes .../preview-imgs/speech-to-text.png | Bin 24529 -> 0 bytes .../preview-imgs/speech-to-text.svg | 100 ----- .../suggested-questions-after-answer.png | Bin 42447 -> 0 bytes .../suggested-questions-after-answer.svg | 163 ------- .../text-to-audio-preview-assistant@2x.png | Bin 23500 -> 0 bytes .../text-to-audio-preview-completion@2x.png | Bin 18462 -> 0 bytes .../feature-item/style.module.css | 41 -- .../config/feature/choose-feature/index.tsx | 172 -------- .../config/feature/feature-group/index.tsx | 31 -- .../app/configuration/config/index.tsx | 231 +--------- .../configuration/dataset-config/index.tsx | 2 +- .../dataset-config/settings-modal/index.tsx | 10 +- .../configuration/debug/chat-user-input.tsx | 109 +++++ .../debug-with-multiple-model/chat-item.tsx | 32 +- .../debug/debug-with-multiple-model/index.tsx | 45 +- .../text-generation-item.tsx | 25 +- .../debug/debug-with-single-model/index.tsx | 45 +- .../app/configuration/debug/index.tsx | 203 +++++---- .../features/chat-group/citation/index.tsx | 25 -- .../features/chat-group/index.tsx | 65 --- .../chat-group/speech-to-text/index.tsx | 25 -- .../index.tsx | 34 -- .../chat-group/text-to-speech/index.tsx | 55 --- .../components/app/configuration/index.tsx | 405 ++++++++++-------- .../prompt-value-panel/index.tsx | 294 ++++++------- .../configuration/prompt-value-panel/utils.ts | 13 + .../toolbox/moderation/index.tsx | 80 ---- .../tools/external-data-tool-modal.tsx | 2 +- .../components/app/create-app-modal/index.tsx | 10 +- .../app/create-from-dsl-modal/index.tsx | 4 +- .../components/app/duplicate-modal/index.tsx | 5 +- .../components/app/log-annotation/index.tsx | 4 +- web/app/components/app/log/filter.tsx | 80 ++-- web/app/components/app/log/index.tsx | 10 +- web/app/components/app/log/list.tsx | 68 +-- web/app/components/app/log/style.module.css | 6 - .../app/overview/settings/index.tsx | 28 +- .../app/overview/settings/style.module.css | 5 - web/app/components/app/store.ts | 4 + .../components/app/switch-app-modal/index.tsx | 10 +- .../app/text-generate/item/index.tsx | 4 +- .../app/text-generate/item/result-tab.tsx | 31 +- .../components/app/workflow-log/detail.tsx | 6 +- .../components/app/workflow-log/filter.tsx | 64 ++- web/app/components/app/workflow-log/index.tsx | 12 +- web/app/components/app/workflow-log/list.tsx | 64 +-- .../app/workflow-log/style.module.css | 6 - web/app/components/base/button/add-button.tsx | 4 +- .../chat/chat-with-history/chat-wrapper.tsx | 60 ++- .../config-panel/form-input.tsx | 5 +- .../chat-with-history/config-panel/form.tsx | 38 +- .../base/chat/chat-with-history/context.tsx | 2 + .../base/chat/chat-with-history/hooks.tsx | 62 ++- .../base/chat/chat-with-history/index.tsx | 2 + .../base/chat/chat/answer/agent-content.tsx | 29 +- .../base/chat/chat/answer/basic-content.tsx | 13 +- .../base/chat/chat/answer/index.tsx | 31 +- .../base/chat/chat/answer/operation.tsx | 2 +- .../base/chat/chat/answer/tool-detail.tsx | 71 +++ .../chat/chat/answer/workflow-process.tsx | 25 +- .../base/chat/chat/chat-input-area/hooks.ts | 47 ++ .../base/chat/chat/chat-input-area/index.tsx | 209 +++++++++ .../chat/chat/chat-input-area/operation.tsx | 76 ++++ .../components/base/chat/chat/chat-input.tsx | 258 ----------- .../base/chat/chat/check-input-forms-hooks.ts | 54 +++ web/app/components/base/chat/chat/context.tsx | 3 - web/app/components/base/chat/chat/hooks.ts | 87 ++-- web/app/components/base/chat/chat/index.tsx | 35 +- .../components/base/chat/chat/question.tsx | 18 +- .../base/chat/chat/thought/index.tsx | 8 +- web/app/components/base/chat/chat/type.ts | 19 +- web/app/components/base/chat/chat/utils.ts | 32 ++ .../chat/embedded-chatbot/chat-wrapper.tsx | 8 +- .../config-panel/form-input.tsx | 5 +- .../embedded-chatbot/config-panel/form.tsx | 50 ++- .../base/chat/embedded-chatbot/context.tsx | 2 + .../base/chat/embedded-chatbot/hooks.tsx | 62 ++- .../base/chat/embedded-chatbot/index.tsx | 2 + web/app/components/base/chat/types.ts | 6 +- web/app/components/base/chat/utils.ts | 7 +- web/app/components/base/chip/index.tsx | 109 +++++ .../feature-choose/feature-group/index.tsx | 31 -- .../feature-choose/feature-item/index.tsx | 96 ----- .../feature-item/preview-imgs/citation.svg | 150 ------- .../citations-and-attributions-preview@2x.png | Bin 20827 -> 0 bytes .../conversation-opener-preview@2x.png | Bin 14409 -> 0 bytes .../more-like-this-preview@2x.png | Bin 19839 -> 0 bytes .../preview-imgs/more-like-this.svg | 188 -------- .../next-question-suggestion-preview@2x.png | Bin 28325 -> 0 bytes .../preview-imgs/opening-statement.png | Bin 19955 -> 0 bytes .../opening-suggestion-preview@2x.png | Bin 24140 -> 0 bytes .../speech-to-text-preview@2x.png | Bin 16929 -> 0 bytes .../preview-imgs/speech-to-text.svg | 100 ----- .../suggested-questions-after-answer.svg | 163 ------- .../text-to-audio-preview-assistant@2x.png | Bin 23500 -> 0 bytes .../text-to-audio-preview-completion@2x.png | Bin 18462 -> 0 bytes .../feature-item/style.module.css | 41 -- .../features/feature-choose/feature-modal.tsx | 147 ------- .../base/features/feature-choose/index.tsx | 42 -- .../features/feature-panel/citation/index.tsx | 25 -- .../feature-panel/file-upload/index.tsx | 63 --- .../file-upload/param-config-content.tsx | 119 ----- .../file-upload/param-config.tsx | 49 --- .../file-upload/radio-group/index.tsx | 40 -- .../file-upload/radio-group/style.module.css | 24 -- .../moderation/form-generation.tsx | 80 ---- .../feature-panel/moderation/index.tsx | 108 ----- .../moderation/moderation-content.tsx | 73 ---- .../moderation/moderation-setting-modal.tsx | 376 ---------------- .../score-slider/base-slider/index.tsx | 38 -- .../score-slider/base-slider/style.module.css | 20 - .../feature-panel/score-slider/index.tsx | 46 -- .../feature-panel/speech-to-text/index.tsx | 22 - .../index.tsx | 25 -- .../feature-panel/text-to-speech/index.tsx | 62 --- .../text-to-speech/param-config-content.tsx | 241 ----------- .../text-to-speech/params-config.tsx | 48 --- web/app/components/base/features/index.tsx | 2 - .../annotation-ctrl-btn/index.tsx | 0 .../annotation-reply}/config-param-modal.tsx | 2 +- .../annotation-reply/config-param.tsx | 24 ++ .../annotation-reply/index.tsx | 152 +++++++ .../score-slider/base-slider/index.tsx | 0 .../score-slider/base-slider/style.module.css | 0 .../annotation-reply}/score-slider/index.tsx | 2 +- .../annotation-reply}/type.ts | 0 .../use-annotation-config.ts | 0 .../features/new-feature-panel/citation.tsx | 56 +++ .../conversation-opener/index.tsx | 119 +++++ .../conversation-opener/modal.tsx | 206 +++++++++ .../new-feature-panel/dialog-wrapper.tsx | 59 +++ .../new-feature-panel/feature-bar.tsx | 145 +++++++ .../new-feature-panel/feature-card.tsx | 61 +++ .../new-feature-panel/file-upload/index.tsx | 105 +++++ .../file-upload/setting-content.tsx | 89 ++++ .../file-upload/setting-modal.tsx | 53 +++ .../features/new-feature-panel/follow-up.tsx | 56 +++ .../new-feature-panel/image-upload/index.tsx | 114 +++++ .../base/features/new-feature-panel/index.tsx | 126 ++++++ .../moderation/form-generation.tsx | 7 +- .../new-feature-panel/moderation/index.tsx | 176 ++++++++ .../moderation/moderation-content.tsx | 0 .../moderation/moderation-setting-modal.tsx | 8 +- .../new-feature-panel/more-like-this.tsx | 57 +++ .../new-feature-panel/speech-to-text.tsx | 56 +++ .../text-to-speech/index.tsx | 102 +++++ .../text-to-speech/param-config-content.tsx | 242 +++++++++++ .../text-to-speech/voice-settings.tsx | 47 ++ web/app/components/base/features/store.ts | 9 +- web/app/components/base/features/types.ts | 25 +- .../base/file-uploader/constants.ts | 3 + .../file-from-link-or-local/index.tsx | 129 ++++++ .../base/file-uploader/file-image-render.tsx | 32 ++ .../base/file-uploader/file-input.tsx | 39 ++ .../base/file-uploader/file-list-in-log.tsx | 86 ++++ .../base/file-uploader/file-type-icon.tsx | 94 ++++ .../file-uploader-in-attachment/file-item.tsx | 139 ++++++ .../file-uploader-in-attachment/index.tsx | 133 ++++++ .../file-image-item.tsx | 109 +++++ .../file-uploader-in-chat-input/file-item.tsx | 115 +++++ .../file-uploader-in-chat-input/file-list.tsx | 81 ++++ .../file-uploader-in-chat-input/index.tsx | 41 ++ .../components/base/file-uploader/hooks.ts | 246 +++++++++++ .../components/base/file-uploader/index.ts | 7 + .../components/base/file-uploader/store.tsx | 67 +++ .../components/base/file-uploader/types.ts | 32 ++ .../components/base/file-uploader/utils.ts | 181 ++++++++ .../public/files/{unknow.svg => unknown.svg} | 0 .../assets/vender/features/citations.svg | 3 + .../vender/features/content-moderation.svg | 3 + .../assets/vender/features/folder-upload.svg | 3 + .../assets/vender/features/love-message.svg | 3 + .../assets/vender/features/message-fast.svg | 3 + .../assets/vender/features/microphone-01.svg | 4 + .../assets/vender/features/text-to-audio.svg | 8 + .../vender/features/virtual-assistant.svg | 4 + .../icons/assets/vender/features/vision.svg | 3 + .../vender/line/others/global-variable.svg | 3 + .../icons/assets/vender/other/replay-line.svg | 5 + .../{cute-robote.svg => cute-robot.svg} | 0 .../assets/vender/workflow/docs-extractor.svg | 9 + .../assets/vender/workflow/list-filter.svg | 5 + .../icons/src/vender/features/Citations.json | 26 ++ .../icons/src/vender/features/Citations.tsx | 16 + .../vender/features/ContentModeration.json | 28 ++ .../src/vender/features/ContentModeration.tsx | 16 + .../src/vender/features/FolderUpload.json | 26 ++ .../src/vender/features/FolderUpload.tsx | 16 + .../src/vender/features/LoveMessage.json | 26 ++ .../icons/src/vender/features/LoveMessage.tsx | 16 + .../src/vender/features/MessageFast.json | 28 ++ .../icons/src/vender/features/MessageFast.tsx | 16 + .../src/vender/features/Microphone01.json | 37 ++ .../src/vender/features/Microphone01.tsx | 16 + .../src/vender/features/TextToAudio.json | 77 ++++ .../icons/src/vender/features/TextToAudio.tsx | 16 + .../src/vender/features/VirtualAssistant.json | 35 ++ .../src/vender/features/VirtualAssistant.tsx | 16 + .../icons/src/vender/features/Vision.json | 28 ++ .../base/icons/src/vender/features/Vision.tsx | 16 + .../base/icons/src/vender/features/index.ts | 9 + .../vender/line/others/GlobalVariable.json | 28 ++ .../src/vender/line/others/GlobalVariable.tsx | 16 + .../icons/src/vender/line/others/index.ts | 1 + .../icons/src/vender/other/ReplayLine.json | 36 ++ .../icons/src/vender/other/ReplayLine.tsx | 16 + .../base/icons/src/vender/other/index.ts | 1 + .../src/vender/workflow/DocsExtractor.json | 64 +++ .../src/vender/workflow/DocsExtractor.tsx | 16 + .../icons/src/vender/workflow/ListFilter.json | 38 ++ .../icons/src/vender/workflow/ListFilter.tsx | 16 + .../base/icons/src/vender/workflow/index.ts | 2 + .../base/image-uploader/image-preview.tsx | 2 +- web/app/components/base/input/index.tsx | 2 +- .../base/message-log-modal/index.tsx | 50 +-- .../base/progress-bar/progress-circle.tsx | 64 +++ .../base/prompt-editor/constants.tsx | 9 +- .../components/base/prompt-editor/index.tsx | 7 +- .../plugins/component-picker-block/index.tsx | 11 +- .../components/base/prompt-editor/utils.ts | 2 +- web/app/components/base/select/index.tsx | 185 +++++--- web/app/components/base/sort/index.tsx | 4 +- web/app/components/base/switch/index.tsx | 2 +- web/app/components/base/tag-input/index.tsx | 4 +- .../components/base/tag-management/filter.tsx | 10 +- .../base/tag-management/selector.tsx | 11 +- .../components/base/text-generation/types.ts | 6 +- web/app/components/base/textarea/index.tsx | 53 +++ .../empty-dataset-creation-modal/index.tsx | 2 +- .../datasets/create/step-two/index.tsx | 48 +-- .../documents/detail/completed/index.tsx | 24 +- .../documents/detail/metadata/index.tsx | 1 - .../components/datasets/documents/index.tsx | 19 +- .../datasets/documents/rename-modal.tsx | 4 +- .../datasets/hit-testing/style.module.css | 4 - .../datasets/hit-testing/textarea.tsx | 2 +- .../datasets/rename-modal/index.tsx | 10 +- .../datasets/settings/form/index.tsx | 20 +- .../settings/permission-selector/index.tsx | 12 +- web/app/components/explore/app-list/index.tsx | 11 +- .../explore/create-app-modal/index.tsx | 10 +- .../model-provider-page/declarations.ts | 1 + .../share/text-generation/result/index.tsx | 8 +- .../share/text-generation/run-once/index.tsx | 19 +- .../components/tools/add-tool-modal/index.tsx | 10 +- .../edit-custom-collection-modal/index.tsx | 22 +- web/app/components/tools/labels/filter.tsx | 10 +- web/app/components/tools/labels/selector.tsx | 12 +- web/app/components/tools/provider-list.tsx | 11 +- web/app/components/tools/utils/index.ts | 6 +- .../components/tools/workflow-tool/index.tsx | 20 +- web/app/components/workflow/block-icon.tsx | 36 +- .../workflow/block-selector/constants.tsx | 10 + .../workflow/block-selector/index.tsx | 39 +- web/app/components/workflow/constants.ts | 72 ++++ web/app/components/workflow/features.tsx | 56 +-- .../header/global-variable-button.tsx | 20 + web/app/components/workflow/header/index.tsx | 1 + .../workflow/hooks/use-config-vision.ts | 88 ++++ .../workflow/hooks/use-nodes-sync-draft.ts | 4 +- .../workflow/hooks/use-workflow-run.ts | 4 + .../components/workflow/hooks/use-workflow.ts | 5 +- web/app/components/workflow/index.tsx | 8 + .../nodes/_base/components/add-button.tsx | 11 +- .../components/before-run-form/form-item.tsx | 60 ++- .../_base/components/before-run-form/form.tsx | 3 +- .../nodes/_base/components/config-vision.tsx | 91 ++++ .../nodes/_base/components/editor/base.tsx | 9 + .../components/editor/code-editor/index.tsx | 15 +- .../workflow/nodes/_base/components/field.tsx | 4 +- .../nodes/_base/components/file-type-item.tsx | 77 ++++ .../_base/components/file-upload-setting.tsx | 185 ++++++++ .../nodes/_base/components/info-panel.tsx | 6 +- .../components/input-number-with-slider.tsx | 65 +++ .../_base/components/input-var-type-icon.tsx | 15 +- .../nodes/_base/components/memory-config.tsx | 12 +- .../nodes/_base/components/node-handle.tsx | 76 ++-- .../nodes/_base/components/prompt/editor.tsx | 3 + .../workflow/nodes/_base/components/split.tsx | 2 +- .../nodes/_base/components/variable-tag.tsx | 4 +- .../components/variable/output-var-list.tsx | 7 +- .../nodes/_base/components/variable/utils.ts | 190 ++++++-- .../_base/components/variable/var-list.tsx | 8 +- .../variable/var-reference-picker.tsx | 236 +++++----- .../variable/var-reference-popup.tsx | 4 +- .../variable/var-reference-vars.tsx | 87 ++-- .../nodes/_base/hooks/use-node-help-link.ts | 22 +- .../nodes/_base/hooks/use-one-step-run.ts | 6 +- .../workflow/nodes/answer/panel.tsx | 1 + .../workflow/nodes/code/dependency-picker.tsx | 85 ++++ .../components/workflow/nodes/constants.ts | 8 + .../nodes/document-extractor/default.ts | 36 ++ .../nodes/document-extractor/node.tsx | 42 ++ .../nodes/document-extractor/panel.tsx | 88 ++++ .../nodes/document-extractor/types.ts | 6 + .../nodes/document-extractor/use-config.ts | 66 +++ .../http/components/authorization/index.tsx | 5 +- .../nodes/http/components/edit-body/index.tsx | 134 ++++-- .../nodes/http/components/key-value/index.tsx | 3 + .../key-value/key-value-edit/index.tsx | 28 +- .../key-value/key-value-edit/input-item.tsx | 8 +- .../key-value/key-value-edit/item.tsx | 79 +++- .../nodes/http/components/timeout/index.tsx | 17 +- .../components/workflow/nodes/http/default.ts | 11 +- .../components/workflow/nodes/http/panel.tsx | 4 + .../components/workflow/nodes/http/types.ts | 19 +- .../workflow/nodes/http/use-config.ts | 34 +- .../components/workflow/nodes/http/utils.ts | 22 +- .../if-else/components/condition-add.tsx | 1 + .../components/condition-files-list-value.tsx | 115 +++++ .../condition-list/condition-item.tsx | 244 +++++++++-- .../condition-list/condition-operator.tsx | 15 +- .../components/condition-list/index.tsx | 95 +++- .../components/condition-number-input.tsx | 35 +- .../if-else/components/condition-value.tsx | 31 +- .../if-else/components/condition-wrap.tsx | 225 ++++++++++ .../workflow/nodes/if-else/default.ts | 37 +- .../workflow/nodes/if-else/node.tsx | 63 ++- .../workflow/nodes/if-else/panel.tsx | 122 ++---- .../workflow/nodes/if-else/types.ts | 19 +- .../workflow/nodes/if-else/use-config.ts | 114 ++++- .../if-else/use-is-var-file-attribute.ts | 45 ++ .../workflow/nodes/if-else/utils.ts | 82 +++- .../workflow/nodes/iteration/use-config.ts | 3 +- .../components/dataset-item.tsx | 2 +- .../nodes/knowledge-retrieval/node.tsx | 4 +- .../components/filter-condition.tsx | 113 +++++ .../list-operator/components/limit-config.tsx | 80 ++++ .../components/sub-variable-picker.tsx | 73 ++++ .../workflow/nodes/list-operator/default.ts | 61 +++ .../workflow/nodes/list-operator/node.tsx | 42 ++ .../workflow/nodes/list-operator/panel.tsx | 153 +++++++ .../workflow/nodes/list-operator/types.ts | 34 ++ .../nodes/list-operator/use-config.ts | 168 ++++++++ .../components/workflow/nodes/llm/default.ts | 2 + .../components/workflow/nodes/llm/panel.tsx | 43 +- .../components/workflow/nodes/llm/types.ts | 7 +- .../workflow/nodes/llm/use-config.ts | 104 ++--- .../components/extract-parameter/update.tsx | 11 +- .../components/reasoning-mode-picker.tsx | 41 +- .../nodes/parameter-extractor/default.ts | 5 + .../nodes/parameter-extractor/panel.tsx | 42 +- .../nodes/parameter-extractor/types.ts | 6 +- .../nodes/parameter-extractor/use-config.ts | 33 +- .../nodes/question-classifier/default.ts | 6 + .../nodes/question-classifier/panel.tsx | 38 +- .../nodes/question-classifier/types.ts | 6 +- .../nodes/question-classifier/use-config.ts | 33 +- .../nodes/start/components/var-item.tsx | 10 + .../components/workflow/nodes/start/panel.tsx | 2 + .../nodes/tool/components/input-var-list.tsx | 23 +- .../components/var-group-item.tsx | 4 +- .../workflow/panel/chat-record/index.tsx | 7 +- .../components/array-value-list.tsx | 4 +- .../components/variable-modal.tsx | 11 +- .../panel/debug-and-preview/chat-wrapper.tsx | 36 +- .../conversation-variable-modal.tsx | 8 +- .../workflow/panel/debug-and-preview/hooks.ts | 42 +- .../panel/debug-and-preview/index.tsx | 7 +- .../panel/debug-and-preview/user-input.tsx | 8 +- .../panel/env-panel/variable-modal.tsx | 9 +- .../panel/global-variable-panel/index.tsx | 56 +++ .../panel/global-variable-panel/item.tsx | 30 ++ web/app/components/workflow/panel/index.tsx | 7 + .../workflow/panel/inputs-panel.tsx | 26 +- web/app/components/workflow/panel/record.tsx | 4 +- .../workflow/panel/workflow-preview.tsx | 10 +- .../workflow/run/assets/bg-line-error.svg | 3 + .../workflow/run/assets/bg-line-running.svg | 3 + .../workflow/run/assets/bg-line-success.svg | 3 + .../workflow/run/assets/bg-line-warning.svg | 3 + .../workflow/run/assets/highlight.svg | 9 + web/app/components/workflow/run/index.tsx | 22 +- .../workflow/run/iteration-result-panel.tsx | 2 +- web/app/components/workflow/run/meta.tsx | 38 +- web/app/components/workflow/run/node.tsx | 28 +- .../components/workflow/run/output-panel.tsx | 7 +- .../components/workflow/run/result-panel.tsx | 4 +- .../components/workflow/run/result-text.tsx | 21 +- .../workflow/run/status-container.tsx | 30 ++ web/app/components/workflow/run/status.tsx | 46 +- web/app/components/workflow/store.ts | 15 + web/app/components/workflow/types.ts | 40 +- .../components/workflow/update-dsl-modal.tsx | 30 +- web/context/debug-configuration.ts | 9 +- web/context/modal-context.tsx | 41 +- web/i18n/en-US/app-debug.ts | 70 ++- web/i18n/en-US/common.ts | 15 + web/i18n/en-US/tools.ts | 4 +- web/i18n/en-US/workflow.ts | 51 +++ web/i18n/zh-Hans/app-debug.ts | 62 ++- web/i18n/zh-Hans/common.ts | 15 + web/i18n/zh-Hans/tools.ts | 4 +- web/i18n/zh-Hans/workflow.ts | 51 +++ web/models/debug.ts | 4 + web/package.json | 1 + web/service/common.ts | 3 + web/tailwind.config.js | 5 + web/themes/dark.css | 4 + web/themes/light.css | 4 + web/types/app.ts | 6 +- web/types/workflow.ts | 14 + web/utils/model-config.ts | 34 ++ web/yarn.lock | 5 + 445 files changed, 11759 insertions(+), 6922 deletions(-) create mode 100644 web/app/components/app/app-publisher/features-wrapper.tsx delete mode 100644 web/app/components/app/configuration/config-var/select-type-item/style.module.css delete mode 100644 web/app/components/app/configuration/config-vision/radio-group/index.tsx delete mode 100644 web/app/components/app/configuration/config-vision/radio-group/style.module.css delete mode 100644 web/app/components/app/configuration/config-voice/param-config-content.tsx delete mode 100644 web/app/components/app/configuration/config-voice/param-config.tsx delete mode 100644 web/app/components/app/configuration/config/feature/add-feature-btn/index.tsx delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/index.tsx delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/citation.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/citation.svg delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/citations-and-attributions-preview@2x.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/conversation-opener-preview@2x.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/more-like-this-preview@2x.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/more-like-this.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/more-like-this.svg delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/next-question-suggestion-preview@2x.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/opening-statement.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/opening-suggestion-preview@2x.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/speech-to-text-preview@2x.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/speech-to-text.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/speech-to-text.svg delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/suggested-questions-after-answer.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/suggested-questions-after-answer.svg delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/text-to-audio-preview-assistant@2x.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/preview-imgs/text-to-audio-preview-completion@2x.png delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/feature-item/style.module.css delete mode 100644 web/app/components/app/configuration/config/feature/choose-feature/index.tsx delete mode 100644 web/app/components/app/configuration/config/feature/feature-group/index.tsx create mode 100644 web/app/components/app/configuration/debug/chat-user-input.tsx delete mode 100644 web/app/components/app/configuration/features/chat-group/citation/index.tsx delete mode 100644 web/app/components/app/configuration/features/chat-group/index.tsx delete mode 100644 web/app/components/app/configuration/features/chat-group/speech-to-text/index.tsx delete mode 100644 web/app/components/app/configuration/features/chat-group/suggested-questions-after-answer/index.tsx delete mode 100644 web/app/components/app/configuration/features/chat-group/text-to-speech/index.tsx create mode 100644 web/app/components/app/configuration/prompt-value-panel/utils.ts delete mode 100644 web/app/components/app/configuration/toolbox/moderation/index.tsx create mode 100644 web/app/components/base/chat/chat/answer/tool-detail.tsx create mode 100644 web/app/components/base/chat/chat/chat-input-area/hooks.ts create mode 100644 web/app/components/base/chat/chat/chat-input-area/index.tsx create mode 100644 web/app/components/base/chat/chat/chat-input-area/operation.tsx delete mode 100644 web/app/components/base/chat/chat/chat-input.tsx create mode 100644 web/app/components/base/chat/chat/check-input-forms-hooks.ts create mode 100644 web/app/components/base/chat/chat/utils.ts create mode 100644 web/app/components/base/chip/index.tsx delete mode 100644 web/app/components/base/features/feature-choose/feature-group/index.tsx delete mode 100644 web/app/components/base/features/feature-choose/feature-item/index.tsx delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/citation.svg delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/citations-and-attributions-preview@2x.png delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/conversation-opener-preview@2x.png delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/more-like-this-preview@2x.png delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/more-like-this.svg delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/next-question-suggestion-preview@2x.png delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/opening-statement.png delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/opening-suggestion-preview@2x.png delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/speech-to-text-preview@2x.png delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/speech-to-text.svg delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/suggested-questions-after-answer.svg delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/text-to-audio-preview-assistant@2x.png delete mode 100644 web/app/components/base/features/feature-choose/feature-item/preview-imgs/text-to-audio-preview-completion@2x.png delete mode 100644 web/app/components/base/features/feature-choose/feature-item/style.module.css delete mode 100644 web/app/components/base/features/feature-choose/feature-modal.tsx delete mode 100644 web/app/components/base/features/feature-choose/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/citation/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/file-upload/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/file-upload/param-config-content.tsx delete mode 100644 web/app/components/base/features/feature-panel/file-upload/param-config.tsx delete mode 100644 web/app/components/base/features/feature-panel/file-upload/radio-group/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/file-upload/radio-group/style.module.css delete mode 100644 web/app/components/base/features/feature-panel/moderation/form-generation.tsx delete mode 100644 web/app/components/base/features/feature-panel/moderation/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/moderation/moderation-content.tsx delete mode 100644 web/app/components/base/features/feature-panel/moderation/moderation-setting-modal.tsx delete mode 100644 web/app/components/base/features/feature-panel/score-slider/base-slider/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/score-slider/base-slider/style.module.css delete mode 100644 web/app/components/base/features/feature-panel/score-slider/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/speech-to-text/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/suggested-questions-after-answer/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/text-to-speech/index.tsx delete mode 100644 web/app/components/base/features/feature-panel/text-to-speech/param-config-content.tsx delete mode 100644 web/app/components/base/features/feature-panel/text-to-speech/params-config.tsx rename web/app/components/{app/configuration/toolbox/annotation => base/features/new-feature-panel/annotation-reply}/annotation-ctrl-btn/index.tsx (100%) rename web/app/components/{app/configuration/toolbox/annotation => base/features/new-feature-panel/annotation-reply}/config-param-modal.tsx (99%) create mode 100644 web/app/components/base/features/new-feature-panel/annotation-reply/config-param.tsx create mode 100644 web/app/components/base/features/new-feature-panel/annotation-reply/index.tsx rename web/app/components/{app/configuration/toolbox => base/features/new-feature-panel/annotation-reply}/score-slider/base-slider/index.tsx (100%) rename web/app/components/{app/configuration/toolbox => base/features/new-feature-panel/annotation-reply}/score-slider/base-slider/style.module.css (100%) rename web/app/components/{app/configuration/toolbox => base/features/new-feature-panel/annotation-reply}/score-slider/index.tsx (90%) rename web/app/components/{app/configuration/toolbox/annotation => base/features/new-feature-panel/annotation-reply}/type.ts (100%) rename web/app/components/{app/configuration/toolbox/annotation => base/features/new-feature-panel/annotation-reply}/use-annotation-config.ts (100%) create mode 100644 web/app/components/base/features/new-feature-panel/citation.tsx create mode 100644 web/app/components/base/features/new-feature-panel/conversation-opener/index.tsx create mode 100644 web/app/components/base/features/new-feature-panel/conversation-opener/modal.tsx create mode 100644 web/app/components/base/features/new-feature-panel/dialog-wrapper.tsx create mode 100644 web/app/components/base/features/new-feature-panel/feature-bar.tsx create mode 100644 web/app/components/base/features/new-feature-panel/feature-card.tsx create mode 100644 web/app/components/base/features/new-feature-panel/file-upload/index.tsx create mode 100644 web/app/components/base/features/new-feature-panel/file-upload/setting-content.tsx create mode 100644 web/app/components/base/features/new-feature-panel/file-upload/setting-modal.tsx create mode 100644 web/app/components/base/features/new-feature-panel/follow-up.tsx create mode 100644 web/app/components/base/features/new-feature-panel/image-upload/index.tsx create mode 100644 web/app/components/base/features/new-feature-panel/index.tsx rename web/app/components/{app/configuration/toolbox => base/features/new-feature-panel}/moderation/form-generation.tsx (91%) create mode 100644 web/app/components/base/features/new-feature-panel/moderation/index.tsx rename web/app/components/{app/configuration/toolbox => base/features/new-feature-panel}/moderation/moderation-content.tsx (100%) rename web/app/components/{app/configuration/toolbox => base/features/new-feature-panel}/moderation/moderation-setting-modal.tsx (97%) create mode 100644 web/app/components/base/features/new-feature-panel/more-like-this.tsx create mode 100644 web/app/components/base/features/new-feature-panel/speech-to-text.tsx create mode 100644 web/app/components/base/features/new-feature-panel/text-to-speech/index.tsx create mode 100644 web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx create mode 100644 web/app/components/base/features/new-feature-panel/text-to-speech/voice-settings.tsx create mode 100644 web/app/components/base/file-uploader/constants.ts create mode 100644 web/app/components/base/file-uploader/file-from-link-or-local/index.tsx create mode 100644 web/app/components/base/file-uploader/file-image-render.tsx create mode 100644 web/app/components/base/file-uploader/file-input.tsx create mode 100644 web/app/components/base/file-uploader/file-list-in-log.tsx create mode 100644 web/app/components/base/file-uploader/file-type-icon.tsx create mode 100644 web/app/components/base/file-uploader/file-uploader-in-attachment/file-item.tsx create mode 100644 web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx create mode 100644 web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.tsx create mode 100644 web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.tsx create mode 100644 web/app/components/base/file-uploader/file-uploader-in-chat-input/file-list.tsx create mode 100644 web/app/components/base/file-uploader/file-uploader-in-chat-input/index.tsx create mode 100644 web/app/components/base/file-uploader/hooks.ts create mode 100644 web/app/components/base/file-uploader/index.ts create mode 100644 web/app/components/base/file-uploader/store.tsx create mode 100644 web/app/components/base/file-uploader/types.ts create mode 100644 web/app/components/base/file-uploader/utils.ts rename web/app/components/base/icons/assets/public/files/{unknow.svg => unknown.svg} (100%) create mode 100644 web/app/components/base/icons/assets/vender/features/citations.svg create mode 100644 web/app/components/base/icons/assets/vender/features/content-moderation.svg create mode 100644 web/app/components/base/icons/assets/vender/features/folder-upload.svg create mode 100644 web/app/components/base/icons/assets/vender/features/love-message.svg create mode 100644 web/app/components/base/icons/assets/vender/features/message-fast.svg create mode 100644 web/app/components/base/icons/assets/vender/features/microphone-01.svg create mode 100644 web/app/components/base/icons/assets/vender/features/text-to-audio.svg create mode 100644 web/app/components/base/icons/assets/vender/features/virtual-assistant.svg create mode 100644 web/app/components/base/icons/assets/vender/features/vision.svg create mode 100644 web/app/components/base/icons/assets/vender/line/others/global-variable.svg create mode 100644 web/app/components/base/icons/assets/vender/other/replay-line.svg rename web/app/components/base/icons/assets/vender/solid/communication/{cute-robote.svg => cute-robot.svg} (100%) create mode 100644 web/app/components/base/icons/assets/vender/workflow/docs-extractor.svg create mode 100644 web/app/components/base/icons/assets/vender/workflow/list-filter.svg create mode 100644 web/app/components/base/icons/src/vender/features/Citations.json create mode 100644 web/app/components/base/icons/src/vender/features/Citations.tsx create mode 100644 web/app/components/base/icons/src/vender/features/ContentModeration.json create mode 100644 web/app/components/base/icons/src/vender/features/ContentModeration.tsx create mode 100644 web/app/components/base/icons/src/vender/features/FolderUpload.json create mode 100644 web/app/components/base/icons/src/vender/features/FolderUpload.tsx create mode 100644 web/app/components/base/icons/src/vender/features/LoveMessage.json create mode 100644 web/app/components/base/icons/src/vender/features/LoveMessage.tsx create mode 100644 web/app/components/base/icons/src/vender/features/MessageFast.json create mode 100644 web/app/components/base/icons/src/vender/features/MessageFast.tsx create mode 100644 web/app/components/base/icons/src/vender/features/Microphone01.json create mode 100644 web/app/components/base/icons/src/vender/features/Microphone01.tsx create mode 100644 web/app/components/base/icons/src/vender/features/TextToAudio.json create mode 100644 web/app/components/base/icons/src/vender/features/TextToAudio.tsx create mode 100644 web/app/components/base/icons/src/vender/features/VirtualAssistant.json create mode 100644 web/app/components/base/icons/src/vender/features/VirtualAssistant.tsx create mode 100644 web/app/components/base/icons/src/vender/features/Vision.json create mode 100644 web/app/components/base/icons/src/vender/features/Vision.tsx create mode 100644 web/app/components/base/icons/src/vender/features/index.ts create mode 100644 web/app/components/base/icons/src/vender/line/others/GlobalVariable.json create mode 100644 web/app/components/base/icons/src/vender/line/others/GlobalVariable.tsx create mode 100644 web/app/components/base/icons/src/vender/other/ReplayLine.json create mode 100644 web/app/components/base/icons/src/vender/other/ReplayLine.tsx create mode 100644 web/app/components/base/icons/src/vender/workflow/DocsExtractor.json create mode 100644 web/app/components/base/icons/src/vender/workflow/DocsExtractor.tsx create mode 100644 web/app/components/base/icons/src/vender/workflow/ListFilter.json create mode 100644 web/app/components/base/icons/src/vender/workflow/ListFilter.tsx create mode 100644 web/app/components/base/progress-bar/progress-circle.tsx create mode 100644 web/app/components/base/textarea/index.tsx create mode 100644 web/app/components/workflow/header/global-variable-button.tsx create mode 100644 web/app/components/workflow/hooks/use-config-vision.ts create mode 100644 web/app/components/workflow/nodes/_base/components/config-vision.tsx create mode 100644 web/app/components/workflow/nodes/_base/components/file-type-item.tsx create mode 100644 web/app/components/workflow/nodes/_base/components/file-upload-setting.tsx create mode 100644 web/app/components/workflow/nodes/_base/components/input-number-with-slider.tsx create mode 100644 web/app/components/workflow/nodes/code/dependency-picker.tsx create mode 100644 web/app/components/workflow/nodes/document-extractor/default.ts create mode 100644 web/app/components/workflow/nodes/document-extractor/node.tsx create mode 100644 web/app/components/workflow/nodes/document-extractor/panel.tsx create mode 100644 web/app/components/workflow/nodes/document-extractor/types.ts create mode 100644 web/app/components/workflow/nodes/document-extractor/use-config.ts create mode 100644 web/app/components/workflow/nodes/if-else/components/condition-files-list-value.tsx create mode 100644 web/app/components/workflow/nodes/if-else/components/condition-wrap.tsx create mode 100644 web/app/components/workflow/nodes/if-else/use-is-var-file-attribute.ts create mode 100644 web/app/components/workflow/nodes/list-operator/components/filter-condition.tsx create mode 100644 web/app/components/workflow/nodes/list-operator/components/limit-config.tsx create mode 100644 web/app/components/workflow/nodes/list-operator/components/sub-variable-picker.tsx create mode 100644 web/app/components/workflow/nodes/list-operator/default.ts create mode 100644 web/app/components/workflow/nodes/list-operator/node.tsx create mode 100644 web/app/components/workflow/nodes/list-operator/panel.tsx create mode 100644 web/app/components/workflow/nodes/list-operator/types.ts create mode 100644 web/app/components/workflow/nodes/list-operator/use-config.ts create mode 100644 web/app/components/workflow/panel/global-variable-panel/index.tsx create mode 100644 web/app/components/workflow/panel/global-variable-panel/item.tsx create mode 100644 web/app/components/workflow/run/assets/bg-line-error.svg create mode 100644 web/app/components/workflow/run/assets/bg-line-running.svg create mode 100644 web/app/components/workflow/run/assets/bg-line-success.svg create mode 100644 web/app/components/workflow/run/assets/bg-line-warning.svg create mode 100644 web/app/components/workflow/run/assets/highlight.svg create mode 100644 web/app/components/workflow/run/status-container.tsx diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/annotations/page.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/annotations/page.tsx index 314b481699..0af2e945f3 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/annotations/page.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/annotations/page.tsx @@ -1,6 +1,6 @@ import React from 'react' import Main from '@/app/components/app/log-annotation' -import { PageType } from '@/app/components/app/configuration/toolbox/annotation/type' +import { PageType } from '@/app/components/base/features/new-feature-panel/annotation-reply/type' export type IProps = { params: { appId: string } diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/logs/page.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/logs/page.tsx index 47ba846be1..244a357616 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/logs/page.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/logs/page.tsx @@ -1,6 +1,6 @@ import React from 'react' import Main from '@/app/components/app/log-annotation' -import { PageType } from '@/app/components/app/configuration/toolbox/annotation/type' +import { PageType } from '@/app/components/base/features/new-feature-panel/annotation-reply/type' const Logs = async () => { return ( diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/field.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/field.tsx index 287039fd9c..87c84948be 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/field.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/field.tsx @@ -2,6 +2,7 @@ import type { FC } from 'react' import React from 'react' import cn from '@/utils/classnames' +import Input from '@/app/components/base/input' type Props = { className?: string @@ -28,11 +29,10 @@ const Field: FC = ({
{label}
{isRequired && *} - onChange(e.target.value)} - className='flex h-9 w-full py-1 px-2 rounded-lg text-xs leading-normal bg-gray-100 caret-primary-600 hover:bg-gray-100 focus:ring-1 focus:ring-inset focus:ring-gray-200 focus-visible:outline-none focus:bg-gray-50 placeholder:text-gray-400' + className='h-9' placeholder={placeholder} /> diff --git a/web/app/(commonLayout)/apps/Apps.tsx b/web/app/(commonLayout)/apps/Apps.tsx index accf6c67f2..9d6345aa6c 100644 --- a/web/app/(commonLayout)/apps/Apps.tsx +++ b/web/app/(commonLayout)/apps/Apps.tsx @@ -21,7 +21,7 @@ import { NEED_REFRESH_APP_LIST_KEY } from '@/config' import { CheckModal } from '@/hooks/use-pay' import TabSliderNew from '@/app/components/base/tab-slider-new' import { useTabSearchParams } from '@/hooks/use-tab-searchparams' -import SearchInput from '@/app/components/base/search-input' +import Input from '@/app/components/base/input' import { useStore as useTagStore } from '@/app/components/base/tag-management/store' import TagManagementModal from '@/app/components/base/tag-management' import TagFilter from '@/app/components/base/tag-management/filter' @@ -133,7 +133,14 @@ const Apps = () => { />
- + handleKeywordsChange(e.target.value)} + onClear={() => handleKeywordsChange('')} + />