mirror of
https://github.com/instructkr/claude-code.git
synced 2026-04-06 19:28:49 +03:00
Make claw's REPL feel self-explanatory from analysis through commit
Claw already had the core slash-command and git primitives, but the UX still made users work to discover them, understand current workspace state, and trust what `/commit` was about to do. This change tightens that flow in the same places Codex-style CLIs do: command discovery, live status, typo recovery, and commit preflight/output. The REPL banner and `/help` now surface a clearer starter path, unknown slash commands suggest likely matches, `/status` includes actionable git state, and `/commit` explains what it is staging and committing before and after the model writes the Lore message. I also cleared the workspace's existing clippy blockers so the verification lane can stay fully green. Constraint: Improve UX inside the existing Rust CLI surfaces without adding new dependencies Rejected: Add more slash commands first | discoverability and feedback were the bigger friction points Rejected: Split verification lint fixes into a second commit | user requested one solid commit Confidence: high Scope-risk: moderate Directive: Keep slash discoverability, status reporting, and commit reporting aligned so `/help`, `/status`, and `/commit` tell the same workflow story Tested: cargo fmt --all; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace Not-tested: Manual interactive REPL session against live Anthropic/xAI endpoints
This commit is contained in:
@@ -19,6 +19,7 @@ async fn stream_via_provider<P: Provider>(
|
||||
provider.stream_message(request).await
|
||||
}
|
||||
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ProviderClient {
|
||||
Anthropic(AnthropicClient),
|
||||
|
||||
@@ -296,6 +296,7 @@ impl OpenAiSseParser {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
#[derive(Debug)]
|
||||
struct StreamState {
|
||||
model: String,
|
||||
@@ -497,6 +498,7 @@ impl ToolCallState {
|
||||
self.openai_index + 1
|
||||
}
|
||||
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
fn start_event(&self) -> Result<Option<ContentBlockStartEvent>, ApiError> {
|
||||
let Some(name) = self.name.clone() else {
|
||||
return Ok(None);
|
||||
|
||||
Reference in New Issue
Block a user