diff --git a/packages/web/src/components/Share.tsx b/packages/web/src/components/Share.tsx index 07b12946..a61852d9 100644 --- a/packages/web/src/components/Share.tsx +++ b/packages/web/src/components/Share.tsx @@ -23,7 +23,6 @@ import { } from "./icons/custom" import { IconFolder, - IconCpuChip, IconHashtag, IconSparkles, IconGlobeAlt, @@ -102,10 +101,7 @@ function stripWorkingDirectory(filePath: string, workingDir?: string) { } function getShikiLang(filename: string) { - const ext = filename - .split('.') - .pop() - ?.toLowerCase() ?? '' + const ext = filename.split(".").pop()?.toLowerCase() ?? "" // map.languages(ext) returns an array of matching Linguist language names (e.g. ['TypeScript']) const langs = map.languages(ext) @@ -113,12 +109,10 @@ function getShikiLang(filename: string) { // Overrride any specific language mappings const overrides: Record = { - "conf": "shellscript" + conf: "shellscript", } - return type - ? overrides[type] ?? type - : 'plaintext' + return type ? (overrides[type] ?? type) : "plaintext" } function formatDuration(ms: number): string { @@ -1008,13 +1002,6 @@ export default function Share(props: { } > {(assistant) => { - const system = createMemo(() => { - const prompts = assistant().system || [] - return prompts.filter( - (p: string) => - !p.startsWith("You are Claude"), - ) - }) return (
{assistant().modelID} - 0}> -
- - setShowResults((e) => !e) - } - /> - - - -
-
) }} - {/* System text */} - - {(part) => ( -
-
- - - -
-
-
-
-
- System -
- -
-
-
- )} -
+ {/* Grep tool */} toolData()?.args.path !== data().rootDir ? stripWorkingDirectory( - toolData()?.args.path, - data().rootDir, - ) + toolData()?.args.path, + data().rootDir, + ) : toolData()?.args.path, ) @@ -1658,8 +1591,7 @@ export default function Share(props: { when={ msg.role === "assistant" && part.type === "tool-invocation" && - part.toolInvocation.toolName === - "todowrite" && + part.toolInvocation.toolName === "todowrite" && part } > @@ -1724,8 +1656,7 @@ export default function Share(props: { when={ msg.role === "assistant" && part.type === "tool-invocation" && - part.toolInvocation.toolName === - "webfetch" && + part.toolInvocation.toolName === "webfetch" && part } > @@ -1899,9 +1830,7 @@ export default function Share(props: { > - - - +