feat: add editing and MCP command handling, enhance SSE streaming with usage tracking
- Implemented `Edit` and `McpAdd` commands in the command parser and handler. - Added a new `stream` module to the runtime for handling streaming events. - Enhanced `SseParser` to parse usage information from SSE events. - Introduced `ToolCallAccumulator` for tracking tool calls independently. - Updated `AppStateRest` to include `app_config` and `MiscState` to track `effort_level` and `selected_index`. - Modified `LlmClient` to support streaming responses with usage tracking. - Improved error handling and retry logic in the streaming API calls. - Added tests for new features and improved markdown rendering in the chat view.
This commit is contained in:
+3
-4
@@ -74,10 +74,9 @@ pub fn draw_chat(frame: &mut Frame, area: Rect, state: &crate::app::state::rest:
|
||||
} else {
|
||||
msg.content.clone()
|
||||
};
|
||||
let content_line = Line::from(vec![
|
||||
Span::styled(format!("{} ", prefix), Style::default().fg(role_color)),
|
||||
Span::styled(content_str, Style::default().fg(Theme::TEXT)),
|
||||
]);
|
||||
let mut content_spans = vec![Span::styled(format!("{} ", prefix), Style::default().fg(role_color))];
|
||||
content_spans.extend(super::markdown::render_markdown(&content_str, area.width));
|
||||
let content_line = Line::from(content_spans);
|
||||
|
||||
display_lines.push(header);
|
||||
display_lines.push(content_line);
|
||||
|
||||
Reference in New Issue
Block a user