Files
clawpanel/tests/hermes-group-chat.test.js
Cursor Agent 6985bac56f fix(hermes): restore active profile after group chat send
Group chat switched profiles per target but never restored the user's
original active profile. After sending to multiple profiles, all
subsequent Hermes operations (chat page, sessions) ran against the last
profile in the selection.

Also tighten hermes-run-* event matching so cross-page runs cannot
leak output into group chat bubbles before our run_id is known.

Co-authored-by: 晴天 <1186258278@users.noreply.github.com>
2026-06-05 11:13:47 +00:00

15 lines
539 B
JavaScript

import test from 'node:test'
import assert from 'node:assert/strict'
import { matchesHermesRun } from '../src/engines/hermes/lib/hermes-run-events.js'
test('matchesHermesRun ignores events before run_id is known', () => {
assert.equal(matchesHermesRun(null, 'run_other'), false)
assert.equal(matchesHermesRun('', 'run_other'), false)
})
test('matchesHermesRun rejects cross-run events once run_id is set', () => {
assert.equal(matchesHermesRun('run_a', 'run_b'), false)
assert.equal(matchesHermesRun('run_a', 'run_a'), true)
})