Merge pull request #5999 from haoqixu/fix-5996

fix(coding-agent): normalize session names
This commit is contained in:
Mario Zechner
2026-06-23 15:15:52 +02:00
committed by GitHub
5 changed files with 55 additions and 3 deletions
@@ -86,6 +86,12 @@ async function runSessionSuite(
expect(context.messages[1]?.role).toBe("custom");
});
it("normalizes session names", async () => {
const session = new Session(await createStorage());
await session.appendSessionName(" hello\nworld\r\nagain ");
expect(await session.getSessionName()).toBe("hello world again");
});
it("supports labels and session info entries without affecting context", async () => {
const session = new Session(await createStorage());
const user1 = await session.appendMessage(createUserMessage("one"));