mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
Merge branch 'summary_op' into compact_cmd
This commit is contained in:
@@ -895,9 +895,11 @@ async fn submission_loop(
|
||||
|
||||
// Attempt to inject input into current task
|
||||
if let Err(items) = sess.inject_input(summarization_prompt) {
|
||||
// No current task, spawn a new one
|
||||
let task = AgentTask::spawn(sess.clone(), sub.id, items);
|
||||
sess.set_task(task);
|
||||
run_task(sess.clone(), sub.id, items).await;
|
||||
// only keep the last input item and clear the rest
|
||||
let mut pending_input = sess.state.lock().unwrap().pending_input.clone();
|
||||
pending_input.truncate(1);
|
||||
sess.state.lock().unwrap().pending_input = pending_input;
|
||||
}
|
||||
}
|
||||
Op::Shutdown => {
|
||||
|
||||
@@ -158,7 +158,7 @@ impl ChatWidget<'_> {
|
||||
self.bottom_pane.handle_paste(text);
|
||||
}
|
||||
|
||||
fn add_to_history(&mut self, cell: HistoryCell) {
|
||||
pub(crate) fn add_to_history(&mut self, cell: HistoryCell) {
|
||||
self.app_event_tx
|
||||
.send(AppEvent::InsertHistory(cell.plain_lines()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user