feat(coding): keep one ongoing conversation per delivered agent

This commit is contained in:
2026-09-28 14:19:02 +08:00
parent e54f3d234d
commit 7aa81da616
23 changed files with 1205 additions and 160 deletions

View File

@@ -232,6 +232,17 @@ async function submitCompiledContext(
return { body, compiled };
}
it('uses the accepted turn scope and runtime segment instead of mutable chat metadata', async () => {
const f = await fixture();
f.topic.requests.push({ id: requestId, projectId: 'accepted-project', sourceConversationId: 'accepted-pi',
teacherVersion: 12, runtimeThreadId: 'accepted-segment', text: '查看项目', references: [], status: 'running',
createdAt: 'now', sourceCapturedAt: 'now', sourceCursor: f.access.source.cursor,
includedSourceMessageIds: [], omittedMessages: 0, response: '' });
const { body } = await submitCompiledContext(f);
expect(body).toMatchObject({ teacher_version: 12, thread_id: 'accepted-segment',
local_context: { scope: { project_id: 'accepted-project', source_session_id: 'accepted-pi' } } });
});
it('submits only the published persona, source evidence and current question in ordered roles', async () => {
const f = await fixture();
f.topic.definition.system_prompt = '补充:解释代码时先说明现象。';