Skip to content

Commit

Permalink
refactor: add deprecation warnings for MessageUtils (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Sep 29, 2024
1 parent f7c156b commit 84ab5ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .changeset/tender-badgers-call.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"assistant-ui": patch
"@assistant-ui/react": patch
---

feat: mark new runtime API methods as stable
6 changes: 6 additions & 0 deletions packages/react/src/context/stores/MessageUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ import { SpeechSynthesisAdapter } from "../../runtimes/speech/SpeechAdapterTypes
export type MessageUtilsState = Readonly<{
isCopied: boolean;
setIsCopied: (value: boolean) => void;

isHovering: boolean;
setIsHovering: (value: boolean) => void;

/** @deprecated This will be moved to `useMessage().isSpeaking` instead. This will be removed in 0.6.0. */
isSpeaking: boolean;
/** @deprecated This will be moved to `useMessageRuntime().stopSpeaking()` instead. This will be removed in 0.6.0. */
stopSpeaking: () => void;
/** @deprecated This will be moved to `useMessageRuntime().speak()` instead. This will be removed in 0.6.0. */
addUtterance: (utterance: SpeechSynthesisAdapter.Utterance) => void;

/** @deprecated This will be moved to `useMessage().submittedFeedback`. This will be removed in 0.6.0. */
submittedFeedback: "positive" | "negative" | null;
/** @deprecated This will be moved to `useMessageRuntime().submitFeedback()` instead. This will be removed in 0.6.0. */
setSubmittedFeedback: (feedback: "positive" | "negative" | null) => void;
}>;

Expand Down

0 comments on commit 84ab5ce

Please sign in to comment.