fix(test): add _resetForTesting for proper test isolation

This commit is contained in:
justsisyphus
2026-01-17 16:57:31 +09:00
parent 86711a7b5b
commit c1e42d71b3
2 changed files with 11 additions and 11 deletions
@@ -1,13 +1,19 @@
export const subagentSessions = new Set<string>()
export let mainSessionID: string | undefined
let _mainSessionID: string | undefined
export function setMainSession(id: string | undefined) {
mainSessionID = id
_mainSessionID = id
}
export function getMainSessionID(): string | undefined {
return mainSessionID
return _mainSessionID
}
/** @internal For testing only */
export function _resetForTesting(): void {
_mainSessionID = undefined
subagentSessions.clear()
}
const sessionAgentMap = new Map<string, string>()