Skip to content

Commit 27c1c4e

Browse files
angusfzbracesproul
andauthored
feat: Update interrupt schema to 1.0 (langchain-ai#194) (#1)
Co-authored-by: Brace Sproul <braceasproul@gmail.com>
1 parent b5a494a commit 27c1c4e

File tree

16 files changed

+1044
-754
lines changed

16 files changed

+1044
-754
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"format:check": "prettier --check ."
2020
},
2121
"dependencies": {
22-
"@langchain/core": "^0.3.44",
23-
"@langchain/langgraph": "^0.2.63",
24-
"@langchain/langgraph-sdk": "^0.1.0",
22+
"@langchain/core": "^1.0.2",
23+
"@langchain/langgraph": "^1.0.1",
24+
"@langchain/langgraph-sdk": "^1.0.0",
2525
"@radix-ui/react-avatar": "^1.1.3",
2626
"@radix-ui/react-dialog": "^1.1.6",
2727
"@radix-ui/react-label": "^2.1.2",
@@ -54,7 +54,7 @@
5454
"tailwindcss-animate": "^1.0.7",
5555
"use-stick-to-bottom": "^1.0.46",
5656
"uuid": "^11.1.0",
57-
"zod": "^3.24.2"
57+
"zod": "^4.1.12"
5858
},
5959
"devDependencies": {
6060
"@eslint/js": "^9.19.0",

pnpm-lock.yaml

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

src/components/thread/ContentBlocksPreview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from "react";
2-
import type { Base64ContentBlock } from "@langchain/core/messages";
32
import { MultimodalPreview } from "./MultimodalPreview";
43
import { cn } from "@/lib/utils";
4+
import { ContentBlock } from "@langchain/core/messages";
55

66
interface ContentBlocksPreviewProps {
7-
blocks: Base64ContentBlock[];
7+
blocks: ContentBlock.Multimodal.Data[];
88
onRemove: (idx: number) => void;
99
size?: "sm" | "md" | "lg";
1010
className?: string;

src/components/thread/MultimodalPreview.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from "react";
2-
import { File, Image as ImageIcon, X as XIcon } from "lucide-react";
3-
import type { Base64ContentBlock } from "@langchain/core/messages";
2+
import { File, X as XIcon } from "lucide-react";
3+
import { ContentBlock } from "@langchain/core/messages";
44
import { cn } from "@/lib/utils";
55
import Image from "next/image";
66
export interface MultimodalPreviewProps {
7-
block: Base64ContentBlock;
7+
block: ContentBlock.Multimodal.Data;
88
removable?: boolean;
99
onRemove?: () => void;
1010
className?: string;
@@ -21,11 +21,10 @@ export const MultimodalPreview: React.FC<MultimodalPreviewProps> = ({
2121
// Image block
2222
if (
2323
block.type === "image" &&
24-
block.source_type === "base64" &&
25-
typeof block.mime_type === "string" &&
26-
block.mime_type.startsWith("image/")
24+
typeof block.mimeType === "string" &&
25+
block.mimeType.startsWith("image/")
2726
) {
28-
const url = `data:${block.mime_type};base64,${block.data}`;
27+
const url = `data:${block.mimeType};base64,${block.data}`;
2928
let imgClass: string = "rounded-md object-cover h-16 w-16 text-lg";
3029
if (size === "sm") imgClass = "rounded-md object-cover h-10 w-10 text-base";
3130
if (size === "lg") imgClass = "rounded-md object-cover h-24 w-24 text-xl";
@@ -53,11 +52,7 @@ export const MultimodalPreview: React.FC<MultimodalPreviewProps> = ({
5352
}
5453

5554
// PDF block
56-
if (
57-
block.type === "file" &&
58-
block.source_type === "base64" &&
59-
block.mime_type === "application/pdf"
60-
) {
55+
if (block.type === "file" && block.mimeType === "application/pdf") {
6156
const filename =
6257
block.metadata?.filename || block.metadata?.name || "PDF file";
6358
return (

0 commit comments

Comments
 (0)