mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 09:19:42 +02:00
fix(session-options): keep Respawn and Ralph visible for Claude sessions
Since the CLI registry gave claude kind 'agent' (#476), isExternalCliRunMode() reads claude as an external CLI, so Session Options opened every Claude session on Summary and hid the Respawn and Ralph tabs and every Claude-only control (auto-resume, the respawn loop). The browser catalog now carries the registry's capabilities.external, the flag the server's isExternalCliMode() already reads, and Session Options asks that instead. run() keeps isExternalCliRunMode(): choosing a launch path is a different question, and custom agents rely on it.
This commit is contained in:
@@ -248,16 +248,23 @@ describe('WebServer.renderIndexHtml', () => {
|
||||
shortBadge: string;
|
||||
order: number;
|
||||
kind: string;
|
||||
external: boolean;
|
||||
enabled: boolean;
|
||||
available: boolean;
|
||||
}>;
|
||||
expect(catalog.map((entry) => entry.id)).toEqual(STOCK_CLIS.map((entry) => entry.id));
|
||||
expect(catalog.find((entry) => entry.id === 'codex')).toMatchObject({ label: 'Codex', kind: 'agent' });
|
||||
expect(catalog.find((entry) => entry.id === 'codex')).toMatchObject({
|
||||
label: 'Codex',
|
||||
kind: 'agent',
|
||||
external: true,
|
||||
});
|
||||
// claude is `kind: 'agent'` too; `external` is what keeps its Respawn/Ralph options visible.
|
||||
expect(catalog.find((entry) => entry.id === 'claude')).toMatchObject({ kind: 'agent', external: false });
|
||||
expect(catalog.find((entry) => entry.id === 'shell')).toMatchObject({ enabled: true, available: true });
|
||||
expect(
|
||||
catalog.every((entry) =>
|
||||
Object.keys(entry).every((key) =>
|
||||
['id', 'label', 'shortBadge', 'order', 'kind', 'enabled', 'available'].includes(key)
|
||||
['id', 'label', 'shortBadge', 'order', 'kind', 'external', 'enabled', 'available'].includes(key)
|
||||
)
|
||||
)
|
||||
).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user