feat(deeptide-rs): multi-protocol backends, themed TUI, reasoning display, local engines - #134
Merged
Merged
Conversation
…cal engines Broaden the Rust deeptide CLI toward zero-cli parity and beyond, across protocols, TUI rendering, headless mode, KV-cache, and local-model UX. Protocols & models - OpenAI (`/v1/chat/completions`) and Gemini (`generateContent`/SSE) backends behind the protocol-agnostic AgentBackend trait, alongside Anthropic; the agent loop / tools / TUI are unchanged across protocols. - Reasoning display across all three protocols (StreamingEvent::ThinkingDelta): OpenAI `reasoning_content` (+`reasoning` alias / DeepSeek-reasoner), Gemini `thought:true` parts, Anthropic `thinking_delta`; surfaced live, kept out of the answer text. - 11 local-inference presets (OpenAI-protocol, keyless): ollama, lmstudio, vllm/llama.cpp/llama, mlx/omlx, llamafile, koboldcpp, localai, jan, oobabooga, gpt4all — each at its documented default port. TUI rendering - Markdown italic, dependency-free code-fence syntax highlighting (syntax.rs), OSC-8 hyperlinks + bare-URL autolinking, word-level diff highlighting (word_diff.rs). - Theme system (theme.rs): dark/light/high-contrast via `--theme`, covering syntax highlight + diff preview + markdown accents. `dark` reproduces the prior hard-coded SGR so all snapshots are unchanged. - Live spinner shows dynamic up/down token transfer (↑ prompt / ↓ output) plus a tok/s throughput pulse. - CJK/wide-char display-width handling via width.rs; strip_ansi now also strips OSC sequences. Agent KV-cache - Rolling Anthropic prompt-cache breakpoint on the conversation tail (3 of 4 breakpoints: tools + system + conversation), so each turn reads the prior prefix from cache. Cached-token cost double-count fixed for OpenAI/Gemini. Headless mode - json/stream-json exit-code contract (non-zero on failure, envelope still printed); stream-json tool/thinking events; permission_request emission + pre-queued permission_response handling. Verified: cargo build/test/clippy(--all-targets)/fmt all green (1269 tests). Co-Authored-By: Claude Opus 4.8 <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.
Broadens the Rust deeptide CLI toward zero-cli parity and beyond — across protocols, TUI rendering, headless mode, KV-cache, and local-model UX. Default behaviour is unchanged (the
darktheme reproduces the prior hard-coded colours, so every existing snapshot stays green).Protocols & models
/v1/chat/completions) + Gemini (generateContent/SSE) backends behind the protocol-agnosticAgentBackendtrait, alongside Anthropic — the agent loop, tools, and TUI are unchanged across protocols.StreamingEvent::ThinkingDelta): OpenAIreasoning_content(+reasoningalias / DeepSeek-reasoner), Geminithought:trueparts, Anthropicthinking_delta. Surfaced live (dim "💭 thinking"), kept out of the answer text and not echoed back next turn.ollama,lmstudio,vllm/llama.cpp/llama,mlx/omlx,llamafile,koboldcpp,localai,jan,oobabooga,gpt4all— each at its documented default port.--list-providerslists them.TUI rendering
syntax.rs), OSC-8 hyperlinks + bare-URL autolinking, word-level diff highlighting (word_diff.rs).theme.rs):dark/light/high-contrastvia--theme, covering syntax highlight + diff preview + markdown accents.width.rs);strip_ansinow also strips OSC sequences.Agent KV-cache
Headless mode
permission_requestemission + pre-queuedpermission_responsehandling.Verification
cargo build/test/clippy --all-targets/fmt --checkall green — 1269 tests, 0 warnings.Known follow-ups (need live-API e2e, out of scope here)
thinkingConfigenablement; GeminicachedContentprovisioning.🤖 Generated with Claude Code