- {args.length > 0 && (
-
- )}
+
+ {!!toolCallState.output?.length && (
+
+ )}
+ {args.length > 0 ? (
+
+ ) : null}
+
-
{isToggleable && (
@@ -104,8 +110,8 @@ export function SimpleToolCallUI({
shouldShowContent ? "max-h-[50vh] opacity-100" : "max-h-0 opacity-0"
}`}
>
- {ctxItems.length > 0 ? (
- ctxItems.map((contextItem, idx) => (
+ {shownContextItems.length > 0 ? (
+ shownContextItems.map((contextItem, idx) => (
))
) : (
diff --git a/gui/src/pages/gui/ToolCallDiv/ToolCall.tsx b/gui/src/pages/gui/ToolCallDiv/ToolCall.tsx
index dcfd186c7..956ef791b 100644
--- a/gui/src/pages/gui/ToolCallDiv/ToolCall.tsx
+++ b/gui/src/pages/gui/ToolCallDiv/ToolCall.tsx
@@ -2,12 +2,14 @@ import { Tool, ToolCallState } from "core";
import { useMemo, useState } from "react";
import { ArgsItems, ArgsToggleIcon } from "./ToolCallArgs";
import { ToolCallStatusMessage } from "./ToolCallStatusMessage";
+import { ToolTruncateHistoryIcon } from "./ToolTruncateHistoryIcon";
interface ToolCallDisplayProps {
children: React.ReactNode;
icon: React.ReactNode;
tool: Tool | undefined;
toolCallState: ToolCallState;
+ historyIndex: number;
}
export function ToolCallDisplay({
@@ -15,6 +17,7 @@ export function ToolCallDisplay({
toolCallState,
children,
icon,
+ historyIndex,
}: ToolCallDisplayProps) {
const [argsExpanded, setArgsExpanded] = useState(false);
@@ -39,13 +42,18 @@ export function ToolCallDisplay({
toolCallState={toolCallState}
/>