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

+9
View File
@@ -42,6 +42,15 @@ const taggedAiCliErrorKeys: Record<string, string> = {
openCodeTimeout: "ai.cliErrors.openCodeTimeout",
openCodeProtocolError: "ai.cliErrors.openCodeProtocolError",
openCodeRunFailed: "ai.cliErrors.openCodeRunFailed",
cursorNotInstalled: "ai.cliErrors.cursorNotInstalled",
cursorCliPathInvalid: "ai.cliErrors.cursorCliPathInvalid",
cursorEnvInvalid: "ai.cliErrors.cursorEnvInvalid",
cursorEnvReserved: "ai.cliErrors.cursorEnvReserved",
cursorNotAuthenticated: "ai.cliErrors.cursorNotAuthenticated",
cursorMcpStartupFailed: "ai.cliErrors.cursorMcpStartupFailed",
cursorTimeout: "ai.cliErrors.cursorTimeout",
cursorProtocolError: "ai.cliErrors.cursorProtocolError",
cursorRunFailed: "ai.cliErrors.cursorRunFailed",
};
const exactMessageKeys: Record<string, string> = {
+10 -1
View File
@@ -2059,7 +2059,7 @@ export default {
maxRetries: "Max Retries",
maxRetriesHint: "Retry on rate limits, timeouts, and temporary network errors. 0 = never, max 10.",
maxRetriesGlobal: "Max Retries",
maxRetriesGlobalDescription: "Number of automatic retries on transient API errors (rate limits, timeouts, network blips). Applies to all API-backed AI providers. CLI providers (claude-code, codex, pi) are unaffected.",
maxRetriesGlobalDescription: "Number of automatic retries on transient API errors (rate limits, timeouts, network blips). Applies to all API-backed AI providers. CLI providers are unaffected.",
maxRetriesRange: "{min}–{max}, default {default}",
maxRetriesSaved: "Max retries saved",
codexCliPath: "Codex CLI Path",
@@ -2130,6 +2130,15 @@ export default {
openCodeTimeout: "OpenCode CLI did not respond before the operation timed out.",
openCodeProtocolError: "OpenCode CLI returned an invalid JSON event stream. Check the OpenCode version and diagnostics below.",
openCodeRunFailed: "OpenCode CLI exited unexpectedly. Use the error code and diagnostics below to identify the failing executable or CLI output.",
cursorNotInstalled: "Cursor CLI was not found. Install Cursor CLI or set its executable path in Settings > AI.",
cursorCliPathInvalid: "The Cursor CLI path is invalid. Select only the agent executable and configure environment variables separately.",
cursorEnvInvalid: "A Cursor CLI environment variable name is invalid. Use names such as HTTPS_PROXY.",
cursorEnvReserved: "A Cursor or DBX-managed environment variable was overridden. Remove CURSOR_CONFIG_DIR, CURSOR_DATA_DIR, and DBX_MCP_* variables from the provider configuration.",
cursorNotAuthenticated: "Cursor CLI is not authenticated. Run `agent login` in a terminal and try again.",
cursorMcpStartupFailed: "Cursor could not start the scoped DBX MCP server. Check Settings > MCP and the diagnostics below.",
cursorTimeout: "Cursor CLI did not respond before the operation timed out.",
cursorProtocolError: "Cursor CLI returned an invalid JSON event stream. Check the Cursor CLI version and diagnostics below.",
cursorRunFailed: "Cursor CLI exited unexpectedly. Use the error code and diagnostics below to identify the failing executable or CLI output.",
},
actions: {
general: "General",
+10 -1
View File
@@ -1969,6 +1969,15 @@ export default withEnglishFallback({
openCodeTimeout: "OpenCode CLI no respondió antes de que finalizara el tiempo de espera.",
openCodeProtocolError: "OpenCode CLI devolvió un flujo de eventos JSON no válido. Revisa la versión de OpenCode y los detalles siguientes.",
openCodeRunFailed: "OpenCode CLI terminó de forma inesperada. Usa el código de error y los detalles siguientes para identificar el fallo.",
cursorNotInstalled: "No se encontró Cursor CLI. Instálalo o configura la ruta del ejecutable en Ajustes > IA.",
cursorCliPathInvalid: "La ruta de Cursor CLI no es válida. Selecciona solo el ejecutable agent y configura las variables de entorno por separado.",
cursorEnvInvalid: "El nombre de una variable de entorno de Cursor CLI no es válido. Usa nombres como HTTPS_PROXY.",
cursorEnvReserved: "Se intentó sobrescribir una variable administrada por Cursor o DBX. Elimina CURSOR_CONFIG_DIR, CURSOR_DATA_DIR y DBX_MCP_* de la configuración.",
cursorNotAuthenticated: "Cursor CLI no está autenticado. Ejecuta `agent login` en una terminal y vuelve a intentarlo.",
cursorMcpStartupFailed: "Cursor no pudo iniciar el servidor DBX MCP con ámbito restringido. Revisa Ajustes > MCP y los detalles siguientes.",
cursorTimeout: "Cursor CLI no respondió antes de que finalizara el tiempo de espera.",
cursorProtocolError: "Cursor CLI devolvió un flujo de eventos JSON no válido. Revisa la versión de Cursor CLI y los detalles siguientes.",
cursorRunFailed: "Cursor CLI terminó de forma inesperada. Usa el código de error y los detalles siguientes para identificar el fallo.",
},
run: "Ejecutar",
readingSchema: "Leyendo esquema",
@@ -2105,7 +2114,7 @@ export default withEnglishFallback({
contextWindowAuto: "Auto (detectar desde el nombre del modelo)",
contextWindowHint: "Tokens. Déjalo vacío para detección automática. Configúralo manualmente para modelos locales/personalizados.",
maxRetriesGlobal: "Reintentos máximos",
maxRetriesGlobalDescription: "Número de reintentos automáticos en errores transitorios de API (límite de tasa, timeout, fallos de red). Se aplica a todos los proveedores de IA por API. Los proveedores CLI (claude-code, codex, pi) no se ven afectados.",
maxRetriesGlobalDescription: "Número de reintentos automáticos en errores transitorios de API (límite de tasa, timeout, fallos de red). Se aplica a todos los proveedores de IA por API. Los proveedores CLI no se ven afectados.",
maxRetriesRange: "{min}–{max}, predeterminado {default}",
maxRetriesSaved: "Reintentos máximos guardados",
codexCliPath: "Ruta de Codex CLI",
+10 -1
View File
@@ -2036,7 +2036,7 @@ export default withEnglishFallback({
contextWindowAuto: "Auto (rileva dal nome del modello)",
contextWindowHint: "Token. Lascia vuoto per il rilevamento automatico. Imposta manualmente per modelli locali/personalizzati.",
maxRetriesGlobal: "Tentativi massimi",
maxRetriesGlobalDescription: "Numero di tentativi automatici su errori API transitori (limite di velocità, timeout, problemi di rete). Si applica a tutti i provider IA via API. I provider CLI (claude-code, codex, pi) non sono interessati.",
maxRetriesGlobalDescription: "Numero di tentativi automatici su errori API transitori (limite di velocità, timeout, problemi di rete). Si applica a tutti i provider IA via API. I provider CLI non sono interessati.",
maxRetriesRange: "{min}–{max}, predefinito {default}",
maxRetriesSaved: "Tentativi massimi salvati",
codexCliPath: "Percorso Codex CLI",
@@ -2107,6 +2107,15 @@ export default withEnglishFallback({
openCodeTimeout: "OpenCode CLI non ha risposto prima della scadenza dell'operazione.",
openCodeProtocolError: "OpenCode CLI ha restituito un flusso di eventi JSON non valido. Controlla la versione di OpenCode e i dettagli seguenti.",
openCodeRunFailed: "OpenCode CLI è terminato in modo imprevisto. Usa il codice errore e i dettagli seguenti per identificare il problema.",
cursorNotInstalled: "Cursor CLI non è stato trovato. Installalo o imposta il percorso dell'eseguibile in Impostazioni > AI.",
cursorCliPathInvalid: "Il percorso di Cursor CLI non è valido. Seleziona solo l'eseguibile agent e configura separatamente le variabili d'ambiente.",
cursorEnvInvalid: "Il nome di una variabile d'ambiente di Cursor CLI non è valido. Usa nomi come HTTPS_PROXY.",
cursorEnvReserved: "È stata sovrascritta una variabile gestita da Cursor o DBX. Rimuovi CURSOR_CONFIG_DIR, CURSOR_DATA_DIR e DBX_MCP_* dalla configurazione.",
cursorNotAuthenticated: "Cursor CLI non è autenticato. Esegui `agent login` nel terminale e riprova.",
cursorMcpStartupFailed: "Cursor non ha potuto avviare il server DBX MCP con ambito limitato. Controlla Impostazioni > MCP e i dettagli seguenti.",
cursorTimeout: "Cursor CLI non ha risposto prima della scadenza dell'operazione.",
cursorProtocolError: "Cursor CLI ha restituito un flusso di eventi JSON non valido. Controlla la versione di Cursor CLI e i dettagli seguenti.",
cursorRunFailed: "Cursor CLI è terminato in modo imprevisto. Usa il codice errore e i dettagli seguenti per identificare il problema.",
},
actions: {
general: "Generale",
+10 -1
View File
@@ -1954,7 +1954,7 @@ export default withEnglishFallback({
contextWindowAuto: "自動(モデル名から検出)",
contextWindowHint: "トークン数。空欄で自動検出。ローカル/カスタムモデルは手動設定してください。",
maxRetriesGlobal: "最大再試行回数",
maxRetriesGlobalDescription: "一時的なAPIエラー(レート制限、タイムアウト、ネットワーク障害)発生時の自動再試行回数。すべてのAPI対応AIプロバイダーに適用されます。CLIプロバイダー(claude-code、codex、pi)は影響を受けません。",
maxRetriesGlobalDescription: "一時的なAPIエラー(レート制限、タイムアウト、ネットワーク障害)発生時の自動再試行回数。すべてのAPI対応AIプロバイダーに適用されます。CLIプロバイダーは影響を受けません。",
maxRetriesRange: "{min}–{max}、デフォルト {default}",
maxRetriesSaved: "最大再試行回数を保存しました",
codexCliPath: "Codex CLI パス",
@@ -2003,6 +2003,15 @@ export default withEnglishFallback({
openCodeTimeout: "OpenCode CLIはタイムアウトまでに応答しませんでした。",
openCodeProtocolError: "OpenCode CLIが無効なJSONイベントストリームを返しました。OpenCodeのバージョンと以下の診断詳細を確認してください。",
openCodeRunFailed: "OpenCode CLIが予期せず終了しました。エラーコードと以下の診断詳細から問題を確認してください。",
cursorNotInstalled: "Cursor CLIが見つかりません。Cursor CLIをインストールするか、設定 > AIで実行ファイルのパスを指定してください。",
cursorCliPathInvalid: "Cursor CLIのパスが無効です。agent実行ファイルだけを選択し、環境変数は別に設定してください。",
cursorEnvInvalid: "Cursor CLIの環境変数名が無効です。HTTPS_PROXYのような名前を使用してください。",
cursorEnvReserved: "CursorまたはDBXが管理する環境変数が上書きされています。CURSOR_CONFIG_DIR、CURSOR_DATA_DIR、DBX_MCP_*を設定から削除してください。",
cursorNotAuthenticated: "Cursor CLIにログインしていません。ターミナルで`agent login`を実行してから再試行してください。",
cursorMcpStartupFailed: "Cursorはスコープ付きDBX MCPサーバーを起動できませんでした。設定 > MCPと以下の診断詳細を確認してください。",
cursorTimeout: "Cursor CLIはタイムアウトまでに応答しませんでした。",
cursorProtocolError: "Cursor CLIが無効なJSONイベントストリームを返しました。Cursor CLIのバージョンと以下の診断詳細を確認してください。",
cursorRunFailed: "Cursor CLIが予期せず終了しました。エラーコードと以下の診断詳細から問題を確認してください。",
},
run: "実行",
readingSchema: "スキーマを読み取り中",
+9
View File
@@ -2010,6 +2010,15 @@ export default withEnglishFallback({
openCodeTimeout: "OpenCode CLI가 제한 시간 안에 응답하지 않았습니다.",
openCodeProtocolError: "OpenCode CLI가 잘못된 JSON 이벤트 스트림을 반환했습니다. OpenCode 버전과 아래 진단을 확인하세요.",
openCodeRunFailed: "OpenCode CLI가 예기치 않게 종료되었습니다. 아래의 오류 코드와 진단을 사용하여 실패한 실행 파일이나 CLI 출력을 파악하세요.",
cursorNotInstalled: "Cursor CLI를 찾을 수 없습니다. Cursor CLI를 설치하거나 설정 > AI에서 실행 파일 경로를 지정하세요.",
cursorCliPathInvalid: "Cursor CLI 경로가 올바르지 않습니다. agent 실행 파일만 선택하고 환경 변수는 별도로 설정하세요.",
cursorEnvInvalid: "Cursor CLI 환경 변수 이름이 올바르지 않습니다. HTTPS_PROXY와 같은 이름을 사용하세요.",
cursorEnvReserved: "Cursor 또는 DBX가 관리하는 환경 변수를 덮어썼습니다. CURSOR_CONFIG_DIR, CURSOR_DATA_DIR 및 DBX_MCP_* 변수를 제거하세요.",
cursorNotAuthenticated: "Cursor CLI에 로그인되어 있지 않습니다. 터미널에서 `agent login`을 실행한 후 다시 시도하세요.",
cursorMcpStartupFailed: "Cursor가 범위가 제한된 DBX MCP 서버를 시작하지 못했습니다. 설정 > MCP와 아래 진단을 확인하세요.",
cursorTimeout: "Cursor CLI가 제한 시간 안에 응답하지 않았습니다.",
cursorProtocolError: "Cursor CLI가 잘못된 JSON 이벤트 스트림을 반환했습니다. Cursor CLI 버전과 아래 진단을 확인하세요.",
cursorRunFailed: "Cursor CLI가 예기치 않게 종료되었습니다. 아래의 오류 코드와 진단을 사용하여 실패 원인을 확인하세요.",
},
actions: {
general: "일반",
+10 -1
View File
@@ -1971,6 +1971,15 @@ export default withEnglishFallback({
openCodeTimeout: "O OpenCode CLI não respondeu antes do tempo limite da operação.",
openCodeProtocolError: "O OpenCode CLI retornou um fluxo de eventos JSON inválido. Verifique a versão do OpenCode e os detalhes abaixo.",
openCodeRunFailed: "O OpenCode CLI foi encerrado inesperadamente. Use o código do erro e os detalhes abaixo para identificar a falha.",
cursorNotInstalled: "O Cursor CLI não foi encontrado. Instale-o ou defina o caminho do executável em Configurações > IA.",
cursorCliPathInvalid: "O caminho do Cursor CLI é inválido. Selecione apenas o executável agent e configure as variáveis de ambiente separadamente.",
cursorEnvInvalid: "O nome de uma variável de ambiente do Cursor CLI é inválido. Use nomes como HTTPS_PROXY.",
cursorEnvReserved: "Uma variável gerenciada pelo Cursor ou DBX foi sobrescrita. Remova CURSOR_CONFIG_DIR, CURSOR_DATA_DIR e DBX_MCP_* da configuração.",
cursorNotAuthenticated: "O Cursor CLI não está autenticado. Execute `agent login` no terminal e tente novamente.",
cursorMcpStartupFailed: "O Cursor não conseguiu iniciar o servidor DBX MCP com escopo restrito. Verifique Configurações > MCP e os detalhes abaixo.",
cursorTimeout: "O Cursor CLI não respondeu antes do tempo limite da operação.",
cursorProtocolError: "O Cursor CLI retornou um fluxo de eventos JSON inválido. Verifique a versão do Cursor CLI e os detalhes abaixo.",
cursorRunFailed: "O Cursor CLI foi encerrado inesperadamente. Use o código do erro e os detalhes abaixo para identificar a falha.",
},
run: "Executar",
readingSchema: "Lendo schema",
@@ -2103,7 +2112,7 @@ export default withEnglishFallback({
contextWindowAuto: "Automático (detectar pelo nome do modelo)",
contextWindowHint: "Tokens. Deixe vazio para detecção automática. Defina manualmente para modelos locais/personalizados.",
maxRetriesGlobal: "Máximo de Tentativas",
maxRetriesGlobalDescription: "Número de tentativas automáticas em erros transitórios de API (limite de taxa, timeout, falhas de rede). Aplica-se a todos os provedores de IA via API. Provedores CLI (claude-code, codex, pi) não são afetados.",
maxRetriesGlobalDescription: "Número de tentativas automáticas em erros transitórios de API (limite de taxa, timeout, falhas de rede). Aplica-se a todos os provedores de IA via API. Provedores CLI não são afetados.",
maxRetriesRange: "{min}–{max}, padrão {default}",
maxRetriesSaved: "Máximo de tentativas salvo",
enableThinking: "Raciocínio",
+10 -1
View File
@@ -2059,7 +2059,7 @@ export default withEnglishFallback({
maxRetries: "最大重试次数",
maxRetriesHint: "遇到限流、超时或临时网络错误时自动重试。0 = 不重试,最大 10。",
maxRetriesGlobal: "最大重试次数",
maxRetriesGlobalDescription: "遇到临时 API 错误(限流、超时、网络波动)时的自动重试次数。适用于所有 API 模式 AI 供应商。CLI 供应商(claude-code、codex、pi)不受影响。",
maxRetriesGlobalDescription: "遇到临时 API 错误(限流、超时、网络波动)时的自动重试次数。适用于所有 API 模式 AI 供应商。CLI 供应商不受影响。",
maxRetriesRange: "{min}–{max},默认 {default}",
maxRetriesSaved: "最大重试次数已保存",
codexCliPath: "Codex CLI 路径",
@@ -2130,6 +2130,15 @@ export default withEnglishFallback({
openCodeTimeout: "OpenCode CLI 未能在操作超时前响应。",
openCodeProtocolError: "OpenCode CLI 返回了无效的 JSON 事件流。请检查 OpenCode 版本和下方诊断详情。",
openCodeRunFailed: "OpenCode CLI 异常退出。请根据错误代码和下方诊断详情确认失败的可执行文件或 CLI 输出。",
cursorNotInstalled: "未找到 Cursor CLI。请安装 Cursor CLI,或在 设置 > AI 中填写其可执行文件路径。",
cursorCliPathInvalid: "Cursor CLI 路径无效。请只选择 agent 可执行文件,环境变量需单独配置。",
cursorEnvInvalid: "Cursor CLI 环境变量名称无效。请使用 HTTPS_PROXY 这类合法名称。",
cursorEnvReserved: "配置覆盖了由 Cursor 或 DBX 管理的环境变量。请移除 CURSOR_CONFIG_DIR、CURSOR_DATA_DIR 和 DBX_MCP_* 变量。",
cursorNotAuthenticated: "Cursor CLI 尚未登录。请在终端执行 `agent login` 后重试。",
cursorMcpStartupFailed: "Cursor 无法启动受限范围的 DBX MCP Server。请检查 设置 > MCP 和下方诊断详情。",
cursorTimeout: "Cursor CLI 未能在操作超时前响应。",
cursorProtocolError: "Cursor CLI 返回了无效的 JSON 事件流。请检查 Cursor CLI 版本和下方诊断详情。",
cursorRunFailed: "Cursor CLI 异常退出。请根据错误代码和下方诊断详情确认失败的可执行文件或 CLI 输出。",
},
actions: {
general: "通用问答",
+10 -1
View File
@@ -2039,7 +2039,7 @@ export default withEnglishFallback({
maxRetries: "最大重試次數",
maxRetriesHint: "遇到限流、超時或暫時性網路錯誤時自動重試。0 = 不重試,最大 10。",
maxRetriesGlobal: "最大重試次數",
maxRetriesGlobalDescription: "遇到暫時性 API 錯誤(限流、超時、網路波動)時的自動重試次數。適用於所有 API 模式 AI 供應商。CLI 供應商(claude-code、codex、pi)不受影響。",
maxRetriesGlobalDescription: "遇到暫時性 API 錯誤(限流、超時、網路波動)時的自動重試次數。適用於所有 API 模式 AI 供應商。CLI 供應商不受影響。",
maxRetriesRange: "{min}–{max},預設 {default}",
maxRetriesSaved: "最大重試次數已儲存",
codexCliPath: "Codex CLI 路徑",
@@ -2110,6 +2110,15 @@ export default withEnglishFallback({
openCodeTimeout: "OpenCode CLI 未能在操作逾時前回應。",
openCodeProtocolError: "OpenCode CLI 傳回了無效的 JSON 事件串流。請檢查 OpenCode 版本和下方診斷詳情。",
openCodeRunFailed: "OpenCode CLI 異常結束。請依據錯誤代碼和下方診斷詳情確認失敗的執行檔或 CLI 輸出。",
cursorNotInstalled: "找不到 Cursor CLI。請安裝 Cursor CLI,或在 設定 > AI 中填寫其執行檔路徑。",
cursorCliPathInvalid: "Cursor CLI 路徑無效。請只選擇 agent 執行檔,環境變數需另外設定。",
cursorEnvInvalid: "Cursor CLI 環境變數名稱無效。請使用 HTTPS_PROXY 這類合法名稱。",
cursorEnvReserved: "設定覆寫了由 Cursor 或 DBX 管理的環境變數。請移除 CURSOR_CONFIG_DIR、CURSOR_DATA_DIR 和 DBX_MCP_* 變數。",
cursorNotAuthenticated: "Cursor CLI 尚未登入。請在終端執行 `agent login` 後重試。",
cursorMcpStartupFailed: "Cursor 無法啟動受限範圍的 DBX MCP Server。請檢查 設定 > MCP 和下方診斷詳情。",
cursorTimeout: "Cursor CLI 未能在操作逾時前回應。",
cursorProtocolError: "Cursor CLI 傳回了無效的 JSON 事件串流。請檢查 Cursor CLI 版本和下方診斷詳情。",
cursorRunFailed: "Cursor CLI 異常結束。請依據錯誤代碼和下方診斷詳情確認失敗的執行檔或 CLI 輸出。",
},
actions: {
general: "通用問答",