mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
fix: address the release-prep review of #685
Keep the Run button's mode when fewer than two agents are offered (_commandPaletteAgent), so a Docker case whose host offers only Shell still starts the container agent the Run button shows; pinned by a new palette test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d16172c4b8
commit
fac47f067d
2 files changed
+36
-4
No files matched your search
@@ -513,6 +513,28 @@ describe('Command-K new-session agent picker', () => {
|
||||
|
||||
expect(elements.commandPaletteList.innerHTML).not.toContain('data-palette-agent-cycle');
|
||||
});
|
||||
|
||||
it('keeps the Run button mode when the host offers a single other agent (a Docker case)', async () => {
|
||||
// The host has only Shell, while a Docker case's Run menu put the Run
|
||||
// button on the container's claude: Enter must still start claude.
|
||||
const { app, elements } = loadAgentPalette(PALETTE_CATALOG.slice(0, 2));
|
||||
app.isCliAvailable = (id: string) => id !== 'claude';
|
||||
let modeDuringRun: string | undefined;
|
||||
app.run = vi.fn(async () => {
|
||||
modeDuringRun = app._runMode;
|
||||
});
|
||||
|
||||
app.openCommandPalette();
|
||||
elements.commandPaletteSearch.value = 'nomatch';
|
||||
app.renderCommandPalette();
|
||||
const index = app.commandPaletteItems.findIndex((i: any) => i.type === 'new-session');
|
||||
|
||||
expect(app.commandPaletteItems[index]).toMatchObject({ mode: 'claude', subtitle: 'Run Claude in plex-previews' });
|
||||
expect(elements.commandPaletteList.innerHTML).not.toContain('data-palette-agent-cycle');
|
||||
await app.activateCommandPaletteItem(index);
|
||||
expect(modeDuringRun).toBe('claude');
|
||||
expect(app._runMode).toBe('claude');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Session Manager unified list', () => {
|
||||
|
||||
Reference in new issue
Block a user