mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
V4
This commit is contained in:
@@ -2272,6 +2272,9 @@ async fn handle_response_item(
|
||||
action,
|
||||
} => {
|
||||
let LocalShellAction::Exec(action) = action;
|
||||
if let Some(flag) = turn_readiness.as_ref() {
|
||||
flag.wait_ready().await;
|
||||
}
|
||||
tracing::info!("LocalShellCall: {action:?}");
|
||||
let params = ShellToolCallParams {
|
||||
command: action.command,
|
||||
@@ -2314,18 +2317,23 @@ async fn handle_response_item(
|
||||
name,
|
||||
input,
|
||||
status: _,
|
||||
} => Some(
|
||||
handle_custom_tool_call(
|
||||
sess,
|
||||
turn_state,
|
||||
turn_context,
|
||||
sub_id.to_string(),
|
||||
name,
|
||||
input,
|
||||
call_id,
|
||||
} => {
|
||||
if let Some(flag) = turn_readiness.as_ref() {
|
||||
flag.wait_ready().await;
|
||||
}
|
||||
Some(
|
||||
handle_custom_tool_call(
|
||||
sess,
|
||||
turn_state,
|
||||
turn_context,
|
||||
sub_id.to_string(),
|
||||
name,
|
||||
input,
|
||||
call_id,
|
||||
)
|
||||
.await,
|
||||
)
|
||||
.await,
|
||||
),
|
||||
},
|
||||
ResponseItem::FunctionCallOutput { .. } => {
|
||||
debug!("unexpected FunctionCallOutput from stream");
|
||||
None
|
||||
|
||||
@@ -1137,9 +1137,7 @@ impl ChatWidget {
|
||||
let repo_path = self.config.cwd.clone();
|
||||
let app_event_tx = self.app_event_tx.clone();
|
||||
tokio::spawn(async move {
|
||||
if let Ok(token) = readiness_to_mark.subscribe().await {
|
||||
let _ = readiness_to_mark.mark_ready(token).await;
|
||||
}
|
||||
let readiness_token = readiness_to_mark.subscribe().await.ok();
|
||||
if capture_snapshot {
|
||||
let event = match spawn_blocking(move || {
|
||||
let options = CreateGhostCommitOptions::new(repo_path.as_path());
|
||||
@@ -1184,6 +1182,9 @@ impl ChatWidget {
|
||||
};
|
||||
app_event_tx.send(event);
|
||||
}
|
||||
if let Some(token) = readiness_token {
|
||||
let _ = readiness_to_mark.mark_ready(token).await;
|
||||
}
|
||||
});
|
||||
|
||||
let mut items: Vec<InputItem> = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user