Skip to content

Commit 43953d7

Browse files
committed
Use task unique_id for tool call IDs
1 parent 3097cd8 commit 43953d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/state/chat/reducer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export interface Task {
137137
parent_id: number | null;
138138
run_id: string;
139139
debug: any;
140+
unique_id: string;
140141
child_ids: Array<number[]>;
141142
result: any; // Key field for completion status
142143
}
@@ -242,7 +243,7 @@ const getMessages = (state: ChatState) => getActiveThread(state).messages
242243
* Converts a Task to a ChatCompletionMessageToolCall for display purposes
243244
*/
244245
const taskToToolCall = (task: Task): ChatCompletionMessageToolCall => ({
245-
id: `task_${task.id}`,
246+
id: task.unique_id || `task_${task.id}`,
246247
type: 'function',
247248
function: {
248249
name: task.agent,

0 commit comments

Comments
 (0)