feat(ai): add Cursor CLI provider

This commit is contained in:
Guoyu Su authored and GitHub committed 2026-08-08 11:08:18 +08:00
1 parent 25fd5677c7
commit 36e5fa4f4c
36 files changed
+1173 -36

No files matched your search

+8
View File
@@ -183,6 +183,14 @@ pub async fn run_agent_loop(
);
return crate::ai_opencode_cli::run_opencode_agent(config, &prompt, options, cancelled, on_event).await;
}
if matches!(config.provider, AiProvider::CursorCli) {
let prompt = crate::ai_cursor_cli::build_cursor_prompt(
system_prompt,
messages,
agent_ctx.sql_permissions.allow_writes,
);
return crate::ai_cursor_cli::run_cursor_agent(config, &prompt, options, cancelled, on_event).await;
}
let prompt =
crate::ai_codex_cli::build_codex_prompt(system_prompt, messages, agent_ctx.sql_permissions.allow_writes);
return crate::ai_codex_cli::run_codex_agent(config, &prompt, options, cancelled, on_event).await;