Reference example proposal: desktop plugin (context-menu interception + composer middleware)
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- desktop
调研方向
Start with the proposed quote-comment-desktop/ directory and the desktop/plugin.js disk-plugin entry point, then compare the linked hermes-quote-comment source and gist. Check the contributing notes and developer-guide coverage before choosing the example shape. Done means an accepted, self-contained reference example demonstrating context-menu interception, fixed UI mounting, and COMPOSER_AREAS.middleware.
由索引模型根据 Issue 内容生成。
描述
Proposal: a desktop-side reference example (context menu + composer middleware)
The current index covers agent-side (ctx.llm.*) and dashboard plugins, but nothing here shows a desktop/plugin.js end to end — while the desktop SDK docs send plugin authors to this repo for reference demos. Three seams this example would cover are currently discoverable only from the app source, and two of them bit us in practice:
- Context-menu interception. The app's own menu system listens on
windowcapture and callsstopPropagation()on every right-click, so document-level listeners never run (window-capture listeners still do —stopPropagationdoes not affect same-target listeners). To keep the app's menu from flashing underneath, the example stamps message roots withdata-hermes-context-menu-triggerduring the right-buttonmousedown; on Windowscontextmenufires aftermouseup, so the stamps cannot be cleared there. - Floating UI without react-dom. Disk plugins cannot import react-dom, so menus/dialogs render as
position: fixednodes from aSTATUSBAR_AREAS.rightcontribution — the only always-mounted, non-closable mount point. COMPOSER_AREAS.middleware. A queue drained on send:handler(draft) => { ...draft, text },nullto cancel, throw = pass-through.
The example is a slimmed version of a working community plugin — pwwang/hermes-quote-comment (MIT): select text in a response → right-click → Comment → the quote + comment is appended to your next message.
- ~240 lines, self-contained, uses the disk-plugin door (
$HERMES_HOME/desktop-plugins/<id>/plugin.js) - Full source: https://gist.github.com/pwwang/b6466ffad2b0f9510cc4e53eed0baad7
- Demo:

Per the contributing notes ("open an issue first if the surface you want to demonstrate isn't already covered in the developer-guide docs"): the context-menu interception + trigger-attribute behavior is exactly such a surface. Happy to wait if you would rather land a docs page for it first, or to restructure the example to your preferred shape — it is slightly over the ~200 LOC note, with ~80 lines being the window-capture/attribute machinery.
Would a PR for quote-comment-desktop/ be welcome?
- 主要语言
- Python
- 星标
- 49
- 派生
- 34
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
area/auth comp/agent P3 type/bug
难度 2/5 1-3 小时 新手友好度 88/100
NousResearch/hermes-agent#161417 ·
维护者通常 1 天内回复
-
Hourly-aggregate projection test depends on other tests' spans可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭accepted
难度 2/5 1-3 小时 新手友好度 82/100
future-agi/future-agi#4737 ·
维护者通常 1 天内回复
-
Fix URL validation, get_version_url, and implement robust parse_url for Launchpad backend可能已有人在做 @patelshivani2283-lab 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 90/100
fedora-infra/anitya#2278 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
Dao-AILab/flash-attention#3251 ·
维护者通常 2 天内回复