feat(hermes): add worktree session setting

This commit is contained in:
晴天
2026-05-26 05:50:12 +08:00
parent 51be3ab4ca
commit 975613416d
6 changed files with 68 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ const SESSION_RUNTIME_DEFAULTS = {
atHour: 4,
groupSessionsPerUser: true,
threadSessionsPerUser: false,
worktreeEnabled: false,
}
const COMPRESSION_DEFAULTS = {
@@ -498,6 +499,10 @@ export function render() {
<input id="hm-thread-sessions-per-user" type="checkbox" ${runtimeValues.threadSessionsPerUser ? 'checked' : ''} ${disabled ? 'disabled' : ''}>
<span>${t('engine.hermesThreadSessionsPerUser')}</span>
</label>
<label class="hm-channel-check">
<input id="hm-worktree-enabled" type="checkbox" ${runtimeValues.worktreeEnabled ? 'checked' : ''} ${disabled ? 'disabled' : ''}>
<span>${t('engine.hermesWorktreeEnabled')}</span>
</label>
</div>
<div class="hm-channel-footnote">${t('engine.hermesSessionRuntimeFootnote')}</div>
</div>
@@ -2727,6 +2732,7 @@ export function render() {
atHour: el.querySelector('#hm-session-at-hour')?.value || '4',
groupSessionsPerUser: !!el.querySelector('#hm-group-sessions-per-user')?.checked,
threadSessionsPerUser: !!el.querySelector('#hm-thread-sessions-per-user')?.checked,
worktreeEnabled: !!el.querySelector('#hm-worktree-enabled')?.checked,
}
runtimeSaving = true
runtimeError = null