mirror of
https://github.com/openai/codex.git
synced 2026-11-25 15:24:26 +00:00
Render exec output deltas inline (#9194)
This commit is contained in:
1 parent
7532f34699
commit
bdae0035ec
4 files changed
+52
-10
No files matched your search
@@ -54,6 +54,7 @@ use codex_core::protocol::EventMsg;
|
||||
use codex_core::protocol::ExecApprovalRequestEvent;
|
||||
use codex_core::protocol::ExecCommandBeginEvent;
|
||||
use codex_core::protocol::ExecCommandEndEvent;
|
||||
use codex_core::protocol::ExecCommandOutputDeltaEvent;
|
||||
use codex_core::protocol::ExecCommandSource;
|
||||
use codex_core::protocol::ExitedReviewModeEvent;
|
||||
use codex_core::protocol::ListCustomPromptsResponseEvent;
|
||||
@@ -1017,11 +1018,19 @@ impl ChatWidget {
|
||||
self.defer_or_handle(|q| q.push_exec_begin(ev), |s| s.handle_exec_begin_now(ev2));
|
||||
}
|
||||
|
||||
fn on_exec_command_output_delta(
|
||||
&mut self,
|
||||
_ev: codex_core::protocol::ExecCommandOutputDeltaEvent,
|
||||
) {
|
||||
// TODO: Handle streaming exec output if/when implemented
|
||||
fn on_exec_command_output_delta(&mut self, ev: ExecCommandOutputDeltaEvent) {
|
||||
let Some(cell) = self
|
||||
.active_cell
|
||||
.as_mut()
|
||||
.and_then(|c| c.as_any_mut().downcast_mut::<ExecCell>())
|
||||
else {
|
||||
return;
|
||||
};
|
||||
|
||||
if cell.append_output(&ev.call_id, std::str::from_utf8(&ev.chunk).unwrap_or("")) {
|
||||
self.bump_active_cell_revision();
|
||||
self.request_redraw();
|
||||
}
|
||||
}
|
||||
|
||||
fn on_terminal_interaction(&mut self, ev: TerminalInteractionEvent) {
|
||||
|
||||
Reference in new issue
Block a user