diff --git a/packages/react-ai-sdk/package.json b/packages/react-ai-sdk/package.json index 92fe11892..522b42c79 100644 --- a/packages/react-ai-sdk/package.json +++ b/packages/react-ai-sdk/package.json @@ -34,7 +34,7 @@ "zustand": "^5.0.2" }, "peerDependencies": { - "@assistant-ui/react": "^0.7.16", + "@assistant-ui/react": "^0.7.17", "@types/react": "*", "react": "^18 || ^19 || ^19.0.0-rc" }, diff --git a/packages/react-hook-form/package.json b/packages/react-hook-form/package.json index ff2caa373..73e3c7129 100644 --- a/packages/react-hook-form/package.json +++ b/packages/react-hook-form/package.json @@ -30,7 +30,7 @@ "zod": "^3.24.1" }, "peerDependencies": { - "@assistant-ui/react": "^0.7.16", + "@assistant-ui/react": "^0.7.17", "@types/react": "*", "react": "^18 || ^19 || ^19.0.0-rc", "react-hook-form": "^7" diff --git a/packages/react-langgraph/package.json b/packages/react-langgraph/package.json index 84e27bd0c..a9916e584 100644 --- a/packages/react-langgraph/package.json +++ b/packages/react-langgraph/package.json @@ -30,7 +30,7 @@ "zod": "^3.24.1" }, "peerDependencies": { - "@assistant-ui/react": "^0.7.16", + "@assistant-ui/react": "^0.7.17", "@types/react": "*", "react": "^18 || ^19 || ^19.0.0-rc" }, diff --git a/packages/react-markdown/package.json b/packages/react-markdown/package.json index 8a9cf04c8..53293af35 100644 --- a/packages/react-markdown/package.json +++ b/packages/react-markdown/package.json @@ -41,7 +41,7 @@ "react-markdown": "^9.0.1" }, "peerDependencies": { - "@assistant-ui/react": "^0.7.16", + "@assistant-ui/react": "^0.7.17", "@types/react": "*", "react": "^18 || ^19 || ^19.0.0-rc", "tailwindcss": "^3.4.4" diff --git a/packages/react-playground/package.json b/packages/react-playground/package.json index 22a8bdc5e..80f1eee34 100644 --- a/packages/react-playground/package.json +++ b/packages/react-playground/package.json @@ -47,7 +47,7 @@ "zustand": "^5.0.2" }, "peerDependencies": { - "@assistant-ui/react": "^0.7.16", + "@assistant-ui/react": "^0.7.17", "@types/react": "*", "react": "^18 || ^19 || ^19.0.0-rc", "tailwindcss": "^3.4.4" diff --git a/packages/react-syntax-highlighter/package.json b/packages/react-syntax-highlighter/package.json index 385e8d236..c51a21231 100644 --- a/packages/react-syntax-highlighter/package.json +++ b/packages/react-syntax-highlighter/package.json @@ -27,7 +27,7 @@ "build": "tsup src/index.ts --format cjs,esm --dts --sourcemap --clean" }, "peerDependencies": { - "@assistant-ui/react": "^0.7.16", + "@assistant-ui/react": "^0.7.17", "@assistant-ui/react-markdown": "^0.7.5", "@types/react": "*", "@types/react-syntax-highlighter": "*", diff --git a/packages/react-trieve/package.json b/packages/react-trieve/package.json index 2fccee1a0..158cdcd46 100644 --- a/packages/react-trieve/package.json +++ b/packages/react-trieve/package.json @@ -45,7 +45,7 @@ "unist-util-visit": "^5.0.0" }, "peerDependencies": { - "@assistant-ui/react": "^0.7.16", + "@assistant-ui/react": "^0.7.17", "@assistant-ui/react-markdown": "^0.7.5", "@types/react": "*", "react": "^18 || ^19 || ^19.0.0-rc", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 8806dd747..400d13d37 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @assistant-ui/react +## 0.7.17 + +### Patch Changes + +- fix: toLanguageModelMessages should include attachments + ## 0.7.16 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index a9bcc7b8f..927f95c53 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -29,7 +29,7 @@ "conversational-ui", "conversational-ai" ], - "version": "0.7.16", + "version": "0.7.17", "license": "MIT", "exports": { ".": { diff --git a/packages/react/src/runtimes/edge/converters/toLanguageModelMessages.ts b/packages/react/src/runtimes/edge/converters/toLanguageModelMessages.ts index 2cc1c8fd2..ddf4c3861 100644 --- a/packages/react/src/runtimes/edge/converters/toLanguageModelMessages.ts +++ b/packages/react/src/runtimes/edge/converters/toLanguageModelMessages.ts @@ -82,9 +82,14 @@ export function toLanguageModelMessages( } case "user": { + const attachments = "attachments" in message ? message.attachments : []; + const content = [ + ...message.content, + ...attachments.map((a) => a.content).flat(), + ]; const msg: LanguageModelV1Message = { role: "user", - content: message.content.map( + content: content.map( (part): LanguageModelV1TextPart | LanguageModelV1ImagePart => { const type = part.type; switch (type) {