fix(agents): sync Kimi and Grok context windows with CPA core
This commit is contained in:
1 parent
b312b904a2
commit
51ea7fd69f
11 files changed
+218
-37
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
+33
-31
@@ -32,6 +32,7 @@ import kimiIcon from '../assets/icons/kimi-light.svg';
|
||||
import openclawIcon from '../assets/icons/openclaw.svg';
|
||||
import opencodeIcon from '../assets/icons/opencode.svg';
|
||||
import piIcon from '../assets/icons/pi-logo-on-light.svg';
|
||||
import zcodeIcon from '../assets/icons/zcode.png';
|
||||
import {
|
||||
agentModelAlias,
|
||||
filterAgentModels,
|
||||
@@ -79,6 +80,7 @@ type AgentConfigStatus = {
|
||||
pluginVersion: string | null;
|
||||
configValid: boolean;
|
||||
configured: boolean;
|
||||
configurationSynchronized: boolean;
|
||||
currentModel: string | null;
|
||||
oauthConfiguration: boolean;
|
||||
modificationEnabled: boolean;
|
||||
@@ -205,12 +207,42 @@ const agentDefinitions: AgentDefinition[] = [
|
||||
icon: codexIcon,
|
||||
descriptionKey: 'agents.description.codex',
|
||||
},
|
||||
{
|
||||
id: 'deepseek-harness',
|
||||
name: 'DeepSeek Harness',
|
||||
icon: deepseekIcon,
|
||||
descriptionKey: 'agents.description.deepseekHarness',
|
||||
},
|
||||
{
|
||||
id: 'opencode',
|
||||
name: 'OpenCode',
|
||||
icon: opencodeIcon,
|
||||
descriptionKey: 'agents.description.opencode',
|
||||
},
|
||||
{
|
||||
id: 'pi',
|
||||
name: 'Pi',
|
||||
icon: piIcon,
|
||||
descriptionKey: 'agents.description.pi',
|
||||
},
|
||||
{
|
||||
id: 'grok-build',
|
||||
name: 'Grok Build',
|
||||
icon: grokIcon,
|
||||
descriptionKey: 'agents.description.grokBuild',
|
||||
},
|
||||
{
|
||||
id: 'zcode',
|
||||
name: 'ZCode',
|
||||
icon: zcodeIcon,
|
||||
descriptionKey: 'agents.description.zcode',
|
||||
},
|
||||
{
|
||||
id: 'kimi-code',
|
||||
name: 'Kimi Code',
|
||||
icon: kimiIcon,
|
||||
descriptionKey: 'agents.description.kimiCode',
|
||||
},
|
||||
{
|
||||
id: 'openclaw',
|
||||
name: 'OpenClaw',
|
||||
@@ -223,36 +255,6 @@ const agentDefinitions: AgentDefinition[] = [
|
||||
icon: hermesIcon,
|
||||
descriptionKey: 'agents.description.hermes',
|
||||
},
|
||||
{
|
||||
id: 'deepseek-harness',
|
||||
name: 'DeepSeek Harness',
|
||||
icon: deepseekIcon,
|
||||
descriptionKey: 'agents.description.deepseekHarness',
|
||||
},
|
||||
{
|
||||
id: 'zcode',
|
||||
name: 'ZCode',
|
||||
Icon: Bot,
|
||||
descriptionKey: 'agents.description.zcode',
|
||||
},
|
||||
{
|
||||
id: 'kimi-code',
|
||||
name: 'Kimi Code',
|
||||
icon: kimiIcon,
|
||||
descriptionKey: 'agents.description.kimiCode',
|
||||
},
|
||||
{
|
||||
id: 'grok-build',
|
||||
name: 'Grok Build',
|
||||
icon: grokIcon,
|
||||
descriptionKey: 'agents.description.grokBuild',
|
||||
},
|
||||
{
|
||||
id: 'pi',
|
||||
name: 'Pi',
|
||||
icon: piIcon,
|
||||
descriptionKey: 'agents.description.pi',
|
||||
},
|
||||
];
|
||||
|
||||
const agentSubpages: AgentSubpageDefinition[] = [
|
||||
@@ -885,7 +887,7 @@ export function AgentsPage() {
|
||||
const configurationAction = resolveAgentConfigurationAction({
|
||||
client: selected,
|
||||
modificationState: activeStatus?.modificationState ?? 'unconfigured',
|
||||
configurationSynchronized: Boolean(activeStatus?.configured),
|
||||
configurationSynchronized: Boolean(activeStatus?.configurationSynchronized),
|
||||
selectedModel,
|
||||
appliedModel,
|
||||
oauthConfiguration,
|
||||
|
||||
@@ -93,7 +93,10 @@ export function resolveAgentConfigurationAction({
|
||||
}: ResolveAgentConfigurationActionOptions): AgentConfigurationAction {
|
||||
if (modificationState !== 'applied') return 'apply';
|
||||
if (client === 'pi') return 'close';
|
||||
if (client === 'zcode' && !configurationSynchronized) return 'update';
|
||||
if (
|
||||
(client === 'zcode' || client === 'kimi-code' || client === 'grok-build')
|
||||
&& !configurationSynchronized
|
||||
) return 'update';
|
||||
|
||||
const modelChanged = client === 'claude-code' || client === 'claude-desktop'
|
||||
? !sameAgentModelMappings(modelMappings, appliedModelMappings)
|
||||
|
||||
Reference in new issue
Block a user