From 5a1a7aaefcf7bb42106c0da33ced7f33097362df Mon Sep 17 00:00:00 2001 From: Donnie Adams Date: Fri, 1 Nov 2024 20:23:26 -0400 Subject: [PATCH] fix: the parent call frame should be of "no" tool category Signed-off-by: Donnie Adams --- src/gptscript.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gptscript.ts b/src/gptscript.ts index c9f32bf..406f702 100644 --- a/src/gptscript.ts +++ b/src/gptscript.ts @@ -960,7 +960,7 @@ export class Run { } } else if ((f.type as string).startsWith("call")) { f = f as CallFrame - if (!f.parentID && this.parentCallId === "") { + if (!f.parentID && this.parentCallId === "" && (f.toolCategory || ToolCategory.NoCategory) === ToolCategory.NoCategory) { this.parentCallId = f.id } this.calls[f.id] = f