From cf3c0ec470e68bf92d17ce0d163479e3fe18343b Mon Sep 17 00:00:00 2001 From: "lorenzo.neumann" <36760115+ln-12@users.noreply.github.com> Date: Thu, 28 Aug 2025 12:20:27 +0200 Subject: [PATCH 01/14] added copy functionality to JsonView component --- client/src/components/JsonView.tsx | 102 ++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 3 deletions(-) diff --git a/client/src/components/JsonView.tsx b/client/src/components/JsonView.tsx index e9ef0d2d..575b1375 100644 --- a/client/src/components/JsonView.tsx +++ b/client/src/components/JsonView.tsx @@ -1,4 +1,5 @@ import { useState, memo, useMemo, useCallback, useEffect } from "react"; +import type React from "react"; import type { JsonValue } from "@/utils/jsonUtils"; import clsx from "clsx"; import { Copy, CheckCheck } from "lucide-react"; @@ -114,6 +115,7 @@ const JsonNode = memo( initialExpandDepth, isError = false, }: JsonNodeProps) => { + const { toast } = useToast(); const [isExpanded, setIsExpanded] = useState(depth < initialExpandDepth); const [typeStyleMap] = useState>({ number: "text-blue-600", @@ -126,6 +128,52 @@ const JsonNode = memo( }); const dataType = getDataType(data); + const [copied, setCopied] = useState(false); + useEffect(() => { + let timeoutId: NodeJS.Timeout; + if (copied) { + timeoutId = setTimeout(() => setCopied(false), 500); + } + return () => { + if (timeoutId) clearTimeout(timeoutId); + }; + }, [copied]); + + const handleCopyValue = useCallback( + (value: JsonValue) => { + try { + let text: string; + const valueType = getDataType(value); + switch (valueType) { + case "string": + text = value as unknown as string; + break; + case "number": + case "boolean": + text = String(value); + break; + case "null": + text = "null"; + break; + case "undefined": + text = "undefined"; + break; + default: + text = JSON.stringify(value); + } + navigator.clipboard.writeText(text); + setCopied(true); + } catch (error) { + toast({ + title: "Error", + description: `There was an error coping result into the clipboard: ${error instanceof Error ? error.message : String(error)}`, + variant: "destructive", + }); + } + }, + [toast], + ); + const renderCollapsible = (isArray: boolean) => { const items = isArray ? (data as JsonValue[]) @@ -219,7 +267,7 @@ const JsonNode = memo( if (!isTooLong) { return ( -
+
{name && ( {name}: @@ -233,12 +281,28 @@ const JsonNode = memo( > "{value}" +
); } return ( -
+
{name && ( {name}: @@ -254,6 +318,22 @@ const JsonNode = memo( > {isExpanded ? `"${value}"` : `"${value.slice(0, maxLength)}..."`} +
); }; @@ -266,7 +346,7 @@ const JsonNode = memo( return renderString(data as string); default: return ( -
+
{name && ( {name}: @@ -275,6 +355,22 @@ const JsonNode = memo( {data === null ? "null" : String(data)} +
); } From a1e04c72feef262b0f5fe0d696f180c5ed5e459c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 02:14:39 +0000 Subject: [PATCH 02/14] Bump vite in the npm_and_yarn group across 1 directory Bumps the npm_and_yarn group with 1 update in the / directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite). Updates `vite` from 6.3.5 to 6.3.6 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v6.3.6/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 6.3.6 dependency-type: direct:development dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 91385dd4..176fbf5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11342,9 +11342,9 @@ } }, "node_modules/vite": { - "version": "6.3.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz", - "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==", + "version": "6.3.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.6.tgz", + "integrity": "sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==", "dev": true, "license": "MIT", "dependencies": { From 89f6945ee484f7440fc541ebc90416fa11487763 Mon Sep 17 00:00:00 2001 From: bill lau Date: Thu, 11 Sep 2025 17:24:07 +0800 Subject: [PATCH 03/14] fix wrong role default value --- client/src/components/SamplingRequest.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/SamplingRequest.tsx b/client/src/components/SamplingRequest.tsx index 0e6f365e..62c9dac6 100644 --- a/client/src/components/SamplingRequest.tsx +++ b/client/src/components/SamplingRequest.tsx @@ -56,7 +56,7 @@ const SamplingRequest = ({ }, role: { type: "string", - default: "endTurn", + default: "assistant", description: "Role of the model", }, content: { From 5bec008b8172f3892ad7d736b039e0667cce04ab Mon Sep 17 00:00:00 2001 From: Kenneth Sinder Date: Sun, 21 Sep 2025 10:05:40 -0700 Subject: [PATCH 04/14] ToolsTab: truncate tool descriptions for nicer rendering --- client/src/components/ToolsTab.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/components/ToolsTab.tsx b/client/src/components/ToolsTab.tsx index 377521ae..6c72b208 100644 --- a/client/src/components/ToolsTab.tsx +++ b/client/src/components/ToolsTab.tsx @@ -95,7 +95,7 @@ const ToolsTab = ({ renderItem={(tool) => (
{tool.name} - + {tool.description}
@@ -114,9 +114,12 @@ const ToolsTab = ({
{selectedTool ? (
-

+

Description
+
{selectedTool.description} -

+
+
+
Inputs & Outputs
{Object.entries(selectedTool.inputSchema.properties ?? []).map( ([key, value]) => { const prop = normalizeUnionType(value as JsonSchemaType); From 3d3a79e10950aa0bada35bb674c9d7b529965c33 Mon Sep 17 00:00:00 2001 From: olaservo Date: Tue, 7 Oct 2025 20:57:42 -0700 Subject: [PATCH 05/14] Add enum parameter support in ToolsTab component and corresponding tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- client/src/components/ToolsTab.tsx | 43 ++++++++++++++ .../components/__tests__/ToolsTab.test.tsx | 58 +++++++++++++++++++ 2 files changed, 101 insertions(+) diff --git a/client/src/components/ToolsTab.tsx b/client/src/components/ToolsTab.tsx index 0123296a..0c7cb17a 100644 --- a/client/src/components/ToolsTab.tsx +++ b/client/src/components/ToolsTab.tsx @@ -5,6 +5,13 @@ import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { TabsContent } from "@/components/ui/tabs"; import { Textarea } from "@/components/ui/textarea"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; import DynamicJsonForm, { DynamicJsonFormRef } from "./DynamicJsonForm"; import type { JsonValue, JsonSchemaType } from "@/utils/jsonUtils"; import { @@ -180,6 +187,42 @@ const ToolsTab = ({ {prop.description || "Toggle this option"}
+ ) : prop.type === "string" && prop.enum ? ( + ) : prop.type === "string" ? (