mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-04 12:33:08 +00:00
test(desktop): assert new backend sessions carry workspace cwd
Pin the desktop-to-gateway cwd handoff: createBackendSessionForSend must pass the current workspace cwd into session.create so the backend registers the session cwd before the agent/tools run.
This commit is contained in:
parent
8d8c7111d9
commit
19bae1b9e0
1 changed files with 10 additions and 0 deletions
|
|
@ -112,6 +112,7 @@ describe('createBackendSessionForSend profile routing', () => {
|
|||
cleanup()
|
||||
$newChatProfile.set(null)
|
||||
$activeGatewayProfile.set('default')
|
||||
$currentCwd.set('')
|
||||
vi.restoreAllMocks()
|
||||
})
|
||||
|
||||
|
|
@ -145,6 +146,14 @@ describe('createBackendSessionForSend profile routing', () => {
|
|||
|
||||
expect(params).toMatchObject({ profile: 'default' })
|
||||
})
|
||||
|
||||
it('passes the current workspace cwd into session.create', async () => {
|
||||
const params = await createWith(() => {
|
||||
$currentCwd.set('/remote/worktree')
|
||||
})
|
||||
|
||||
expect(params).toMatchObject({ cwd: '/remote/worktree' })
|
||||
})
|
||||
})
|
||||
|
||||
// ── Resume failure recovery (the "stuck loading session window" bug) ──────────
|
||||
|
|
@ -344,6 +353,7 @@ describe('resumeSession failure recovery', () => {
|
|||
const runtimeIdByStoredSessionIdRef = {
|
||||
current: new Map([['stored-1', 'runtime-stale']])
|
||||
} satisfies MutableRefObject<Map<string, string>>
|
||||
|
||||
const sessionStateByRuntimeIdRef = {
|
||||
current: new Map([
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue