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:
@@ -140,6 +140,13 @@ function isExternalCliRunMode(mode) {
|
||||
return EXTERNAL_CLI_MODES.has(mode) || registryCliById(mode)?.kind === 'agent';
|
||||
}
|
||||
|
||||
// Does this session lack the Claude-only features (Respawn, Ralph)? The registry's
|
||||
// `capabilities.external`, the flag the server's isExternalCliMode() reads. Not
|
||||
// isExternalCliRunMode(): that picks a launch path, and claude is `kind: 'agent'` too.
|
||||
function isExternalCliSession(mode) {
|
||||
return registryCliById(mode)?.external ?? isExternalCliRunMode(mode);
|
||||
}
|
||||
|
||||
Object.assign(CodemanApp.prototype, {
|
||||
/**
|
||||
* Build envOverrides payload from case + global settings.
|
||||
@@ -2430,7 +2437,7 @@ Object.assign(CodemanApp.prototype, {
|
||||
if (detachToggle) detachToggle.checked = this.hasTabDetachOverride(sessionId);
|
||||
|
||||
// Reset to an appropriate tab — Summary for external CLIs (Respawn/Ralph are Claude-only)
|
||||
const isAltMode = isExternalCliRunMode(session.mode);
|
||||
const isAltMode = isExternalCliSession(session.mode);
|
||||
this.switchOptionsTab(isAltMode ? 'summary' : 'respawn');
|
||||
|
||||
// Update respawn status display and buttons
|
||||
|
||||
@@ -1713,6 +1713,7 @@ export class WebServer extends EventEmitter {
|
||||
shortBadge: entry.shortBadge,
|
||||
order: entry.order,
|
||||
kind: entry.kind,
|
||||
external: entry.capabilities.external,
|
||||
enabled,
|
||||
available: enabled && installed,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user