diff --git a/frontend/src/components/workspace/input-box.tsx b/frontend/src/components/workspace/input-box.tsx index 3f38a73f..4e350a4f 100644 --- a/frontend/src/components/workspace/input-box.tsx +++ b/frontend/src/components/workspace/input-box.tsx @@ -970,6 +970,14 @@ export function InputBox({ /> )} + {!showWelcomeStyle && ( +
+ +
+ )}
@@ -1292,6 +1300,53 @@ function HistoryButton({ ); } + +function ExitChattingButton({ + className, + router, + threadId, +}: { + className?: string; + router: AppRouterInstance; + threadId: string; +}) { + const { t } = useI18n(); + return ( + + + router.replace(`/workspace/chats/${threadId}?is_chatting=false`) + } + > + + + + + + + ); +} // 启动iframeSkillDialog function IframeSkillDialogButton({ className, diff --git a/frontend/src/components/workspace/messages/message-list-item.tsx b/frontend/src/components/workspace/messages/message-list-item.tsx index 9e76aae8..c045b9a7 100644 --- a/frontend/src/components/workspace/messages/message-list-item.tsx +++ b/frontend/src/components/workspace/messages/message-list-item.tsx @@ -39,7 +39,6 @@ import { } from "@/core/messages/utils"; import { useRehypeSplitWordsIntoSpans } from "@/core/rehype"; import { materializeSkillYaml } from "@/core/skills"; -import { humanMessagePlugins } from "@/core/streamdown"; import { dispatchMentionReference } from "@/core/threads/reference-events"; import { cn } from "@/lib/utils"; @@ -225,13 +224,9 @@ function MessageContent_({ if (isHuman) { const shouldRenderSummaryCollapse = isSummaryMessage && summaryBody; const messageResponse = contentToDisplay ? ( - +
{contentToDisplay} - +
) : null; return (
@@ -250,13 +245,9 @@ function MessageContent_({ : t.toolCalls.expandContent} - +
{summaryBody} - +
)} diff --git a/frontend/src/core/artifacts/references.ts b/frontend/src/core/artifacts/references.ts index e3371396..dc263308 100644 --- a/frontend/src/core/artifacts/references.ts +++ b/frontend/src/core/artifacts/references.ts @@ -32,7 +32,6 @@ export function useReferenceFiles(threadId: string | undefined) { queryKey: ["references", "list", threadId], queryFn: () => listReferenceFiles(threadId ?? ""), enabled: Boolean(threadId), - refetchInterval: 5000, - refetchOnWindowFocus: true, + refetchOnWindowFocus: false, }); } diff --git a/frontend/src/core/i18n/locales/en-US.ts b/frontend/src/core/i18n/locales/en-US.ts index f4ef480f..86a3894a 100644 --- a/frontend/src/core/i18n/locales/en-US.ts +++ b/frontend/src/core/i18n/locales/en-US.ts @@ -86,6 +86,7 @@ export const enUS: Translations = { "Please note, this feature will consume tokens. Ensure your account balance is greater than 200 credits.", addAttachments: "Add attachments", history: "History", + welcome:"Welcome", selectSkill: "Select Skill", mode: "Mode", flashMode: "Flash", diff --git a/frontend/src/core/i18n/locales/types.ts b/frontend/src/core/i18n/locales/types.ts index 654f0ee6..ebd22bb6 100644 --- a/frontend/src/core/i18n/locales/types.ts +++ b/frontend/src/core/i18n/locales/types.ts @@ -75,6 +75,7 @@ export interface Translations { createSkillPrompt: string; addAttachments: string; history: string; + welcome:string; selectSkill: string; mode: string; flashMode: string; diff --git a/frontend/src/core/i18n/locales/zh-CN.ts b/frontend/src/core/i18n/locales/zh-CN.ts index 9d69a271..3a726e93 100644 --- a/frontend/src/core/i18n/locales/zh-CN.ts +++ b/frontend/src/core/i18n/locales/zh-CN.ts @@ -87,6 +87,7 @@ export const zhCN: Translations = { "请注意,此功能将消耗token,请保证账户余额大于200可学豆。", addAttachments: "添加附件", history: "历史记录", + welcome:"欢迎页", selectSkill: "选择Skill", mode: "模式", flashMode: "闪速", @@ -262,7 +263,7 @@ export const zhCN: Translations = { noArtifactSelectedDescription: "请选择一个生成文件以查看详情", exitDialogTitle: "提示", exitDialogDescription: - "历史记录每七天自动删除,现在将返回欢迎页,是否继续?", + "每七天自动删除。现在将返回欢迎页且清空聊天消息,是否继续?", exitDialogConfirm: "确定", selectedSkillLoadFailed: "技能加载失败", unknownErrorRetry: "发生了未知错误,请稍后重试。", diff --git a/frontend/src/core/messages/utils.ts b/frontend/src/core/messages/utils.ts index c682fc39..d0f15f94 100644 --- a/frontend/src/core/messages/utils.ts +++ b/frontend/src/core/messages/utils.ts @@ -414,12 +414,9 @@ export function stripPriorityHintSuffix(content: string): string { * - Split Chinese-numbered items (e.g. "1)...") into separate paragraphs. */ export function normalizeHumanMessageDisplayText(content: string): string { - return content - .replace(/\\n/g, "\n") - .replace(/\r\n?/g, "\n") - .replace(/\n(?=\d+[))]\s*)/g, "\n\n") - .replace(/\n{3,}/g, "\n\n") - .trim(); + // Preserve human input as-is for display; only decode escaped newlines + // and normalize CRLF/CR to LF so line breaks render consistently. + return content.replace(/\\n/g, "\n").replace(/\r\n?/g, "\n"); } export function parseUploadedFiles(content: string): FileInMessage[] {