Repository navigation
Providers phase 2c-4: composer submit protocol as a provider capability - #402
Merged
Merged
Conversation
Completes phase 2c: the last inline provider fork in the composer moves behind the registry. - RendererProviderCapabilities gains composerSubmit(io) plus two flags: supportsImageAttachments (gates draft accumulation, the pill strip, and post-submit clearing — was three `provider === 'claude'` literals) and usesOptimisticUserEcho (Codex's optimistic user entry at submit; the STORE calls stay at the call site so providers never import the workspace store). - providers/claude/renderer/composerSubmit.ts owns Claude's three routes — images (750ms wall-clock fallback; event-driven detection deliberately disabled because image expansion never shows the text placeholder), paste-like (bracketed paste, then Enter only after the TUI visibly committed the paste — #279/#90), plain fast path. providers/codex/renderer/composerSubmit.ts owns the atomic bracketed-paste+Enter write that fixed Codex swallowing \r. Every race WHY block moved verbatim; the protocols are byte-identical to the inlined versions. - useComposerKeybinds keeps only kind-agnostic machinery: pasteId minting + paste-debug journal, streaming-baseline capture, composer clearing, draft preservation on throw. The paste-debug isPasteLike heuristic still uses CLAUDE_PASTE_THRESHOLD on purpose — it's a diagnostic field kept stable so historical dumps stay comparable. - TileLeaf's `kind === 'codex' ? 'codex' : 'claude'` derivation (which silently coerced any future provider to claude, #394 §4.7) becomes isAgentProviderKind + DEFAULT_PROVIDER back-compat. Verified: tsc clean on both projects, electron-vite build clean, vitest 170/170. NOTE: the moved protocols are verbatim, but this is the paste-race path — a manual smoke (multiline paste into a Claude pane; prompt submit into a Codex pane) is recommended on first run. Part of #394. Phase 2c complete. 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 — completes phase 2c. Follows #401.
What
composerSubmit(io)capability +supportsImageAttachments/usesOptimisticUserEchoflags on the renderer registry.providers/claude/renderer/composerSubmit.ts; Codex's atomic bracketed-paste+Enter to its counterpart. Every race WHY block moved verbatim — the protocols are byte-identical to the inlined versions.useComposerKeybindskeeps only kind-agnostic machinery (pasteId journal, baseline capture, clear/preserve-draft).isAgentProviderKind+ documentedDEFAULT_PROVIDERback-compat.'claude'literals.Verification
tsc --noEmitclean on both projects;electron-vite buildclean;vitest170/170.route:*events) will confirm routing went through the new modules.🤖 Generated with Claude Code