@assistant-ui/react 0.11.53 → 0.11.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/dist/client/NoOpComposerClient.d.ts +1 -1
- package/dist/client/NoOpComposerClient.d.ts.map +1 -1
- package/dist/client/NoOpComposerClient.js +7 -0
- package/dist/client/NoOpComposerClient.js.map +1 -1
- package/dist/client/types/Composer.d.ts +18 -3
- package/dist/client/types/Composer.d.ts.map +1 -1
- package/dist/client/types/Message.d.ts +17 -3
- package/dist/client/types/Message.d.ts.map +1 -1
- package/dist/legacy-runtime/client/ComposerRuntimeClient.d.ts.map +1 -1
- package/dist/legacy-runtime/client/ComposerRuntimeClient.js +3 -0
- package/dist/legacy-runtime/client/ComposerRuntimeClient.js.map +1 -1
- package/dist/legacy-runtime/hooks/AssistantContext.d.ts +2 -2
- package/dist/legacy-runtime/hooks/AssistantContext.js +1 -1
- package/dist/legacy-runtime/hooks/AttachmentContext.d.ts +2 -2
- package/dist/legacy-runtime/hooks/AttachmentContext.js +1 -1
- package/dist/legacy-runtime/hooks/ComposerContext.d.ts +2 -2
- package/dist/legacy-runtime/hooks/ComposerContext.js +1 -1
- package/dist/legacy-runtime/hooks/MessageContext.d.ts +3 -3
- package/dist/legacy-runtime/hooks/MessageContext.js +2 -2
- package/dist/legacy-runtime/hooks/MessagePartContext.d.ts +2 -2
- package/dist/legacy-runtime/hooks/MessagePartContext.js +1 -1
- package/dist/legacy-runtime/hooks/ThreadContext.d.ts +4 -4
- package/dist/legacy-runtime/hooks/ThreadContext.js +2 -2
- package/dist/legacy-runtime/hooks/ThreadListItemContext.d.ts +2 -2
- package/dist/legacy-runtime/hooks/ThreadListItemContext.js +1 -1
- package/dist/legacy-runtime/runtime/ComposerRuntime.d.ts +22 -6
- package/dist/legacy-runtime/runtime/ComposerRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime/ComposerRuntime.js +18 -2
- package/dist/legacy-runtime/runtime/ComposerRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime/ThreadRuntime.d.ts +3 -0
- package/dist/legacy-runtime/runtime/ThreadRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/SpeechAdapterTypes.d.ts +25 -3
- package/dist/legacy-runtime/runtime-cores/adapters/speech/SpeechAdapterTypes.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.d.ts +61 -0
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.d.ts.map +1 -0
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.js +152 -0
- package/dist/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.js.map +1 -0
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.d.ts +2 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.js +1 -0
- package/dist/legacy-runtime/runtime-cores/adapters/speech/index.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/types.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/types.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js +4 -1
- package/dist/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.d.ts +20 -5
- package/dist/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.js +140 -0
- package/dist/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.d.ts +6 -3
- package/dist/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.js +3 -0
- package/dist/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.d.ts +7 -4
- package/dist/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.js +3 -0
- package/dist/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/ComposerRuntimeCore.d.ts +35 -1
- package/dist/legacy-runtime/runtime-cores/core/ComposerRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.d.ts +1 -0
- package/dist/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/core/index.d.ts +1 -0
- package/dist/legacy-runtime/runtime-cores/core/index.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreAdapter.d.ts +8 -7
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreAdapter.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.d.ts +7 -6
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.js +4 -2
- package/dist/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.d.ts +10 -8
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.d.ts +5 -3
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.js +6 -0
- package/dist/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.js.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.d.ts +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.d.ts.map +1 -1
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.js +8 -0
- package/dist/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.js.map +1 -1
- package/dist/primitives/actionBarMore/ActionBarMoreContent.d.ts +12 -0
- package/dist/primitives/actionBarMore/ActionBarMoreContent.d.ts.map +1 -0
- package/dist/primitives/actionBarMore/ActionBarMoreContent.js +11 -0
- package/dist/primitives/actionBarMore/ActionBarMoreContent.js.map +1 -0
- package/dist/primitives/actionBarMore/ActionBarMoreItem.d.ts +8 -0
- package/dist/primitives/actionBarMore/ActionBarMoreItem.d.ts.map +1 -0
- package/dist/primitives/actionBarMore/ActionBarMoreItem.js +11 -0
- package/dist/primitives/actionBarMore/ActionBarMoreItem.js.map +1 -0
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.d.ts +7 -0
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.d.ts.map +1 -0
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.js +10 -0
- package/dist/primitives/actionBarMore/ActionBarMoreRoot.js.map +1 -0
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.d.ts +8 -0
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.d.ts.map +1 -0
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.js +12 -0
- package/dist/primitives/actionBarMore/ActionBarMoreSeparator.js.map +1 -0
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.d.ts +8 -0
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.d.ts.map +1 -0
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.js +11 -0
- package/dist/primitives/actionBarMore/ActionBarMoreTrigger.js.map +1 -0
- package/dist/primitives/actionBarMore/index.d.ts +6 -0
- package/dist/primitives/actionBarMore/index.d.ts.map +1 -0
- package/dist/primitives/actionBarMore/index.js +6 -0
- package/dist/primitives/actionBarMore/index.js.map +1 -0
- package/dist/primitives/actionBarMore/scope.d.ts +7 -0
- package/dist/primitives/actionBarMore/scope.d.ts.map +1 -0
- package/dist/primitives/actionBarMore/scope.js +3 -0
- package/dist/primitives/actionBarMore/scope.js.map +1 -0
- package/dist/primitives/composer/ComposerDictate.d.ts +23 -0
- package/dist/primitives/composer/ComposerDictate.d.ts.map +1 -0
- package/dist/primitives/composer/ComposerDictate.js +30 -0
- package/dist/primitives/composer/ComposerDictate.js.map +1 -0
- package/dist/primitives/composer/ComposerDictationTranscript.d.ts +25 -0
- package/dist/primitives/composer/ComposerDictationTranscript.d.ts.map +1 -0
- package/dist/primitives/composer/ComposerDictationTranscript.js +29 -0
- package/dist/primitives/composer/ComposerDictationTranscript.js.map +1 -0
- package/dist/primitives/composer/ComposerIf.d.ts +3 -0
- package/dist/primitives/composer/ComposerIf.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerIf.js +5 -0
- package/dist/primitives/composer/ComposerIf.js.map +1 -1
- package/dist/primitives/composer/ComposerInput.d.ts.map +1 -1
- package/dist/primitives/composer/ComposerInput.js +1 -1
- package/dist/primitives/composer/ComposerInput.js.map +1 -1
- package/dist/primitives/composer/ComposerStopDictation.d.ts +23 -0
- package/dist/primitives/composer/ComposerStopDictation.d.ts.map +1 -0
- package/dist/primitives/composer/ComposerStopDictation.js +28 -0
- package/dist/primitives/composer/ComposerStopDictation.js.map +1 -0
- package/dist/primitives/composer/index.d.ts +3 -0
- package/dist/primitives/composer/index.d.ts.map +1 -1
- package/dist/primitives/composer/index.js +3 -0
- package/dist/primitives/composer/index.js.map +1 -1
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +2 -0
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.d.ts +12 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.d.ts.map +1 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js +12 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreContent.js.map +1 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.d.ts +8 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.d.ts.map +1 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.js +12 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreItem.js.map +1 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.d.ts +7 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.d.ts.map +1 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js +11 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreRoot.js.map +1 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.d.ts +8 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.d.ts.map +1 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.js +12 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreSeparator.js.map +1 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.d.ts +8 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.d.ts.map +1 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.js +12 -0
- package/dist/primitives/threadListItemMore/ThreadListItemMoreTrigger.js.map +1 -0
- package/dist/primitives/threadListItemMore/index.d.ts +6 -0
- package/dist/primitives/threadListItemMore/index.d.ts.map +1 -0
- package/dist/primitives/threadListItemMore/index.js +6 -0
- package/dist/primitives/threadListItemMore/index.js.map +1 -0
- package/dist/primitives/threadListItemMore/scope.d.ts +7 -0
- package/dist/primitives/threadListItemMore/scope.d.ts.map +1 -0
- package/dist/primitives/threadListItemMore/scope.js +3 -0
- package/dist/primitives/threadListItemMore/scope.js.map +1 -0
- package/package.json +6 -5
- package/src/client/NoOpComposerClient.tsx +8 -1
- package/src/client/types/Composer.ts +21 -4
- package/src/client/types/Message.ts +17 -3
- package/src/legacy-runtime/client/ComposerRuntimeClient.ts +4 -0
- package/src/legacy-runtime/hooks/AssistantContext.ts +2 -2
- package/src/legacy-runtime/hooks/AttachmentContext.ts +2 -2
- package/src/legacy-runtime/hooks/ComposerContext.ts +2 -2
- package/src/legacy-runtime/hooks/MessageContext.ts +3 -3
- package/src/legacy-runtime/hooks/MessagePartContext.ts +2 -2
- package/src/legacy-runtime/hooks/ThreadContext.ts +4 -4
- package/src/legacy-runtime/hooks/ThreadListItemContext.ts +2 -2
- package/src/legacy-runtime/runtime/ComposerRuntime.ts +51 -14
- package/src/legacy-runtime/runtime-cores/adapters/speech/SpeechAdapterTypes.ts +26 -3
- package/src/legacy-runtime/runtime-cores/adapters/speech/WebSpeechDictationAdapter.ts +255 -0
- package/src/legacy-runtime/runtime-cores/adapters/speech/index.ts +5 -1
- package/src/legacy-runtime/runtime-cores/assistant-transport/types.ts +1 -1
- package/src/legacy-runtime/runtime-cores/assistant-transport/useAssistantTransportRuntime.tsx +5 -1
- package/src/legacy-runtime/runtime-cores/composer/BaseComposerRuntimeCore.tsx +171 -5
- package/src/legacy-runtime/runtime-cores/composer/DefaultEditComposerRuntimeCore.tsx +14 -4
- package/src/legacy-runtime/runtime-cores/composer/DefaultThreadComposerRuntimeCore.tsx +15 -5
- package/src/legacy-runtime/runtime-cores/core/ComposerRuntimeCore.tsx +39 -1
- package/src/legacy-runtime/runtime-cores/core/ThreadRuntimeCore.tsx +1 -0
- package/src/legacy-runtime/runtime-cores/core/index.ts +2 -0
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreAdapter.tsx +11 -7
- package/src/legacy-runtime/runtime-cores/external-store/ExternalStoreThreadRuntimeCore.tsx +12 -7
- package/src/legacy-runtime/runtime-cores/local/LocalRuntimeOptions.tsx +12 -8
- package/src/legacy-runtime/runtime-cores/local/LocalThreadRuntimeCore.tsx +11 -4
- package/src/legacy-runtime/runtime-cores/remote-thread-list/EMPTY_THREAD_CORE.tsx +12 -1
- package/src/primitives/actionBarMore/ActionBarMoreContent.tsx +46 -0
- package/src/primitives/actionBarMore/ActionBarMoreItem.tsx +31 -0
- package/src/primitives/actionBarMore/ActionBarMoreRoot.tsx +22 -0
- package/src/primitives/actionBarMore/ActionBarMoreSeparator.tsx +32 -0
- package/src/primitives/actionBarMore/ActionBarMoreTrigger.tsx +31 -0
- package/src/primitives/actionBarMore/index.ts +5 -0
- package/src/primitives/actionBarMore/scope.tsx +8 -0
- package/src/primitives/composer/ComposerDictate.tsx +48 -0
- package/src/primitives/composer/ComposerDictationTranscript.tsx +45 -0
- package/src/primitives/composer/ComposerIf.tsx +7 -0
- package/src/primitives/composer/ComposerInput.tsx +4 -1
- package/src/primitives/composer/ComposerStopDictation.tsx +45 -0
- package/src/primitives/composer/index.ts +3 -0
- package/src/primitives/index.ts +2 -0
- package/src/primitives/threadListItemMore/ThreadListItemMoreContent.tsx +47 -0
- package/src/primitives/threadListItemMore/ThreadListItemMoreItem.tsx +32 -0
- package/src/primitives/threadListItemMore/ThreadListItemMoreRoot.tsx +23 -0
- package/src/primitives/threadListItemMore/ThreadListItemMoreSeparator.tsx +32 -0
- package/src/primitives/threadListItemMore/ThreadListItemMoreTrigger.tsx +32 -0
- package/src/primitives/threadListItemMore/index.ts +5 -0
- package/src/primitives/threadListItemMore/scope.tsx +8 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
6
|
<a href="https://www.assistant-ui.com">Product</a> ·
|
|
7
|
-
<a href="https://www.assistant-ui.com/docs
|
|
7
|
+
<a href="https://www.assistant-ui.com/docs">Documentation</a> ·
|
|
8
8
|
<a href="https://www.assistant-ui.com/examples">Examples</a> ·
|
|
9
9
|
<a href="https://discord.gg/S9dwgCNEFs">Discord Community</a> ·
|
|
10
10
|
<a href="https://cal.com/simon-farshid/assistant-ui">Contact Sales</a>
|
|
@@ -39,6 +39,8 @@ You can get started by running `npx assistant-ui create` (new project) or `npx a
|
|
|
39
39
|
- Chat UI
|
|
40
40
|
- Streaming, Auto-scrolling, Markdown, Code Highlighting, File Attachments, and more
|
|
41
41
|
- Keyboard shortcuts and accessibility features
|
|
42
|
+
- Speech-to-Text (Dictation)
|
|
43
|
+
- Voice input with Web Speech API or custom adapters (ElevenLabs, etc.)
|
|
42
44
|
- Generative UI
|
|
43
45
|
- Map LLM tool calls and JSONs to custom UI components
|
|
44
46
|
- Frontend tool calls
|
|
@@ -89,11 +91,12 @@ With >50k+ monthly downloads, assistant-ui is the most popular UI library for AI
|
|
|
89
91
|
- [x] Improved Markdown rendering performance
|
|
90
92
|
- [x] LangGraph `interrupt()` support
|
|
91
93
|
- [x] Open in v0 support
|
|
94
|
+
- [x] Speech-to-Text (Dictation) with custom adapter support
|
|
92
95
|
- [ ] Improved documentation (work in progress)
|
|
93
|
-
- [ ]
|
|
96
|
+
- [ ] Realtime Voice Conversation (work in progress)
|
|
94
97
|
- [ ] Resume interrupted LLM calls (work in progress)
|
|
95
98
|
- [ ] Native PDF attachment support
|
|
96
|
-
- [
|
|
99
|
+
- [ ] Follow-up suggestions
|
|
97
100
|
|
|
98
101
|
## Next Steps
|
|
99
102
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoOpComposerClient.d.ts","sourceRoot":"","sources":["../../src/client/NoOpComposerClient.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAuB,iBAAiB,EAAE,4BAAyB;
|
|
1
|
+
{"version":3,"file":"NoOpComposerClient.d.ts","sourceRoot":"","sources":["../../src/client/NoOpComposerClient.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAuB,iBAAiB,EAAE,4BAAyB;AAG/E,eAAO,MAAM,kBAAkB;;;;;UACV,MAAM,GAAG,QAAQ;EAwDrC,CAAC"}
|
|
@@ -13,6 +13,7 @@ export const NoOpComposerClient = resource(({ type }) => {
|
|
|
13
13
|
runConfig: {},
|
|
14
14
|
canCancel: false,
|
|
15
15
|
type: type,
|
|
16
|
+
dictation: undefined,
|
|
16
17
|
};
|
|
17
18
|
}, [type]);
|
|
18
19
|
return tapApi({
|
|
@@ -47,6 +48,12 @@ export const NoOpComposerClient = resource(({ type }) => {
|
|
|
47
48
|
beginEdit: () => {
|
|
48
49
|
throw new Error("Not supported");
|
|
49
50
|
},
|
|
51
|
+
startDictation: () => {
|
|
52
|
+
throw new Error("Not supported");
|
|
53
|
+
},
|
|
54
|
+
stopDictation: () => {
|
|
55
|
+
throw new Error("Not supported");
|
|
56
|
+
},
|
|
50
57
|
});
|
|
51
58
|
});
|
|
52
59
|
//# sourceMappingURL=NoOpComposerClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoOpComposerClient.js","sourceRoot":"","sources":["../../src/client/NoOpComposerClient.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,MAAM,EAAE,oCAA2B;AAE5C,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CACxC,CAAC,EAAE,IAAI,EAA+B,EAAE,EAAE;IACxC,MAAM,KAAK,GAAG,OAAO,CAAsB,GAAG,EAAE;QAC9C,OAAO;YACL,SAAS,EAAE,KAAK;YAChB,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,EAAE;YACR,gBAAgB,EAAE,GAAG;Y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EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QACD,UAAU,EAAE,GAAG,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QACD,KAAK,EAAE,GAAG,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,EAAE,GAAG,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QACD,MAAM,EAAE,GAAG,EAAE;YACX,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QACD,SAAS,EAAE,GAAG,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QACD,cAAc,EAAE,GAAG,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;QACD,aAAa,EAAE,GAAG,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACnC,CAAC;KACF,CAAC,CAAC;AACL,CAAC,CACF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { DictationState } from "../../legacy-runtime/runtime-cores/core/ComposerRuntimeCore.js";
|
|
2
|
+
import type { Attachment } from "../../types/index.js";
|
|
3
|
+
import type { MessageRole, RunConfig } from "../../types/AssistantTypes.js";
|
|
4
|
+
import type { AttachmentClientApi } from "./Attachment.js";
|
|
4
5
|
export type ComposerClientState = {
|
|
5
6
|
readonly text: string;
|
|
6
7
|
readonly role: MessageRole;
|
|
@@ -11,6 +12,11 @@ export type ComposerClientState = {
|
|
|
11
12
|
readonly attachmentAccept: string;
|
|
12
13
|
readonly isEmpty: boolean;
|
|
13
14
|
readonly type: "thread" | "edit";
|
|
15
|
+
/**
|
|
16
|
+
* The current state of dictation.
|
|
17
|
+
* Undefined when dictation is not active.
|
|
18
|
+
*/
|
|
19
|
+
readonly dictation: DictationState | undefined;
|
|
14
20
|
};
|
|
15
21
|
export type ComposerClientApi = {
|
|
16
22
|
getState(): ComposerClientState;
|
|
@@ -28,5 +34,14 @@ export type ComposerClientApi = {
|
|
|
28
34
|
send(): void;
|
|
29
35
|
cancel(): void;
|
|
30
36
|
beginEdit(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Start dictation to convert voice to text input.
|
|
39
|
+
* Requires a DictationAdapter to be configured.
|
|
40
|
+
*/
|
|
41
|
+
startDictation(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Stop the current dictation session.
|
|
44
|
+
*/
|
|
45
|
+
stopDictation(): void;
|
|
31
46
|
};
|
|
32
47
|
//# sourceMappingURL=Composer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Composer.d.ts","sourceRoot":"","sources":["../../../src/client/types/Composer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,6BAAoB;
|
|
1
|
+
{"version":3,"file":"Composer.d.ts","sourceRoot":"","sources":["../../../src/client/types/Composer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,uEAAoE;AAClG,OAAO,KAAK,EAAE,UAAU,EAAE,6BAAoB;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,sCAAmC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAqB;AAExD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,IAAI,mBAAmB,CAAC;IAEhC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IACzC,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,UAAU,CAAC,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,mBAAmB,CAAC;IAC9E,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,IAAI,IAAI,CAAC;IACb,MAAM,IAAI,IAAI,CAAC;IACf,SAAS,IAAI,IAAI,CAAC;IAElB;;;OAGG;IACH,cAAc,IAAI,IAAI,CAAC;IAEvB;;OAEG;IACH,aAAa,IAAI,IAAI,CAAC;CAIvB,CAAC"}
|
|
@@ -10,7 +10,21 @@ export type MessageClientState = ThreadMessage & {
|
|
|
10
10
|
readonly branchNumber: number;
|
|
11
11
|
readonly branchCount: number;
|
|
12
12
|
/**
|
|
13
|
-
* @deprecated
|
|
13
|
+
* @deprecated The `speech` property is deprecated and will be removed in a future version.
|
|
14
|
+
*
|
|
15
|
+
* To enable text-to-speech, provide a `SpeechSynthesisAdapter` to the runtime.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* import { WebSpeechSynthesisAdapter } from "@assistant-ui/react";
|
|
20
|
+
* import { useChatRuntime } from "@assistant-ui/react-ai-sdk";
|
|
21
|
+
*
|
|
22
|
+
* const runtime = useChatRuntime({
|
|
23
|
+
* adapters: {
|
|
24
|
+
* speech: new WebSpeechSynthesisAdapter(),
|
|
25
|
+
* },
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
14
28
|
*/
|
|
15
29
|
readonly speech: SpeechState | undefined;
|
|
16
30
|
/**
|
|
@@ -34,11 +48,11 @@ export type MessageClientApi = {
|
|
|
34
48
|
runConfig?: RunConfig;
|
|
35
49
|
}): void;
|
|
36
50
|
/**
|
|
37
|
-
* @deprecated
|
|
51
|
+
* @deprecated The `speak()` method is deprecated. Use the `ActionBarPrimitive.Speak` component instead.
|
|
38
52
|
*/
|
|
39
53
|
speak(): void;
|
|
40
54
|
/**
|
|
41
|
-
* @deprecated
|
|
55
|
+
* @deprecated The `stopSpeaking()` method is deprecated. Use the `ActionBarPrimitive.StopSpeaking` component instead.
|
|
42
56
|
*/
|
|
43
57
|
stopSpeaking(): void;
|
|
44
58
|
submitFeedback(feedback: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/client/types/Message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAmB;AACpE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,kBAAe;AAEtE,OAAO,EACL,WAAW,EACX,iBAAiB,EAClB,qEAAkE;AACnE,OAAO,EAAE,aAAa,EAAE,6BAAoB;AAC5C,OAAO,EAAE,SAAS,EAAE,sCAAmC;AACvD,OAAO,EAAE,mBAAmB,EAAE,wBAAqB;AAEnD,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,C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AAC,MAAM,CAAC;mBACtB,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;aAC9B,eAAe;
|
|
1
|
+
{"version":3,"file":"ComposerRuntimeClient.d.ts","sourceRoot":"","sources":["../../../src/legacy-runtime/client/ComposerRuntimeClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EAEhB,sCAAmC;AAMpC,OAAO,EAEL,iBAAiB,EAClB,uCAAoC;AAoBrC,eAAO,MAAM,cAAc;;;;;iBAMV,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;mBACtB,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;aAC9B,eAAe;EAoF3B,CAAC"}
|
|
@@ -50,6 +50,7 @@ export const ComposerClient = resource(({ threadIdRef, messageIdRef, runtime, })
|
|
|
50
50
|
attachmentAccept: runtimeState.attachmentAccept,
|
|
51
51
|
isEmpty: runtimeState.isEmpty,
|
|
52
52
|
type: runtimeState.type ?? "thread",
|
|
53
|
+
dictation: runtimeState.dictation,
|
|
53
54
|
};
|
|
54
55
|
}, [runtimeState, attachments.state]);
|
|
55
56
|
return tapApi({
|
|
@@ -66,6 +67,8 @@ export const ComposerClient = resource(({ threadIdRef, messageIdRef, runtime, })
|
|
|
66
67
|
(() => {
|
|
67
68
|
throw new Error("beginEdit is not supported in this runtime");
|
|
68
69
|
}),
|
|
70
|
+
startDictation: runtime.startDictation,
|
|
71
|
+
stopDictation: runtime.stopDictation,
|
|
69
72
|
attachment: (selector) => {
|
|
70
73
|
if ("id" in selector) {
|
|
71
74
|
return attachments.api({ key: selector.id });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerRuntimeClient.js","sourceRoot":"","sources":["../../../src/legacy-runtime/client/ComposerRuntimeClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,iBAAiB,GAElB,MAAM,mBAA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I,EAAE,OAAO,CAAC,IAAI;QAClB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EACN,OAA+B,CAAC,SAAS;YAC1C,CAAC,GAAG,EAAE;gBACJ,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;YAChE,CAAC,CAAC;QAEJ,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,aAAa,EAAE,OAAO,CAAC,aAAa;QAEpC,UAAU,EAAE,CAAC,QAAQ,EAAE,EAAE;YACvB,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;gBACrB,OAAO,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;YAC/C,CAAC;iBAAM,CAAC;gBACN,OAAO,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;QAED,qBAAqB,EAAE,GAAG,EAAE,CAAC,OAAO;KACrC,CAAC,CAAC;AACL,CAAC,CACF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AssistantRuntime } from "../runtime/AssistantRuntime.js";
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Use `useAssistantApi()` instead. See migration guide: https://
|
|
3
|
+
* @deprecated Use `useAssistantApi()` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
4
4
|
*
|
|
5
5
|
* Hook to access the AssistantRuntime from the current context.
|
|
6
6
|
*
|
|
@@ -39,7 +39,7 @@ export declare function useAssistantRuntime(options?: {
|
|
|
39
39
|
optional?: boolean | undefined;
|
|
40
40
|
}): AssistantRuntime | null;
|
|
41
41
|
/**
|
|
42
|
-
* @deprecated Use `useAssistantState(({ threads }) => threads)` instead. See migration guide: https://
|
|
42
|
+
* @deprecated Use `useAssistantState(({ threads }) => threads)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
43
43
|
*/
|
|
44
44
|
export declare const useThreadList: {
|
|
45
45
|
(): import("../runtime").ThreadListState;
|
|
@@ -11,7 +11,7 @@ export function useAssistantRuntime(options) {
|
|
|
11
11
|
}
|
|
12
12
|
const useThreadListRuntime = (opt) => useAssistantRuntime(opt)?.threads ?? null;
|
|
13
13
|
/**
|
|
14
|
-
* @deprecated Use `useAssistantState(({ threads }) => threads)` instead. See migration guide: https://
|
|
14
|
+
* @deprecated Use `useAssistantState(({ threads }) => threads)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
15
15
|
*/
|
|
16
16
|
export const useThreadList = createStateHookForRuntime(useThreadListRuntime);
|
|
17
17
|
//# sourceMappingURL=AssistantContext.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AttachmentRuntime } from "../runtime/AttachmentRuntime.js";
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Use `useAssistantApi()` with `api.attachment()` instead. See migration guide: https://
|
|
3
|
+
* @deprecated Use `useAssistantApi()` with `api.attachment()` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
4
4
|
*/
|
|
5
5
|
export declare function useAttachmentRuntime(options?: {
|
|
6
6
|
optional?: false | undefined;
|
|
@@ -27,7 +27,7 @@ export declare function useMessageAttachmentRuntime(options?: {
|
|
|
27
27
|
optional?: boolean | undefined;
|
|
28
28
|
}): AttachmentRuntime<"message"> | null;
|
|
29
29
|
/**
|
|
30
|
-
* @deprecated Use `useAssistantState(({ attachment }) => attachment)` instead. See migration guide: https://
|
|
30
|
+
* @deprecated Use `useAssistantState(({ attachment }) => attachment)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
31
31
|
*/
|
|
32
32
|
export declare const useAttachment: {
|
|
33
33
|
(): import("../runtime").AttachmentState & {
|
|
@@ -36,7 +36,7 @@ export function useMessageAttachmentRuntime(options) {
|
|
|
36
36
|
return attachmentRuntime;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* @deprecated Use `useAssistantState(({ attachment }) => attachment)` instead. See migration guide: https://
|
|
39
|
+
* @deprecated Use `useAssistantState(({ attachment }) => attachment)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
40
40
|
*/
|
|
41
41
|
export const useAttachment = createStateHookForRuntime(useAttachmentRuntime);
|
|
42
42
|
export const useThreadComposerAttachment = createStateHookForRuntime(useThreadComposerAttachmentRuntime);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComposerRuntime } from "../runtime/ComposerRuntime.js";
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Use `useAssistantApi()` with `api.composer()` instead. See migration guide: https://
|
|
3
|
+
* @deprecated Use `useAssistantApi()` with `api.composer()` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
4
4
|
*
|
|
5
5
|
* Hook to access the ComposerRuntime from the current context.
|
|
6
6
|
*
|
|
@@ -67,7 +67,7 @@ export declare function useComposerRuntime(options?: {
|
|
|
67
67
|
optional?: boolean | undefined;
|
|
68
68
|
}): ComposerRuntime | null;
|
|
69
69
|
/**
|
|
70
|
-
* @deprecated Use `useAssistantState(({ composer }) => composer)` instead. See migration guide: https://
|
|
70
|
+
* @deprecated Use `useAssistantState(({ composer }) => composer)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
71
71
|
*
|
|
72
72
|
* Hook to access the current composer state.
|
|
73
73
|
*
|
|
@@ -12,7 +12,7 @@ export function useComposerRuntime(options) {
|
|
|
12
12
|
return runtime;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated Use `useAssistantState(({ composer }) => composer)` instead. See migration guide: https://
|
|
15
|
+
* @deprecated Use `useAssistantState(({ composer }) => composer)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
16
16
|
*
|
|
17
17
|
* Hook to access the current composer state.
|
|
18
18
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessageRuntime } from "../runtime/MessageRuntime.js";
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Use `useAssistantApi()` with `api.message()` instead. See migration guide: https://
|
|
3
|
+
* @deprecated Use `useAssistantApi()` with `api.message()` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
4
4
|
*
|
|
5
5
|
* Hook to access the MessageRuntime from the current context.
|
|
6
6
|
*
|
|
@@ -55,7 +55,7 @@ export declare function useMessageRuntime(options?: {
|
|
|
55
55
|
optional?: boolean | undefined;
|
|
56
56
|
}): MessageRuntime | null;
|
|
57
57
|
/**
|
|
58
|
-
* @deprecated Use `useAssistantState(({ message }) => message)` instead. See migration guide: https://
|
|
58
|
+
* @deprecated Use `useAssistantState(({ message }) => message)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
59
59
|
*
|
|
60
60
|
* Hook to access the current message state.
|
|
61
61
|
*
|
|
@@ -120,7 +120,7 @@ export declare const useMessage: {
|
|
|
120
120
|
}): import("../runtime").MessageState | TSelected | null;
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
|
-
* @deprecated Use `useAssistantState(({ message }) => message.composer)` instead. See migration guide: https://
|
|
123
|
+
* @deprecated Use `useAssistantState(({ message }) => message.composer)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
124
124
|
*/
|
|
125
125
|
export declare const useEditComposer: {
|
|
126
126
|
(): import("../runtime").EditComposerState;
|
|
@@ -12,7 +12,7 @@ export function useMessageRuntime(options) {
|
|
|
12
12
|
return runtime;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated Use `useAssistantState(({ message }) => message)` instead. See migration guide: https://
|
|
15
|
+
* @deprecated Use `useAssistantState(({ message }) => message)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
16
16
|
*
|
|
17
17
|
* Hook to access the current message state.
|
|
18
18
|
*
|
|
@@ -52,7 +52,7 @@ export function useMessageRuntime(options) {
|
|
|
52
52
|
export const useMessage = createStateHookForRuntime(useMessageRuntime);
|
|
53
53
|
const useEditComposerRuntime = (opt) => useMessageRuntime(opt)?.composer ?? null;
|
|
54
54
|
/**
|
|
55
|
-
* @deprecated Use `useAssistantState(({ message }) => message.composer)` instead. See migration guide: https://
|
|
55
|
+
* @deprecated Use `useAssistantState(({ message }) => message.composer)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
56
56
|
*/
|
|
57
57
|
export const useEditComposer = createStateHookForRuntime(useEditComposerRuntime);
|
|
58
58
|
//# sourceMappingURL=MessageContext.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessagePartRuntime } from "../runtime/MessagePartRuntime.js";
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Use `useAssistantApi()` with `api.part()` instead. See migration guide: https://
|
|
3
|
+
* @deprecated Use `useAssistantApi()` with `api.part()` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
4
4
|
*/
|
|
5
5
|
export declare function useMessagePartRuntime(options?: {
|
|
6
6
|
optional?: false | undefined;
|
|
@@ -9,7 +9,7 @@ export declare function useMessagePartRuntime(options?: {
|
|
|
9
9
|
optional?: boolean | undefined;
|
|
10
10
|
}): MessagePartRuntime | null;
|
|
11
11
|
/**
|
|
12
|
-
* @deprecated Use `useAssistantState(({ part }) => part)` instead. See migration guide: https://
|
|
12
|
+
* @deprecated Use `useAssistantState(({ part }) => part)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
13
13
|
*/
|
|
14
14
|
export declare const useMessagePart: {
|
|
15
15
|
(): import("../runtime").MessagePartState;
|
|
@@ -10,7 +10,7 @@ export function useMessagePartRuntime(options) {
|
|
|
10
10
|
return runtime;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* @deprecated Use `useAssistantState(({ part }) => part)` instead. See migration guide: https://
|
|
13
|
+
* @deprecated Use `useAssistantState(({ part }) => part)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
14
14
|
*/
|
|
15
15
|
export const useMessagePart = createStateHookForRuntime(useMessagePartRuntime);
|
|
16
16
|
//# sourceMappingURL=MessagePartContext.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThreadRuntime } from "../runtime/ThreadRuntime.js";
|
|
2
2
|
import { ModelContext } from "../../model-context/index.js";
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated Use `useAssistantApi()` with `api.thread()` instead. See migration guide: https://
|
|
4
|
+
* @deprecated Use `useAssistantApi()` with `api.thread()` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
5
5
|
*
|
|
6
6
|
* Hook to access the ThreadRuntime from the current context.
|
|
7
7
|
*
|
|
@@ -40,7 +40,7 @@ export declare function useThreadRuntime(options?: {
|
|
|
40
40
|
optional?: boolean | undefined;
|
|
41
41
|
}): ThreadRuntime | null;
|
|
42
42
|
/**
|
|
43
|
-
* @deprecated Use `useAssistantState(({ thread }) => thread)` instead. See migration guide: https://
|
|
43
|
+
* @deprecated Use `useAssistantState(({ thread }) => thread)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
44
44
|
*
|
|
45
45
|
* Hook to access the current thread state.
|
|
46
46
|
*
|
|
@@ -95,7 +95,7 @@ export declare const useThread: {
|
|
|
95
95
|
}): import("../runtime").ThreadState | TSelected | null;
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
98
|
-
* @deprecated Use `useAssistantState(({ thread }) => thread.composer)` instead. See migration guide: https://
|
|
98
|
+
* @deprecated Use `useAssistantState(({ thread }) => thread.composer)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
99
99
|
*/
|
|
100
100
|
export declare const useThreadComposer: {
|
|
101
101
|
(): import("../runtime").ThreadComposerState;
|
|
@@ -125,7 +125,7 @@ export declare const useThreadComposer: {
|
|
|
125
125
|
}): import("../runtime").ThreadComposerState | TSelected | null;
|
|
126
126
|
};
|
|
127
127
|
/**
|
|
128
|
-
* @deprecated Use `useAssistantState(({ thread }) => thread.modelContext)` instead. See migration guide: https://
|
|
128
|
+
* @deprecated Use `useAssistantState(({ thread }) => thread.modelContext)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
129
129
|
*/
|
|
130
130
|
export declare function useThreadModelContext(options?: {
|
|
131
131
|
optional?: false | undefined;
|
|
@@ -11,7 +11,7 @@ export function useThreadRuntime(options) {
|
|
|
11
11
|
return runtime;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* @deprecated Use `useAssistantState(({ thread }) => thread)` instead. See migration guide: https://
|
|
14
|
+
* @deprecated Use `useAssistantState(({ thread }) => thread)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
15
15
|
*
|
|
16
16
|
* Hook to access the current thread state.
|
|
17
17
|
*
|
|
@@ -41,7 +41,7 @@ export function useThreadRuntime(options) {
|
|
|
41
41
|
export const useThread = createStateHookForRuntime(useThreadRuntime);
|
|
42
42
|
const useThreadComposerRuntime = (opt) => useThreadRuntime(opt)?.composer ?? null;
|
|
43
43
|
/**
|
|
44
|
-
* @deprecated Use `useAssistantState(({ thread }) => thread.composer)` instead. See migration guide: https://
|
|
44
|
+
* @deprecated Use `useAssistantState(({ thread }) => thread.composer)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
45
45
|
*/
|
|
46
46
|
export const useThreadComposer = createStateHookForRuntime(useThreadComposerRuntime);
|
|
47
47
|
export function useThreadModelContext(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ThreadListItemRuntime } from "../runtime/ThreadListItemRuntime.js";
|
|
2
2
|
/**
|
|
3
|
-
* @deprecated Use `useAssistantApi()` with `api.threadListItem()` instead. See migration guide: https://
|
|
3
|
+
* @deprecated Use `useAssistantApi()` with `api.threadListItem()` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
4
4
|
*/
|
|
5
5
|
export declare function useThreadListItemRuntime(options?: {
|
|
6
6
|
optional?: false | undefined;
|
|
@@ -9,7 +9,7 @@ export declare function useThreadListItemRuntime(options?: {
|
|
|
9
9
|
optional?: boolean | undefined;
|
|
10
10
|
}): ThreadListItemRuntime | null;
|
|
11
11
|
/**
|
|
12
|
-
* @deprecated Use `useAssistantState(({ threadListItem }) => threadListItem)` instead. See migration guide: https://
|
|
12
|
+
* @deprecated Use `useAssistantState(({ threadListItem }) => threadListItem)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
13
13
|
*/
|
|
14
14
|
export declare const useThreadListItem: {
|
|
15
15
|
(): import("../runtime").ThreadListItemState;
|
|
@@ -12,7 +12,7 @@ export function useThreadListItemRuntime(options) {
|
|
|
12
12
|
return runtime;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* @deprecated Use `useAssistantState(({ threadListItem }) => threadListItem)` instead. See migration guide: https://
|
|
15
|
+
* @deprecated Use `useAssistantState(({ threadListItem }) => threadListItem)` instead. See migration guide: https://assistant-ui.com/docs/migrations/v0-12
|
|
16
16
|
*/
|
|
17
17
|
export const useThreadListItem = createStateHookForRuntime(useThreadListItemRuntime);
|
|
18
18
|
//# sourceMappingURL=ThreadListItemContext.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Attachment, PendingAttachment } from "../../types/AttachmentTypes.js";
|
|
2
|
-
import { ComposerRuntimeEventType } from "../runtime-cores/core/ComposerRuntimeCore.js";
|
|
3
|
-
import { Unsubscribe } from "../../types/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import { ComposerRuntimePath } from "./RuntimePathTypes.js";
|
|
6
|
-
import { MessageRole, RunConfig } from "../../types/AssistantTypes.js";
|
|
1
|
+
import type { Attachment, PendingAttachment } from "../../types/AttachmentTypes.js";
|
|
2
|
+
import type { ComposerRuntimeEventType, DictationState } from "../runtime-cores/core/ComposerRuntimeCore.js";
|
|
3
|
+
import type { Unsubscribe } from "../../types/index.js";
|
|
4
|
+
import type { MessageRole, RunConfig } from "../../types/AssistantTypes.js";
|
|
7
5
|
import type { ThreadComposerRuntimeCoreBinding, EditComposerRuntimeCoreBinding, ComposerRuntimeCoreBinding } from "./RuntimeBindings.js";
|
|
6
|
+
import type { ComposerRuntimePath } from "./RuntimePathTypes.js";
|
|
7
|
+
import { type AttachmentRuntime, EditComposerAttachmentRuntimeImpl, ThreadComposerAttachmentRuntimeImpl } from "./AttachmentRuntime.js";
|
|
8
8
|
export type { ThreadComposerRuntimeCoreBinding, EditComposerRuntimeCoreBinding, ComposerRuntimeCoreBinding, };
|
|
9
9
|
type BaseComposerState = {
|
|
10
10
|
readonly canCancel: boolean;
|
|
@@ -15,6 +15,11 @@ type BaseComposerState = {
|
|
|
15
15
|
readonly attachments: readonly Attachment[];
|
|
16
16
|
readonly runConfig: RunConfig;
|
|
17
17
|
readonly attachmentAccept: string;
|
|
18
|
+
/**
|
|
19
|
+
* The current state of dictation.
|
|
20
|
+
* Undefined when dictation is not active.
|
|
21
|
+
*/
|
|
22
|
+
readonly dictation: DictationState | undefined;
|
|
18
23
|
};
|
|
19
24
|
export type ThreadComposerState = BaseComposerState & {
|
|
20
25
|
readonly type: "thread";
|
|
@@ -84,6 +89,15 @@ export type ComposerRuntime = {
|
|
|
84
89
|
* @param idx The index of the attachment to get.
|
|
85
90
|
*/
|
|
86
91
|
getAttachmentByIndex(idx: number): AttachmentRuntime;
|
|
92
|
+
/**
|
|
93
|
+
* Start dictation to convert voice to text input.
|
|
94
|
+
* Requires a DictationAdapter to be configured.
|
|
95
|
+
*/
|
|
96
|
+
startDictation(): void;
|
|
97
|
+
/**
|
|
98
|
+
* Stop the current dictation session.
|
|
99
|
+
*/
|
|
100
|
+
stopDictation(): void;
|
|
87
101
|
/**
|
|
88
102
|
* @deprecated This API is still under active development and might change without notice.
|
|
89
103
|
*/
|
|
@@ -104,6 +118,8 @@ export declare abstract class ComposerRuntimeImpl implements ComposerRuntime {
|
|
|
104
118
|
send(): void;
|
|
105
119
|
cancel(): void;
|
|
106
120
|
setRole(role: MessageRole): void;
|
|
121
|
+
startDictation(): void;
|
|
122
|
+
stopDictation(): void;
|
|
107
123
|
subscribe(callback: () => void): Unsubscribe;
|
|
108
124
|
private _eventSubscriptionSubjects;
|
|
109
125
|
unstable_on(event: ComposerRuntimeEventType, callback: () => void): Unsubscribe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerRuntime.d.ts","sourceRoot":"","sources":["../../../src/legacy-runtime/runtime/ComposerRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ComposerRuntime.d.ts","sourceRoot":"","sources":["../../../src/legacy-runtime/runtime/ComposerRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EAClB,uCAAoC;AACrC,OAAO,KAAK,EAEV,wBAAwB,EACxB,cAAc,EAEf,qDAAkD;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,6BAAoB;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,sCAAmC;AACzE,OAAO,KAAK,EACV,gCAAgC,EAChC,8BAA8B,EAC9B,0BAA0B,EAC3B,6BAA0B;AAC3B,OAAO,KAAK,EAAE,mBAAmB,EAAE,8BAA2B;AAG9D,OAAO,EACL,KAAK,iBAAiB,EAEtB,iCAAiC,EACjC,mCAAmC,EACpC,+BAA4B;AAK7B,YAAY,EACV,gCAAgC,EAChC,8BAA8B,EAC9B,0BAA0B,GAC3B,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAE9B,QAAQ,CAAC,gBAAgB,EAAE,MAA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ECT,
|
|
18
18
|
attachmentAccept: runtime?.attachmentAccept ?? "",
|
|
19
|
+
dictation: runtime?.dictation,
|
|
19
20
|
value: runtime?.text ?? "",
|
|
20
21
|
});
|
|
21
22
|
};
|
|
@@ -30,6 +31,7 @@ const getEditComposerState = (runtime) => {
|
|
|
30
31
|
attachments: runtime?.attachments ?? EMPTY_ARRAY,
|
|
31
32
|
runConfig: runtime?.runConfig ?? EMPTY_OBJECT,
|
|
32
33
|
attachmentAccept: runtime?.attachmentAccept ?? "",
|
|
34
|
+
dictation: runtime?.dictation,
|
|
33
35
|
value: runtime?.text ?? "",
|
|
34
36
|
});
|
|
35
37
|
};
|
|
@@ -53,6 +55,8 @@ export class ComposerRuntimeImpl {
|
|
|
53
55
|
this.cancel = this.cancel.bind(this);
|
|
54
56
|
this.setRole = this.setRole.bind(this);
|
|
55
57
|
this.getAttachmentByIndex = this.getAttachmentByIndex.bind(this);
|
|
58
|
+
this.startDictation = this.startDictation.bind(this);
|
|
59
|
+
this.stopDictation = this.stopDictation.bind(this);
|
|
56
60
|
this.unstable_on = this.unstable_on.bind(this);
|
|
57
61
|
}
|
|
58
62
|
setText(text) {
|
|
@@ -103,6 +107,18 @@ export class ComposerRuntimeImpl {
|
|
|
103
107
|
throw new Error("Composer is not available");
|
|
104
108
|
core.setRole(role);
|
|
105
109
|
}
|
|
110
|
+
startDictation() {
|
|
111
|
+
const core = this._core.getState();
|
|
112
|
+
if (!core)
|
|
113
|
+
throw new Error("Composer is not available");
|
|
114
|
+
core.startDictation();
|
|
115
|
+
}
|
|
116
|
+
stopDictation() {
|
|
117
|
+
const core = this._core.getState();
|
|
118
|
+
if (!core)
|
|
119
|
+
throw new Error("Composer is not available");
|
|
120
|
+
core.stopDictation();
|
|
121
|
+
}
|
|
106
122
|
subscribe(callback) {
|
|
107
123
|
return this._core.subscribe(callback);
|
|
108
124
|
}
|
|
@@ -150,7 +166,7 @@ export class ThreadComposerRuntimeImpl extends ComposerRuntimeImpl {
|
|
|
150
166
|
...this.path,
|
|
151
167
|
attachmentSource: "thread-composer",
|
|
152
168
|
attachmentSelector: { type: "index", index: idx },
|
|
153
|
-
ref: `${this.path.ref}
|
|
169
|
+
ref: `${this.path.ref}.attachments[${idx}]`,
|
|
154
170
|
},
|
|
155
171
|
getState: () => {
|
|
156
172
|
const attachments = this.getState().attachments;
|
|
@@ -206,7 +222,7 @@ export class EditComposerRuntimeImpl extends ComposerRuntimeImpl {
|
|
|
206
222
|
...this.path,
|
|
207
223
|
attachmentSource: "edit-composer",
|
|
208
224
|
attachmentSelector: { type: "index", index: idx },
|
|
209
|
-
ref: `${this.path.ref}
|
|
225
|
+
ref: `${this.path.ref}.attachments[${idx}]`,
|
|
210
226
|
},
|
|
211
227
|
getState: () => {
|
|
212
228
|
const attachments = this.getState().attachments;
|