Merge teacher composer and compact prompt UI into main

This commit is contained in:
鲨鱼辣椒
2026-09-29 20:40:09 +08:00
62 changed files with 2327 additions and 158 deletions

View File

@@ -132,6 +132,21 @@ describe('continuous conversation persistence', () => {
await new TeacherConversationStore(dest, 'account', 'agent-a', 'project-a').importGlobal(old);
expect((await store.history()).messages).toHaveLength(2);
});
it('preserves individual completion times and reads older replies without backfilling or rewriting them', async () => {
const dir = await root();
const store = new TeacherConversationStore(dir, 'account', 'agent-a', 'project-a');
const topic = await store.ensure(definition, 1);
const old = turn(1), recent = { ...turn(2), finishedAt: '2026-09-29T08:01:42.000Z' };
topic.requests = [old, recent];
await store.save(topic);
const first = await new TeacherConversationStore(dir, 'account', 'agent-a', 'project-a').read();
expect(first.requests[0]).not.toHaveProperty('finishedAt');
expect(first.requests[1].finishedAt).toBe(recent.finishedAt);
const second = await new TeacherConversationStore(dir, 'account', 'agent-a', 'project-a').read();
expect(second.requests).toEqual(first.requests);
expect(second.requests[0].createdAt).toBe(old.createdAt);
});
it('repairs retained replies on every page without rewriting their files during restart recovery', async () => {
const dir = await root();
const store = new TeacherConversationStore(dir, 'account', 'agent-a', 'project-a');