(toolCalls)
| 621 | } |
| 622 | |
| 623 | function getVisibleSendFileToolCalls(toolCalls) { |
| 624 | if (!Array.isArray(toolCalls)) { |
| 625 | return []; |
| 626 | } |
| 627 | |
| 628 | return toolCalls.filter((toolCall) => |
| 629 | toolCall && |
| 630 | toolCall.name === "send_file" && |
| 631 | !toolCall.isError && |
| 632 | toolCall.arguments && |
| 633 | typeof toolCall.arguments.filePath === "string" && |
| 634 | toolCall.arguments.filePath |
| 635 | ); |
| 636 | } |
| 637 | |
| 638 | function appendFileCard(container, filePath, caption) { |
| 639 | const fileName = basename(filePath); |