重构会话管理,简化上下文存储逻辑
This commit is contained in:
@@ -44,9 +44,11 @@ describe("ConversationStore", () => {
|
||||
|
||||
const touched = await store.touch(record, {
|
||||
title: "新标题",
|
||||
opencodeSessionId: "opencode-session-1",
|
||||
});
|
||||
|
||||
expect(touched.title).toBe("新标题");
|
||||
expect(touched.opencodeSessionId).toBe("opencode-session-1");
|
||||
expect(touched.updatedAt >= record.updatedAt).toBe(true);
|
||||
|
||||
const fetched = await store.get(
|
||||
@@ -58,7 +60,7 @@ describe("ConversationStore", () => {
|
||||
},
|
||||
"existing-session",
|
||||
);
|
||||
expect(fetched?.sessionScopeKey).toBe(record.sessionScopeKey);
|
||||
expect(fetched?.title).toBe("新标题");
|
||||
expect(fetched?.opencodeSessionId).toBe("opencode-session-1");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user