-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: deprecate primitive-hooks (#961)
* refactor: deprecate primitive-hooks * changeset
- Loading branch information
Showing
7 changed files
with
71 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@assistant-ui/react": patch | ||
--- | ||
|
||
refactor: deprecate primitive-hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,39 @@ | ||
export { | ||
/** | ||
* @deprecated Use `useMessageRuntime().copy()` instead. This will be removed in 0.6. | ||
*/ | ||
useActionBarCopy, | ||
/** | ||
* @deprecated Use `useMessageRuntime().copy()` instead. This will be removed in 0.6. | ||
*/ | ||
type UseActionBarCopyProps, | ||
} from "./useActionBarCopy"; | ||
/** | ||
* @deprecated Use `useMessageRuntime().composer.beginEdit()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useActionBarEdit } from "./useActionBarEdit"; | ||
|
||
/** | ||
* @deprecated Use `useMessageRuntime().reload()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useActionBarReload } from "./useActionBarReload"; | ||
|
||
/** | ||
* @deprecated Use `useMessageRuntime().speak()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useActionBarSpeak } from "./useActionBarSpeak"; | ||
|
||
/** | ||
* @deprecated Use `useMessageRuntime().stopSpeaking()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useActionBarStopSpeaking } from "./useActionBarStopSpeaking"; | ||
|
||
/** | ||
* @deprecated Use `useMessageRuntime().submitFeedback()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useActionBarFeedbackPositive } from "./useActionBarFeedbackPositive"; | ||
|
||
/** | ||
* @deprecated Use `useMessageRuntime().submitFeedback()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useActionBarFeedbackNegative } from "./useActionBarFeedbackNegative"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
/** | ||
* @deprecated Use `useMessage(m => m.branhcCount)` instead. This will be removed in 0.6. | ||
*/ | ||
export { useBranchPickerCount } from "./useBranchPickerCount"; | ||
|
||
/** | ||
* @deprecated Use `useMessageRuntime().switchToBranch({ position: "next" })` instead. This will be removed in 0.6. | ||
*/ | ||
export { useBranchPickerNext } from "./useBranchPickerNext"; | ||
/** | ||
* @deprecated Use `useMessage(m => m.branchNumber)` instead. This will be removed in 0.6. | ||
*/ | ||
export { useBranchPickerNumber } from "./useBranchPickerNumber"; | ||
|
||
/** | ||
* @deprecated Use `useMessageRuntime().switchToBranch({ position: "previous" })` instead. This will be removed in 0.6. | ||
*/ | ||
export { useBranchPickerPrevious } from "./useBranchPickerPrevious"; |
14 changes: 5 additions & 9 deletions
14
packages/react/src/primitive-hooks/branchPicker/useBranchPickerNext.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 2 additions & 9 deletions
11
packages/react/src/primitive-hooks/branchPicker/useBranchPickerPrevious.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
/** | ||
* @deprecated Use `useComposerRuntime().cancel()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useComposerCancel } from "./useComposerCancel"; | ||
export { useComposerIf } from "./useComposerIf"; | ||
/** | ||
* @deprecated Use `useComposerRuntime().send()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useComposerSend } from "./useComposerSend"; | ||
|
||
/** | ||
* @deprecated Use `useComposerRuntime().addAttachment()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useComposerAddAttachment } from "./useComposerAddAttachment"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
export { useThreadEmpty } from "./useThreadEmpty"; | ||
export { useThreadIf } from "./useThreadIf"; | ||
/** | ||
* @deprecated Use `useThreadViewport().scrollToBottom()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useThreadScrollToBottom } from "./useThreadScrollToBottom"; | ||
/** | ||
* @deprecated Use `useThreadRuntime().append()` instead. This will be removed in 0.6. | ||
*/ | ||
export { useThreadSuggestion } from "./useThreadSuggestion"; |