mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 09:01:14 +00:00
fix(coding-agent): rpc test needs prompt before checking session file
Session files are only written after first assistant message. The test was checking for a session file without having sent any prompt.
This commit is contained in:
parent
13ac63c3cd
commit
4990981e47
1 changed files with 4 additions and 1 deletions
|
|
@ -290,6 +290,9 @@ describe.skipIf(!process.env.ANTHROPIC_API_KEY && !process.env.ANTHROPIC_OAUTH_T
|
|||
let state = await client.getState();
|
||||
expect(state.sessionName).toBeUndefined();
|
||||
|
||||
// Send a prompt first - session files are only written after first assistant message
|
||||
await client.promptAndWait("Reply with just 'ok'");
|
||||
|
||||
// Set name
|
||||
await client.setSessionName("my-test-session");
|
||||
|
||||
|
|
@ -314,5 +317,5 @@ describe.skipIf(!process.env.ANTHROPIC_API_KEY && !process.env.ANTHROPIC_OAUTH_T
|
|||
const sessionInfoEntries = entries.filter((e: { type: string }) => e.type === "session_info");
|
||||
expect(sessionInfoEntries.length).toBe(1);
|
||||
expect(sessionInfoEntries[0].name).toBe("my-test-session");
|
||||
}, 30000);
|
||||
}, 60000);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue