mirror of
https://github.com/openai/codex.git
synced 2026-11-03 19:53:25 +00:00
Clippy
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user