Skip to content

Commit afa2c09

Browse files
committed
fix: ai messages
1 parent e321fe1 commit afa2c09

5 files changed

Lines changed: 46 additions & 43 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@
9494
"vitest": "^2.1.8"
9595
},
9696
"dependencies": {
97-
"@ai-sdk/openai": "^2.0.29",
98-
"@ai-sdk/react": "^2.0.42",
97+
"@ai-sdk/openai": "^2.0.38",
98+
"@ai-sdk/react": "^2.0.56",
9999
"@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
100100
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration": "^1.3.1",
101101
"@headlessui/react": "^2.2.0",
@@ -124,7 +124,7 @@
124124
"@radix-ui/react-tooltip": "^1.1.6",
125125
"@radix-ui/react-use-controllable-state": "^1.2.2",
126126
"@tailwindcss/typography": "^0.5.15",
127-
"ai": "^5.0.42",
127+
"ai": "^5.0.56",
128128
"bson-objectid": "^2.0.4",
129129
"class-variance-authority": "^0.7.1",
130130
"clsx": "^2.1.1",

pnpm-lock.yaml

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Chat/PartTypes/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const CodeBlock = ({
3737
<CodeBlockContext.Provider value={{ code }}>
3838
<div
3939
className={cn(
40-
'relative w-full overflow-hidden rounded-md border bg-background text-foreground',
40+
'relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground',
4141
className,
4242
)}
4343
{...props}

src/components/Chat/PartTypes/MessageHandler.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,10 @@ return(
326326

327327
if (part.type === 'dynamic-tool') {
328328
return (
329-
<Tool defaultOpen={true} key={`${message.id}-${key}`}>
329+
<Tool
330+
defaultOpen={part.state !== 'output-available'}
331+
key={`${message.id}-${key}`}
332+
>
330333
<ToolHeader type={`tool-${part.toolName}`} state={part.state} />
331334
<ToolContent>
332335
<ToolInput input={part.input} />

src/components/Chat/PartTypes/Tool.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type ToolProps = ComponentProps<typeof Collapsible>;
2323

2424
export const Tool = ({ className, ...props }: ToolProps) => (
2525
<Collapsible
26-
className={cn('not-prose mb-4 w-full rounded-md border', className)}
26+
className={cn('not-prose mb-4 w-full', className)}
2727
{...props}
2828
/>
2929
);
@@ -65,7 +65,7 @@ export const ToolHeader = ({
6565
}: ToolHeaderProps) => (
6666
<CollapsibleTrigger
6767
className={cn(
68-
'flex w-full items-center justify-between gap-4 p-3',
68+
'flex w-full items-center justify-between gap-4 p-3 pl-0 w-2xl',
6969
className,
7070
)}
7171
{...props}

0 commit comments

Comments
 (0)