diff --git a/docs/superpowers/plans/2026-07-23-cell-toolbar-actions-v3.md b/docs/superpowers/plans/2026-07-23-cell-toolbar-actions-v3.md new file mode 100644 index 0000000..fdbd53a --- /dev/null +++ b/docs/superpowers/plans/2026-07-23-cell-toolbar-actions-v3.md @@ -0,0 +1,612 @@ +# Cell Toolbar Actions v3 — 实现计划 + +> **For agentic workers:** REQUIRED SUB-SKILL: superpowers:subagent-driven-development or superpowers:executing-plans. Steps use checkbox (`- [ ]`) syntax. + +**Goal:** 把 4 个 server 连接字段(URL/User/Password/Timeout)从 JupyterLab Settings 移到启动环境变量;Settings 只剩 `opencodeProvider`/`opencodeModel`;在 inline 输入框增加模型选择器。 + +**Architecture:** `config.py` 4 字段全走 `os.environ.get(ENV) or DEFAULT`(不再 `bridge.get(...)` 兜底);`schema/plugin.json` 删 4 个 property;`src/types.ts` `OpenCodeSettings` 缩为 `{opencodeProvider, opencodeModel}`;前端 `index.ts` 把 `callOpenCodeProviders` 结果通过 `setOpenCodeProviders` 写到 `opencode_cell_actions.ts` 模块级缓存;`OpenCodeInlinePrompt` 加 `providers/defaultProviderId/defaultModelId` 构造参数,渲染 ` at the top, listing every +(provider, model) pair returned by GET /opencode-bridge/providers at +plugin activation. The default selection matches opencodeProvider / +opencodeModel from JupyterLab settings; the user can pick a different +model per request. The chosen value is sent as providerId/modelId in +the OpenCodeRequest, overriding the settings default for that call. If +the providers fetch failed at startup (e.g. opencode serve not running), +no selector is rendered and submissions fall back to the settings +defaults (or omit providerId/modelId so OpenCode picks its own default)." +``` + +--- + +### Task 3: design.md 同步(CC) + +**Files:** +- Modify: `design.md` §2(给 inline 输入框段补一行模型选择器描述);新增 §6 "启动配置"(env 变量清单)。 + +- [ ] **Step 1: 改 `design.md` §2 item 2 的描述**,在第 2 段里"多行 `textarea`(placeholder ...)"前插一句: +> 顶部一行 `模型: