Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules

# local home for testing
.llm-space
.omc

# output
out
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function _ToolCallListItem({
const executable = tool !== undefined && isExecutableTool(tool);
const [calling, setCalling] = useState(false);
const [previewOpen, setPreviewOpen] = useState(false);
const [argsPreviewOpen, setArgsPreviewOpen] = useState(false);
const outputText = useMemo(() => getToolCallOutputText(toolCall), [toolCall]);
const isError = toolCall.output?.isError ?? false;
const handleOutputChange = useCallback(
Expand Down Expand Up @@ -137,6 +138,16 @@ function _ToolCallListItem({
<div className="relative flex min-w-0 items-start">
<ToolCallInputView input={toolCall.input} />
<div className="absolute top-0 right-0 flex items-center">
<Tooltip content="Preview arguments">
<Button
className="invisible shrink-0 group-hover/message:visible"
size="icon"
variant="secondary"
onClick={() => setArgsPreviewOpen(true)}
>
<EyeIcon className="size-3" />
</Button>
</Tooltip>
<Tooltip content="Copy arguments">
<Button
className="invisible shrink-0 group-hover/message:visible"
Expand Down Expand Up @@ -200,6 +211,13 @@ function _ToolCallListItem({
</div>
)}
</div>
<PreviewDialog
open={argsPreviewOpen}
title={`Arguments of ${toolCall.input.name}()`}
type="json"
value={formatJson(toolCall.input.arguments)}
onOpenChange={setArgsPreviewOpen}
/>
<PreviewDialog
open={previewOpen}
title={`Response of ${toolCall.input.name}()`}
Expand Down