支持Cline Agent

This commit is contained in:
xintaofei
2026-03-28 20:14:48 +08:00
parent afa67380e7
commit be3f4986d7
26 changed files with 1418 additions and 35 deletions

View File

@@ -38,6 +38,17 @@ const EXACT_TOOL_NAME_ALIASES: Record<string, string> = {
search_text: "grep",
writefile: "write",
editfile: "edit",
// Cline
attempt_completion: "attempt_completion",
ask_followup_question: "question",
write_to_file: "write",
replace_in_file: "edit",
execute_command: "bash",
list_files: "glob",
search_files: "grep",
list_code_definition_names: "grep",
browser_action: "webfetch",
use_mcp_tool: "tool",
// Codex
update_plan: "task",
request_user_input: "question",

View File

@@ -4,6 +4,7 @@ export type AgentType =
| "open_code"
| "gemini"
| "open_claw"
| "cline"
export type AppErrorCode =
| "invalid_input"
@@ -206,6 +207,7 @@ export const AGENT_DISPLAY_ORDER: AgentType[] = [
"open_code",
"gemini",
"open_claw",
"cline",
]
const AGENT_DISPLAY_ORDER_INDEX = new Map(
@@ -224,6 +226,7 @@ export const AGENT_LABELS: Record<AgentType, string> = {
open_code: "OpenCode",
gemini: "Gemini CLI",
open_claw: "OpenClaw",
cline: "Cline",
}
export const AGENT_COLORS: Record<AgentType, string> = {
@@ -232,6 +235,7 @@ export const AGENT_COLORS: Record<AgentType, string> = {
open_code: "bg-blue-500",
gemini: "bg-blue-400",
open_claw: "bg-emerald-600",
cline: "bg-purple-500",
}
// ACP connection status (matches Rust ConnectionStatus)
@@ -461,6 +465,7 @@ export interface AcpAgentInfo {
opencode_auth_json: string | null
codex_auth_json: string | null
codex_config_toml: string | null
cline_secrets_json: string | null
}
// Lightweight agent status returned by acp_get_agent_status