From 1e4d7809118d7d14684ac2e8ad60ca83cd523834 Mon Sep 17 00:00:00 2001 From: BobcGn <1483901658@qq.com> Date: Tue, 4 Aug 2026 00:58:08 +0800 Subject: [PATCH] feat(agents): add reasonix TUI agent provider Register reasonix (npm-installed terminal coding agent, reasonix@1.19.4) as a launchable TuiAgent: extend the TuiAgent union, TUI_AGENT_CONFIG with detect/launch on the npm bin, telemetry kind, display names, skills CLI mapping, auto-pick order, agent status labels, and the UI catalog plus 5 locale catalogs. promptInjectionMode uses stdin-after-start until the CLI prompt contract is verified. --- .gitignore | 3 +++ src/renderer/src/i18n/locales/en.json | 3 ++- src/renderer/src/i18n/locales/es.json | 3 ++- src/renderer/src/i18n/locales/ja.json | 3 ++- src/renderer/src/i18n/locales/ko.json | 3 ++- src/renderer/src/i18n/locales/zh.json | 3 ++- src/renderer/src/lib/agent-catalog.tsx | 6 ++++++ src/renderer/src/lib/agent-status.ts | 3 ++- src/shared/agent-kind.ts | 3 ++- src/shared/agent-status-types.ts | 1 + src/shared/agent-type-label.ts | 1 + src/shared/skills-cli-agent-keys.ts | 4 +++- src/shared/telemetry-events.ts | 1 + src/shared/tui-agent-config.ts | 7 +++++++ src/shared/tui-agent-display-names.ts | 3 ++- src/shared/tui-agent-selection.ts | 3 ++- src/shared/types.ts | 1 + 17 files changed, 41 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 2918ae32a69d..e2d5c08afd7e 100644 --- a/.gitignore +++ b/.gitignore @@ -134,3 +134,6 @@ src/renderer/src/i18n/locales/.es-catalog-cache.json # Bench result JSONs are working artifacts tests/tools/benchmarks/results/terminal-pipeline-*.json + +# Local contribution logs (working notes; not part of the upstream contribution) +/logs/ diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 3cb7acdff3ea..0b9b0c85f2e1 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -370,7 +370,8 @@ "fc80296033": "Devin", "da41abbdd4": "Ante", "060d152fb5": "Trae", - "mimo_code_label": "MiMo Code" + "mimo_code_label": "MiMo Code", + "reasonix": "Reasonix" }, "skill": { "cli": { diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index d13b704ba3b6..581c17c17717 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -338,7 +338,8 @@ "fc80296033": "Devin", "da41abbdd4": "Ante", "060d152fb5": "Trae", - "mimo_code_label": "MiMo Code" + "mimo_code_label": "MiMo Code", + "reasonix": "Reasonix" }, "skill": { "cli": { diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index 764f515a583d..337a4e35aa99 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -338,7 +338,8 @@ "fc80296033": "Devin", "da41abbdd4": "Ante", "060d152fb5": "Trae", - "mimo_code_label": "MiMo Code" + "mimo_code_label": "MiMo Code", + "reasonix": "Reasonix" }, "skill": { "cli": { diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index 2b007dfdbe9d..a1f14ad38c6e 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -338,7 +338,8 @@ "fc80296033": "Devin", "da41abbdd4": "Ante", "060d152fb5": "Trae", - "mimo_code_label": "MiMo Code" + "mimo_code_label": "MiMo Code", + "reasonix": "Reasonix" }, "skill": { "cli": { diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index cbee13ada941..099d680c45ff 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -338,7 +338,8 @@ "fc80296033": "Devin", "da41abbdd4": "Ante", "060d152fb5": "Trae", - "mimo_code_label": "MiMo Code" + "mimo_code_label": "MiMo Code", + "reasonix": "Reasonix" }, "skill": { "cli": { diff --git a/src/renderer/src/lib/agent-catalog.tsx b/src/renderer/src/lib/agent-catalog.tsx index 2106c0eaa485..c2967c0c3c9f 100644 --- a/src/renderer/src/lib/agent-catalog.tsx +++ b/src/renderer/src/lib/agent-catalog.tsx @@ -113,6 +113,12 @@ export const getAgentCatalog = createLocalizedCatalog((): AgentCatalogEntry[] => faviconDomain: 'www.trae.cn', homepageUrl: 'https://docs.trae.cn/cli_get-started-with-trae-cli' }, + { + id: 'reasonix', + label: translate('auto.lib.agent.catalog.reasonix', 'Reasonix'), + cmd: 'reasonix', + homepageUrl: 'https://github.com/esengine/DeepSeek-Reasonix' + }, { id: 'pi', label: translate('auto.lib.agent.catalog.302934c5d9', 'Pi'), diff --git a/src/renderer/src/lib/agent-status.ts b/src/renderer/src/lib/agent-status.ts index 1bfa9fc49da0..9e189afd4631 100644 --- a/src/renderer/src/lib/agent-status.ts +++ b/src/renderer/src/lib/agent-status.ts @@ -130,7 +130,8 @@ const ICONABLE_AGENT_TYPES: Record = { grok: true, devin: true, ante: true, - trae: true + trae: true, + reasonix: true } // Why: return null (not a 'claude' fallback) for unknown so Codex panes don't flash the Claude icon before the hook fires. diff --git a/src/shared/agent-kind.ts b/src/shared/agent-kind.ts index 95a25a3c0776..6b44b26cba20 100644 --- a/src/shared/agent-kind.ts +++ b/src/shared/agent-kind.ts @@ -48,7 +48,8 @@ const TUI_AGENT_KIND_BY_AGENT = { grok: 'grok', devin: 'devin', ante: 'ante', - trae: 'trae' + trae: 'trae', + reasonix: 'reasonix' } satisfies Record // Why: `satisfies Record` makes the lookup exhaustive at compile diff --git a/src/shared/agent-status-types.ts b/src/shared/agent-status-types.ts index 157fc95a050d..3baaa474b64b 100644 --- a/src/shared/agent-status-types.ts +++ b/src/shared/agent-status-types.ts @@ -38,6 +38,7 @@ export type WellKnownAgentType = | 'devin' | 'ante' | 'trae' + | 'reasonix' | 'unknown' export type AgentType = WellKnownAgentType | (string & {}) diff --git a/src/shared/agent-type-label.ts b/src/shared/agent-type-label.ts index 05d70d238681..792d9531a95b 100644 --- a/src/shared/agent-type-label.ts +++ b/src/shared/agent-type-label.ts @@ -23,6 +23,7 @@ const WELL_KNOWN_LABELS: Record = { devin: 'Devin', ante: 'Ante', trae: 'Trae', + reasonix: 'Reasonix', kimi: 'Kimi' } diff --git a/src/shared/skills-cli-agent-keys.ts b/src/shared/skills-cli-agent-keys.ts index ecd4a7d96c26..188da24af963 100644 --- a/src/shared/skills-cli-agent-keys.ts +++ b/src/shared/skills-cli-agent-keys.ts @@ -48,7 +48,9 @@ export const SKILLS_CLI_AGENT_KEY_BY_TUI_AGENT = { devin: 'devin', ante: null, // Why: Orca detects trae by `traecli`, an alias only TRAE CN ships. - trae: 'trae-cn' + trae: 'trae-cn', + // Why: the skills CLI has no reasonix key; drop to the universal target. + reasonix: null } satisfies Record /** diff --git a/src/shared/telemetry-events.ts b/src/shared/telemetry-events.ts index 18f7cd8986fb..f6932c2179ac 100644 --- a/src/shared/telemetry-events.ts +++ b/src/shared/telemetry-events.ts @@ -102,6 +102,7 @@ export const AGENT_KIND_VALUES = [ 'devin', 'ante', 'trae', + 'reasonix', 'other' ] as const export const agentKindSchema = z.enum(AGENT_KIND_VALUES) diff --git a/src/shared/tui-agent-config.ts b/src/shared/tui-agent-config.ts index ffaa334fda9e..98fddb1c01bc 100644 --- a/src/shared/tui-agent-config.ts +++ b/src/shared/tui-agent-config.ts @@ -306,6 +306,13 @@ export const TUI_AGENT_CONFIG: Record = { expectedProcess: 'devin', // Why: `devin -- ` auto-submits immediately (docs.devin.ai/cli), so start the REPL with no argv prompt. promptInjectionMode: 'stdin-after-start' + }, + reasonix: { + detectCmd: 'reasonix', + launchCmd: 'reasonix', + expectedProcess: 'reasonix', + // Why: reasonix's prompt contract is unverified; start bare and inject after startup, like aider/goose. + promptInjectionMode: 'stdin-after-start' } } diff --git a/src/shared/tui-agent-display-names.ts b/src/shared/tui-agent-display-names.ts index f680e16f967d..a63d48318ebc 100644 --- a/src/shared/tui-agent-display-names.ts +++ b/src/shared/tui-agent-display-names.ts @@ -40,7 +40,8 @@ export const TUI_AGENT_DISPLAY_NAMES: Record = { hermes: 'Hermes', openclaw: 'OpenClaw', copilot: 'GitHub Copilot', - grok: 'Grok' + grok: 'Grok', + reasonix: 'Reasonix' } /** Canonical agent id list derived from the exhaustive display-name record, diff --git a/src/shared/tui-agent-selection.ts b/src/shared/tui-agent-selection.ts index 0256c0526e9f..a712c0f520e0 100644 --- a/src/shared/tui-agent-selection.ts +++ b/src/shared/tui-agent-selection.ts @@ -38,7 +38,8 @@ export const TUI_AGENT_AUTO_PICK_ORDER = [ 'rovo', 'hermes', 'devin', - 'openclaw' + 'openclaw', + 'reasonix' ] as const satisfies readonly TuiAgent[] // Why: fresh installs should expose Claude Agent Teams in agent pickers; the diff --git a/src/shared/types.ts b/src/shared/types.ts index d316934f5429..bdf992f02c58 100644 --- a/src/shared/types.ts +++ b/src/shared/types.ts @@ -2608,6 +2608,7 @@ export type TuiAgent = | 'devin' // Devin CLI | 'ante' // Ante (Antigma Labs) | 'trae' // Trae CLI + | 'reasonix' // Reasonix (npm CLI) export type TaskViewPresetId = 'all' | 'issues' | 'review' | 'my-issues' | 'my-prs' | 'prs'