feat: add TUI provider/model picker panel and session quick-switching
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript
- 領域
- cli
調査の方向性
Start in src/tui/panels.js and src/tui/skillsPanel.js to see how panels are registered and rendered, then src/tui/commandParser.js and src/session/stateManager.js for the command and state paths. Done would mean a provider picker panel and a /session <name> command, each with tests, but the issue asks for an OpenSpec proposal and maintainer approval before any code, and recommends splitting it first.
索引モデルが issue の本文から書いたものです。
説明
Summary
Add a provider/model picker panel to the TUI (arrow-select, matching the skills/memories/settings panel pattern) and a /session <name> quick-switch command that resumes a session in place.
Motivation
The current /provider set command is not discoverable — users must know the exact command syntax to switch providers/models. A picker panel listing providers/models with arrow-select would make this capability visible and consistent with the existing skills/memories/settings panels. Separately, switching sessions currently requires a panel round-trip; a /session <name> command or quick-switcher would resume a session in place, reducing friction.
Proposed Solution
- Provider/model picker panel — A picker panel listing providers/models with arrow-select, matching the skills/memories/settings panel pattern, more discoverable than
/provider set. - Session quick-switching — A
/session <name>command or quick-switcher that resumes a session in place, avoiding the panel round-trip.
Alternatives Considered
Unknown — user to confirm.
Dependencies
- None new — reuses the existing TUI panel infrastructure (skills/memories/settings panels) and the existing session/provider modules.
Testing Strategy
- Unit tests: Verify provider/model picker selection logic and the
/session <name>command parsing/resume behavior. - Integration test: Exercise the panel end-to-end (open, arrow-select, confirm) and the session quick-switch command.
- Edge cases: Empty provider/model list, invalid or nonexistent session name, session resume when no session is active.
Security Considerations
- Credential storage: No new credentials introduced — reuses existing provider/session config.
- Input validation: Validate session names and provider/model identifiers to prevent path traversal or injection.
- OWASP: Sanitize any user-supplied session/provider names before use in file paths or shell commands.
OpenSpec Note
This project uses OpenSpec for feature development. If this request is approved, I will:
- Run
/opsx:proposeto generate a full proposal with specs and tasks - Iterate on the design before any code is written
- Follow the task-driven implementation workflow
Additional Context
Split out from issue #1339.
Split Recommendation
This issue bundles multiple distinct capabilities. Consider splitting into separate issues:
- Provider/model picker panel — UI panel for selecting providers/models; a discoverability improvement over
/provider set. - Session quick-switching —
/session <name>command or quick-switcher; a session-resume behavior change.
MVP recommendation: Start with the provider/model picker panel as it has the least dependencies and highest immediate value.
Audit Findings (for Issue #1358)
- src/tui/panels.js — Defines the
PANELSenum andgetPanelOrder(). NoPROVIDERentry exists yet; addPROVIDER: "provider"and include it ingetPanelOrder()to enable tab navigation to the new picker panel. - src/tui/skillsPanel.js — Reference pattern for the picker panel: uses ink
SelectInputwith a customCyanIndicator/cyan item renderer,useInputfor Escape-to-return, anduseWindowSizeto bound the list. The provider/model picker should mirror this structure. - src/tui/settingsPanel.js — Reference for a custom selectable list that preserves selection across item rebuilds (
SettingsSelectList+clampOffset). Useful if the provider/model list is nested (provider → model) or rebuilt on selection. - src/tui/app.js:495-527 — Panel wiring. Add a
PANELS.PROVIDERbranch here to render the new picker panel, passingconfig(for providers) and anonSelectProvider/model callback. - src/provider/index.js — Exposes
getActiveProviderName(config),getActiveProviderConfig(config), andgetActiveModelName(config). These are the helpers to list the active provider/model and to drive the picker's current selection. - src/config/schemas/providers.js —
ProvidersSchemaisz.object({}).passthrough(); each provider config hasenabledandmodelfields. Iterateconfig.providersto enumerate providers and their configured models for the picker. - src/tui/commandParser.js:111-118 — Registers view-switching commands (
sessions,memories,skills,settings) returning{ action: "view", value }. Add a/session <name>command here (or extend thesessionshandler) to resume a session in place. - src/tui/sessionsPanel.js:143-165 — Existing resume logic:
loadSession(sessionsDir, 20, sessionId, cwd)thensessionState.createNewSession(sessionId),loadConversation(loaded.conversation),setSessionId(sessionId). Reuse this exact sequence for the/session <name>quick-switch. - src/session/loader.js —
loadSession(sessionsDir, windowSize, sessionId, cwd)loads a session by ID. The/session <name>command should call this with the user-supplied name. - src/session/stateManager.js —
SessionStateManagerexposescreateNewSession,loadConversation,setSessionId,setProvider,getProvider. These are the state transitions needed for both the picker (setProvider) and session quick-switch (resume). - src/tui/conversationArea.js:247 —
handleCommanddispatches parsed commands. Add handling for a/sessionaction (resume in place) and for the provider picker's selection callback here.
Fix Steps
- Add the provider panel type — In
src/tui/panels.js, addPROVIDER: "provider"toPANELSand append it togetPanelOrder(). - Create the picker panel — Add
src/tui/providerPanel.jsmodeled onskillsPanel.js: enumerateconfig.providers(fromsrc/config/schemas/providers.js) into items, render with inkSelectInput+ cyan indicator/item, and call anonSelectProvider/model callback on Enter. Escape returns to conversation. - Wire the panel — In
src/tui/app.js, add aPANELS.PROVIDERbranch that rendersProviderPanelwithconfigand anonSelecthandler that callssessionState.setProvider(...)and updates the model. - Add the
/session <name>command — Insrc/tui/commandParser.js, register asessioncommand that takes a name argument and returns{ action: "session", value: name }. - Handle the session action — In
src/tui/conversationArea.jshandleCommand, onresult.action === "session", callloadSession(sessionsDir, 20, name, cwd)and replay the resume sequence fromsessionsPanel.js(createNewSession→loadConversation→setSessionId). - Update command help — In
src/tui/commandHelp.js, add/session <name> - resume a session in placeand a/providerpanel entry to the Command group. - Verify — Run
npm run test,npm run lint, andnpm run coverageto confirm no regressions.
- 主要言語
- JavaScript
- スター
- 2
- フォーク
- 0
- 平均マージ
- 1時間 34分
- マージ済み PR(30日)
- 231
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
avoidwork/madz のほかの issue
-
fix: show file picker empty message below the input line対応中かも @avoidwork が 1 日前に担当しました。 オープンapproved bug in progress
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
avoidwork/madz#1412 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Add: EUROTV NEWSオープンchannels:add check:passed
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
curriculum documentation quality
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
githubnext/gh-aw-workshop#4638 ·
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
openclaw/openclaw-enterprise#2571 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fabriziosalmi/certmate#1247 ·
メンテナーはふだん 1 日以内に返信