From 017a440a700dbaf64912695265f2f553b2c9c079 Mon Sep 17 00:00:00 2001 From: Jay V Date: Fri, 30 May 2025 14:08:21 -0400 Subject: refactor --- app/packages/web/src/components/Share.tsx | 423 ++++++++++++++++-------------- 1 file changed, 220 insertions(+), 203 deletions(-) (limited to 'app/packages/web/src/components') diff --git a/app/packages/web/src/components/Share.tsx b/app/packages/web/src/components/Share.tsx index c9fbb0680..db533831d 100644 --- a/app/packages/web/src/components/Share.tsx +++ b/app/packages/web/src/components/Share.tsx @@ -460,229 +460,246 @@ export default function Share(props: { api: string }) { || msg.metadata?.time.created || 0 return ( -
- - { /* User text */} - - {part => - <> -
-
- -
-
+ + { /* User text */} + + {part => +
+
+
+
-
-
+
+
+ + +
+
+ } +
+ { /* AI text */} + + {part => +
+
+
+
+
+
+ + +
+
+ } +
+ { /* AI model */} + + {assistant => +
+
+
+ -
- - } - - { /* AI text */} - - {part => - <> -
-
-
+
+
+
+
+ + {assistant().providerID} + + + {assistant().modelID} +
-
+
+
+ } +
+ { /* System text */} + + {part => +
+
+
+ +
+
+
+
+
+ + System + -
- - } - - { /* AI model */} - - {assistant => - <> -
-
- -
-
-
-
-
- - {assistant().providerID} - - - {assistant().modelID} - -
-
- - } -
- { /* System text */} - - {part => - <> + +
+
+ } +
+ { /* Edit tool */} + + {part => { + const args = part().toolInvocation.args + const filePath = args.filePath + return ( +
- +
- - System + + Edit {filePath} - +
+ +
- - } - - { /* Edit tool */} - - {part => { - const args = part().toolInvocation.args - const filePath = args.filePath - return ( - <> -
-
- -
-
+
+ ) + }} +
+ { /* Tool call */} + + {part => +
+
+
+ +
+
+
+
+
+ + {part().toolInvocation.toolName} + +
+ + {([name, value]) => + <> +
+
{name}
+
{value}
+ + } +
-
-
- - Edit {filePath} - -
- + +
+ showResults(e => !e)} /> -
-
- -
- - ) - }} - - { /* Tool call */} - - {part => - <> -
-
- -
-
-
-
-
- - {part().toolInvocation.toolName} - -
- - {([name, value]) => - <> -
-
{name}
-
{value}
- - } -
-
- - -
- showResults(e => !e)} + + - - - -
-
- - - -
-
- + +
+
+ + + +
- - } - - { /* Fallback */} - + +
+
+ } + + { /* Fallback */} + +
- - -
+
+
+ ) }} -- cgit v1.2.3