opencode-prompt-expand 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - Initial OpenCode Desktop GUI plugin.
6
+ - Expand, regenerate, undo, restore, and version navigation commands.
7
+ - Composer pill for mounted sessions.
8
+ - Best-effort bottom button and DOM fallback for Home / new-session drafts.
9
+ - Settings page for mode, model, and project context.
10
+ - Project context from package.json, rule files, and git status.
11
+ - OpenAI/Claude-family prompt variants.
12
+ - Unit tests and a stubbed GUI smoke test.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,339 @@
1
- # Temporary Holding Version
1
+ # opencode-prompt-expand
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ![opencode-prompt-expand featured image](assets/featured.png)
4
+
5
+ Expand a rough draft in the **OpenCode Desktop** composer into a structured prompt, in place.
6
+
7
+ The plugin is a small OpenCode Desktop extension: it reads the current draft, asks your own connected model to expand it, writes the result back into the composer, and leaves the send action to you. It never sends a message, never writes session history, and never proxies model credentials.
8
+
9
+ **Status:** `v0.1.0` experimental. The OpenCode Desktop GUI plugin API is still marked experimental upstream; pin the OpenCode version you test against.
10
+
11
+ [中文说明](README.zh-CN.md)
12
+
13
+ **Who it is for:** OpenCode Desktop users who write natural-language prompts and want a more structured first draft without leaving the composer. It is not a TUI plugin and it does not send messages for you.
14
+
15
+ ## What it does
16
+
17
+ - Turns vague requests into prompts with scope, constraints, output format, and acceptance criteria.
18
+ - Writes the result back into the composer so you can edit it before sending.
19
+ - Keeps up to five generated versions in memory for the current window.
20
+ - Adds toast actions for **Undo** and **Regenerate**.
21
+ - Can read a small, whitelisted set of project facts to make the expansion more specific.
22
+ - Supports a concise mode (~800 characters) and a full-expansion mode.
23
+
24
+ It does not:
25
+
26
+ - send the prompt
27
+ - modify session history
28
+ - read `.env`, keys, or source files
29
+ - call the plugin author's servers
30
+
31
+ ## Requirements
32
+
33
+ - OpenCode Desktop **2.2.5** (the version this release was built and tested against)
34
+ - Node.js **^20.19.0 or >=22.12.0** and npm, if you build from source
35
+ - A provider/model connected in OpenCode. The plugin uses your own provider account (BYOK).
36
+
37
+ The TUI is not supported. The GUI composer API used here is only available in OpenCode Desktop.
38
+
39
+ ## Install from GitHub
40
+
41
+ ```bash
42
+ git clone https://github.com/ConnorYyy/opencode-prompt-expand.git
43
+ cd opencode-prompt-expand
44
+ npm ci
45
+ ```
46
+
47
+ `npm ci` runs the `prepare` script, which builds `dist/`. You can also run `npm run build` explicitly.
48
+
49
+ The build produces:
50
+
51
+ ```text
52
+ dist/index.js server part
53
+ dist/rpc.js RPC contract
54
+ dist/gui-experimental.cjs Desktop GUI bundle
55
+ ```
56
+
57
+ Add the plugin to the **global** OpenCode config. Desktop reads GUI plugins only from the global file:
58
+
59
+ - macOS / Linux: `~/.config/opencode/opencode.jsonc`
60
+ - Windows: `C:\Users\<you>\.config\opencode\opencode.jsonc`
61
+
62
+ ```jsonc
63
+ {
64
+ "shell": "powershell",
65
+ "plugins": [
66
+ {
67
+ "package": "/absolute/path/to/opencode-prompt-expand",
68
+ "options": {
69
+ "mode": "concise",
70
+ "model": "auto",
71
+ "projectContext": true,
72
+ "timeoutMs": 30000
73
+ }
74
+ }
75
+ ]
76
+ }
77
+ ```
78
+
79
+ On Windows, use forward slashes or escaped backslashes in the path, for example:
80
+
81
+ ```jsonc
82
+ "package": "D:/path/to/opencode-prompt-expand"
83
+ ```
84
+
85
+ Then reload the Desktop window or restart OpenCode Desktop. The GUI bundle is loaded at window start; reloading only the server is not enough after a first install.
86
+
87
+ Confirm the install:
88
+
89
+ - **Settings > Extensions > Plugins** shows `prompt-expand` as enabled.
90
+ - The command palette has **Expand prompt**.
91
+ - A mounted session shows the `⚡ Expand Prompt` pill above the composer.
92
+ - Home / new-session drafts show the bottom `⚡ Expand Prompt` button (see below).
93
+
94
+ ### Install from npm
95
+
96
+ Once the package is published, install it with the OpenCode CLI:
97
+
98
+ ```bash
99
+ opencode plugin add opencode-prompt-expand
100
+ ```
101
+
102
+ Pin a specific version when needed:
103
+
104
+ ```bash
105
+ opencode plugin add opencode-prompt-expand@0.1.0
106
+ ```
107
+
108
+ Then verify it is configured:
109
+
110
+ ```bash
111
+ opencode plugin list
112
+ ```
113
+
114
+ The package name is `opencode-prompt-expand`. It has not been published to npm in this release yet; until it is, use the local-directory install above.
115
+
116
+ ## Usage
117
+
118
+ 1. Write a draft in the composer, for example:
119
+ `帮我做一个数据看板,包含筛选和导出`
120
+ 2. Click `⚡ Expand Prompt`, run **Expand prompt** from the command palette, or type `/expand <text>`.
121
+ 3. Wait for the model. The draft is replaced in place.
122
+ 4. Review or edit the result, then press Enter yourself.
123
+
124
+ ### Entry points
125
+
126
+ | Entry | How |
127
+ |---|---|
128
+ | Pill | Click `⚡ Expand Prompt` above a session composer |
129
+ | Draft button | On Home / new-session drafts, use the bottom `⚡ Expand Prompt` button |
130
+ | Command palette | Search `Expand prompt` |
131
+ | Slash command | `/expand <text>` |
132
+ | Regenerate | Toast action, or command palette **Regenerate prompt** |
133
+ | Restore original | Toast **Undo**, or command palette **Restore original prompt** |
134
+ | Previous / next version | Command palette **Previous expanded version** / **Next expanded version** |
135
+ | Toggle mode | Command palette **Toggle expansion mode** |
136
+
137
+ There are **no default keyboard shortcuts**. Commands are registered in **Settings > Shortcuts**; assign your own:
138
+
139
+ ```text
140
+ prompt-expand.expand
141
+ prompt-expand.regenerate
142
+ prompt-expand.restore
143
+ prompt-expand.previous
144
+ prompt-expand.next
145
+ prompt-expand.mode
146
+ prompt-expand.settings
147
+ ```
148
+
149
+ ### Versions
150
+
151
+ - Up to 5 generated versions per draft, in memory for the current window.
152
+ - Editing the draft resets the version stack; the next expansion starts from the edited text.
153
+ - Toast actions are guarded: if you switched sessions or edited the text, Undo will not overwrite your changes.
154
+ - The failure toast includes the server `code` and `message` when available, so timeout, model, and validation failures are distinguishable.
155
+
156
+ ## Home and new-session drafts
157
+
158
+ The official `ctx.screen.current()?.composer` API is `undefined` on Home and on a draft session; `Sessions.current()` is also `undefined` there. The session `ComposerPill` therefore cannot render before the first message creates a mounted session.
159
+
160
+ For those pages the plugin adds a bottom `⚡ Expand Prompt` button. Because no official draft composer API exists, it uses a **best-effort DOM adapter**:
161
+
162
+ - it finds the bottom-most visible `textarea`, text input, or contenteditable;
163
+ - it reads and writes that element directly;
164
+ - it only runs when there is no mounted session;
165
+ - it is hidden on Settings and other plugin pages.
166
+
167
+ Impact and limits:
168
+
169
+ - It is not an official OpenCode API and may break if the Desktop composer changes.
170
+ - It may fail on a complex rich-text composer or if the editor changes during the model call.
171
+ - `@` mentions and attachments are not supported on drafts.
172
+ - The draft has no composer model, so the model comes from the server default or your configured model.
173
+ - Disable it with `draftFallback: false` if you only want to expand in mounted sessions.
174
+ - After the first message creates a session, the normal composer pill is used.
175
+
176
+ ## Settings
177
+
178
+ Open **Settings > Prompt Expand**, or run **Prompt Expand settings** from the command palette (command `prompt-expand.settings`).
179
+
180
+ | Setting | Description |
181
+ |---|---|
182
+ | Mode | `concise` (~800 chars) or `full` |
183
+ | Model | `auto`, `composer`, `provider/model`, or empty |
184
+ | Project context | Read `package.json`, rule files, and git status |
185
+
186
+ Settings persist through `Store.global`. An unset field, or a model field of `auto`, follows the `options` from `opencode.jsonc`; an explicit setting overrides it. This matters on Home/draft pages, where no composer model is available.
187
+
188
+ ## Configuration
189
+
190
+ Options are passed through the plugin entry:
191
+
192
+ | Key | Default | Description |
193
+ |---|---|---|
194
+ | `model` | `"auto"` | `auto`, `composer`, or `"provider/model"` |
195
+ | `mode` | `"concise"` | `concise` / `full` |
196
+ | `maxRounds` | `5` | Total generations per draft, including v1 |
197
+ | `timeoutMs` | `30000` | Abort and leave the composer untouched after this long |
198
+ | `maxGrowth` | `5` | Reject output larger than `original × maxGrowth` **and** > 2000 chars |
199
+ | `minChars` | `10` | Below this, skip |
200
+ | `maxPromptChars` | `6000` | Above this, skip |
201
+ | `skipPatterns` | built-in | Array of regex strings; replaces the built-in list |
202
+ | `skipOnMentions` | `true` | Skip drafts containing `@path` |
203
+ | `projectContext` | `true` | Read project facts |
204
+ | `projectContextBudget` | `2048` | Character budget for injected context |
205
+ | `draftFallback` | `true` | Enable the DOM fallback on Home / new-session drafts |
206
+ | `prompts` | built-in | Map of glob → prompt; `*gpt*` and `*claude*` included |
207
+
208
+ ### Model selection
209
+
210
+ - `composer` uses the model currently selected in the composer.
211
+ - `auto` prefers the composer model, then the session model, then the server default, then a cheap chat model.
212
+ - Explicit `provider/model` is used as-is.
213
+
214
+ If `auto` falls back to a free model and that model has hit its usage limit, set the model to `composer` or an explicit paid model.
215
+
216
+ The composer model is mapped from `{ providerID, modelID }` to the generation API's `{ providerID, id }`.
217
+
218
+ ### Project context
219
+
220
+ Only these sources are read:
221
+
222
+ - `package.json` (name, description, dependency names)
223
+ - `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules`, `CONVENTIONS.md`, `.github/copilot-instructions.md`
224
+ - current branch and changed file names (filtered to exclude `node_modules/`)
225
+
226
+ The directory is resolved from the mounted session first, then the directory supplied by the Desktop window, then the plugin instance location. The result is cached for 5 minutes per directory and limited to `projectContextBudget` characters.
227
+
228
+ ## Privacy and side effects
229
+
230
+ - The draft is sent only to the provider you connected in OpenCode.
231
+ - The plugin does not persist drafts, keys, or credentials.
232
+ - It does not send messages, write session history, or occupy the session context window.
233
+ - Project context never reads `.env`, `.pem`, `credentials*`, or source files.
234
+ - The plugin has no telemetry and no author-operated proxy.
235
+
236
+ ## Development
237
+
238
+ ```bash
239
+ npm ci
240
+ npm run typecheck
241
+ npm test
242
+ npm run build
243
+ npm run smoke:gui
244
+ npm run verify # typecheck + tests + build + GUI smoke
245
+ ```
246
+
247
+ `src/index.ts` is the server part, `src/gui.tsx` is the Desktop GUI bundle, and `src/rpc.ts` is the shared contract.
248
+
249
+ `scripts/smoke-gui.cjs` loads the built GUI bundle with stubbed host modules and exercises expand, regenerate, undo, settings, pill, and the draft fallback slot.
250
+
251
+ ### Project layout
252
+
253
+ ```text
254
+ src/
255
+ ├── index.ts server and RPC registration
256
+ ├── rpc.ts RPC contract
257
+ ├── gui.tsx Desktop GUI entry
258
+ ├── gui/
259
+ │ ├── commands.ts command palette / slash commands
260
+ │ ├── controller.ts expand, regenerate, undo, versions
261
+ │ ├── draft.ts DOM fallback for Home / drafts
262
+ │ ├── failure.ts RPC error detail
263
+ │ ├── pill.ts composer pill
264
+ │ ├── settings.tsx settings page
265
+ │ └── state.ts per-session version stack
266
+ ├── optimizer.ts bypass, cleaning, validation
267
+ ├── prompts.ts default and model-family prompts
268
+ ├── model.ts model selection
269
+ ├── project-context.ts whitelist and budget
270
+ └── config.ts option resolution
271
+ ```
272
+
273
+ ### CI
274
+
275
+ The repository includes a GitHub Actions workflow that runs `npm ci` and `npm run verify` on Windows and Ubuntu with Node 20.19 and 22.12.
276
+
277
+ ## Limitations
278
+
279
+ - The Desktop GUI plugin API is experimental. Pin `@opencode/plugin` to the OpenCode version you run.
280
+ - The Home/draft DOM fallback is best-effort and not an official composer API.
281
+ - `composer.setText()` replaces text and keeps attachments, but it cannot rewrite `@` mention parts. Drafts containing `@path` are skipped.
282
+ - There is no TUI implementation.
283
+ - A slow model can exceed `timeoutMs`; raise it if your provider is slow.
284
+
285
+ ## FAQ
286
+
287
+ ### Is this a TUI plugin?
288
+
289
+ No. It uses the OpenCode Desktop GUI composer API. The terminal TUI is not supported.
290
+
291
+ ### Does it send the prompt automatically?
292
+
293
+ No. The plugin only reads the composer, writes the expanded text back, and leaves Enter to you. It does not create session messages or write conversation history.
294
+
295
+ ### Which model does it use?
296
+
297
+ By default, `auto` prefers the composer model, then the session model, then the server default, then a cheap chat model. You can also set `composer` or an explicit `provider/model` in settings.
298
+
299
+ ### Why are there no default keyboard shortcuts?
300
+
301
+ Shortcuts are user-specific and can conflict with host bindings. The commands are registered in **Settings > Shortcuts**; assign the ones you want.
302
+
303
+ ### Why does the new-session page use a bottom button instead of a composer pill?
304
+
305
+ OpenCode does not expose an official composer API on Home or draft sessions. The bottom button is a best-effort DOM fallback and is marked experimental. Once the first message creates a mounted session, the normal composer pill is used.
306
+
307
+ ### Does it support `@` file mentions?
308
+
309
+ Drafts containing `@path` references are skipped because rewriting the text can desynchronize mention attachments. Plain email addresses are not treated as mentions.
310
+
311
+ ### Does it store my prompts?
312
+
313
+ No. Drafts are not persisted by the plugin. The version stack is in memory for the current window only.
314
+
315
+ ### What happens when expansion fails?
316
+
317
+ The original composer text is left unchanged. The toast includes the server `code` and `message` when available, such as timeout, model, or validation failure.
318
+
319
+ ### Is it free?
320
+
321
+ The plugin is MIT-licensed. You pay your own model provider for generation; there is no author-operated proxy or telemetry.
322
+
323
+ ### How is it different from a generic prompt optimizer?
324
+
325
+ It works inside the OpenCode Desktop composer, writes back in place, keeps a small version stack, and can use the model you already selected. It does not require copying prompts into another chat window.
326
+
327
+ ## Sponsor
328
+
329
+ If this plugin saves you time, you can support maintenance and testing through Buy Me a Coffee:
330
+
331
+ [buymeacoffee.com/connory](https://buymeacoffee.com/connory)
332
+
333
+ [![Buy Me a Coffee QR code](assets/bmc-qr.png)](https://buymeacoffee.com/connory)
334
+
335
+ Scan the QR code or use the link. Support is optional; the plugin remains MIT-licensed.
336
+
337
+ ## License
338
+
339
+ MIT
@@ -0,0 +1,177 @@
1
+ # opencode-prompt-expand
2
+
3
+ [English README](README.md)
4
+
5
+ ![opencode-prompt-expand](assets/featured.png)
6
+
7
+ 在 **OpenCode Desktop** 的 composer 里,把粗糙草稿扩展成结构化提示词,并原地写回。
8
+
9
+ **状态:** `v0.1.0` 实验版。OpenCode Desktop 的 GUI 插件 API 仍是 experimental,请锁定你测试的 OpenCode 版本。
10
+
11
+ ## 适合谁
12
+
13
+ - 使用 OpenCode Desktop 的个人开发者
14
+ - 习惯用自然语言描述需求,但不想每次手写结构化提示词
15
+ - 希望结果留在 composer 里,自己检查、修改后再按 Enter
16
+
17
+ 不适用于终端 TUI。插件不会自动发送消息,也不会写入会话历史。
18
+
19
+ ## 功能
20
+
21
+ - 把模糊需求补成:目标、范围、约束、产出、验收方式
22
+ - 原地写回 composer,可继续编辑
23
+ - toast 提供「撤销」和「重生成」
24
+ - 最多保留 5 个版本,仅在当前窗口内存中
25
+ - 简洁模式(约 800 字符)和充分展开模式
26
+ - 可读取白名单内的项目信息:`package.json`、规则文件、git 状态
27
+ - 支持 `*gpt*` / `*claude*` 家族指令
28
+
29
+ ## 要求
30
+
31
+ - OpenCode Desktop **2.2.5**(当前验证版本)
32
+ - Node.js **^20.19.0 或 >=22.12.0**(仅从源码构建时需要)
33
+ - 已在 OpenCode 中连接 provider/model
34
+
35
+ ## 安装
36
+
37
+ ### 从 GitHub 构建
38
+
39
+ ```bash
40
+ git clone https://github.com/ConnorYyy/opencode-prompt-expand.git
41
+ cd opencode-prompt-expand
42
+ npm ci
43
+ ```
44
+
45
+ `npm ci` 会通过 `prepare` 自动构建 `dist/`。
46
+
47
+ 把插件加入**全局** OpenCode 配置:
48
+
49
+ - macOS / Linux:`~/.config/opencode/opencode.jsonc`
50
+ - Windows:`C:\Users\<you>\.config\opencode\opencode.jsonc`
51
+
52
+ ```jsonc
53
+ {
54
+ "shell": "powershell",
55
+ "plugins": [
56
+ {
57
+ "package": "/absolute/path/to/opencode-prompt-expand",
58
+ "options": {
59
+ "mode": "concise",
60
+ "model": "auto",
61
+ "projectContext": true,
62
+ "timeoutMs": 30000
63
+ }
64
+ }
65
+ ]
66
+ }
67
+ ```
68
+
69
+ Windows 路径示例:
70
+
71
+ ```jsonc
72
+ "package": "D:/path/to/opencode-prompt-expand"
73
+ ```
74
+
75
+ 重载 Desktop 窗口,或重启 OpenCode Desktop。
76
+ 检查 **Settings > Extensions > Plugins** 中是否出现 `prompt-expand`。
77
+
78
+ ### npm
79
+
80
+ npm 包名是 `opencode-prompt-expand`,当前尚未发布。发布后可使用:
81
+
82
+ ```bash
83
+ opencode plugin add opencode-prompt-expand
84
+ opencode plugin list
85
+ ```
86
+
87
+ ## 使用
88
+
89
+ 1. 在 composer 写草稿,例如:`帮我做一个数据看板,包含筛选和导出`
90
+ 2. 点击 `⚡ Expand Prompt`,或在命令面板搜索 **Expand prompt**,或输入 `/expand <text>`
91
+ 3. 等待模型返回,结果会写回 composer
92
+ 4. 自己检查/修改,然后按 Enter 发送
93
+
94
+ 入口:
95
+
96
+ | 入口 | 方式 |
97
+ |---|---|
98
+ | session composer | 点击 `⚡ Expand Prompt` pill |
99
+ | Home / 新建会话草稿 | 点击底部 `⚡ Expand Prompt` 按钮 |
100
+ | 命令面板 | 搜索 `Expand prompt` |
101
+ | 斜杠 | `/expand <text>` |
102
+ | 重生成 / 撤销 | toast 按钮,或命令面板 |
103
+ | 版本切换 | 命令面板 Previous / Next expanded version |
104
+
105
+ 没有默认快捷键。可在 **Settings > Shortcuts** 绑定:
106
+
107
+ ```text
108
+ prompt-expand.expand
109
+ prompt-expand.regenerate
110
+ prompt-expand.restore
111
+ prompt-expand.previous
112
+ prompt-expand.next
113
+ prompt-expand.mode
114
+ prompt-expand.settings
115
+ ```
116
+
117
+ ## 设置
118
+
119
+ 打开 **Settings > Prompt Expand**,或运行 **Prompt Expand settings**。
120
+
121
+ | 设置 | 说明 |
122
+ |---|---|
123
+ | Mode | 简洁 / 充分展开 |
124
+ | Model | `auto`、`composer`、`provider/model` 或留空 |
125
+ | Project context | 是否读取项目信息 |
126
+
127
+ 设置通过 `Store.global` 保存。未设置或 Model 为 `auto` 时,回退到 `opencode.jsonc` 的 options;显式设置会覆盖。
128
+
129
+ ## 常见问题
130
+
131
+ **会发送消息吗?**
132
+ 不会。插件只读写 composer,发送由你按 Enter 完成。
133
+
134
+ **支持 TUI 吗?**
135
+ 不支持,只支持 OpenCode Desktop。
136
+
137
+ **为什么新建会话页没有 composer pill?**
138
+ Home / draft 没有官方 composer API。插件在底部提供 `⚡ Expand Prompt` 按钮,通过 DOM 适配器读写草稿,属于 best-effort。创建 session 后会使用正常 pill。
139
+
140
+ **支持 `@` 文件引用吗?**
141
+ 含 `@path` 的草稿会跳过,避免附件与文本不同步。普通邮箱地址不会被误判。
142
+
143
+ **失败会改输入框吗?**
144
+ 不会。失败时原文不变,toast 会尽量显示服务端 code/message。
145
+
146
+ **会保存我的提示词吗?**
147
+ 不会。版本栈只在当前窗口内存中。
148
+
149
+ ## 隐私
150
+
151
+ - 草稿只发送给你在 OpenCode 中连接的 provider
152
+ - 不经过插件作者的代理
153
+ - 不读取 `.env`、`.pem`、`credentials*` 或源码文件
154
+ - 项目感知只读取白名单文件,并限制字符预算
155
+ - 无 telemetry
156
+
157
+ ## 限制
158
+
159
+ - GUI 插件 API 仍是 experimental
160
+ - Home / draft 的 DOM 回退不是官方 API
161
+ - `setText()` 不能重写 `@` mention 附件
162
+ - 没有 TUI 实现
163
+ - 慢模型可能超过 `timeoutMs`
164
+
165
+ ## 赞助
166
+
167
+ 如果这个插件帮你节省了时间,可以通过 Buy Me a Coffee 支持维护和测试:
168
+
169
+ [buymeacoffee.com/connory](https://buymeacoffee.com/connory)
170
+
171
+ [![Buy Me a Coffee QR code](assets/bmc-qr.png)](https://buymeacoffee.com/connory)
172
+
173
+ 赞助是可选的,插件保持 MIT License。
174
+
175
+ ## License
176
+
177
+ MIT
Binary file