Skip to content

Conversation

@j4rviscmd
Copy link
Owner

@j4rviscmd j4rviscmd commented Jan 23, 2026

Summary

  • agent-mode-switcher.jsoncurrentMode が手動で変更された場合、起動時に opencode.json / oh-my-opencode.json を期待値と比較し、差分があれば自動更新するロジックを追加
  • Toast通知はfire-and-forgetで呼び出し、プラグイン初期化のブロッキングを回避
  • updateOpencodeConfig 内の冗長なガード条件を削除、テスト内の重複パターンをヘルパー関数に抽出

Test plan

  • 全73テストがパス (bun test)
  • 型チェック通過 (bun run typecheck)
  • Biome lint通過 (bun run lint)
  • 手動確認: currentMode を手動変更 → opencode起動 → json更新されることを確認
  • 手動確認: currentMode が既に適用済み → 起動時に書き込みが発生しないことを確認

🤖 Generated with Claude Code

j4rviscmd and others added 4 commits January 23, 2026 13:38
When a user manually edits agent-mode-switcher.json to change
currentMode while OpenCode is not running, the plugin now detects
the drift on next startup and updates opencode.json and
oh-my-opencode.json to match the expected preset values.

Toast notification uses fire-and-forget to avoid blocking plugin
initialization before UI is ready.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When a user manually edits agent-mode-switcher.json to change
currentMode while OpenCode is not running, the plugin now detects
the drift on next startup and updates opencode.json and
oh-my-opencode.json to match the expected preset values.

Toast notification uses fire-and-forget to avoid blocking plugin
initialization before UI is ready.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@j4rviscmd j4rviscmd merged commit 32f4027 into main Jan 23, 2026
1 check passed
@j4rviscmd j4rviscmd deleted the feat/apply-mode-on-startup branch January 23, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants