feat: Agent CLI の有無チェック(doctor)と Config 選択肢の絞り込み#320
Merged
Conversation
`usagi doctor` が claude / codex / sakana.ai / gemini の各 Agent CLI が PATH 上にあるかを確認する。いずれも任意(起動するのは設定中の 1 つだけ) なので、未導入は `missing` ではなく `warn` 扱いとし、doctor は正常終了し `--fix` の対象にもしない。 あわせて表示名を domain に集約(SSoT 化): - `AgentCli::ALL` と `AgentCli::display_name()` を domain に追加 - 有無判定 `usecase::agent::available_clis` を新設(doctor と Config 画面で共用) - `usagi feature` の列ラベルを display_name 由来に統一 テスト・確認方法: cargo fmt / clippy -D warnings / test すべてパス。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Config 画面(グローバル設定・ワークスペース上書きの両方)の Agent CLI セレクタが、PATH 上にインストール済みの agent だけを循環するようにする。 未インストールの agent は選択肢に出さない。判定は usecase::agent::available_clis で行い、doctor の有無チェックと同じ仕組みを共有する。 画面を開いただけで保存値を失わないよう、現在設定中の値が未インストールでも 選択肢に残す。 テスト・確認方法: cargo fmt / clippy -D warnings / test すべてパス。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
available_clis は CommandRunner::available のみ使うため、テスト用 FakeRunner の run/check/spawn が未カバーだった(カバレッジ CI が失敗)。 doctor のフェイクランナーテストと同じ方針でそれらを叩くテストを追加する。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📊 Test Coverage
🎉✨ パーフェクト!全ファイル Lines カバレッジ 100% を達成しました 🏆🐰 |
Merged
kkyosuke
added a commit
that referenced
this pull request
Jun 24, 2026
## 目的 `v1.2.0` をリリースする。`Cargo.toml` / `Cargo.lock` の version を `1.1.0` → `1.2.0` に更新する。 本 PR を `main` にマージすると `auto-release.yml` が version 変更を検知し、`v1.2.0` タグと GitHub Release を自動作成する。 ## 変更内容 version bump のみ。v1.1.0 以降に main へマージ済みの変更点は以下のとおり。 ### 新機能(feat) - doctor で Agent CLI の有無をチェックし Config の選択肢を絞り込む (#320) - note 編集で Shift+矢印の範囲選択と Del 削除を追加 (#319) - sakana.ai(codex 互換 CLI)を追加 (#317) - 切替で右ペインのプレビューを淡色にし、選択対象が左だと示す (#315) - モードはしごの下に空行を挟みヘッダーと本体を分ける (#311) - 在席に「+ new」タブを選択中だけ表示する (#309) - 切替(Switch)でも Ctrl-E でセッションメモを開く (#310) - note を右ペイン右上に表示し ESC で閉じる (#307) - Ctrl-T を在席の「+ new」タブに着地させ Esc で元のペインに戻す (#306) - 在席(Focus)にペインのタブを表示する (#305) - Gemini に会話再開(-r latest)と初期プロンプト(-i)を配線 (#300) - usagi feature コマンドで Agent CLI 機能の星取表を表示 (#304) ### 修正(fix) - コードレビュー指摘の修正(セキュリティ・堅牢性・UX) (#318) - 在席・切替で Ctrl-E が実機端末でもメモを開くように修正 (#314) - Open Project で最近開いたワークスペースを上に表示 (#308) - 切替の note でセッション識別子が見えるように修正 (#302) - 没入から開いたメモ編集中もアタッチ端末を背後に描く (#303) - Windows でリリースビルドが通らない端末入力読み取りを修正 (#301) ### リファクタ・ドキュメント - home のオーバーレイ群を Option の集合から enum に変える (#316) - 共通ヘルパの重複を集約し分類ロジックを domain へ寄せる (#312) - 切替のキー表とコメントの `h` 表記を実装に合わせる (#313) ## テスト・確認方法 - version 変更のみのため `release-build-check.yml` が 4 プラットフォーム(Linux / macOS amd64・arm64 / Windows)でリリースビルドを検証する。 - 各機能・修正はマージ済み PR で個別にテスト・確認済み。 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
usagi doctorに Agent CLI(claude / codex / sakana.ai / gemini)の有無チェックを追加する。両者は同じ「インストール判定」を共有する(
usecase::agent::available_clis)。変更内容
doctor(有無チェック)
usagi doctorが 4 つの Agent CLI の有無を確認。いずれも任意(起動するのは設定中の 1 つだけ)なので、未導入はmissingではなくwarn(doctor は正常終了、--fixの対象外)。okのときは探索コマンド名(sakana.aiならcodex-fugu)を併記。Config 画面(選択肢の絞り込み)
リファクタ(SSoT)
AgentCli::ALLとAgentCli::display_name()を domain に集約。TUI Config・usagi featureの表示名と循環順序の正本を一本化(重複していたagent_cli_label/COLUMNSのラベルを削除)。usecase::agentに新設し、doctor と Config 画面で共用。テスト・確認方法
cargo fmt --check/cargo clippy --all-targets -- -D warnings/cargo test(1651 件)すべてパス。available_clisのフィルタ、doctor の agent presence(ok/warn・順序)、Config 循環(導入済みのみ・未導入の保存値の保持・ローカル上書き)。🤖 Generated with Claude Code