mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 18:21:52 +08:00
Improve streaming feedback for CLI responses
The active Rust CLI path now keeps users informed during streaming with a waiting spinner, inline tool call summaries, response token usage, semantic color cues, and an opt-out switch. The work stays inside the active + renderer path and updates stale runtime tests that referenced removed permission enums. Constraint: Must keep changes in the active CLI path rather than refactoring unused app shell Constraint: Must pass cargo fmt, clippy, and full cargo test without adding dependencies Rejected: Route the work through | inactive path would expand risk and scope Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep future streaming UX changes wired through renderer color settings so remains end-to-end Tested: cargo fmt --all; cargo clippy --all-targets --all-features -- -D warnings; cargo test Not-tested: Interactive manual terminal run against live Anthropic streaming output
This commit is contained in:
@@ -408,7 +408,7 @@ mod tests {
|
||||
.sum::<i32>();
|
||||
Ok(total.to_string())
|
||||
});
|
||||
let permission_policy = PermissionPolicy::new(PermissionMode::Prompt);
|
||||
let permission_policy = PermissionPolicy::new(PermissionMode::WorkspaceWrite);
|
||||
let system_prompt = SystemPromptBuilder::new()
|
||||
.with_project_context(ProjectContext {
|
||||
cwd: PathBuf::from("/tmp/project"),
|
||||
@@ -487,7 +487,7 @@ mod tests {
|
||||
Session::new(),
|
||||
SingleCallApiClient,
|
||||
StaticToolExecutor::new(),
|
||||
PermissionPolicy::new(PermissionMode::Prompt),
|
||||
PermissionPolicy::new(PermissionMode::WorkspaceWrite),
|
||||
vec!["system".to_string()],
|
||||
);
|
||||
|
||||
@@ -536,7 +536,7 @@ mod tests {
|
||||
session,
|
||||
SimpleApi,
|
||||
StaticToolExecutor::new(),
|
||||
PermissionPolicy::new(PermissionMode::Allow),
|
||||
PermissionPolicy::new(PermissionMode::DangerFullAccess),
|
||||
vec!["system".to_string()],
|
||||
);
|
||||
|
||||
@@ -563,7 +563,7 @@ mod tests {
|
||||
Session::new(),
|
||||
SimpleApi,
|
||||
StaticToolExecutor::new(),
|
||||
PermissionPolicy::new(PermissionMode::Allow),
|
||||
PermissionPolicy::new(PermissionMode::DangerFullAccess),
|
||||
vec!["system".to_string()],
|
||||
);
|
||||
runtime.run_turn("a", None).expect("turn a");
|
||||
|
||||
Reference in New Issue
Block a user