You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fresh session that only ran slash commands (no user message) shows no command result at all —
the blank onboarding state hides the command card until the user types one more message.
Additionally, multi-line command output is collapsed into a single-line ellipsis by default.
This report covers both issues with a prepared fix branch.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[Bug] 新会话仅执行 slash 命令时命令结果不可见(blank 引导界面空窗),多行命令输出默认折叠成省略号
1. Bug 概述
两个相互独立、但都发生在「slash 命令会话」上的前端可见性问题:
问题 1:纯命令会话被 blank 引导界面挡住,命令结果不可见
新会话只执行过 slash 命令(如
/compact,日志里只有 log-only 的command/run+command/done事件、没有 user message)时:hasVisibleConversationContent(packages/client/runtime/src/client/sessions/session.ts)排除command节点(注释原文:"A generic command row alone remains control-plane content");blank→ConversationSession视图区if (blank && composerPhase === 'blank') return null→ 只渲染 EmptyHero 引导界面;问题 2:多行命令输出默认折叠成一行省略号
GenericCommandCard默认collapsed,多行输出被压成单行 ellipsis,全文要点开才可见。2. 环境
3. 复现步骤(问题 1)
/compact,即不发送任何 user message);4. 根因分析
问题 1
session.ts的hasVisibleConversationContent有意将command节点排除在「可见内容」之外,理由是命令行属于 control-plane。但命令卡(command/done渲染出的卡片)实际是用户可见的内容——排除它导致阶段推导在纯命令会话中永远为blank,视图区直接return null,命令结果被引导界面遮蔽。这是「阶段推导」与「host 权威 blank 位」两个概念混用造成的:推导阶段不应决定是否渲染命令卡。问题 2
GenericCommandCard以collapsed为默认态,对多行输出(常见于任意命令的结果)默认渲染单行省略,需要用户手动展开。5. 涉及文件
packages/client/runtime/src/client/sessions/session.tshasVisibleConversationContent排除command节点(问题 1 起点)packages/client/runtime/src/client/sessions/conversation.tspackages/client/runtime/tests/session.client.spec.tspackages/client/ui-conversation/src/client/chat/GenericCommandCard.tsx6. 期望行为 vs 实际行为
7. 建议修复方向(含补丁分支)
hasVisibleConversationContent将command节点计入可见内容——命令卡本身是用户可见内容。host 的 blank 位保持权威(列表隐藏/可复用语义不变),只有推导出的阶段被激活为active,视图区正常渲染命令卡。GenericCommandCard默认展开改为按内容判定——useState初始化器按text.includes('\n')决定默认展开;单行命令保持紧凑外观,展开按钮仍可手动切换。补丁已就绪(含测试更新),fork 分支:
维护者可直接 cherry-pick:
改动 4 个文件、1 个 commit(
7d59927b)。由于外部 PR 通道暂未开放,按社区指引以 Discussion 形式提交,维护者可 cherry-pick 或告知期望的提交方式。8. 验证
session.client.spec:50/50(含按新语义更新的用例:host blank 位保持、推导阶段激活)ui-conversation:416/416All reactions