Files
fusion/packages/dashboard/app/components
gsxdsm 8f5c60fd8c refactor(claude-cli): always load extension, gate via /api/models filter
Previously the vendored @fusion/pi-claude-cli extension was conditionally
loaded based on GlobalSettings.useClaudeCli. That forced a Fusion restart
every time the user toggled the provider card — confusing UX.

Key insight: pi-claude-cli registers a NEW provider id ("pi-claude-cli")
rather than overriding "anthropic", so loading it unconditionally is
safe — direct Anthropic auth and CLI-routed models coexist peacefully.
The extension also gracefully no-ops when the `claude` binary is missing
(see packages/pi-claude-cli/index.ts:106 — the throw is caught locally).

Changes:
 - serve/daemon/dashboard: always append the resolved pi-claude-cli path
   to discoverAndLoadExtensions, no settings lookup.
 - resolveClaudeCliExtensionPaths() takes no args now; always returns the
   resolved path.
 - /api/models filter flipped: hide provider === "pi-claude-cli" when
   the toggle is OFF (previously: restricted to those models when ON).
 - POST /api/auth/claude-cli drops restartRequired semantics — toggling
   now has immediate effect on the picker.
 - Provider card UX updated to match: "Claude-CLI-routed models are
   now visible/hidden from the model picker" instead of "Restart Fusion
   to activate".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 23:02:37 -07:00
..