Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Client-side transport API for talking to a Devo server.
//!
//! Protocol logic (JSON-RPC routing, pending response maps, ACP client handlers)
//! lives in [`client_core`]. [`stdio::StdioServerClient`] and
//! lives in `client_core`. [`stdio::StdioServerClient`] and
//! [`websocket::WebSocketServerClient`] are thin transport adapters.

mod acp_fs;
Expand Down
16 changes: 0 additions & 16 deletions crates/tui/src/chatwidget/worker_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use devo_protocol::parse_command::ParsedCommand;
use devo_protocol::protocol::ExecCommandSource;
use ratatui::text::Line;

use crate::app_event::AppEvent;
use crate::bottom_pane::ApprovalOverlay;
use crate::bottom_pane::ApprovalOverlayRequest;
use crate::bottom_pane::InputMode;
Expand All @@ -18,7 +17,6 @@ use crate::events::WorkerEvent;
use crate::exec_cell::CommandOutput;
use crate::exec_cell::ExecCell;
use crate::exec_cell::new_active_exec_command;
use crate::get_git_diff::get_git_diff;
use crate::history_cell;
use crate::tool_io_cell::FileChangeToolIoCell;
use crate::tool_io_cell::ToolIoCell;
Expand Down Expand Up @@ -587,13 +585,6 @@ impl ChatWidget {
} else {
"Tool completed"
});
if self.should_auto_show_git_diff_for_turn(&resolved_title, is_error) {
let tx = self.app_event_tx.clone();
tokio::spawn(async move {
let text = Self::format_git_diff_result(get_git_diff().await);
tx.send(AppEvent::DiffResult(text));
});
}
}
WorkerEvent::ToolResult {
tool_use_id,
Expand Down Expand Up @@ -703,13 +694,6 @@ impl ChatWidget {
} else {
"Tool completed"
});
if self.should_auto_show_git_diff_for_turn(&resolved_title, is_error) {
let tx = self.app_event_tx.clone();
tokio::spawn(async move {
let text = Self::format_git_diff_result(get_git_diff().await);
tx.send(AppEvent::DiffResult(text));
});
}
}
WorkerEvent::ShellCommandFinished { exit_code } => {
let interrupted = exit_code.is_none();
Expand Down
39 changes: 0 additions & 39 deletions crates/tui/src/chatwidget_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8228,45 +8228,6 @@ fn auto_git_diff_trigger_matches_editing_tools_only() {
));
}

#[tokio::test]
async fn successful_write_tool_result_triggers_diff_event() {
let model = Model {
slug: "test-model".to_string(),
display_name: "Test Model".to_string(),
..Model::default()
};
let (mut widget, mut app_event_rx) = widget_with_model(model, PathBuf::from("."));

widget.handle_worker_event(crate::events::WorkerEvent::ToolCall {
tool_use_id: "tool-1".to_string(),
summary: "write src/main.rs".to_string(),
preparing: false,
parsed_commands: None,
});
widget.handle_worker_event(crate::events::WorkerEvent::ToolResult {
tool_use_id: "tool-1".to_string(),
title: "write src/main.rs".to_string(),
preview: "updated".to_string(),
is_error: false,
truncated: false,
});

let diff_event = tokio::time::timeout(std::time::Duration::from_secs(1), async {
loop {
if let Some(AppEvent::DiffResult(text)) = app_event_rx.recv().await {
break text;
}
}
})
.await
.expect("diff event should arrive");

assert!(
!diff_event.is_empty(),
"auto diff should send some result text"
);
}

#[tokio::test]
async fn research_turn_does_not_auto_show_git_diff() {
let model = Model {
Expand Down
Loading