diff --git a/app/service/Interaction/templateStoryService.ts b/app/service/Interaction/templateStoryService.ts index b7fa795..8357268 100644 --- a/app/service/Interaction/templateStoryService.ts +++ b/app/service/Interaction/templateStoryService.ts @@ -192,7 +192,7 @@ export const useTemplateStoryServiceHook = (): UseTemplateStoryService => { ...selectedTemplate, fillable_content: selectedTemplate.fillable_content.map((field) => field.field_name === fieldName - ? { ...field, field_value: fieldValue } + ? { ...field, value: fieldValue } : field ), }; diff --git a/app/service/domain/Entities.ts b/app/service/domain/Entities.ts index 9c17320..98d492a 100644 --- a/app/service/domain/Entities.ts +++ b/app/service/domain/Entities.ts @@ -168,6 +168,8 @@ export interface StoryTemplateEntity { field_type: string; /** 字段值 */ field_value?: string; + /** 前端展示,无关后端的字段值 */ + value?: string; /** 字段描述 */ field_description?: string; /** 字段元数据 */ diff --git a/components/ChatInputBox/ChatInputBox.tsx b/components/ChatInputBox/ChatInputBox.tsx index 40b7cd1..a69ace9 100644 --- a/components/ChatInputBox/ChatInputBox.tsx +++ b/components/ChatInputBox/ChatInputBox.tsx @@ -18,7 +18,15 @@ import { Sparkles, Settings, } from "lucide-react"; -import { Dropdown, Modal, Tooltip, Upload, Popconfirm, Image } from "antd"; +import { + Dropdown, + Modal, + Tooltip, + Upload, + Popconfirm, + Image, + Popover, +} from "antd"; import { UploadOutlined } from "@ant-design/icons"; import { StoryTemplateEntity } from "@/app/service/domain/Entities"; import { useImageStoryServiceHook } from "@/app/service/Interaction/ImageStoryService"; @@ -229,30 +237,31 @@ const RenderTemplateStoryMode = ({