mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-10 01:09:43 +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:
@@ -453,7 +453,15 @@ describe('Codex quick start settings', () => {
|
||||
const src = readFileSync(resolve(import.meta.dirname, `../src/web/public/${file}`), 'utf8');
|
||||
vm.runInContext(src, context, { filename: file });
|
||||
}
|
||||
return { app: new (CodemanApp as any)(), welcomeCliActions, tunnelBtn, runModeCliOptions, modeBtns, menu };
|
||||
return {
|
||||
app: new (CodemanApp as any)(),
|
||||
welcomeCliActions,
|
||||
tunnelBtn,
|
||||
runModeCliOptions,
|
||||
modeBtns,
|
||||
menu,
|
||||
context,
|
||||
};
|
||||
}
|
||||
|
||||
const ALL_OFF = {
|
||||
@@ -539,6 +547,15 @@ describe('Codex quick start settings', () => {
|
||||
expect(src).not.toContain('data-mode="codex"');
|
||||
});
|
||||
|
||||
it('keeps Claude-only session options for claude even though it is a registry agent', () => {
|
||||
const catalog = CATALOG.map((cli) => ({ ...cli, external: cli.id !== 'claude' && cli.id !== 'shell' }));
|
||||
const { context } = loadUi(undefined, catalog);
|
||||
expect(context.isExternalCliSession('claude')).toBe(false);
|
||||
expect(context.isExternalCliSession('shell')).toBe(false);
|
||||
expect(context.isExternalCliSession('codex')).toBe(true);
|
||||
expect(context.isExternalCliSession('custom-agent')).toBe(true);
|
||||
});
|
||||
|
||||
it('shows everything when the flags were never injected', () => {
|
||||
// A cached page from a build without the injection, or a solo popup. Hiding
|
||||
// every run button on a doubt would leave a working install nothing to click.
|
||||
|
||||
Reference in New Issue
Block a user