feat(coding): keep one ongoing conversation per delivered agent
This commit is contained in:
@@ -212,7 +212,7 @@ export function prepareCloudTeacher(
|
||||
id: requestId,
|
||||
read_protocol: TEACHER_READ_PROTOCOL,
|
||||
scope: {
|
||||
project_id: topic.projectId,
|
||||
project_id: currentRequest?.projectId ?? topic.projectId,
|
||||
source_session_id: currentRequest?.sourceConversationId ?? topic.sourceConversationId,
|
||||
},
|
||||
tools: tools?.definitions.map((item) => item.function.name) ?? [],
|
||||
@@ -238,7 +238,7 @@ export function prepareCloudTeacher(
|
||||
if (previous && previous.status !== 'completed') {
|
||||
try {
|
||||
await transport.json(
|
||||
'/questions/' + encodeURIComponent(previous.id) + '/cancel',
|
||||
'/questions/' + encodeURIComponent(previous.cloudRequestId ?? previous.id) + '/cancel',
|
||||
{},
|
||||
bounded
|
||||
);
|
||||
@@ -249,8 +249,8 @@ export function prepareCloudTeacher(
|
||||
let queued = await transport.json(
|
||||
'/questions',
|
||||
{
|
||||
teacher_version: topic.version,
|
||||
thread_id: topic.id,
|
||||
teacher_version: currentRequest?.teacherVersion ?? topic.version,
|
||||
thread_id: currentRequest?.runtimeThreadId ?? topic.id,
|
||||
request_id: requestId,
|
||||
query,
|
||||
local_context: localContext,
|
||||
|
||||
Reference in New Issue
Block a user