@admin-layout/tailwind-ui 12.2.4-alpha.9 → 12.2.4-alpha.98
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/lib/components/AIToolbar/components/AIToolBar.d.ts +22 -0
- package/lib/components/AIToolbar/components/AIToolBar.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/AIToolBar.js +87 -0
- package/lib/components/AIToolbar/components/AIToolBar.js.map +1 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.d.ts +14 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.js +60 -0
- package/lib/components/AIToolbar/components/AIToolbarPrimitives.js.map +1 -0
- package/lib/components/AIToolbar/components/CustomCursor.d.ts +2 -0
- package/lib/components/AIToolbar/components/CustomCursor.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/CustomCursor.js +66 -0
- package/lib/components/AIToolbar/components/CustomCursor.js.map +1 -0
- package/lib/components/AIToolbar/components/DragButton.d.ts +9 -0
- package/lib/components/AIToolbar/components/DragButton.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/DragButton.js +57 -0
- package/lib/components/AIToolbar/components/DragButton.js.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.d.ts +7 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.js +30 -0
- package/lib/components/AIToolbar/components/Markdown/copy-button.js.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/index.d.ts +7 -0
- package/lib/components/AIToolbar/components/Markdown/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/Markdown/index.js +65 -0
- package/lib/components/AIToolbar/components/Markdown/index.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.d.ts +24 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.js +48 -0
- package/lib/components/AIToolbar/components/completion/AssistantAvatar.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.d.ts +28 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.js +209 -0
- package/lib/components/AIToolbar/components/completion/AssistantMessageActions.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AssistantSenderBadge.d.ts +15 -0
- package/lib/components/AIToolbar/components/completion/AssistantSenderBadge.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Audio.d.ts +5 -0
- package/lib/components/AIToolbar/components/completion/Audio.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Audio.js +67 -0
- package/lib/components/AIToolbar/components/completion/Audio.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.d.ts +11 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.js +66 -0
- package/lib/components/AIToolbar/components/completion/AutoSpeechVad.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.d.ts +5 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.js +93 -0
- package/lib/components/AIToolbar/components/completion/CharacterPicker.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Files.d.ts +7 -0
- package/lib/components/AIToolbar/components/completion/Files.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Files.js +166 -0
- package/lib/components/AIToolbar/components/completion/Files.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Input.d.ts +6 -0
- package/lib/components/AIToolbar/components/completion/Input.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Input.js +287 -0
- package/lib/components/AIToolbar/components/completion/Input.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.d.ts +11 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.js +131 -0
- package/lib/components/AIToolbar/components/completion/MessageHistory.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.d.ts +7 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.js +30 -0
- package/lib/components/AIToolbar/components/completion/Screenshot.js.map +1 -0
- package/lib/components/AIToolbar/components/completion/index.d.ts +13 -0
- package/lib/components/AIToolbar/components/completion/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/completion/index.js +25 -0
- package/lib/components/AIToolbar/components/completion/index.js.map +1 -0
- package/lib/components/AIToolbar/components/index.d.ts +17 -0
- package/lib/components/AIToolbar/components/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/Header.d.ts +14 -0
- package/lib/components/AIToolbar/components/speech/Header.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/Header.js +82 -0
- package/lib/components/AIToolbar/components/speech/Header.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.d.ts +2 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.js +396 -0
- package/lib/components/AIToolbar/components/speech/MicrophoneDiagnostics.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.d.ts +8 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.js +44 -0
- package/lib/components/AIToolbar/components/speech/ModeSwitcher.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.d.ts +13 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.js +168 -0
- package/lib/components/AIToolbar/components/speech/PermissionFlow.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.d.ts +13 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.js +100 -0
- package/lib/components/AIToolbar/components/speech/QuickActions.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.d.ts +14 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.js +101 -0
- package/lib/components/AIToolbar/components/speech/RecordingPanel.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts +14 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.js +293 -0
- package/lib/components/AIToolbar/components/speech/SettingsPanel.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.d.ts +10 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.js +48 -0
- package/lib/components/AIToolbar/components/speech/StatusIndicator.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/Warning.d.ts +6 -0
- package/lib/components/AIToolbar/components/speech/Warning.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/Warning.js +226 -0
- package/lib/components/AIToolbar/components/speech/Warning.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.d.ts +7 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.js +194 -0
- package/lib/components/AIToolbar/components/speech/audio-visualizer.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.d.ts +2 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.js +32 -0
- package/lib/components/AIToolbar/components/speech/floatArrayToWav.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/index.d.ts +4 -0
- package/lib/components/AIToolbar/components/speech/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/index.js +276 -0
- package/lib/components/AIToolbar/components/speech/index.js.map +1 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.d.ts +12 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.d.ts.map +1 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.js +114 -0
- package/lib/components/AIToolbar/components/speech/promptTemplates.js.map +1 -0
- package/lib/components/AIToolbar/components/types.d.ts +194 -0
- package/lib/components/AIToolbar/components/types.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.d.ts +13 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.js +6 -0
- package/lib/components/AIToolbar/hooks/marketplaceCharactersRegistry.js.map +1 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts +52 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.js +360 -0
- package/lib/components/AIToolbar/hooks/useActiveCharacter.js.map +1 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.d.ts +14 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.js +103 -0
- package/lib/components/AIToolbar/hooks/useCharacterSprite.js.map +1 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.d.ts +10 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.d.ts.map +1 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.js +126 -0
- package/lib/components/AIToolbar/hooks/useChatBackgroundImage.js.map +1 -0
- package/lib/components/AIToolbar/index.d.ts +8 -0
- package/lib/components/AIToolbar/index.d.ts.map +1 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.d.ts +19 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.d.ts.map +1 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.js +142 -0
- package/lib/components/AIToolbar/utils/emotionClassifier.js.map +1 -0
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +7 -6
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.d.ts +20 -0
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.d.ts.map +1 -0
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.js +249 -0
- package/lib/components/CharacterSlotPicker/CharacterSlotPicker.js.map +1 -0
- package/lib/components/CharacterSlotPicker/index.d.ts +3 -0
- package/lib/components/CharacterSlotPicker/index.d.ts.map +1 -0
- package/lib/components/DatePicker/DatePicker.js +158 -140
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/Dialog/Dialog.d.ts +20 -0
- package/lib/components/Dialog/Dialog.d.ts.map +1 -0
- package/lib/components/Dialog/Dialog.js +111 -0
- package/lib/components/Dialog/Dialog.js.map +1 -0
- package/lib/components/Dialog/index.d.ts +3 -0
- package/lib/components/Dialog/index.d.ts.map +1 -0
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts +1 -2
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.js +2 -2
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts +1 -2
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.js +35 -28
- package/lib/components/ErrorHandlers/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts +1 -2
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js +20 -15
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/RemixErrorBoundary.d.ts +4 -2
- package/lib/components/ErrorHandlers/RemixErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/RemixErrorBoundary.js +222 -104
- package/lib/components/ErrorHandlers/RemixErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts +4 -2
- package/lib/components/ErrorHandlers/SPAErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/SPAErrorBoundary.js +247 -86
- package/lib/components/ErrorHandlers/SPAErrorBoundary.js.map +1 -1
- package/lib/components/ErrorPages/403.d.ts +1 -2
- package/lib/components/ErrorPages/403.d.ts.map +1 -1
- package/lib/components/ErrorPages/403.js +27 -18
- package/lib/components/ErrorPages/403.js.map +1 -1
- package/lib/components/ErrorPages/404.d.ts +1 -2
- package/lib/components/ErrorPages/404.d.ts.map +1 -1
- package/lib/components/ErrorPages/404.js +27 -18
- package/lib/components/ErrorPages/404.js.map +1 -1
- package/lib/components/ErrorPages/500.d.ts +1 -2
- package/lib/components/ErrorPages/500.d.ts.map +1 -1
- package/lib/components/ErrorPages/500.js +27 -18
- package/lib/components/ErrorPages/500.js.map +1 -1
- package/lib/components/ErrorPages/useErrorAsset.d.ts +11 -0
- package/lib/components/ErrorPages/useErrorAsset.d.ts.map +1 -0
- package/lib/components/ErrorPages/useErrorAsset.js +24 -0
- package/lib/components/ErrorPages/useErrorAsset.js.map +1 -0
- package/lib/components/Inbox/Channels/ChannelBar.d.ts +33 -0
- package/lib/components/Inbox/Channels/ChannelBar.d.ts.map +1 -0
- package/lib/components/Inbox/Channels/ChannelBar.js +79 -0
- package/lib/components/Inbox/Channels/ChannelBar.js.map +1 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.d.ts +24 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.d.ts.map +1 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.js +177 -0
- package/lib/components/Inbox/Channels/ChannelConnectModal.js.map +1 -0
- package/lib/components/Inbox/Channels/channelsMeta.d.ts +16 -0
- package/lib/components/Inbox/Channels/channelsMeta.d.ts.map +1 -0
- package/lib/components/Inbox/Channels/channelsMeta.js +127 -0
- package/lib/components/Inbox/Channels/channelsMeta.js.map +1 -0
- package/lib/components/Inbox/Channels/index.d.ts +7 -0
- package/lib/components/Inbox/Channels/index.d.ts.map +1 -0
- package/lib/components/Inbox/index.d.ts +2 -0
- package/lib/components/Inbox/index.d.ts.map +1 -0
- package/lib/components/InputToolBar/InputToolBar.d.ts +8 -0
- package/lib/components/InputToolBar/InputToolBar.d.ts.map +1 -0
- package/lib/components/InputToolBar/InputToolBar.js +531 -0
- package/lib/components/InputToolBar/InputToolBar.js.map +1 -0
- package/lib/components/InputToolBar/defaults.d.ts +15 -0
- package/lib/components/InputToolBar/defaults.d.ts.map +1 -0
- package/lib/components/InputToolBar/defaults.js +60 -0
- package/lib/components/InputToolBar/defaults.js.map +1 -0
- package/lib/components/InputToolBar/index.d.ts +5 -0
- package/lib/components/InputToolBar/index.d.ts.map +1 -0
- package/lib/components/InputToolBar/types.d.ts +156 -0
- package/lib/components/InputToolBar/types.d.ts.map +1 -0
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts +1 -2
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts.map +1 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js +24 -19
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js.map +1 -1
- package/lib/components/Markdown/MarkdownBreadcrumbs.d.ts +13 -0
- package/lib/components/Markdown/MarkdownBreadcrumbs.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownBreadcrumbs.js +34 -0
- package/lib/components/Markdown/MarkdownBreadcrumbs.js.map +1 -0
- package/lib/components/Markdown/MarkdownCopyButton.d.ts +10 -0
- package/lib/components/Markdown/MarkdownCopyButton.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownCopyButton.js +229 -0
- package/lib/components/Markdown/MarkdownCopyButton.js.map +1 -0
- package/lib/components/Markdown/MarkdownHeader.d.ts +13 -0
- package/lib/components/Markdown/MarkdownHeader.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownHeader.js +44 -0
- package/lib/components/Markdown/MarkdownHeader.js.map +1 -0
- package/lib/components/Markdown/MarkdownNavigation.d.ts +15 -0
- package/lib/components/Markdown/MarkdownNavigation.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownNavigation.js +38 -0
- package/lib/components/Markdown/MarkdownNavigation.js.map +1 -0
- package/lib/components/Markdown/MarkdownPage.d.ts +41 -0
- package/lib/components/Markdown/MarkdownPage.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownPage.js +238 -0
- package/lib/components/Markdown/MarkdownPage.js.map +1 -0
- package/lib/components/Markdown/MarkdownTableOfContents.d.ts +15 -0
- package/lib/components/Markdown/MarkdownTableOfContents.d.ts.map +1 -0
- package/lib/components/Markdown/MarkdownTableOfContents.js +57 -0
- package/lib/components/Markdown/MarkdownTableOfContents.js.map +1 -0
- package/lib/components/Markdown/index.d.ts +7 -0
- package/lib/components/Markdown/index.d.ts.map +1 -0
- package/lib/components/OTP/OTPInput.js +32 -30
- package/lib/components/OTP/OTPInput.js.map +1 -1
- package/lib/components/OTP/OTPVerification.js +75 -55
- package/lib/components/OTP/OTPVerification.js.map +1 -1
- package/lib/components/OTP/SingleInput.js +2 -2
- package/lib/components/OTP/SingleInput.js.map +1 -1
- package/lib/components/PageContainer/PageContainer.js +29 -22
- package/lib/components/PageContainer/PageContainer.js.map +1 -1
- package/lib/components/PageLoading/index.js +8 -7
- package/lib/components/PageLoading/index.js.map +1 -1
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts +1 -2
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.d.ts +1 -2
- package/lib/components/ReactTable/Table.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.js +92 -71
- package/lib/components/ReactTable/Table.js.map +1 -1
- package/lib/components/ReactTable/TableFilters.d.ts +2 -3
- package/lib/components/ReactTable/TableFilters.d.ts.map +1 -1
- package/lib/components/ReactTable/TableFilters.js +40 -34
- package/lib/components/ReactTable/TableFilters.js.map +1 -1
- package/lib/components/Search/SearchInput.d.ts +1 -2
- package/lib/components/Search/SearchInput.d.ts.map +1 -1
- package/lib/components/Search/SearchInput.js +14 -13
- package/lib/components/Search/SearchInput.js.map +1 -1
- package/lib/components/Select/Select.d.ts +6 -6
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.js +60 -45
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Spin/index.js +14 -11
- package/lib/components/Spin/index.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.js +29 -17
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeToggle.js +28 -25
- package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -1
- package/lib/components/ThemeProvider/types.d.ts +3 -3
- package/lib/components/ThemeProvider/types.d.ts.map +1 -1
- package/lib/components/YantraIcon.d.ts +6 -0
- package/lib/components/YantraIcon.d.ts.map +1 -0
- package/lib/components/YantraIcon.js +32 -0
- package/lib/components/YantraIcon.js.map +1 -0
- package/lib/components/index.d.ts +8 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/hooks/activeCharacterPreference.d.ts +25 -0
- package/lib/hooks/activeCharacterPreference.d.ts.map +1 -0
- package/lib/hooks/activeCharacterPreference.js +71 -0
- package/lib/hooks/activeCharacterPreference.js.map +1 -0
- package/lib/hooks/characterOverrides.d.ts +29 -0
- package/lib/hooks/characterOverrides.d.ts.map +1 -0
- package/lib/hooks/characterOverrides.js +130 -0
- package/lib/hooks/characterOverrides.js.map +1 -0
- package/lib/hooks/characterSlotsPreference.d.ts +33 -0
- package/lib/hooks/characterSlotsPreference.d.ts.map +1 -0
- package/lib/hooks/characterSlotsPreference.js +141 -0
- package/lib/hooks/characterSlotsPreference.js.map +1 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/useGlobalShortcutBridge.d.ts +21 -0
- package/lib/hooks/useGlobalShortcutBridge.d.ts.map +1 -0
- package/lib/hooks/useGlobalShortcutBridge.js +68 -0
- package/lib/hooks/useGlobalShortcutBridge.js.map +1 -0
- package/lib/hooks/useToast.d.ts +1 -1
- package/lib/hooks/useToast.d.ts.map +1 -1
- package/lib/hooks/useToast.js +46 -37
- package/lib/hooks/useToast.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/shardui/accordion.js +20 -16
- package/lib/shardui/accordion.js.map +1 -1
- package/lib/shardui/alert-dialog.d.ts +2 -2
- package/lib/shardui/alert-dialog.js +15 -13
- package/lib/shardui/alert-dialog.js.map +1 -1
- package/lib/shardui/alert.js +4 -4
- package/lib/shardui/alert.js.map +1 -1
- package/lib/shardui/avatar.js +4 -4
- package/lib/shardui/avatar.js.map +1 -1
- package/lib/shardui/badge.d.ts +1 -1
- package/lib/shardui/badge.d.ts.map +1 -1
- package/lib/shardui/badge.js +2 -2
- package/lib/shardui/badge.js.map +1 -1
- package/lib/shardui/breadcrumb.d.ts +2 -2
- package/lib/shardui/breadcrumb.js +19 -16
- package/lib/shardui/breadcrumb.js.map +1 -1
- package/lib/shardui/button.js +2 -2
- package/lib/shardui/button.js.map +1 -1
- package/lib/shardui/calendar.d.ts +1 -1
- package/lib/shardui/calendar.d.ts.map +1 -1
- package/lib/shardui/calendar.js +4 -4
- package/lib/shardui/card.js +7 -7
- package/lib/shardui/card.js.map +1 -1
- package/lib/shardui/carousel.js +40 -33
- package/lib/shardui/carousel.js.map +1 -1
- package/lib/shardui/chart.d.ts +1 -1
- package/lib/shardui/chart.d.ts.map +1 -1
- package/lib/shardui/chart.js +81 -66
- package/lib/shardui/chart.js.map +1 -1
- package/lib/shardui/checkbox.js +10 -8
- package/lib/shardui/checkbox.js.map +1 -1
- package/lib/shardui/command.d.ts +3 -3
- package/lib/shardui/command.d.ts.map +1 -1
- package/lib/shardui/command.js +28 -24
- package/lib/shardui/command.js.map +1 -1
- package/lib/shardui/context-menu.d.ts +1 -1
- package/lib/shardui/context-menu.js +41 -30
- package/lib/shardui/context-menu.js.map +1 -1
- package/lib/shardui/dialog.d.ts +2 -2
- package/lib/shardui/dialog.js +22 -17
- package/lib/shardui/dialog.js.map +1 -1
- package/lib/shardui/drawer.d.ts +3 -3
- package/lib/shardui/drawer.js +17 -14
- package/lib/shardui/drawer.js.map +1 -1
- package/lib/shardui/dropdown-menu.d.ts +1 -1
- package/lib/shardui/dropdown-menu.js +42 -31
- package/lib/shardui/dropdown-menu.js.map +1 -1
- package/lib/shardui/form.d.ts +1 -1
- package/lib/shardui/form.d.ts.map +1 -1
- package/lib/shardui/form.js +22 -19
- package/lib/shardui/form.js.map +1 -1
- package/lib/shardui/hover-card.js +2 -2
- package/lib/shardui/hover-card.js.map +1 -1
- package/lib/shardui/input-otp.js +16 -13
- package/lib/shardui/input-otp.js.map +1 -1
- package/lib/shardui/input.js +2 -2
- package/lib/shardui/input.js.map +1 -1
- package/lib/shardui/label.js +2 -2
- package/lib/shardui/label.js.map +1 -1
- package/lib/shardui/menubar.d.ts +1 -1
- package/lib/shardui/menubar.js +46 -35
- package/lib/shardui/menubar.js.map +1 -1
- package/lib/shardui/navigation-menu.js +28 -24
- package/lib/shardui/navigation-menu.js.map +1 -1
- package/lib/shardui/pagination.d.ts +5 -5
- package/lib/shardui/pagination.js +30 -22
- package/lib/shardui/pagination.js.map +1 -1
- package/lib/shardui/popover.js +10 -8
- package/lib/shardui/popover.js.map +1 -1
- package/lib/shardui/progress.js +10 -9
- package/lib/shardui/progress.js.map +1 -1
- package/lib/shardui/radio-group.js +11 -9
- package/lib/shardui/radio-group.js.map +1 -1
- package/lib/shardui/resizable.d.ts +3 -3
- package/lib/shardui/resizable.d.ts.map +1 -1
- package/lib/shardui/resizable.js +11 -9
- package/lib/shardui/resizable.js.map +1 -1
- package/lib/shardui/scroll-area.js +14 -11
- package/lib/shardui/scroll-area.js.map +1 -1
- package/lib/shardui/select.js +49 -35
- package/lib/shardui/select.js.map +1 -1
- package/lib/shardui/separator.js +2 -2
- package/lib/shardui/separator.js.map +1 -1
- package/lib/shardui/sheet.d.ts +2 -2
- package/lib/shardui/sheet.js +24 -19
- package/lib/shardui/sheet.js.map +1 -1
- package/lib/shardui/sidebar.js +104 -88
- package/lib/shardui/sidebar.js.map +1 -1
- package/lib/shardui/skeleton.d.ts +1 -1
- package/lib/shardui/skeleton.d.ts.map +1 -1
- package/lib/shardui/skeleton.js +2 -2
- package/lib/shardui/skeleton.js.map +1 -1
- package/lib/shardui/slider.js +12 -10
- package/lib/shardui/slider.js.map +1 -1
- package/lib/shardui/sonner.d.ts +1 -1
- package/lib/shardui/sonner.d.ts.map +1 -1
- package/lib/shardui/sonner.js +2 -2
- package/lib/shardui/sonner.js.map +1 -1
- package/lib/shardui/switch.js +7 -6
- package/lib/shardui/switch.js.map +1 -1
- package/lib/shardui/table.js +16 -15
- package/lib/shardui/table.js.map +1 -1
- package/lib/shardui/tabs.js +4 -4
- package/lib/shardui/tabs.js.map +1 -1
- package/lib/shardui/textarea.js +2 -2
- package/lib/shardui/textarea.js.map +1 -1
- package/lib/shardui/toast.js +12 -11
- package/lib/shardui/toast.js.map +1 -1
- package/lib/shardui/toaster.d.ts +1 -2
- package/lib/shardui/toaster.d.ts.map +1 -1
- package/lib/shardui/toaster.js +21 -14
- package/lib/shardui/toaster.js.map +1 -1
- package/lib/shardui/toggle-group.js +15 -12
- package/lib/shardui/toggle-group.js.map +1 -1
- package/lib/shardui/toggle.js +2 -2
- package/lib/shardui/toggle.js.map +1 -1
- package/lib/shardui/tooltip.js +2 -2
- package/lib/shardui/tooltip.js.map +1 -1
- package/package.json +10 -4
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {useRef,useEffect}from'react';// Configuration constants for the audio analyzer
|
|
2
|
+
const AUDIO_CONFIG = {
|
|
3
|
+
FFT_SIZE: 512,
|
|
4
|
+
SMOOTHING: 0.8,
|
|
5
|
+
MIN_BAR_HEIGHT: 2,
|
|
6
|
+
MIN_BAR_WIDTH: 2,
|
|
7
|
+
BAR_SPACING: 4,
|
|
8
|
+
COLOR: {
|
|
9
|
+
MIN_INTENSITY: 100,
|
|
10
|
+
// Minimum gray value (darker)
|
|
11
|
+
MAX_INTENSITY: 255,
|
|
12
|
+
// Maximum gray value (brighter)
|
|
13
|
+
INTENSITY_RANGE: 155 // MAX_INTENSITY - MIN_INTENSITY
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
function AudioVisualizer({
|
|
17
|
+
stream,
|
|
18
|
+
isRecording
|
|
19
|
+
}) {
|
|
20
|
+
// Refs for managing audio context and animation
|
|
21
|
+
const canvasRef = useRef(null);
|
|
22
|
+
const audioContextRef = useRef(null);
|
|
23
|
+
const analyserRef = useRef(null);
|
|
24
|
+
const animationFrameRef = useRef(0);
|
|
25
|
+
const containerRef = useRef(null);
|
|
26
|
+
const oscillatorsRef = useRef([]);
|
|
27
|
+
const gainNodesRef = useRef([]);
|
|
28
|
+
// Cleanup function to stop visualization and close audio context
|
|
29
|
+
const cleanup = () => {
|
|
30
|
+
if (animationFrameRef.current) {
|
|
31
|
+
cancelAnimationFrame(animationFrameRef.current);
|
|
32
|
+
}
|
|
33
|
+
// Stop all oscillators
|
|
34
|
+
oscillatorsRef.current.forEach(osc => {
|
|
35
|
+
try {
|
|
36
|
+
osc.stop();
|
|
37
|
+
} catch {
|
|
38
|
+
// Oscillator may already be stopped
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
oscillatorsRef.current = [];
|
|
42
|
+
gainNodesRef.current = [];
|
|
43
|
+
if (audioContextRef.current) {
|
|
44
|
+
audioContextRef.current.close();
|
|
45
|
+
audioContextRef.current = null;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
// Cleanup on unmount
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
return cleanup;
|
|
51
|
+
}, []);
|
|
52
|
+
// Start or stop visualization based on recording state
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (isRecording) {
|
|
55
|
+
startVisualization();
|
|
56
|
+
} else {
|
|
57
|
+
cleanup();
|
|
58
|
+
}
|
|
59
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
|
+
}, [stream, isRecording]);
|
|
61
|
+
// Handle window resize
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
const handleResize = () => {
|
|
64
|
+
if (canvasRef.current && containerRef.current) {
|
|
65
|
+
const container = containerRef.current;
|
|
66
|
+
const canvas = canvasRef.current;
|
|
67
|
+
const dpr = window.devicePixelRatio || 1;
|
|
68
|
+
// Set canvas size based on container and device pixel ratio
|
|
69
|
+
const rect = container.getBoundingClientRect();
|
|
70
|
+
// Account for the 2px total margin (1px on each side)
|
|
71
|
+
canvas.width = (rect.width - 2) * dpr;
|
|
72
|
+
canvas.height = (rect.height - 2) * dpr;
|
|
73
|
+
// Scale canvas CSS size to match container minus margins
|
|
74
|
+
canvas.style.width = `${rect.width - 2}px`;
|
|
75
|
+
canvas.style.height = `${rect.height - 2}px`;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
window.addEventListener('resize', handleResize);
|
|
79
|
+
// Initial setup
|
|
80
|
+
handleResize();
|
|
81
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
82
|
+
}, []);
|
|
83
|
+
// Create a fake audio stream using oscillators that mimic speech patterns
|
|
84
|
+
const createFakeStream = (audioContext, analyser) => {
|
|
85
|
+
// Create multiple oscillators with different frequencies to simulate speech
|
|
86
|
+
const frequencies = [120, 240, 350, 500, 800, 1200, 2000, 3500];
|
|
87
|
+
const oscillators = [];
|
|
88
|
+
const gainNodes = [];
|
|
89
|
+
frequencies.forEach((freq, index) => {
|
|
90
|
+
const oscillator = audioContext.createOscillator();
|
|
91
|
+
const gainNode = audioContext.createGain();
|
|
92
|
+
// Use different wave types for variety
|
|
93
|
+
oscillator.type = index % 2 === 0 ? 'sine' : 'triangle';
|
|
94
|
+
oscillator.frequency.setValueAtTime(freq, audioContext.currentTime);
|
|
95
|
+
// Set initial gain (very low to simulate quiet speech)
|
|
96
|
+
gainNode.gain.setValueAtTime(0.01, audioContext.currentTime);
|
|
97
|
+
oscillator.connect(gainNode);
|
|
98
|
+
gainNode.connect(analyser);
|
|
99
|
+
oscillator.start();
|
|
100
|
+
oscillators.push(oscillator);
|
|
101
|
+
gainNodes.push(gainNode);
|
|
102
|
+
});
|
|
103
|
+
oscillatorsRef.current = oscillators;
|
|
104
|
+
gainNodesRef.current = gainNodes;
|
|
105
|
+
// Animate the gain to simulate speech patterns
|
|
106
|
+
const animateGain = () => {
|
|
107
|
+
if (!isRecording || !audioContextRef.current) return;
|
|
108
|
+
gainNodes.forEach((gainNode, index) => {
|
|
109
|
+
// Create random fluctuations to simulate speech
|
|
110
|
+
const baseGain = 0.02 + Math.random() * 0.08;
|
|
111
|
+
const speechPattern = Math.sin(Date.now() / (200 + index * 50)) * 0.5 + 0.5;
|
|
112
|
+
const randomBurst = Math.random() > 0.7 ? Math.random() * 0.1 : 0;
|
|
113
|
+
const targetGain = baseGain * speechPattern + randomBurst;
|
|
114
|
+
gainNode.gain.linearRampToValueAtTime(targetGain, audioContextRef.current.currentTime + 0.05);
|
|
115
|
+
});
|
|
116
|
+
setTimeout(animateGain, 100);
|
|
117
|
+
};
|
|
118
|
+
animateGain();
|
|
119
|
+
};
|
|
120
|
+
// Initialize audio context and start visualization
|
|
121
|
+
const startVisualization = async () => {
|
|
122
|
+
try {
|
|
123
|
+
const audioContext = new AudioContext();
|
|
124
|
+
audioContextRef.current = audioContext;
|
|
125
|
+
const analyser = audioContext.createAnalyser();
|
|
126
|
+
analyser.fftSize = AUDIO_CONFIG.FFT_SIZE;
|
|
127
|
+
analyser.smoothingTimeConstant = AUDIO_CONFIG.SMOOTHING;
|
|
128
|
+
analyserRef.current = analyser;
|
|
129
|
+
if (stream) {
|
|
130
|
+
// Use real stream if available
|
|
131
|
+
const source = audioContext.createMediaStreamSource(stream);
|
|
132
|
+
source.connect(analyser);
|
|
133
|
+
} else {
|
|
134
|
+
// Create fake stream for visualization
|
|
135
|
+
createFakeStream(audioContext, analyser);
|
|
136
|
+
}
|
|
137
|
+
draw();
|
|
138
|
+
} catch (error) {
|
|
139
|
+
console.error('Error starting visualization:', error);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
// Calculate the color intensity based on bar height
|
|
143
|
+
const getBarColor = normalizedHeight => {
|
|
144
|
+
const intensity = Math.floor(normalizedHeight * AUDIO_CONFIG.COLOR.INTENSITY_RANGE) + AUDIO_CONFIG.COLOR.MIN_INTENSITY;
|
|
145
|
+
return `rgb(${intensity}, ${intensity}, ${intensity})`;
|
|
146
|
+
};
|
|
147
|
+
// Draw a single bar of the visualizer
|
|
148
|
+
const drawBar = (ctx, x, centerY, width, height, color) => {
|
|
149
|
+
ctx.fillStyle = color;
|
|
150
|
+
// Draw upper bar (above center)
|
|
151
|
+
ctx.fillRect(x, centerY - height, width, height);
|
|
152
|
+
// Draw lower bar (below center)
|
|
153
|
+
ctx.fillRect(x, centerY, width, height);
|
|
154
|
+
};
|
|
155
|
+
// Main drawing function
|
|
156
|
+
const draw = () => {
|
|
157
|
+
if (!isRecording) return;
|
|
158
|
+
const canvas = canvasRef.current;
|
|
159
|
+
const ctx = canvas?.getContext('2d');
|
|
160
|
+
if (!canvas || !ctx || !analyserRef.current) return;
|
|
161
|
+
const dpr = window.devicePixelRatio || 1;
|
|
162
|
+
ctx.scale(dpr, dpr);
|
|
163
|
+
const analyser = analyserRef.current;
|
|
164
|
+
const bufferLength = analyser.frequencyBinCount;
|
|
165
|
+
const frequencyData = new Uint8Array(bufferLength);
|
|
166
|
+
const drawFrame = () => {
|
|
167
|
+
animationFrameRef.current = requestAnimationFrame(drawFrame);
|
|
168
|
+
// Get current frequency data
|
|
169
|
+
analyser.getByteFrequencyData(frequencyData);
|
|
170
|
+
// Clear canvas - use CSS pixels for clearing
|
|
171
|
+
ctx.clearRect(0, 0, canvas.width / dpr, canvas.height / dpr);
|
|
172
|
+
// Calculate dimensions in CSS pixels
|
|
173
|
+
const barWidth = Math.max(AUDIO_CONFIG.MIN_BAR_WIDTH, canvas.width / dpr / bufferLength - AUDIO_CONFIG.BAR_SPACING);
|
|
174
|
+
const centerY = canvas.height / dpr / 2;
|
|
175
|
+
let x = 0;
|
|
176
|
+
// Draw each frequency bar
|
|
177
|
+
for (let i = 0; i < bufferLength; i++) {
|
|
178
|
+
const normalizedHeight = frequencyData[i] / 255; // Convert to 0-1 range
|
|
179
|
+
const barHeight = Math.max(AUDIO_CONFIG.MIN_BAR_HEIGHT, normalizedHeight * centerY);
|
|
180
|
+
drawBar(ctx, x, centerY, barWidth, barHeight, getBarColor(normalizedHeight));
|
|
181
|
+
x += barWidth + AUDIO_CONFIG.BAR_SPACING;
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
drawFrame();
|
|
185
|
+
};
|
|
186
|
+
return jsx("div", {
|
|
187
|
+
ref: containerRef,
|
|
188
|
+
className: "!h-[32px] !w-full pl-4 pt-2",
|
|
189
|
+
children: jsx("canvas", {
|
|
190
|
+
ref: canvasRef,
|
|
191
|
+
className: "h-full !w-full"
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
}export{AudioVisualizer};//# sourceMappingURL=audio-visualizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio-visualizer.js","sources":["../../../../../src/components/AIToolbar/components/speech/audio-visualizer.tsx"],"sourcesContent":[null],"names":[],"mappings":"yEAkBI;AACH,MAAA,YAAA,GAAA;AAED,EAAA,QAAA,EAAA,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floatArrayToWav.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/speech/floatArrayToWav.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,GACxB,WAAW,YAAY,EACvB,aAAY,MAAc,EAC1B,SAAQ,KAAK,GAAG,KAAK,GAAG,KAAa,KACtC,IAiCF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const floatArrayToWav = (audioData, sampleRate = 16000, format = 'wav') => {
|
|
2
|
+
const buffer = new ArrayBuffer(44 + audioData.length * 2);
|
|
3
|
+
const view = new DataView(buffer);
|
|
4
|
+
const writeString = (offset, string) => {
|
|
5
|
+
for (let i = 0; i < string.length; i++) {
|
|
6
|
+
view.setUint8(offset + i, string.charCodeAt(i));
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
writeString(0, 'RIFF');
|
|
10
|
+
const dataSize = format === 'wav' ? 36 + audioData.length * 2 : 44 + audioData.length * 2;
|
|
11
|
+
view.setUint32(4, dataSize, true);
|
|
12
|
+
writeString(8, format === 'wav' ? 'WAVE' : 'FORM');
|
|
13
|
+
writeString(12, 'fmt ');
|
|
14
|
+
view.setUint32(16, 16, true);
|
|
15
|
+
view.setUint16(20, 1, true);
|
|
16
|
+
view.setUint16(22, 1, true);
|
|
17
|
+
view.setUint32(24, sampleRate, true);
|
|
18
|
+
view.setUint32(28, sampleRate * 2, true);
|
|
19
|
+
view.setUint16(32, 2, true);
|
|
20
|
+
view.setUint16(34, 16, true);
|
|
21
|
+
writeString(36, 'data');
|
|
22
|
+
view.setUint32(40, audioData.length * 2, true);
|
|
23
|
+
let offset = 44;
|
|
24
|
+
for (let i = 0; i < audioData.length; i++) {
|
|
25
|
+
const sample = Math.max(-1, Math.min(1, audioData[i]));
|
|
26
|
+
view.setInt16(offset, sample < 0 ? sample * 0x8000 : sample * 0x7fff, true);
|
|
27
|
+
offset += 2;
|
|
28
|
+
}
|
|
29
|
+
return new Blob([buffer], {
|
|
30
|
+
type: `audio/${format}`
|
|
31
|
+
});
|
|
32
|
+
};export{floatArrayToWav};//# sourceMappingURL=floatArrayToWav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floatArrayToWav.js","sources":["../../../../../src/components/AIToolbar/components/speech/floatArrayToWav.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,MAAA,eAAa,GAAA,CAAA,SACT,EAAA,UAAW,GAAA,KAAA,QACX,GAAA,KAAY,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/speech/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGzE,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAEpD,eAAO,MAAM,WAAW,GAAI,OAAO,gBAAgB,4CA2UlD,CAAC"}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState,useEffect,useCallback}from'react';import'../../../../shardui/accordion.js';import'../../../../shardui/alert.js';import'../../../../shardui/alert-dialog.js';import'@radix-ui/react-aspect-ratio';import'../../../../shardui/avatar.js';import'../../../../shardui/badge.js';import'../../../../shardui/breadcrumb.js';import {Button}from'../../../../shardui/button.js';import'../../../../shardui/calendar.js';import'../../../../shardui/card.js';import'../../../../shardui/carousel.js';import'../../../../shardui/chart.js';import'../../../../shardui/checkbox.js';import'@radix-ui/react-collapsible';import'../../../../shardui/command.js';import'../../../../shardui/context-menu.js';import'../../../../shardui/dialog.js';import'../../../../shardui/drawer.js';import'../../../../shardui/dropdown-menu.js';import'../../../../shardui/form.js';import'../../../../shardui/hover-card.js';import'../../../../shardui/input.js';import'../../../../shardui/input-otp.js';import'../../../../shardui/label.js';import'../../../../shardui/menubar.js';import'../../../../shardui/navigation-menu.js';import'../../../../shardui/pagination.js';import {Popover,PopoverTrigger,PopoverContent}from'../../../../shardui/popover.js';import'../../../../shardui/progress.js';import'../../../../shardui/radio-group.js';import {LoaderIcon,CameraIcon,PlusIcon,XIcon,AlertCircleIcon,AudioLinesIcon,HeadphonesIcon}from'lucide-react';import'react-resizable-panels';import'../../../../utils/isBrowser/index.js';import {cn}from'../../../../utils/util.js';import'fast-deep-equal/react.js';import {ScrollArea}from'../../../../shardui/scroll-area.js';import'../../../../shardui/select.js';import'../../../../shardui/separator.js';import'../../../../shardui/sheet.js';import'../../../../shardui/sidebar.js';import'../../../../shardui/slider.js';import'../../../ThemeProvider/ThemeProvider.js';import'sonner';import'../../../../shardui/switch.js';import'../../../../shardui/table.js';import'../../../../shardui/tabs.js';import'../../../../shardui/textarea.js';import'../../../../shardui/toast.js';import'../../../../shardui/toggle.js';import'../../../../shardui/toggle-group.js';import'../../../../shardui/tooltip.js';import {ModeSwitcher}from'./ModeSwitcher.js';import {RecordingPanel}from'./RecordingPanel.js';import {SettingsPanel}from'./SettingsPanel.js';import {PermissionFlow}from'./PermissionFlow.js';import {QuickActions}from'./QuickActions.js';import {Warning}from'./Warning.js';const SystemAudio = props => {
|
|
2
|
+
const {
|
|
3
|
+
hasActiveLicense = true,
|
|
4
|
+
supportsImages = true,
|
|
5
|
+
checkSystemAudioAccess,
|
|
6
|
+
requestSystemAudioAccess,
|
|
7
|
+
captureSystemScreenshot,
|
|
8
|
+
capturing,
|
|
9
|
+
isProcessing,
|
|
10
|
+
isAIProcessing,
|
|
11
|
+
lastAIResponse,
|
|
12
|
+
error,
|
|
13
|
+
setupRequired,
|
|
14
|
+
startCapture,
|
|
15
|
+
stopCapture,
|
|
16
|
+
isPopoverOpen,
|
|
17
|
+
setIsPopoverOpen,
|
|
18
|
+
useSystemPrompt,
|
|
19
|
+
setUseSystemPrompt,
|
|
20
|
+
contextContent,
|
|
21
|
+
setContextContent,
|
|
22
|
+
startNewConversation,
|
|
23
|
+
resizeWindow,
|
|
24
|
+
quickActions,
|
|
25
|
+
addQuickAction,
|
|
26
|
+
removeQuickAction,
|
|
27
|
+
isManagingQuickActions,
|
|
28
|
+
setIsManagingQuickActions,
|
|
29
|
+
showQuickActions,
|
|
30
|
+
setShowQuickActions,
|
|
31
|
+
handleQuickActionClick,
|
|
32
|
+
vadConfig,
|
|
33
|
+
updateVadConfiguration,
|
|
34
|
+
isRecordingInContinuousMode,
|
|
35
|
+
recordingProgress,
|
|
36
|
+
manualStopAndSend,
|
|
37
|
+
startContinuousRecording,
|
|
38
|
+
ignoreContinuousRecording,
|
|
39
|
+
scrollAreaRef,
|
|
40
|
+
settingsDropdownContent,
|
|
41
|
+
voicePopoverFooter,
|
|
42
|
+
toolbarShowElementTitles
|
|
43
|
+
} = props;
|
|
44
|
+
const showNativeTitles = toolbarShowElementTitles !== false;
|
|
45
|
+
// Screenshot state
|
|
46
|
+
const [screenshotImage, setScreenshotImage] = useState(null);
|
|
47
|
+
const [isCapturingScreenshot, setIsCapturingScreenshot] = useState(false);
|
|
48
|
+
const isVadMode = vadConfig.enabled;
|
|
49
|
+
const hasResponse = lastAIResponse || isAIProcessing;
|
|
50
|
+
// Reset screenshot when processing starts (message is being sent)
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (isProcessing && screenshotImage) {
|
|
53
|
+
setScreenshotImage(null);
|
|
54
|
+
}
|
|
55
|
+
}, [isProcessing, screenshotImage]);
|
|
56
|
+
const handleToggleCapture = async () => {
|
|
57
|
+
if (capturing) {
|
|
58
|
+
await stopCapture();
|
|
59
|
+
} else {
|
|
60
|
+
await startCapture();
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const handleModeChange = vadEnabled => {
|
|
64
|
+
updateVadConfiguration({
|
|
65
|
+
...vadConfig,
|
|
66
|
+
enabled: vadEnabled
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
// Capture screenshot functionality
|
|
70
|
+
const handleCaptureScreenshot = useCallback(async () => {
|
|
71
|
+
if (!captureSystemScreenshot || isCapturingScreenshot) return;
|
|
72
|
+
setIsCapturingScreenshot(true);
|
|
73
|
+
try {
|
|
74
|
+
const base64 = await captureSystemScreenshot();
|
|
75
|
+
if (base64) {
|
|
76
|
+
setScreenshotImage(base64);
|
|
77
|
+
}
|
|
78
|
+
} catch (err) {
|
|
79
|
+
console.error('Failed to capture screenshot:', err);
|
|
80
|
+
} finally {
|
|
81
|
+
setIsCapturingScreenshot(false);
|
|
82
|
+
}
|
|
83
|
+
}, [captureSystemScreenshot, isCapturingScreenshot]);
|
|
84
|
+
const handleRemoveScreenshot = useCallback(() => {
|
|
85
|
+
setScreenshotImage(null);
|
|
86
|
+
}, []);
|
|
87
|
+
const getButtonIcon = () => {
|
|
88
|
+
if (setupRequired) return jsx(AlertCircleIcon, {
|
|
89
|
+
className: "text-orange-500"
|
|
90
|
+
});
|
|
91
|
+
if (error && !setupRequired) return jsx(AlertCircleIcon, {
|
|
92
|
+
className: "text-red-500"
|
|
93
|
+
});
|
|
94
|
+
if (isProcessing) return jsx(LoaderIcon, {
|
|
95
|
+
className: "animate-spin"
|
|
96
|
+
});
|
|
97
|
+
if (capturing) return jsx(AudioLinesIcon, {
|
|
98
|
+
className: "text-green-500 animate-pulse"
|
|
99
|
+
});
|
|
100
|
+
return jsx(HeadphonesIcon, {});
|
|
101
|
+
};
|
|
102
|
+
const getButtonTitle = () => {
|
|
103
|
+
if (setupRequired) return 'Setup required - Click for instructions';
|
|
104
|
+
if (error && !setupRequired) return `Error: ${error}`;
|
|
105
|
+
if (isProcessing) return 'Transcribing audio...';
|
|
106
|
+
if (capturing) return 'Stop system audio capture';
|
|
107
|
+
return 'Start system audio capture';
|
|
108
|
+
};
|
|
109
|
+
return jsxs(Popover, {
|
|
110
|
+
open: isPopoverOpen,
|
|
111
|
+
onOpenChange: open => {
|
|
112
|
+
if (capturing && !open) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
setIsPopoverOpen(open);
|
|
116
|
+
},
|
|
117
|
+
children: [jsx(PopoverTrigger, {
|
|
118
|
+
asChild: true,
|
|
119
|
+
children: jsx(Button, {
|
|
120
|
+
size: "icon",
|
|
121
|
+
title: showNativeTitles ? getButtonTitle() : undefined,
|
|
122
|
+
onClick: handleToggleCapture,
|
|
123
|
+
className: cn(capturing && 'bg-green-50 hover:bg-green-100', error && 'bg-red-100 hover:bg-red-200'),
|
|
124
|
+
children: getButtonIcon()
|
|
125
|
+
})
|
|
126
|
+
}), (capturing || setupRequired || error) && jsx(PopoverContent, {
|
|
127
|
+
align: "end",
|
|
128
|
+
side: "bottom",
|
|
129
|
+
className: "z-[200] select-none w-screen max-h-[min(92vh,calc(100vh-1rem))] p-0 border shadow-lg overflow-hidden border-input/50",
|
|
130
|
+
sideOffset: 8,
|
|
131
|
+
children: jsxs("div", {
|
|
132
|
+
className: "flex flex-col h-[calc(100vh-4rem)] overflow-hidden",
|
|
133
|
+
children: [jsx("div", {
|
|
134
|
+
className: "flex-shrink-0 p-3 border-b border-border/50",
|
|
135
|
+
children: jsxs("div", {
|
|
136
|
+
className: "flex items-center justify-between gap-2",
|
|
137
|
+
children: [!setupRequired && jsx(ModeSwitcher, {
|
|
138
|
+
isVadMode: isVadMode,
|
|
139
|
+
onModeChange: handleModeChange,
|
|
140
|
+
disabled: isRecordingInContinuousMode || isProcessing || isAIProcessing
|
|
141
|
+
}), setupRequired && jsx("h2", {
|
|
142
|
+
className: "font-semibold text-sm",
|
|
143
|
+
children: "Setup Required"
|
|
144
|
+
}), jsxs("div", {
|
|
145
|
+
className: "flex items-center gap-1.5 flex-shrink-0",
|
|
146
|
+
children: [hasActiveLicense && !setupRequired && supportsImages && captureSystemScreenshot && jsxs(Button, {
|
|
147
|
+
size: "sm",
|
|
148
|
+
variant: screenshotImage ? 'default' : 'outline',
|
|
149
|
+
onClick: handleCaptureScreenshot,
|
|
150
|
+
disabled: isCapturingScreenshot,
|
|
151
|
+
className: cn('h-6 text-[10px] gap-1 px-2', screenshotImage && 'bg-primary text-primary-foreground'),
|
|
152
|
+
title: showNativeTitles ? 'Capture screenshot to include with transcription' : undefined,
|
|
153
|
+
children: [isCapturingScreenshot ? jsx(LoaderIcon, {
|
|
154
|
+
className: "w-3 h-3 animate-spin"
|
|
155
|
+
}) : jsx(CameraIcon, {
|
|
156
|
+
className: "w-3 h-3"
|
|
157
|
+
}), "Screenshot"]
|
|
158
|
+
}), !setupRequired && jsxs(Button, {
|
|
159
|
+
size: "sm",
|
|
160
|
+
variant: "ghost",
|
|
161
|
+
onClick: startNewConversation,
|
|
162
|
+
className: "h-6 text-[10px] gap-1 px-2",
|
|
163
|
+
title: showNativeTitles ? 'Start a new conversation' : undefined,
|
|
164
|
+
children: [jsx(PlusIcon, {
|
|
165
|
+
className: "w-3 h-3"
|
|
166
|
+
}), "New"]
|
|
167
|
+
}), !capturing && jsx(Button, {
|
|
168
|
+
size: "icon",
|
|
169
|
+
variant: "ghost",
|
|
170
|
+
className: "h-6 w-6",
|
|
171
|
+
title: showNativeTitles ? 'Close' : undefined,
|
|
172
|
+
onClick: () => {
|
|
173
|
+
setIsPopoverOpen(false);
|
|
174
|
+
resizeWindow(false);
|
|
175
|
+
},
|
|
176
|
+
children: jsx(XIcon, {
|
|
177
|
+
className: "h-3.5 w-3.5"
|
|
178
|
+
})
|
|
179
|
+
})]
|
|
180
|
+
})]
|
|
181
|
+
})
|
|
182
|
+
}), jsx(ScrollArea, {
|
|
183
|
+
className: "flex-1 min-h-0",
|
|
184
|
+
ref: scrollAreaRef,
|
|
185
|
+
children: jsxs("div", {
|
|
186
|
+
className: "p-2 space-y-2",
|
|
187
|
+
children: [screenshotImage && jsxs("div", {
|
|
188
|
+
className: "flex items-center gap-2 p-2 rounded-lg bg-primary/5 border border-primary/20",
|
|
189
|
+
children: [jsx("img", {
|
|
190
|
+
src: `data:image/png;base64,${screenshotImage}`,
|
|
191
|
+
alt: "Screenshot",
|
|
192
|
+
className: "h-12 w-20 object-cover rounded"
|
|
193
|
+
}), jsxs("div", {
|
|
194
|
+
className: "flex-1 min-w-0",
|
|
195
|
+
children: [jsx("p", {
|
|
196
|
+
className: "text-[10px] font-medium",
|
|
197
|
+
children: "Screenshot attached"
|
|
198
|
+
}), jsx("p", {
|
|
199
|
+
className: "text-[9px] text-muted-foreground",
|
|
200
|
+
children: "Will be sent with next transcription"
|
|
201
|
+
})]
|
|
202
|
+
}), jsx(Button, {
|
|
203
|
+
size: "icon",
|
|
204
|
+
variant: "ghost",
|
|
205
|
+
className: "h-5 w-5",
|
|
206
|
+
onClick: handleRemoveScreenshot,
|
|
207
|
+
children: jsx(XIcon, {
|
|
208
|
+
className: "h-3 w-3"
|
|
209
|
+
})
|
|
210
|
+
})]
|
|
211
|
+
}), error && !setupRequired && jsxs("div", {
|
|
212
|
+
className: "flex items-start gap-2 p-2.5 rounded-lg bg-red-50 border border-red-200",
|
|
213
|
+
children: [jsx(AlertCircleIcon, {
|
|
214
|
+
className: "w-3.5 h-3.5 text-red-500 flex-shrink-0 mt-0.5"
|
|
215
|
+
}), jsxs("div", {
|
|
216
|
+
children: [jsx("p", {
|
|
217
|
+
className: "text-[10px] font-medium text-red-800",
|
|
218
|
+
children: "Error"
|
|
219
|
+
}), jsx("p", {
|
|
220
|
+
className: "text-[10px] text-red-700",
|
|
221
|
+
children: error
|
|
222
|
+
})]
|
|
223
|
+
})]
|
|
224
|
+
}), setupRequired ? jsx(PermissionFlow, {
|
|
225
|
+
checkAccess: checkSystemAudioAccess,
|
|
226
|
+
requestAccess: requestSystemAudioAccess,
|
|
227
|
+
onPermissionGranted: () => {
|
|
228
|
+
void startCapture();
|
|
229
|
+
},
|
|
230
|
+
onPermissionDenied: () => {
|
|
231
|
+
// Keep showing setup instructions
|
|
232
|
+
}
|
|
233
|
+
}) : jsxs(Fragment, {
|
|
234
|
+
children: [jsx(RecordingPanel, {
|
|
235
|
+
isVadMode: isVadMode,
|
|
236
|
+
isRecording: isRecordingInContinuousMode,
|
|
237
|
+
isProcessing: isProcessing,
|
|
238
|
+
isAIProcessing: isAIProcessing,
|
|
239
|
+
recordingProgress: recordingProgress,
|
|
240
|
+
maxDuration: vadConfig.max_recording_duration_secs,
|
|
241
|
+
onStartRecording: startContinuousRecording,
|
|
242
|
+
onStopAndSend: manualStopAndSend,
|
|
243
|
+
onIgnore: ignoreContinuousRecording
|
|
244
|
+
}), jsx(SettingsPanel, {
|
|
245
|
+
vadConfig: vadConfig,
|
|
246
|
+
onUpdateVadConfig: updateVadConfiguration,
|
|
247
|
+
useSystemPrompt: useSystemPrompt,
|
|
248
|
+
setUseSystemPrompt: setUseSystemPrompt,
|
|
249
|
+
contextContent: contextContent,
|
|
250
|
+
setContextContent: setContextContent,
|
|
251
|
+
settingsDropdownContent: settingsDropdownContent
|
|
252
|
+
}), jsx(Warning, {
|
|
253
|
+
isVadMode: isVadMode
|
|
254
|
+
})]
|
|
255
|
+
})]
|
|
256
|
+
})
|
|
257
|
+
}), voicePopoverFooter ? jsx("div", {
|
|
258
|
+
className: "flex-shrink-0 border-t border-border/55 bg-muted/25 px-3 py-2.5 backdrop-blur supports-[backdrop-filter]:bg-muted/20",
|
|
259
|
+
children: voicePopoverFooter
|
|
260
|
+
}) : null, !setupRequired && hasResponse && jsx("div", {
|
|
261
|
+
className: "flex-shrink-0 border-t border-border/50 p-2",
|
|
262
|
+
children: jsx(QuickActions, {
|
|
263
|
+
actions: quickActions,
|
|
264
|
+
onActionClick: handleQuickActionClick,
|
|
265
|
+
onAddAction: addQuickAction,
|
|
266
|
+
onRemoveAction: removeQuickAction,
|
|
267
|
+
isManaging: isManagingQuickActions,
|
|
268
|
+
setIsManaging: setIsManagingQuickActions,
|
|
269
|
+
show: showQuickActions,
|
|
270
|
+
setShow: setShowQuickActions
|
|
271
|
+
})
|
|
272
|
+
})]
|
|
273
|
+
})
|
|
274
|
+
})]
|
|
275
|
+
});
|
|
276
|
+
};export{SystemAudio};//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface PromptTemplate {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
prompt: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PROMPT_TEMPLATES: PromptTemplate[];
|
|
7
|
+
export declare const getPromptTemplateById: (id: string) => PromptTemplate | undefined;
|
|
8
|
+
export declare const getPromptTemplateNames: () => {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}[];
|
|
12
|
+
//# sourceMappingURL=promptTemplates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptTemplates.d.ts","sourceRoot":"","sources":["../../../../../src/components/AIToolbar/components/speech/promptTemplates.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAuH5C,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,IAAI,MAAM,KAAG,cAAc,GAAG,SAEnE,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAAO;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAKrE,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
const PROMPT_TEMPLATES = [{
|
|
2
|
+
id: 'real_time_translator',
|
|
3
|
+
name: 'Real-time Translator',
|
|
4
|
+
prompt: `You are a real-time translation assistant. Listen to system audio and provide instant, accurate translations. Be concise and quick.
|
|
5
|
+
|
|
6
|
+
[ADD YOUR TRANSLATION SETTINGS HERE]
|
|
7
|
+
- From language:
|
|
8
|
+
- To language:
|
|
9
|
+
- Context/Domain: (business, casual, technical, etc.)
|
|
10
|
+
|
|
11
|
+
Provide immediate translations of what you hear. Keep responses short and clear for quick reading.`
|
|
12
|
+
}, {
|
|
13
|
+
id: 'meeting_assistant',
|
|
14
|
+
name: 'Meeting Assistant',
|
|
15
|
+
prompt: `You are a transparent meeting assistant. Listen to conversations and provide real-time insights, summaries, and action items.
|
|
16
|
+
|
|
17
|
+
[ADD YOUR MEETING CONTEXT HERE]
|
|
18
|
+
- Meeting type:
|
|
19
|
+
- Your role:
|
|
20
|
+
- Key topics to focus on:
|
|
21
|
+
- What you need help with:
|
|
22
|
+
|
|
23
|
+
Provide quick insights, key points, and actionable information as the meeting progresses.`
|
|
24
|
+
}, {
|
|
25
|
+
id: 'interview_assistant',
|
|
26
|
+
name: 'Interview Assistant',
|
|
27
|
+
prompt: `You are a real-time interview assistant. Help answer questions by providing quick, relevant talking points based on the candidate's background.
|
|
28
|
+
|
|
29
|
+
[ADD YOUR RESUME HERE]
|
|
30
|
+
- Your experience:
|
|
31
|
+
- Key skills:
|
|
32
|
+
- Notable achievements:
|
|
33
|
+
- Education:
|
|
34
|
+
- Projects:
|
|
35
|
+
|
|
36
|
+
[ADD JOB DESCRIPTION HERE]
|
|
37
|
+
- Position:
|
|
38
|
+
- Required skills:
|
|
39
|
+
- Company:
|
|
40
|
+
- Key responsibilities:
|
|
41
|
+
|
|
42
|
+
Listen to interview questions and provide concise, relevant talking points to help answer effectively.`
|
|
43
|
+
}, {
|
|
44
|
+
id: 'technical_interview',
|
|
45
|
+
name: 'Technical Interview Helper',
|
|
46
|
+
prompt: `You are a technical interview assistant. Provide quick hints, approaches, and explanations for technical questions.
|
|
47
|
+
|
|
48
|
+
[ADD YOUR TECHNICAL BACKGROUND HERE]
|
|
49
|
+
- Programming languages:
|
|
50
|
+
- Technologies/frameworks:
|
|
51
|
+
- Experience level:
|
|
52
|
+
- Areas of expertise:
|
|
53
|
+
|
|
54
|
+
[ADD JOB REQUIREMENTS HERE]
|
|
55
|
+
- Technical stack:
|
|
56
|
+
- Position level:
|
|
57
|
+
- Key technical skills needed:
|
|
58
|
+
|
|
59
|
+
Listen to technical questions and provide brief, helpful guidance and approaches.`
|
|
60
|
+
}, {
|
|
61
|
+
id: 'presentation_coach',
|
|
62
|
+
name: 'Presentation Coach',
|
|
63
|
+
prompt: `You are a real-time presentation assistant. Help improve delivery, suggest talking points, and provide confidence boosters.
|
|
64
|
+
|
|
65
|
+
[ADD YOUR PRESENTATION CONTEXT HERE]
|
|
66
|
+
- Topic/subject:
|
|
67
|
+
- Audience:
|
|
68
|
+
- Key messages:
|
|
69
|
+
- Your expertise level:
|
|
70
|
+
- Presentation goals:
|
|
71
|
+
|
|
72
|
+
Provide quick tips, talking points, and encouragement as you present.`
|
|
73
|
+
}, {
|
|
74
|
+
id: 'learning_assistant',
|
|
75
|
+
name: 'Learning Assistant',
|
|
76
|
+
prompt: `You are a real-time learning companion. Help understand concepts, provide explanations, and suggest questions during lectures or tutorials.
|
|
77
|
+
|
|
78
|
+
[ADD YOUR LEARNING CONTEXT HERE]
|
|
79
|
+
- Subject/topic:
|
|
80
|
+
- Your current level:
|
|
81
|
+
- Learning goals:
|
|
82
|
+
- Areas of difficulty:
|
|
83
|
+
- Course context:
|
|
84
|
+
|
|
85
|
+
Provide quick explanations, clarifications, and helpful insights as you learn.`
|
|
86
|
+
}, {
|
|
87
|
+
id: 'customer_call_helper',
|
|
88
|
+
name: 'Customer Call Helper',
|
|
89
|
+
prompt: `You are a customer service assistant. Help handle customer calls by providing quick responses, solutions, and talking points.
|
|
90
|
+
|
|
91
|
+
[ADD YOUR PRODUCT/SERVICE INFO HERE]
|
|
92
|
+
- Company/product:
|
|
93
|
+
- Common issues:
|
|
94
|
+
- Your role:
|
|
95
|
+
- Available solutions:
|
|
96
|
+
- Escalation procedures:
|
|
97
|
+
|
|
98
|
+
Listen to customer concerns and provide quick, helpful response suggestions.`
|
|
99
|
+
}, {
|
|
100
|
+
id: 'general_assistant',
|
|
101
|
+
name: 'General Assistant',
|
|
102
|
+
prompt: `You are a transparent AI assistant. Provide real-time help, insights, and information based on what you hear through system audio.
|
|
103
|
+
|
|
104
|
+
[ADD YOUR PREFERENCES HERE]
|
|
105
|
+
- Primary use case:
|
|
106
|
+
- Areas of interest:
|
|
107
|
+
- Response style: (brief, detailed, technical, etc.)
|
|
108
|
+
- Language preference:
|
|
109
|
+
|
|
110
|
+
Listen and provide relevant, helpful information and insights in real-time.`
|
|
111
|
+
}];
|
|
112
|
+
const getPromptTemplateById = id => {
|
|
113
|
+
return PROMPT_TEMPLATES.find(template => template.id === id);
|
|
114
|
+
};export{PROMPT_TEMPLATES,getPromptTemplateById};//# sourceMappingURL=promptTemplates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptTemplates.js","sources":["../../../../../src/components/AIToolbar/components/speech/promptTemplates.ts"],"sourcesContent":[null],"names":[],"mappings":"sBAAiB,GAAc,CAAA;IAC3B,EAAE,sBAAS;MACX,EAAI,sBAAS;QACb,EAAM,CAAA;;AAGV;AAyHA;AAIA;;;AAAsE,kGAKpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|