feat: add capture:screenshot IPC handler#15
Conversation
Adds a new IPC channel to programmatically capture the current page
and save as PNG. Accepts optional savePath parameter, defaults to desktop.
Returns { success, path } or { success: false, error }.
|
抱歉,前些天太忙了,没来及review。我努力在今明两天review并comment 💪 |
|
@markdavis8898 你好~~ 非常感谢你对sightflow项目的关注和贡献~ 当前pr我review之后发现有一些问题,如果要合入main还需要一些修改哈~ 这里我先补充一下当前 Provider 体系的设计意图。 我们的目标是让外部开发者可以独立开发一个 Provider,而不需要修改 SightFlow Desktop 的主代码。也就是说,一个第三方 Provider 理论上不应该通过改 外部开发者只需要做几件事:
当前 app 的流程是: 目前 Hub 地址是由我作为 owner 维护的地址。外部开发者在测试阶段如果想验证自己的 Provider,可以 mock 这个 hub 的 HTTP 返回,或者直接用本地 综上: Provider 的接入点应该是 manifest / hub,而不是直接修改 renderer 里的 built-in catalog,也不是在主仓库里硬编码一个新的 你现在的做法是: manifestUrl: 'builtin://opencode-go-kimi'并且把
如果你想接入
未来也不会添加任何built-in Provider了~ 因为外部provider就是为了可扩展、不必侵入式改动而设计的 |
Adds a new IPC channel
capture:screenshotthat allows programmatic capture of the current browser page and saves it as PNG.savePathparameter (defaults to desktop){ success, path }or{ success: false, error }No breaking changes. All existing IPC channels remain unaffected.