Replace local input model and improve shell command feedback
This commit is contained in:
@@ -150,7 +150,7 @@ pub struct TerminalGridSnapshotElement {
|
||||
impl TerminalGridSnapshotElement {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new(
|
||||
grid: &GridHandler,
|
||||
grid: GridHandler,
|
||||
row_count: usize,
|
||||
colors: color::List,
|
||||
override_colors: color::OverrideList,
|
||||
@@ -181,7 +181,7 @@ impl TerminalGridSnapshotElement {
|
||||
.with_rows_and_columns(row_count, grid.columns());
|
||||
|
||||
Self {
|
||||
grid: grid.clone(),
|
||||
grid,
|
||||
row_count,
|
||||
colors,
|
||||
override_colors,
|
||||
|
||||
@@ -715,6 +715,27 @@ impl<T: EventLoopSender> PtyController<T> {
|
||||
model.active_block_id().clone()
|
||||
};
|
||||
self.is_user_command_executing = true;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
if let CommandExecutionSource::AI { metadata }
|
||||
| CommandExecutionSource::SharedSession {
|
||||
ai_metadata: Some(metadata),
|
||||
..
|
||||
} = &event.source
|
||||
{
|
||||
crate::ai::remote_logging::log_model_event(
|
||||
ctx,
|
||||
crate::ai::remote_logging::RemoteLogRecord {
|
||||
level: crate::ai::remote_logging::RemoteLogLevel::Info,
|
||||
message: "Agent command dispatched to PTY".to_string(),
|
||||
context: serde_json::json!({
|
||||
"event": "shell_command_pty_dispatched",
|
||||
"conversation_id": metadata.conversation_id().to_string(),
|
||||
"action_id": metadata.requested_command_action_id().map(|id| id.to_string()),
|
||||
"block_id": block_id.to_string(),
|
||||
}),
|
||||
},
|
||||
);
|
||||
}
|
||||
ctx.emit(PtyControllerEvent::CommandStarted { event, block_id });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user