mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-07-02 02:22:55 +08:00
feat: improve Hermes provider support
This commit is contained in:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user