Skip to content

Commit

Permalink
refactor: rename getVercelAIMessage to getVercelAIMessages (#765)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Sep 7, 2024
1 parent 7809584 commit 3ab5a6b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/spotty-planes-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@assistant-ui/react-ai-sdk": patch
---

refactor: rename `getVercelAIMessage` to `getVercelAIMessages`
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import {
} from "@assistant-ui/react";
import type { Message } from "ai";

export const getVercelAIMessage = (message: ThreadMessage) => {
export const getVercelAIMessages = (message: ThreadMessage) => {
return getExternalStoreMessage(message) as Message[];
};
7 changes: 6 additions & 1 deletion packages/react-ai-sdk/src/ui/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
export { useVercelUseChatRuntime } from "./use-chat/useVercelUseChatRuntime";
export { useVercelUseAssistantRuntime } from "./use-assistant/useVercelUseAssistantRuntime";
export { getVercelAIMessage } from "./getVercelAIMessage";
export { getVercelAIMessages } from "./getVercelAIMessages";

/**
* @deprecated Use `getVercelAIMessages` (plural) instead. This will be removed in 0.7.0.
*/
export { getVercelAIMessages as getVercelAIMessage } from "./getVercelAIMessages";

0 comments on commit 3ab5a6b

Please sign in to comment.