feat: add wechat publish recovery and conversation memory
This commit is contained in:
@@ -86,6 +86,19 @@ test('buildSessionMemoryEntries injects sandbox, guidance, and profile', () => {
|
||||
assert.match(entries[3].content, /Bob/);
|
||||
});
|
||||
|
||||
test('buildSessionMemoryEntries injects stored conversation memories', () => {
|
||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'tkmind-memory-'));
|
||||
const sessionPolicy = buildAgentExtensionPolicy(DEFAULT_USER_CAPABILITIES);
|
||||
const entries = buildSessionMemoryEntries({
|
||||
workingDir: root,
|
||||
sessionPolicy,
|
||||
userContext: { userId: 'user-3', displayName: 'Carol', username: 'carol' },
|
||||
userMemories: [{ label: 'interest', text: '用户关注 AI 产品设计' }],
|
||||
});
|
||||
assert.equal(entries.at(-1).title, 'TKMind 已沉淀用户记忆');
|
||||
assert.match(entries.at(-1).content, /AI 产品设计/);
|
||||
});
|
||||
|
||||
test('renderMemoryStoreGuidance scopes memory to one user', () => {
|
||||
const text = renderMemoryStoreGuidance({ addressName: '小陈' });
|
||||
assert.match(text, /小陈/);
|
||||
|
||||
Reference in New Issue
Block a user