mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-09-02 17:49:20 +00:00
feat: Improve CLI (#5)
* Start working on improved CLI * Add tool result previews, boxed approval card, and polished help screen REPL iteration 2: styled /help with grouped sections, box-drawing approval card with colored params, dim separator before responses, inline tool output previews via new StatusUpdate::ToolResult variant. Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
91e27b7395
commit
e6725eb6d9
@@ -208,6 +208,7 @@ impl Channel for GatewayChannel {
|
||||
StatusUpdate::ToolCompleted { name, success } => {
|
||||
SseEvent::ToolCompleted { name, success }
|
||||
}
|
||||
StatusUpdate::ToolResult { name, preview } => SseEvent::ToolResult { name, preview },
|
||||
StatusUpdate::StreamChunk(content) => SseEvent::StreamChunk { content },
|
||||
StatusUpdate::Status(msg) => SseEvent::Status { message: msg },
|
||||
StatusUpdate::ApprovalNeeded {
|
||||
|
||||
@@ -75,6 +75,7 @@ impl SseManager {
|
||||
SseEvent::Thinking { .. } => "thinking",
|
||||
SseEvent::ToolStarted { .. } => "tool_started",
|
||||
SseEvent::ToolCompleted { .. } => "tool_completed",
|
||||
SseEvent::ToolResult { .. } => "tool_result",
|
||||
SseEvent::StreamChunk { .. } => "stream_chunk",
|
||||
SseEvent::Status { .. } => "status",
|
||||
SseEvent::ApprovalNeeded { .. } => "approval_needed",
|
||||
|
||||
@@ -78,6 +78,8 @@ pub enum SseEvent {
|
||||
ToolStarted { name: String },
|
||||
#[serde(rename = "tool_completed")]
|
||||
ToolCompleted { name: String, success: bool },
|
||||
#[serde(rename = "tool_result")]
|
||||
ToolResult { name: String, preview: String },
|
||||
#[serde(rename = "stream_chunk")]
|
||||
StreamChunk { content: String },
|
||||
#[serde(rename = "status")]
|
||||
|
||||
Reference in New Issue
Block a user