feat(hermes): add delegation model override config

This commit is contained in:
晴天
2026-05-26 06:11:25 +08:00
parent 56519808d7
commit c19d6e80d9
6 changed files with 134 additions and 6 deletions

View File

@@ -192,6 +192,8 @@ const EXECUTION_LIMITS_DEFAULTS = {
delegationOrchestratorEnabled: true,
delegationSubagentAutoApprove: false,
delegationInheritMcpToolsets: true,
delegationModel: '',
delegationProvider: '',
}
const IO_SAFETY_DEFAULTS = {
@@ -1548,6 +1550,14 @@ export function render() {
<span class="hm-field-label">${t('engine.hermesExecutionLimitsDelegationMaxSpawnDepth')}</span>
<input id="hm-delegation-max-spawn-depth" class="hm-input" type="number" inputmode="numeric" min="1" max="3" step="1" value="${esc(executionLimitsValues.delegationMaxSpawnDepth)}" ${disabled ? 'disabled' : ''}>
</label>
<label class="hm-field">
<span class="hm-field-label">${t('engine.hermesExecutionLimitsDelegationModel')}</span>
<input id="hm-delegation-model" class="hm-input" value="${esc(executionLimitsValues.delegationModel)}" placeholder="google/gemini-3-flash-preview" ${disabled ? 'disabled' : ''}>
</label>
<label class="hm-field">
<span class="hm-field-label">${t('engine.hermesExecutionLimitsDelegationProvider')}</span>
<input id="hm-delegation-provider" class="hm-input" value="${esc(executionLimitsValues.delegationProvider)}" placeholder="openrouter" ${disabled ? 'disabled' : ''}>
</label>
</div>
<div class="hm-config-check-grid">
<label class="hm-channel-check">
@@ -3402,6 +3412,8 @@ export function render() {
delegationChildTimeoutSeconds: el.querySelector('#hm-delegation-child-timeout-seconds')?.value || '600',
delegationMaxConcurrentChildren: el.querySelector('#hm-delegation-max-concurrent-children')?.value || '3',
delegationMaxSpawnDepth: el.querySelector('#hm-delegation-max-spawn-depth')?.value || '1',
delegationModel: el.querySelector('#hm-delegation-model')?.value || '',
delegationProvider: el.querySelector('#hm-delegation-provider')?.value || '',
delegationOrchestratorEnabled: !!el.querySelector('#hm-delegation-orchestrator-enabled')?.checked,
delegationSubagentAutoApprove: !!el.querySelector('#hm-delegation-subagent-auto-approve')?.checked,
delegationInheritMcpToolsets: !!el.querySelector('#hm-delegation-inherit-mcp-toolsets')?.checked,