Skip to content

feat(plugins): 支持输入框引用扩展与会话引用插件 - #698

Open
zszz3 wants to merge 5 commits into
vastsa:mainfrom
zszz3:codex/plugin-session-references
Open

zszz3 wants to merge 5 commits into
vastsa:mainfrom
zszz3:codex/plugin-session-references

Conversation

@zszz3

@zszz3 zszz3 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

改动

支持受信插件向输入框注册补全候选和引用标签,并提供会话引用示例:输入 @ 选择历史会话,发送时展开最多 10 组已完成问答(24,000 字符内),输入框和聊天记录保留简短标签。候选最多显示 5 条,文件默认折叠,可用鼠标或键盘展开。

  • 可选 renderer 入口派生高风险 ui.renderer 授权;只加载获准、启用且在当前项目生效的插件,卸载时清理注册。此入口运行在应用界面中,不是沙箱。
  • 引用经通用 SDK 注册、去重、删除和解析;普通发送、追加消息及排队共用展开逻辑,单个解析失败退回标签。
  • 可选显示元数据贯穿持久化与队列;SQLite v19 → v20 迁移先备份,旧消息无需改写。重启后仍能展示标签并恢复队列草稿。复制和编辑使用界面显示的文本。
  • 同步 SDK、开发工具校验、权限文案、规范和示例说明。

本次覆盖 #545 的补全与引用两个扩展点(7、14),提供 #446 的插件实现入口;不包含其他界面插槽或 #447 的百分比预算界面。原生 Pi 续接与远程主机暂不支持引用提交,会拒绝并恢复草稿。

当前候选验证

候选提交:24cc5487e1681ee1615c5e074c149fa34259ee6c,已纳入目标 main 62a05d6b2e93c68ce3d9de0135785087b07c5cb2。环境:macOS arm64。

本次解决消息右键菜单、ADR 索引及 E2E 文档冲突:非编辑状态复制引用标签,编辑状态复制当前草稿并选中编辑框;保留主线的编辑和版本切换保护。

  • 完成构建后重跑现有 Desktop 全量测试(并发 2):2505 项通过。
  • JS 构建、Desktop 类型检查、lint、文档检查(499 页)、差异及主线包含检查通过。
  • 既有隔离 Electron 检查通过:候选上限、文件折叠、引用去重与删除、发送、排队、追加消息、标签展示及卸载。
  • 既有隔离 Host 检查通过:v19 升级、旧队列保留、v20 消息及队列显示重启读回、renderer 授权派生。
  • Electron 启动检查通过:沙箱 preload / IPC、800 会话刷新、能力一致性和项目删除 IPC。
  • 本次没有新增测试文件或用例,未调用真实模型服务或使用生产数据。初轮并行检查曾读取旧构建产物且出现计时用例失败;完成构建后重新执行相关检查。

此前完整 SDK / shared / runtime / Rust 检查结果对应旧候选,本次未重复这些全量套件;当前 PR CI 结果另行确认。本次只解决冲突并更新 PR,不合并。

Allow trusted renderer plugins to contribute completion candidates and inline references without adding session-specific composer behavior. Resolve selected references at submission while preserving their display form across queued turns and transcript reloads.

Include a bounded session Q&A example under @, with five visible reference candidates and a collapsible file group. Review renderer trust explicitly and preserve existing database rows through the schema upgrade.
Keep the newly integrated context-menu copy actions consistent with the reference chips shown in the transcript. Copying a user turn or conversation should not unexpectedly expose its expanded historical context.
The composer token helper moved and user messages now separate visible labels from model-facing content. Update the existing source checks and presentation loader to follow those paths while retaining their original regression assertions.
Preserve the composer reference contracts alongside the latest upstream ADR catalog and acceptance scenarios. Keep the shared branch history intact while incorporating current main.
Preserve reference labels while using the active edit draft for the message menu. Retain both sets of architecture and acceptance documentation.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant