mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-06-25 17:54:10 +08:00
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>
15 lines
539 B
JavaScript
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)
|
|
})
|