feat: improve Hermes provider support

This commit is contained in:
Simos Mikelatos
2026-06-30 20:59:40 +00:00
parent f188648a2a
commit 5c14e08493
13 changed files with 212 additions and 78 deletions

View File

@@ -109,6 +109,12 @@ function resolveResumeSessionId(
return resolvedSessionId;
}
function getHermesShellCommand(): string {
return (process.env.HERMES_COMMAND_PATH || process.env.HERMES_CLI_PATH || 'hermes')
.trim()
.split(/\s+/)[0] || 'hermes';
}
/**
* Resolves provider command line for plain shell and agent-backed shell modes.
*/
@@ -161,6 +167,14 @@ function buildShellCommand(
return initialCommand || 'opencode';
}
if (provider === 'hermes') {
const command = initialCommand || getHermesShellCommand();
if (resumeSessionId) {
return `${command} --resume "${resumeSessionId}"`;
}
return command;
}
const command = initialCommand || 'claude';
if (resumeSessionId) {
if (os.platform() === 'win32') {
@@ -481,6 +495,8 @@ export function handleShellConnection(
? 'Gemini'
: provider === 'opencode'
? 'OpenCode'
: provider === 'hermes'
? 'Hermes'
: 'Claude';
welcomeMsg = hasSession && resumeSessionId
? `\x1b[36mResuming ${providerName} session ${resumeSessionId} in: ${projectPath}\x1b[0m\r\n`