From 738d3001be38cdbe2ac77593d8e950fe58704c5d Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 15 Oct 2025 14:45:54 +0800 Subject: [PATCH] chore: chat input and feature readonly --- .../debug/debug-with-single-model/index.tsx | 2 ++ web/app/components/base/action-button/index.tsx | 3 ++- .../base/chat/chat/chat-input-area/index.tsx | 14 ++++++++++++-- .../base/chat/chat/chat-input-area/operation.tsx | 11 ++++++++--- web/app/components/base/chat/chat/context.tsx | 7 ++++++- web/app/components/base/chat/chat/index.tsx | 4 ++++ .../features/new-feature-panel/feature-bar.tsx | 14 ++++++++++---- .../file-uploader-in-chat-input/index.tsx | 6 ++++++ web/i18n/en-US/common.ts | 1 + web/i18n/zh-Hans/common.ts | 1 + 10 files changed, 52 insertions(+), 11 deletions(-) diff --git a/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx b/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx index d439b00939..503aefc4fb 100644 --- a/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx +++ b/web/app/components/app/configuration/debug/debug-with-single-model/index.tsx @@ -39,6 +39,7 @@ const DebugWithSingleModel = ( ) => { const { userProfile } = useAppContext() const { + readonly, modelConfig, appId, inputs, @@ -154,6 +155,7 @@ const DebugWithSingleModel = ( return ( { +const ActionButton = ({ className, size, state = ActionButtonState.Default, styleCss, children, ref, disabled, ...props }: ActionButtonProps) => { return ( + { + !hideEditEntrance && ( + + ) + } )} diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.tsx index 7e6e190ddb..91d6f22ef2 100644 --- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.tsx +++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.tsx @@ -13,21 +13,27 @@ import { TransferMethod } from '@/types/app' type FileUploaderInChatInputProps = { fileConfig: FileUpload + readonly?: boolean } const FileUploaderInChatInput = ({ fileConfig, + readonly, }: FileUploaderInChatInputProps) => { const renderTrigger = useCallback((open: boolean) => { return ( ) }, []) + if(readonly) + return renderTrigger(false) + return (