From 160428d2d4ea9fcceff9cbb41cea55c5f96221fe Mon Sep 17 00:00:00 2001 From: Jay V Date: Wed, 4 Jun 2025 20:14:14 -0400 Subject: share page glob --- packages/web/src/components/Share.tsx | 97 ++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) (limited to 'packages/web/src/components/Share.tsx') diff --git a/packages/web/src/components/Share.tsx b/packages/web/src/components/Share.tsx index a1b49a8de..b6bd7fd0d 100644 --- a/packages/web/src/components/Share.tsx +++ b/packages/web/src/components/Share.tsx @@ -25,6 +25,7 @@ import { IconMagnifyingGlass, IconWrenchScrewdriver, IconDocumentArrowDown, + IconDocumentMagnifyingGlass, } from "./icons" import DiffView from "./DiffView" import CodeBlock from "./CodeBlock" @@ -735,6 +736,100 @@ export default function Share(props: { api: string }) { )} + {/* Grep tool */} + + {(part) => { + const metadata = createMemo(() => + msg.metadata?.tool[part().toolInvocation.toolCallId] + ) + const args = part().toolInvocation.args + const result = part().toolInvocation.state === "result" && part().toolInvocation.result + const matches = metadata()?.matches + + const { pattern, ...rest } = args + + const duration = createMemo(() => + DateTime.fromMillis(metadata()?.time.end || 0).diff( + DateTime.fromMillis(metadata()?.time.start || 0), + ).toMillis(), + ) + + return ( +
+
+
+ +
+
+
+
+
+ + Grep + “{pattern}” + + 0}> +
+ + {([name, value]) => ( + <> +
+
{name}
+
{value}
+ + )} +
+
+
+ + 0}> +
+ showResults((e) => !e)} + /> + + + +
+
+ +
+ +
+
+
+
+ +
+
+ ) + }} +
{/* Glob tool */}
-
+
-- cgit v1.2.3