LoopForge icon indicating copy to clipboard operation
LoopForge copied to clipboard

[Bug]: 会话开始后运行时选择器整块消失,用户无法确认当前使用哪个 CLI

Open pkyes54 opened this issue 1 week ago • 3 comments

[Bug]: 会话开始后运行时选择器整块消失,用户无法确认当前使用哪个 CLI

Component / host: Platform — web / API Edition: Platform LoopForge version: v0.4.0(自托管镜像,诊断中平台版本显示为 (devel))

What happened?

AI 对话里发出第一条消息之后,输入框上方的「CLI」选择器整个不渲染了。 不是变灰、不是显示"已锁定为 Pi",而是彻底不见。

与此同时,模型选择器、思考强度、审批模式都还在。用户中途无法确认自己到底跑在哪个运行时上, 也找不到任何提示说明"运行时已锁定"。

原因链(代码定位)

chatbot/src/App.jsx:2129

{chat.executors.length > 1 && !pinnedExecutor ? (
  <PermissionPicker
    label="CLI"
    options={chat.executors.map(...)}
    value={chat.executor}
    ...
  />
) : null}

pinnedExecutor 在 App.jsx:465-475 计算:

const lockedExecutorId = chat.session
  ? conversationEngine(chat.session.messages, chat.models, chat.session.executor) ||
    (chat.busy ? chat.executor : "")
  : "";
const pinnedExecutor = lockedExecutorId
  ? (chat.executors || []).find((item) => item.id === lockedExecutorId)
  : undefined;

算出来之后,pinnedExecutor 只被用于这一个条件判断,没有任何地方把它渲染成只读展示。

设计意图本身是合理的(注释写明:会话已绑定某个 CLI,换 CLI 需要新开对话), 问题在于表达方式:用"隐藏"来表达"锁定",用户失去的不仅是切换能力,还有当前状态的可见性。

影响

  • 用户中途看不到当前运行时。多运行时环境下,无法判断这次回答到底由哪个 CLI 产生。
  • 想切换运行时的人找不到入口,也不知道"需要新开对话",只会认为功能缺失。
  • 与同排的模型选择器处理方式不一致(模型在会话中仍然显示,只是选项变化), 增加理解成本:用户会以为运行时选择器是"偶发不见了"。

期望行为

锁定态改为只读展示而不是隐藏,例如:

  • 保留 CLI 选择器,但处于禁用状态,显示当前运行时(Pi / CodeBuddy / …), 悬停提示"当前对话已绑定该 CLI,切换请新建对话";
  • 或者在不显示选择器时,在会话头部/输入框附近显示当前运行时名称。

两者都保留"不可切换"的约束,同时把状态显性化。

Reproduction

  1. 平台 v0.4.0,打开 AI 对话,运行时选 Pi。
  2. 发一条消息,等回复开始或结束。
  3. 观察输入框上方:CLI 选择器消失;模型、思考强度、审批模式仍在。
  4. 全页面找不到"当前使用 Pi"的任何标识。

Sanitized diagnostics

// App.jsx:2129
{chat.executors.length > 1 && !pinnedExecutor ? (<PermissionPicker label="CLI" ... />) : null}

// pinnedExecutor 在 App.jsx:471 赋值后,仅参与上面这一个条件

Safety checks

  • [x] 已移除凭证、私有端点、内部标识与个人数据。
  • [x] 已检索现有 issue,未发现重复。

pkyes54 avatar Nov 19 '26 20:11 pkyes54

感谢反馈。我理解的情况是:AI 对话发出第一条消息后,输入框上方的 CLI 选择器不再显示,会话中途看不到当前使用的是哪个运行时。

已经看到这条 Issue,会按现有 Issue 排期查看。

cocofhu00 avatar Nov 19 '26 21:11 cocofhu00

I'll work on this. Scope: after a conversation locks its CLI, keep the composer's CLI selector visible but disabled, showing the bound runtime (e.g. Pi) with a tooltip explaining that switching requires a new conversation. This keeps the "no mid-conversation CLI switch" constraint while restoring visibility of the current runtime. It does not change the model, effort, or approval pickers, and does not alter which executor a session is locked to.

Implementation is focused on chatbot/src/App.jsx (render the selector when pinned instead of hiding it) plus a disabled/title capability on chatbot/src/PermissionPicker.jsx. I'll add regression coverage and a real-browser check, then open a PR.

wcy12378 avatar Nov 20 '26 03:11 wcy12378

Clipboard_Screenshot_1795166996

crispinhu27 avatar Nov 20 '26 09:11 crispinhu27