From fd1120eba241935084637d58dc943d84c3c497e2 Mon Sep 17 00:00:00 2001 From: vspapg Date: Tue, 1 Sep 2026 16:16:56 +0300 Subject: [PATCH 1/2] fix(onboarding): show workers-only engines as disabled rows instead of hiding them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The engine step filtered to inbox-capable providers, so Copilot and Kimi simply vanished — which read as "not supported at all" (issue #355), when the real constraint is narrower: a print-mode / bridge-less CLI can be hired as a worker but cannot run Michael, who must drain hive mail. List every preset engine instead: the god-eligible set stays selectable (same order as before), and the workers-only engines render at the bottom as disabled rows — muted, radio disabled, a WORKERS ONLY badge, and a one-line hint saying why and that hiring them as workers still works. `custom` stays hidden (bring-your-own command, not a preset engine). New onboardingEngineChoices() in the config store keeps the split in one tested place; strings added to en/ar/zh-CN. Closes #355 --- .../src/components/OnboardingWizard.tsx | 41 +++++++++++++++++-- src/renderer/src/i18n/locales/ar.json | 2 + src/renderer/src/i18n/locales/en.json | 2 + src/renderer/src/i18n/locales/zh-CN.json | 2 + src/renderer/src/store/config.ts | 22 +++++++++- test/provider-config.test.cjs | 19 ++++++++- 6 files changed, 83 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/components/OnboardingWizard.tsx b/src/renderer/src/components/OnboardingWizard.tsx index 3679026d5d..49edd2da37 100644 --- a/src/renderer/src/components/OnboardingWizard.tsx +++ b/src/renderer/src/components/OnboardingWizard.tsx @@ -5,8 +5,8 @@ import { PixelButton } from './PixelButton'; import { Icon, type IconName } from './Icon'; import { SpritePortrait } from './SpritePortrait'; import { ProviderLogo } from './ProviderLogo'; -import { AGENT_PROVIDER_PRESETS, modelsForProvider, type AgentProvider, type HarnessConfig } from '@/store/config'; -import { canReceiveInbox, providerPreset } from '@shared/agentProvider'; +import { modelsForProvider, onboardingEngineChoices, type AgentProvider, type HarnessConfig } from '@/store/config'; +import { providerPreset } from '@shared/agentProvider'; import { classifyEngineAvailability, engineAvailabilityBadge, engineAvailabilityMessage, engineBlocksOnboarding } from '@shared/engineAvailability'; @@ -413,7 +413,7 @@ export function OnboardingWizard({ onComplete }: OnboardingWizardProps) {
- {AGENT_PROVIDER_PRESETS.filter((p) => canReceiveInbox(p.id)).map((p) => { + {onboardingEngineChoices().eligible.map((p) => { const sel = godProvider === p.id; return (
{engineBlocked && (
وكيل الـCLI مساعد برمجة ذكي يعمل على حاسوبك — وأشهرها Claude Code (من Anthropic) وCodex (من OpenAI) وAntigravity (من Google Gemini). ونسختك هي الوكيل الدائم الذي يُدير مكتبك كله. ننصح بـClaude Code على Opus 4.8 (1M). ويمكنك إضافة الباقي أو التبديل إليها لاحقًا.", "cliAgent": "كل خيار هو محرّك CLI (Claude Code أو Codex أو Antigravity/Gemini أو وسيط محلي مثل Qwen). المحرّكات المعلَّمة بـINSTALLED موجودة على هذا الجهاز؛ وINSTALLS ON FIRST RUN يعني أن التطبيق يُعِدّها عند أول تشغيل لـ{{godName}}. ونسختك ({{godName}}) هي المحرّك الذي ينسّق الخلية كلها. الموصى به: Claude Code · Opus 4.8 · 1M. ويمكن ربط مزوّدين آخرين لكل وكيل لاحقًا.", "recommended": "موصى به", + "workersOnly": "للعمّال فقط", + "workersOnlyHint": "لا يستطيع تصريف بريد الخليّة بعد، لذا لا يمكنه تشغيل نسختك — لكنه يبقى متاحًا عند تعيين العمّال.", "model": "النموذج", "modelNote": "هذا يضبط محرّك {{godName}} فقط. ويمكنك تشغيل مزوّدين آخرين لكل وكيل لاحقًا." }, diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index b6e4d7723c..0735272834 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -659,6 +659,8 @@ "cliAgentPlain": "A CLI agent is an AI coding assistant that runs on your computer — popular ones are Claude Code (Anthropic), Codex (OpenAI) and Antigravity (Google Gemini). Your clone is the always-on one that runs your whole office. We recommend Claude Code on Opus 4.8 (1M). You can add or switch the others later.", "cliAgent": "Each option is a CLI engine (Claude Code, Codex, Antigravity/Gemini, or a local proxy like Qwen). Engines marked INSTALLED are already on this machine; INSTALLS ON FIRST RUN means the app sets it up when {{godName}} first starts. Your clone ({{godName}}) is the engine that orchestrates the whole hive. Recommended: Claude Code · Opus 4.8 · 1M. Other providers can be wired per agent later.", "recommended": "RECOMMENDED", + "workersOnly": "WORKERS ONLY", + "workersOnlyHint": "Can't drain hive mail yet, so it can't run your clone — still available when hiring workers.", "model": "Model", "modelNote": "This only sets {{godName}}'s engine. You can run other providers per agent later." }, diff --git a/src/renderer/src/i18n/locales/zh-CN.json b/src/renderer/src/i18n/locales/zh-CN.json index a15423d8f4..ca07202af1 100644 --- a/src/renderer/src/i18n/locales/zh-CN.json +++ b/src/renderer/src/i18n/locales/zh-CN.json @@ -659,6 +659,8 @@ "cliAgentPlain": "一个CLI 智能体是运行在你电脑上的 AI 编程助手 —— 常见的有 Claude Code(Anthropic)、Codex(OpenAI)和 Antigravity(Google Gemini)。你的克隆体是常驻运行、打理整个办公室的那一个。我们推荐使用 Opus 4.8(1M)的 Claude Code。其他引擎之后可以随时添加或切换。", "cliAgent": "每个选项都是一个CLI 引擎(Claude Code、Codex、Antigravity/Gemini,或本地代理如 Qwen)。标记为 INSTALLED 的引擎已在本机就绪;INSTALLS ON FIRST RUN 表示应用会在 {{godName}} 首次启动时进行安装。你的克隆体({{godName}})是统筹整个 hive 的引擎。推荐:Claude Code · Opus 4.8 · 1M。其他提供方之后可按智能体逐一接入。", "recommended": "推荐", + "workersOnly": "仅限雇员", + "workersOnlyHint": "暂时无法接收蜂巢邮件,因此不能运行你的分身——但雇佣工作智能体时仍然可用。", "model": "模型", "modelNote": "这只设置 {{godName}} 的引擎。之后你可以在每个智能体上运行其他提供商。" }, diff --git a/src/renderer/src/store/config.ts b/src/renderer/src/store/config.ts index cc63ccfb14..76899112d5 100644 --- a/src/renderer/src/store/config.ts +++ b/src/renderer/src/store/config.ts @@ -5,7 +5,8 @@ import { providerPreset, inferAgentProvider, isClaudeProvider, - type AgentProvider + type AgentProvider, + type AgentProviderPreset } from '@shared/agentProvider'; import type { ContextTriggerConfig, @@ -305,6 +306,25 @@ export function modelProvidersForAgent(isGod = false) { ); } +/** The onboarding engine step's two groups (issue #355). Hiding inbox-less + * engines there read as "Copilot isn't supported at all", when the truth is + * narrower: a print-mode / bridge-less CLI can be HIRED as a worker but cannot + * run Michael, because the orchestrator must drain hive mail. So the step now + * shows those engines too, as disabled workers-only rows — same god-eligible + * set as `modelProvidersForAgent(true)` for the selectable group, and every + * other preset except `custom` (bring-your-own command, not an engine) in the + * disabled group. */ +export function onboardingEngineChoices(): { + eligible: AgentProviderPreset[]; + workersOnly: AgentProviderPreset[]; +} { + const eligible = modelProvidersForAgent(true); + const workersOnly = AGENT_PROVIDER_PRESETS.filter( + (preset) => preset.id !== 'custom' && !eligible.includes(preset) + ); + return { eligible, workersOnly }; +} + /** Native