This commit is contained in:
jimmyfraiture
2025-09-29 14:15:15 +01:00
parent 36298cf734
commit c30e4d3969
3 changed files with 14 additions and 9 deletions
+1
View File
@@ -24,6 +24,7 @@ pub(crate) struct PreparedExec {
pub(crate) apply_patch_exec: Option<ApplyPatchExec>,
}
#[allow(clippy::too_many_arguments)]
pub(crate) async fn prepare_exec_invocation(
approvals: &dyn ApprovalCoordinator,
approval_policy: AskForApproval,
@@ -81,8 +81,10 @@ async fn run_request(input: Vec<ResponseItem>) -> Value {
ConversationId::new(),
);
let mut prompt = Prompt::default();
prompt.input = input;
let prompt = Prompt {
input,
..Default::default()
};
let mut stream = match client.stream(&prompt).await {
Ok(s) => s,
+9 -7
View File
@@ -74,14 +74,16 @@ async fn run_stream(sse_body: &str) -> Vec<ResponseEvent> {
ConversationId::new(),
);
let mut prompt = Prompt::default();
prompt.input = vec![ResponseItem::Message {
id: None,
role: "user".to_string(),
content: vec![ContentItem::InputText {
text: "hello".to_string(),
let prompt = Prompt {
input: vec![ResponseItem::Message {
id: None,
role: "user".to_string(),
content: vec![ContentItem::InputText {
text: "hello".to_string(),
}],
}],
}];
..Default::default()
};
let mut stream = match client.stream(&prompt).await {
Ok(s) => s,