增加 opusplan 模式
Some checks are pending
Build Linux / Build Linux x86_64 (push) Waiting to run
Build Test / Build Test (${{ matrix.platform.name }}) (map[name:Linux os:ubuntu-latest rust-target:x86_64-unknown-linux-gnu]) (push) Waiting to run
Build Test / Build Test (${{ matrix.platform.name }}) (map[name:Windows os:windows-latest rust-target:x86_64-pc-windows-msvc]) (push) Waiting to run
Build Test / Build Test (${{ matrix.platform.name }}) (map[name:macOS os:macos-latest rust-target:x86_64-apple-darwin]) (push) Waiting to run
Build Test / Build Test Summary (push) Blocked by required conditions

This commit is contained in:
2025-08-14 00:21:11 +08:00
parent 28d00f9e62
commit 96eb05856e
5 changed files with 38 additions and 10 deletions

View File

@@ -926,11 +926,17 @@ pub async fn execute_claude_code(
let claude_path = find_claude_binary(&app)?;
// Map opus-plan to the appropriate Claude CLI parameter
let claude_model = match model.as_str() {
"opus-plan" => "opusplan".to_string(),
_ => model.clone()
};
let args = vec![
"-p".to_string(),
prompt.clone(),
"--model".to_string(),
model.clone(),
claude_model,
"--output-format".to_string(),
"stream-json".to_string(),
"--verbose".to_string(),
@@ -957,12 +963,18 @@ pub async fn continue_claude_code(
let claude_path = find_claude_binary(&app)?;
// Map opus-plan to the appropriate Claude CLI parameter
let claude_model = match model.as_str() {
"opus-plan" => "opusplan".to_string(),
_ => model.clone()
};
let args = vec![
"-c".to_string(), // Continue flag
"-p".to_string(),
prompt.clone(),
"--model".to_string(),
model.clone(),
claude_model,
"--output-format".to_string(),
"stream-json".to_string(),
"--verbose".to_string(),
@@ -991,13 +1003,19 @@ pub async fn resume_claude_code(
let claude_path = find_claude_binary(&app)?;
// Map opus-plan to the appropriate Claude CLI parameter
let claude_model = match model.as_str() {
"opus-plan" => "opusplan".to_string(),
_ => model.clone()
};
let args = vec![
"--resume".to_string(),
session_id.clone(),
"-p".to_string(),
prompt.clone(),
"--model".to_string(),
model.clone(),
claude_model,
"--output-format".to_string(),
"stream-json".to_string(),
"--verbose".to_string(),