Skip to content

[Feature] 支持插件从对话选区右键菜单打开面板 - #2446

Merged
vastsa merged 5 commits into
vastsa:mainfrom
Linuxdazhao:codex/plugin-selection-menu-2395-20261119
Nov 20, 2026
Merged

vastsa merged 5 commits into
vastsa:mainfrom
Linuxdazhao:codex/plugin-selection-menu-2395-20261119

Conversation

@Linuxdazhao

@Linuxdazhao Linuxdazhao commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

关联 #2395。按讨论开放一个通用入口,让插件在对话选区的右键菜单中打开自己的工作面板。

  • 插件在 contributes.views 里声明 acceptsTranscriptSelection: true。菜单沿用该面板的标题和图标。Side Questions 使用分支图标。
  • 用户点菜单项时,宿主通过 view:selection 把当前会话 ID 和选中的纯文本交给对应面板。选区不会写入 URL。打开草稿不建会话,发送由用户确认。
  • Side Questions 配套代码

在 macOS 的隔离 Electron 环境中,用合成对话验证了无选区时隐藏入口、图标、首次打开、已打开面板接收新选区、整块移除引用,以及手动发送只带引用和新问题。验证后主对话内容一致。在 7caaeee40562(基于 f589deec80b4)通过 8 项交互检查,之后只补了文档和测试断言。桌面构建、类型检查、格式、文档、SDK 测试和 36 项相关桌面测试通过。全量桌面测试剩下 3 个失败,同环境下在基线也能复现。

Let views opt into the transcript context menu using their localized title and icon. Deliver the excerpt only to the chosen view after the user clicks, scoped to the active session and project.
Apply rustfmt to the manifest validation condition so both Rust CI lanes can run.
Keep the pointer-menu contract checks aligned with optional selection items and register the work-panel view decision in the ADR catalog.
Rustfmt expanded the selection option check above the architecture limit. Name the optional value before validation so both gates pass with the same accepted inputs.
@vastsa
vastsa merged commit 1f56bea into vastsa:main Nov 20, 2026
6 checks passed
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.

2 participants