diff --git a/src/components/Conversation.tsx b/src/components/Conversation.tsx index de132d7..77e5075 100644 --- a/src/components/Conversation.tsx +++ b/src/components/Conversation.tsx @@ -165,29 +165,6 @@ function ProcessCollapse({ parts, idKey }: { parts: Part[]; idKey: string }) { ) } -// 长回复折叠阈值(CF0):终态后超长正文收成摘要行,点击展开全文;live 期间全文可见。 -const LONG_REPLY_CHARS = 800 - -function LongReplyCollapse({ text, idKey }: { text: string; idKey: string }) { - // 摘句取压缩空白后的前 100 字;字数按 Markdown 源码长度计。 - const excerpt = text.replace(/\s+/g, ' ').trim().slice(0, 100) - return ( -
- - ▸ - 📄 长回复 - {text.length} 字(按 Markdown 源码计) - {excerpt && {excerpt}…} - }> -
-
-
- -
- ) -} - // 已工作计时(ZCode「已工作 X 分 X 秒」摘要行;1s 步进,仅 live 期间挂载)。 function useElapsed(startedAt: number): string { const [, tick] = useState(0) @@ -239,14 +216,13 @@ function AssistantMessage({ msg, live }: { msg: Message; live?: LiveState | null ? (showProcess ?
: ) - : (() => { - // CF0:非 live 的超长文本部件折叠为摘要行;live 与短文本不受影响。 - if (!live && b.part.type === 'text' && (b.part.text?.length ?? 0) > LONG_REPLY_CHARS) - return - return
+ : ( + // 最终输出契约:终轮正文是对用户的回复,一律完整可见(CF0 长回复折叠 + // 已废除——过程进折叠区,回复不再折叠);交付卡片钉在正文之后。 +
- })())} + ))} {live && } {!live && ctxObs && }
diff --git a/src/components/Workspaces.tsx b/src/components/Workspaces.tsx index b74bdfe..6798c25 100644 --- a/src/components/Workspaces.tsx +++ b/src/components/Workspaces.tsx @@ -93,15 +93,17 @@ export function ArtifactsPanel() { : visible.length === 0 ?
没有匹配「{q}」的文件
: visible.map(a => ( + // 预览落位在右栏——弹层必须先收起,否则预览换到被盖住的右栏, + // 用户看到的是「点了没反应」(工件面板是全屏 OverlayHost)。
store.requestPreview(a)} title={`预览 ${a.name}(右栏,边聊边看)`}> + onClick={() => { store.closeWorkspace(); store.requestPreview(a) }} title={`预览 ${a.name}(右栏,边聊边看)`}> {a.name} {a.kind} · {humanSize(a.size) || '—'} · {shortTime(a.updatedAt)} - + e.stopPropagation()}>