Repository navigation
Providers phase 5a: explicit-target switch API + neutral-hub pointer bump - #405
Merged
Merged
Conversation
…bump Kills the structural binarity of provider switching (#394 §6): - switchProvider now takes an EXPLICIT targetKind and dispatches on the (source, target) pair. The old code switched by NEGATION — `sourceKind === 'claude' ? claudeToCodex : codexToClaude` with no target parameter anywhere in the API. Unknown pairs now fail loudly ("no translation path for X → Y yet") instead of silently translating to the wrong provider. targetKind is optional for one release of back-compat (omitted = the historical negation); the field hard-requires when a third provider registers. - providerSwitchCore had the real gap: it RECEIVED targetKind from its callers (focused command, bulk modal) but dropped it before the IPC call, relying on main's negation. The renderer's target choice is now authoritative end-to-end (preload + IPC schemas widened). - Bumps packages/agent-transcript-parser to the merged neutral-hub head (atp#6/#7/#8): the A↔C↔B translate seam with proven equivalence is now available in-tree for the switch flows' engine migration (next slice — file layout/sanitizer/id policy move onto the codecs). Opportunistic (per standing preference): the switch/reload flows' remaining literal-pair guards → isAgentProviderKind; "Switched to Codex/Claude" and "Codex/Claude reloaded" toasts → registry shortLabel; providerSwitchCore's draftImages carry-over gate → supportsImageAttachments capability (was `targetKind === 'claude'`). Verified: tsc clean on both projects, electron-vite build clean, vitest 170/170. Part of #394. Co-Authored-By: Claude Fable 5 <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.
Part of #394 (phase 5). The switch feature stops being structurally binary:
switchProvidertakes an explicittargetKind, dispatches on the (source, target) pair, and fails loudly on unknown pairs. The negation default survives one release for back-compat.providerSwitchCorereceivedtargetKindfrom its callers but dropped it before IPC — the renderer's choice is now authoritative end-to-end.agent-transcript-parserto the merged neutral-hub head (Add workflow command pickers #6/fix(workspace): render orphaned ghost fallback entries #7/Add mac packaging and first-launch setup #8) — the translate seam with byte-proven equivalence is now in-tree for the engine migration slice.supportsImageAttachments.Verified: tsc both projects, build, vitest 170/170.
🤖 Generated with Claude Code