From 038689847698725a746fc8c88b4dc655f0a9d6a6 Mon Sep 17 00:00:00 2001 From: Jay V Date: Mon, 11 Aug 2025 13:21:59 -0400 Subject: [PATCH] docs: comment out thinking blocks for share page --- packages/web/src/components/icons/custom.tsx | 4 +- .../web/src/components/share/part.module.css | 4 +- packages/web/src/components/share/part.tsx | 78 ++++++++++--------- 3 files changed, 47 insertions(+), 39 deletions(-) diff --git a/packages/web/src/components/icons/custom.tsx b/packages/web/src/components/icons/custom.tsx index 8023032e5..ffa4fea82 100644 --- a/packages/web/src/components/icons/custom.tsx +++ b/packages/web/src/components/icons/custom.tsx @@ -75,7 +75,7 @@ export function IconRobot(props: JSX.SvgSVGAttributes) { } // https://icones.js.org/collection/ri?s=brain&icon=ri:brain-2-line -export function IconBrain(props: JSX.SvgSVGAttributes) { +/* export function IconBrain(props: JSX.SvgSVGAttributes) { return ( ) { /> ) -} +} */ diff --git a/packages/web/src/components/share/part.module.css b/packages/web/src/components/share/part.module.css index 15a43da36..5634f6102 100644 --- a/packages/web/src/components/share/part.module.css +++ b/packages/web/src/components/share/part.module.css @@ -128,7 +128,7 @@ max-width: var(--md-tool-width); } - [data-component="assistant-reasoning"] { + /* [data-component="assistant-reasoning"] { min-width: 0; display: flex; flex-direction: column; @@ -150,7 +150,7 @@ right: calc(0.5rem - 1px); } } - } + } */ [data-component="assistant-text"] { min-width: 0; diff --git a/packages/web/src/components/share/part.tsx b/packages/web/src/components/share/part.tsx index 597b67d67..2b87c6bcd 100644 --- a/packages/web/src/components/share/part.tsx +++ b/packages/web/src/components/share/part.tsx @@ -19,7 +19,7 @@ import { IconMagnifyingGlass, IconDocumentMagnifyingGlass, } from "../icons" -import { IconMeta, IconRobot, IconOpenAI, IconGemini, IconAnthropic, IconBrain } from "../icons/custom" +import { IconMeta, IconRobot, IconOpenAI, IconGemini, IconAnthropic /*, IconBrain */ } from "../icons/custom" import { ContentCode } from "./content-code" import { ContentDiff } from "./content-diff" import { ContentText } from "./content-text" @@ -83,9 +83,9 @@ export function Part(props: PartProps) { > {(model) => } - + {/* - + */} @@ -158,7 +158,7 @@ export function Part(props: PartProps) { )} )} - {props.message.role === "assistant" && props.part.type === "reasoning" && ( + {/* {props.message.role === "assistant" && props.part.type === "reasoning" && (
Thinking @@ -169,36 +169,43 @@ export function Part(props: PartProps) {
+
+ + )} */} + { + props.message.role === "user" && props.part.type === "file" && ( +
+
Attachment
+
{props.part.filename}
- - )} - {props.message.role === "user" && props.part.type === "file" && ( -
-
Attachment
-
{props.part.filename}
-
- )} - {props.part.type === "step-start" && props.message.role === "assistant" && ( -
-
{props.message.providerID}
-
- {DateTime.fromMillis(props.message.time.completed || props.message.time.created).toLocaleString( - DateTime.DATETIME_MED, - )} - {` | ${props.message.modelID}`} - {props.message.mode && ( - {` | ${props.message.mode}`} - )} + ) + } + { + props.part.type === "step-start" && props.message.role === "assistant" && ( +
+
{props.message.providerID}
+
+ {DateTime.fromMillis(props.message.time.completed || props.message.time.created).toLocaleString( + DateTime.DATETIME_MED, + )} + {` | ${props.message.modelID}`} + {props.message.mode && ( + {` | ${props.message.mode}`} + )} +
-
- )} - {props.part.type === "tool" && props.part.state.status === "error" && ( -
- {formatErrorString(props.part.state.error)} - -
- )} - {props.part.type === "tool" && + ) + } + { + props.part.type === "tool" && props.part.state.status === "error" && ( +
+ {formatErrorString(props.part.state.error)} + +
+ ) + } + { + props.part.type === "tool" && props.part.state.status === "completed" && props.message.role === "assistant" && ( <> @@ -300,9 +307,10 @@ export function Part(props: PartProps) { .toMillis()} /> - )} -
- + ) + } + + ) }