feat(mindspace): 0630004 空间 UI、聊天连接、微信分享与 Agent 能力
含 MindSpace 三列布局与统计修复、聊天加载态与连接降级、平台页脚标记与 og:site_name 微信卡片、勾选资料删除 Agent 接口及内部话术过滤。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
resolveCodeExecutorRouting,
|
||||
renderCodeExecutorGuidance,
|
||||
renderCurrentTimeAnchor,
|
||||
resolveTimeOfDayPeriod,
|
||||
suggestCodeExecutorForTask,
|
||||
buildSessionMemoryEntries,
|
||||
ensureUserMemoryProfile,
|
||||
@@ -86,6 +87,8 @@ test('buildSessionMemoryEntries injects sandbox, guidance, and profile', () => {
|
||||
assert.match(entries[1].content, /openhands/);
|
||||
assert.equal(entries[2].title, 'TKMind 当前时间基准');
|
||||
assert.match(entries[2].content, /2026-06-29(星期一)/);
|
||||
assert.match(entries[2].content, /13:00(中午)/);
|
||||
assert.match(entries[2].content, /若需时段问候可参考:中午好/);
|
||||
assert.match(entries[3].content, /长期记忆/);
|
||||
assert.match(entries[4].content, /Bob/);
|
||||
});
|
||||
@@ -111,6 +114,26 @@ test('renderCurrentTimeAnchor formats Shanghai weekday from exact date', () => {
|
||||
});
|
||||
assert.match(text, /2026-06-29(星期一)/);
|
||||
assert.match(text, /Asia\/Shanghai/);
|
||||
assert.match(text, /13:00(中午)/);
|
||||
assert.match(text, /若需时段问候可参考:中午好/);
|
||||
assert.match(text, /普通任务回复不要每条都加/);
|
||||
});
|
||||
|
||||
test('renderCurrentTimeAnchor uses local morning greeting at 07:03 Shanghai', () => {
|
||||
const text = renderCurrentTimeAnchor({
|
||||
now: Date.UTC(2026, 5, 29, 23, 3, 0),
|
||||
timezone: 'Asia/Shanghai',
|
||||
});
|
||||
assert.match(text, /2026-06-30(星期二)/);
|
||||
assert.match(text, /07:03(早上)/);
|
||||
assert.match(text, /若需时段问候可参考:早上好/);
|
||||
});
|
||||
|
||||
test('resolveTimeOfDayPeriod maps hours to greeting labels', () => {
|
||||
assert.deepEqual(resolveTimeOfDayPeriod(2), { period: '凌晨', greeting: '你好' });
|
||||
assert.deepEqual(resolveTimeOfDayPeriod(7), { period: '早上', greeting: '早上好' });
|
||||
assert.deepEqual(resolveTimeOfDayPeriod(10), { period: '上午', greeting: '上午好' });
|
||||
assert.deepEqual(resolveTimeOfDayPeriod(20), { period: '晚上', greeting: '晚上好' });
|
||||
});
|
||||
|
||||
test('renderMemoryStoreGuidance scopes memory to one user', () => {
|
||||
|
||||
Reference in New Issue
Block a user