Elffuss BraidHub

kikocis/continue public

fix: handle args for function specific tool call divs
Changeset9ea2d7361601b84614f5e031eba04a0a5ed97f145a9ec483ade8f74f5651aed3
AuthorDallin Romney <dallinromney@gmail.com> · 2025-07-20 14:18 +02:00
CommitterDallin Romney <dallinromney@gmail.com> · 2025-07-20 14:18 +02:00
Parentsa92cd8073012

Browse the files at this changeset

1 file changed

modified gui/src/pages/gui/ToolCallDiv/FunctionSpecificToolCallDiv.tsx +12 −7
@@ -18,25 +18,30 @@
1818 case BuiltInToolNames.CreateNewFile:
1919 return (
2020 <CreateFile
21- relativeFilepath={args.filepath}
22- fileContents={args.contents}
21+ relativeFilepath={args?.filepath ?? ""}
22+ fileContents={args?.contents ?? ""}
2323 historyIndex={historyIndex}
2424 />
2525 );
2626 case BuiltInToolNames.EditExistingFile:
2727 return (
2828 <EditFile
29- relativeFilePath={args.filepath ?? ""}
30- changes={args.changes ?? ""}
29+ relativeFilePath={args?.filepath ?? ""}
30+ changes={args?.changes ?? ""}
3131 toolCallId={toolCall.id}
3232 historyIndex={historyIndex}
3333 />
3434 );
3535 case BuiltInToolNames.SearchAndReplaceInFile:
36+ const changes = args.diffs
37+ ? Array.isArray(args.diffs)
38+ ? args.diffs.join("\n\n---\n\n")
39+ : args.diffs
40+ : "";
3641 return (
3742 <EditFile
38- relativeFilePath={args.filepath ?? ""}
39- changes={args.diffs ? args.diffs.join("\n\n---\n\n") : ""}
43+ relativeFilePath={args?.filepath ?? ""}
44+ changes={changes}
4045 toolCallId={toolCall.id}
4146 historyIndex={historyIndex}
4247 />
@@ -44,7 +49,7 @@
4449 case BuiltInToolNames.RunTerminalCommand:
4550 return (
4651 <RunTerminalCommand
47- command={args.command}
52+ command={args?.command ?? ""}
4853 toolCallState={toolCallState}
4954 toolCallId={toolCall.id}
5055 />