Refactor API integration and enhance command handling
- Removed unused modules and updated module paths for clarity. - Added autocomplete functionality for command input in InputState. - Updated AppStateRest to include a method for checking if a turn is in flight. - Refactored subagent engine to use new API client structure. - Changed default provider from "openrouter" to "zen" with updated API keys and models. - Implemented tests for memory management and edit log functionalities. - Enhanced error handling in API requests and improved response parsing. - Updated UI components to reflect new API provider and status indicators.
This commit is contained in:
@@ -98,6 +98,17 @@ pub fn draw_chat(frame: &mut Frame, area: Rect, state: &crate::app::state::rest:
|
||||
display_lines.push(Line::from(Span::raw("")));
|
||||
}
|
||||
|
||||
if state.turn_in_flight() {
|
||||
let last_is_user = messages.last().map(|m| matches!(m.role, crate::dto::chat::message::Role::User)).unwrap_or(false);
|
||||
if last_is_user {
|
||||
display_lines.push(Line::from(vec![
|
||||
Span::styled(" AI ", Style::default().fg(Theme::BG).bg(Theme::ROLE_ASSISTANT).add_modifier(Modifier::BOLD)),
|
||||
Span::styled(" Thinking...", Style::default().fg(Theme::DIM)),
|
||||
]));
|
||||
display_lines.push(Line::from(Span::raw("")));
|
||||
}
|
||||
}
|
||||
|
||||
if messages.len() > scroll_offset + max_visible {
|
||||
let below = messages.len().saturating_sub(scroll_offset + max_visible);
|
||||
display_lines.push(Line::from(Span::styled(
|
||||
|
||||
Reference in New Issue
Block a user