@docyrus/rn-assistant 0.0.1
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 +477 -0
- package/dist/commonjs/components/agent-selector/agent-selector.js +300 -0
- package/dist/commonjs/components/agent-selector/agent-selector.js.map +1 -0
- package/dist/commonjs/components/agent-selector/index.js +17 -0
- package/dist/commonjs/components/agent-selector/index.js.map +1 -0
- package/dist/commonjs/components/assistant-animations/assistant-animations.js +169 -0
- package/dist/commonjs/components/assistant-animations/assistant-animations.js.map +1 -0
- package/dist/commonjs/components/assistant-animations/index.js +17 -0
- package/dist/commonjs/components/assistant-animations/index.js.map +1 -0
- package/dist/commonjs/components/assistant-screen/assistant-screen.js +809 -0
- package/dist/commonjs/components/assistant-screen/assistant-screen.js.map +1 -0
- package/dist/commonjs/components/assistant-screen/index.js +17 -0
- package/dist/commonjs/components/assistant-screen/index.js.map +1 -0
- package/dist/commonjs/components/index.js +116 -0
- package/dist/commonjs/components/index.js.map +1 -0
- package/dist/commonjs/components/message-parts/index.js +13 -0
- package/dist/commonjs/components/message-parts/index.js.map +1 -0
- package/dist/commonjs/components/message-parts/message-parts.js +209 -0
- package/dist/commonjs/components/message-parts/message-parts.js.map +1 -0
- package/dist/commonjs/components/new-chat/index.js +17 -0
- package/dist/commonjs/components/new-chat/index.js.map +1 -0
- package/dist/commonjs/components/new-chat/new-chat.js +100 -0
- package/dist/commonjs/components/new-chat/new-chat.js.map +1 -0
- package/dist/commonjs/components/prompt-input/attachment-picker.js +341 -0
- package/dist/commonjs/components/prompt-input/attachment-picker.js.map +1 -0
- package/dist/commonjs/components/prompt-input/attachment-preview.js +229 -0
- package/dist/commonjs/components/prompt-input/attachment-preview.js.map +1 -0
- package/dist/commonjs/components/prompt-input/index.js +41 -0
- package/dist/commonjs/components/prompt-input/index.js.map +1 -0
- package/dist/commonjs/components/prompt-input/prompt-input.js +288 -0
- package/dist/commonjs/components/prompt-input/prompt-input.js.map +1 -0
- package/dist/commonjs/components/prompt-input/provider-selector.js +542 -0
- package/dist/commonjs/components/prompt-input/provider-selector.js.map +1 -0
- package/dist/commonjs/components/prompt-input/reasoning-level-selector.js +350 -0
- package/dist/commonjs/components/prompt-input/reasoning-level-selector.js.map +1 -0
- package/dist/commonjs/components/prompt-input/voice-recorder.js +260 -0
- package/dist/commonjs/components/prompt-input/voice-recorder.js.map +1 -0
- package/dist/commonjs/components/sessions-list/index.js +17 -0
- package/dist/commonjs/components/sessions-list/index.js.map +1 -0
- package/dist/commonjs/components/sessions-list/sessions-list.js +820 -0
- package/dist/commonjs/components/sessions-list/sessions-list.js.map +1 -0
- package/dist/commonjs/hooks/index.js +34 -0
- package/dist/commonjs/hooks/index.js.map +1 -0
- package/dist/commonjs/hooks/use-agent-models.js +104 -0
- package/dist/commonjs/hooks/use-agent-models.js.map +1 -0
- package/dist/commonjs/hooks/use-assistant.js +402 -0
- package/dist/commonjs/hooks/use-assistant.js.map +1 -0
- package/dist/commonjs/hooks/use-attachment-picker.js +308 -0
- package/dist/commonjs/hooks/use-attachment-picker.js.map +1 -0
- package/dist/commonjs/hooks/use-voice-recorder.js +217 -0
- package/dist/commonjs/hooks/use-voice-recorder.js.map +1 -0
- package/dist/commonjs/index.js +112 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/package.json +1 -0
- package/dist/commonjs/theme/assistant-theme.js +105 -0
- package/dist/commonjs/theme/assistant-theme.js.map +1 -0
- package/dist/commonjs/theme/index.js +19 -0
- package/dist/commonjs/theme/index.js.map +1 -0
- package/dist/commonjs/types/index.js +2 -0
- package/dist/commonjs/types/index.js.map +1 -0
- package/dist/commonjs/ui/action-sheet.js +348 -0
- package/dist/commonjs/ui/action-sheet.js.map +1 -0
- package/dist/commonjs/ui/alert-dialog.js +134 -0
- package/dist/commonjs/ui/alert-dialog.js.map +1 -0
- package/dist/commonjs/ui/docyrus-brand-mark.js +52 -0
- package/dist/commonjs/ui/docyrus-brand-mark.js.map +1 -0
- package/dist/commonjs/ui/docyrus-icon.js +298 -0
- package/dist/commonjs/ui/docyrus-icon.js.map +1 -0
- package/dist/commonjs/ui/index.js +34 -0
- package/dist/commonjs/ui/index.js.map +1 -0
- package/dist/commonjs/utils/api-client.js +99 -0
- package/dist/commonjs/utils/api-client.js.map +1 -0
- package/dist/commonjs/utils/default-api-config.js +195 -0
- package/dist/commonjs/utils/default-api-config.js.map +1 -0
- package/dist/commonjs/utils/index.js +39 -0
- package/dist/commonjs/utils/index.js.map +1 -0
- package/dist/commonjs/utils/resolve-api-headers.js +16 -0
- package/dist/commonjs/utils/resolve-api-headers.js.map +1 -0
- package/dist/module/components/agent-selector/agent-selector.js +296 -0
- package/dist/module/components/agent-selector/agent-selector.js.map +1 -0
- package/dist/module/components/agent-selector/index.js +4 -0
- package/dist/module/components/agent-selector/index.js.map +1 -0
- package/dist/module/components/assistant-animations/assistant-animations.js +164 -0
- package/dist/module/components/assistant-animations/assistant-animations.js.map +1 -0
- package/dist/module/components/assistant-animations/index.js +4 -0
- package/dist/module/components/assistant-animations/index.js.map +1 -0
- package/dist/module/components/assistant-screen/assistant-screen.js +801 -0
- package/dist/module/components/assistant-screen/assistant-screen.js.map +1 -0
- package/dist/module/components/assistant-screen/index.js +4 -0
- package/dist/module/components/assistant-screen/index.js.map +1 -0
- package/dist/module/components/index.js +23 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/components/message-parts/index.js +4 -0
- package/dist/module/components/message-parts/index.js.map +1 -0
- package/dist/module/components/message-parts/message-parts.js +205 -0
- package/dist/module/components/message-parts/message-parts.js.map +1 -0
- package/dist/module/components/new-chat/index.js +4 -0
- package/dist/module/components/new-chat/index.js.map +1 -0
- package/dist/module/components/new-chat/new-chat.js +96 -0
- package/dist/module/components/new-chat/new-chat.js.map +1 -0
- package/dist/module/components/prompt-input/attachment-picker.js +337 -0
- package/dist/module/components/prompt-input/attachment-picker.js.map +1 -0
- package/dist/module/components/prompt-input/attachment-preview.js +225 -0
- package/dist/module/components/prompt-input/attachment-preview.js.map +1 -0
- package/dist/module/components/prompt-input/index.js +15 -0
- package/dist/module/components/prompt-input/index.js.map +1 -0
- package/dist/module/components/prompt-input/prompt-input.js +284 -0
- package/dist/module/components/prompt-input/prompt-input.js.map +1 -0
- package/dist/module/components/prompt-input/provider-selector.js +538 -0
- package/dist/module/components/prompt-input/provider-selector.js.map +1 -0
- package/dist/module/components/prompt-input/reasoning-level-selector.js +346 -0
- package/dist/module/components/prompt-input/reasoning-level-selector.js.map +1 -0
- package/dist/module/components/prompt-input/voice-recorder.js +256 -0
- package/dist/module/components/prompt-input/voice-recorder.js.map +1 -0
- package/dist/module/components/sessions-list/index.js +4 -0
- package/dist/module/components/sessions-list/index.js.map +1 -0
- package/dist/module/components/sessions-list/sessions-list.js +816 -0
- package/dist/module/components/sessions-list/sessions-list.js.map +1 -0
- package/dist/module/hooks/index.js +18 -0
- package/dist/module/hooks/index.js.map +1 -0
- package/dist/module/hooks/use-agent-models.js +100 -0
- package/dist/module/hooks/use-agent-models.js.map +1 -0
- package/dist/module/hooks/use-assistant.js +398 -0
- package/dist/module/hooks/use-assistant.js.map +1 -0
- package/dist/module/hooks/use-attachment-picker.js +303 -0
- package/dist/module/hooks/use-attachment-picker.js.map +1 -0
- package/dist/module/hooks/use-voice-recorder.js +214 -0
- package/dist/module/hooks/use-voice-recorder.js.map +1 -0
- package/dist/module/index.js +59 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/package.json +1 -0
- package/dist/module/theme/assistant-theme.js +100 -0
- package/dist/module/theme/assistant-theme.js.map +1 -0
- package/dist/module/theme/index.js +4 -0
- package/dist/module/theme/index.js.map +1 -0
- package/dist/module/types/index.js +2 -0
- package/dist/module/types/index.js.map +1 -0
- package/dist/module/ui/action-sheet.js +344 -0
- package/dist/module/ui/action-sheet.js.map +1 -0
- package/dist/module/ui/alert-dialog.js +130 -0
- package/dist/module/ui/alert-dialog.js.map +1 -0
- package/dist/module/ui/docyrus-brand-mark.js +48 -0
- package/dist/module/ui/docyrus-brand-mark.js.map +1 -0
- package/dist/module/ui/docyrus-icon.js +294 -0
- package/dist/module/ui/docyrus-icon.js.map +1 -0
- package/dist/module/ui/index.js +7 -0
- package/dist/module/ui/index.js.map +1 -0
- package/dist/module/utils/api-client.js +95 -0
- package/dist/module/utils/api-client.js.map +1 -0
- package/dist/module/utils/default-api-config.js +190 -0
- package/dist/module/utils/default-api-config.js.map +1 -0
- package/dist/module/utils/index.js +12 -0
- package/dist/module/utils/index.js.map +1 -0
- package/dist/module/utils/resolve-api-headers.js +12 -0
- package/dist/module/utils/resolve-api-headers.js.map +1 -0
- package/dist/typescript/commonjs/eslint.config.d.mts +4 -0
- package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/src/components/agent-selector/agent-selector.d.ts +49 -0
- package/dist/typescript/commonjs/src/components/agent-selector/agent-selector.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/agent-selector/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/agent-selector/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/assistant-animations/assistant-animations.d.ts +8 -0
- package/dist/typescript/commonjs/src/components/assistant-animations/assistant-animations.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/assistant-animations/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/assistant-animations/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/assistant-screen/assistant-screen.d.ts +122 -0
- package/dist/typescript/commonjs/src/components/assistant-screen/assistant-screen.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/assistant-screen/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/assistant-screen/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/index.d.ts +11 -0
- package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/message-parts/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/message-parts/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/message-parts/message-parts.d.ts +22 -0
- package/dist/typescript/commonjs/src/components/message-parts/message-parts.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/new-chat/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/new-chat/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/new-chat/new-chat.d.ts +34 -0
- package/dist/typescript/commonjs/src/components/new-chat/new-chat.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/prompt-input/attachment-picker.d.ts +53 -0
- package/dist/typescript/commonjs/src/components/prompt-input/attachment-picker.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/prompt-input/attachment-preview.d.ts +42 -0
- package/dist/typescript/commonjs/src/components/prompt-input/attachment-preview.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/prompt-input/index.d.ts +9 -0
- package/dist/typescript/commonjs/src/components/prompt-input/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/prompt-input/prompt-input.d.ts +139 -0
- package/dist/typescript/commonjs/src/components/prompt-input/prompt-input.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/prompt-input/provider-selector.d.ts +11 -0
- package/dist/typescript/commonjs/src/components/prompt-input/provider-selector.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/prompt-input/reasoning-level-selector.d.ts +35 -0
- package/dist/typescript/commonjs/src/components/prompt-input/reasoning-level-selector.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/prompt-input/voice-recorder.d.ts +48 -0
- package/dist/typescript/commonjs/src/components/prompt-input/voice-recorder.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/sessions-list/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/components/sessions-list/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/components/sessions-list/sessions-list.d.ts +59 -0
- package/dist/typescript/commonjs/src/components/sessions-list/sessions-list.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/hooks/index.d.ts +8 -0
- package/dist/typescript/commonjs/src/hooks/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/hooks/use-agent-models.d.ts +68 -0
- package/dist/typescript/commonjs/src/hooks/use-agent-models.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/hooks/use-assistant.d.ts +55 -0
- package/dist/typescript/commonjs/src/hooks/use-assistant.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/hooks/use-attachment-picker.d.ts +99 -0
- package/dist/typescript/commonjs/src/hooks/use-attachment-picker.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/hooks/use-voice-recorder.d.ts +101 -0
- package/dist/typescript/commonjs/src/hooks/use-voice-recorder.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/index.d.ts +47 -0
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/theme/assistant-theme.d.ts +51 -0
- package/dist/typescript/commonjs/src/theme/assistant-theme.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/theme/index.d.ts +2 -0
- package/dist/typescript/commonjs/src/theme/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/types/index.d.ts +167 -0
- package/dist/typescript/commonjs/src/types/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/ui/action-sheet.d.ts +29 -0
- package/dist/typescript/commonjs/src/ui/action-sheet.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/ui/alert-dialog.d.ts +12 -0
- package/dist/typescript/commonjs/src/ui/alert-dialog.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/ui/docyrus-brand-mark.d.ts +5 -0
- package/dist/typescript/commonjs/src/ui/docyrus-brand-mark.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/ui/docyrus-icon.d.ts +11 -0
- package/dist/typescript/commonjs/src/ui/docyrus-icon.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/ui/index.d.ts +5 -0
- package/dist/typescript/commonjs/src/ui/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utils/api-client.d.ts +35 -0
- package/dist/typescript/commonjs/src/utils/api-client.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utils/default-api-config.d.ts +38 -0
- package/dist/typescript/commonjs/src/utils/default-api-config.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utils/index.d.ts +9 -0
- package/dist/typescript/commonjs/src/utils/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/utils/resolve-api-headers.d.ts +3 -0
- package/dist/typescript/commonjs/src/utils/resolve-api-headers.d.ts.map +1 -0
- package/dist/typescript/module/eslint.config.d.mts +4 -0
- package/dist/typescript/module/eslint.config.d.mts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/src/components/agent-selector/agent-selector.d.ts +49 -0
- package/dist/typescript/module/src/components/agent-selector/agent-selector.d.ts.map +1 -0
- package/dist/typescript/module/src/components/agent-selector/index.d.ts +2 -0
- package/dist/typescript/module/src/components/agent-selector/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/assistant-animations/assistant-animations.d.ts +8 -0
- package/dist/typescript/module/src/components/assistant-animations/assistant-animations.d.ts.map +1 -0
- package/dist/typescript/module/src/components/assistant-animations/index.d.ts +2 -0
- package/dist/typescript/module/src/components/assistant-animations/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/assistant-screen/assistant-screen.d.ts +122 -0
- package/dist/typescript/module/src/components/assistant-screen/assistant-screen.d.ts.map +1 -0
- package/dist/typescript/module/src/components/assistant-screen/index.d.ts +2 -0
- package/dist/typescript/module/src/components/assistant-screen/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/index.d.ts +11 -0
- package/dist/typescript/module/src/components/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/message-parts/index.d.ts +2 -0
- package/dist/typescript/module/src/components/message-parts/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/message-parts/message-parts.d.ts +22 -0
- package/dist/typescript/module/src/components/message-parts/message-parts.d.ts.map +1 -0
- package/dist/typescript/module/src/components/new-chat/index.d.ts +2 -0
- package/dist/typescript/module/src/components/new-chat/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/new-chat/new-chat.d.ts +34 -0
- package/dist/typescript/module/src/components/new-chat/new-chat.d.ts.map +1 -0
- package/dist/typescript/module/src/components/prompt-input/attachment-picker.d.ts +53 -0
- package/dist/typescript/module/src/components/prompt-input/attachment-picker.d.ts.map +1 -0
- package/dist/typescript/module/src/components/prompt-input/attachment-preview.d.ts +42 -0
- package/dist/typescript/module/src/components/prompt-input/attachment-preview.d.ts.map +1 -0
- package/dist/typescript/module/src/components/prompt-input/index.d.ts +9 -0
- package/dist/typescript/module/src/components/prompt-input/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/prompt-input/prompt-input.d.ts +139 -0
- package/dist/typescript/module/src/components/prompt-input/prompt-input.d.ts.map +1 -0
- package/dist/typescript/module/src/components/prompt-input/provider-selector.d.ts +11 -0
- package/dist/typescript/module/src/components/prompt-input/provider-selector.d.ts.map +1 -0
- package/dist/typescript/module/src/components/prompt-input/reasoning-level-selector.d.ts +35 -0
- package/dist/typescript/module/src/components/prompt-input/reasoning-level-selector.d.ts.map +1 -0
- package/dist/typescript/module/src/components/prompt-input/voice-recorder.d.ts +48 -0
- package/dist/typescript/module/src/components/prompt-input/voice-recorder.d.ts.map +1 -0
- package/dist/typescript/module/src/components/sessions-list/index.d.ts +2 -0
- package/dist/typescript/module/src/components/sessions-list/index.d.ts.map +1 -0
- package/dist/typescript/module/src/components/sessions-list/sessions-list.d.ts +59 -0
- package/dist/typescript/module/src/components/sessions-list/sessions-list.d.ts.map +1 -0
- package/dist/typescript/module/src/hooks/index.d.ts +8 -0
- package/dist/typescript/module/src/hooks/index.d.ts.map +1 -0
- package/dist/typescript/module/src/hooks/use-agent-models.d.ts +68 -0
- package/dist/typescript/module/src/hooks/use-agent-models.d.ts.map +1 -0
- package/dist/typescript/module/src/hooks/use-assistant.d.ts +55 -0
- package/dist/typescript/module/src/hooks/use-assistant.d.ts.map +1 -0
- package/dist/typescript/module/src/hooks/use-attachment-picker.d.ts +99 -0
- package/dist/typescript/module/src/hooks/use-attachment-picker.d.ts.map +1 -0
- package/dist/typescript/module/src/hooks/use-voice-recorder.d.ts +101 -0
- package/dist/typescript/module/src/hooks/use-voice-recorder.d.ts.map +1 -0
- package/dist/typescript/module/src/index.d.ts +47 -0
- package/dist/typescript/module/src/index.d.ts.map +1 -0
- package/dist/typescript/module/src/theme/assistant-theme.d.ts +51 -0
- package/dist/typescript/module/src/theme/assistant-theme.d.ts.map +1 -0
- package/dist/typescript/module/src/theme/index.d.ts +2 -0
- package/dist/typescript/module/src/theme/index.d.ts.map +1 -0
- package/dist/typescript/module/src/types/index.d.ts +167 -0
- package/dist/typescript/module/src/types/index.d.ts.map +1 -0
- package/dist/typescript/module/src/ui/action-sheet.d.ts +29 -0
- package/dist/typescript/module/src/ui/action-sheet.d.ts.map +1 -0
- package/dist/typescript/module/src/ui/alert-dialog.d.ts +12 -0
- package/dist/typescript/module/src/ui/alert-dialog.d.ts.map +1 -0
- package/dist/typescript/module/src/ui/docyrus-brand-mark.d.ts +5 -0
- package/dist/typescript/module/src/ui/docyrus-brand-mark.d.ts.map +1 -0
- package/dist/typescript/module/src/ui/docyrus-icon.d.ts +11 -0
- package/dist/typescript/module/src/ui/docyrus-icon.d.ts.map +1 -0
- package/dist/typescript/module/src/ui/index.d.ts +5 -0
- package/dist/typescript/module/src/ui/index.d.ts.map +1 -0
- package/dist/typescript/module/src/utils/api-client.d.ts +35 -0
- package/dist/typescript/module/src/utils/api-client.d.ts.map +1 -0
- package/dist/typescript/module/src/utils/default-api-config.d.ts +38 -0
- package/dist/typescript/module/src/utils/default-api-config.d.ts.map +1 -0
- package/dist/typescript/module/src/utils/index.d.ts +9 -0
- package/dist/typescript/module/src/utils/index.d.ts.map +1 -0
- package/dist/typescript/module/src/utils/resolve-api-headers.d.ts +3 -0
- package/dist/typescript/module/src/utils/resolve-api-headers.d.ts.map +1 -0
- package/package.json +176 -0
package/README.md
ADDED
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
# @docyrus/rn-assistant
|
|
2
|
+
|
|
3
|
+
`@docyrus/rn-assistant` is a standalone React Native AI assistant package for Docyrus-compatible backends.
|
|
4
|
+
|
|
5
|
+
It is host-app independent:
|
|
6
|
+
|
|
7
|
+
- it does not import app-local aliases
|
|
8
|
+
- it does not read `.env` internally
|
|
9
|
+
- it does not require Tailwind, NativeWind, Uniwind, or `className`
|
|
10
|
+
- it supports embedded page, modal, and sheet presentations
|
|
11
|
+
|
|
12
|
+
## What You Get
|
|
13
|
+
|
|
14
|
+
- `DocyrusRNAssistant` as the main entry component
|
|
15
|
+
- `DocyrusRNAssistantEmbedded` for page or tab usage
|
|
16
|
+
- `DocyrusRNAssistantModal` for full-screen modal usage
|
|
17
|
+
- `DocyrusRNAssistantSheet` for bottom-sheet or action-sheet usage
|
|
18
|
+
- built-in chat UI
|
|
19
|
+
- session and message management
|
|
20
|
+
- model and reasoning selection
|
|
21
|
+
- attachment picker
|
|
22
|
+
- voice recording and transcription UI
|
|
23
|
+
- internal light/dark aware theme tokens with overrides
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
Install the package:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pnpm add @docyrus/rn-assistant
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Install required peer dependencies in the host app:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm add react react-native expo react-native-keyboard-controller react-native-safe-area-context react-native-svg
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Current peer requirements:
|
|
40
|
+
|
|
41
|
+
- `expo >= 55`
|
|
42
|
+
- `react >= 19`
|
|
43
|
+
- `react-native >= 0.83`
|
|
44
|
+
- `react-native-keyboard-controller >= 1.20.7`
|
|
45
|
+
- `react-native-safe-area-context >= 5.6.2`
|
|
46
|
+
- `react-native-svg >= 15.15.3`
|
|
47
|
+
|
|
48
|
+
## Host App Responsibilities
|
|
49
|
+
|
|
50
|
+
The host app is responsible for:
|
|
51
|
+
|
|
52
|
+
- providing backend URLs from `.env` or any config source
|
|
53
|
+
- providing a valid user access token when authenticated requests are needed
|
|
54
|
+
- providing `agentId` and optionally `dataSourceId`
|
|
55
|
+
- deciding whether the assistant renders embedded, modal, or sheet
|
|
56
|
+
- storing and refreshing auth or session state
|
|
57
|
+
|
|
58
|
+
The package is responsible for:
|
|
59
|
+
|
|
60
|
+
- rendering the assistant UI
|
|
61
|
+
- fetching deployments and models
|
|
62
|
+
- managing sessions and messages
|
|
63
|
+
- chat streaming
|
|
64
|
+
- attachment and transcription flows
|
|
65
|
+
- filling the full host height in embedded, modal, and sheet modes
|
|
66
|
+
|
|
67
|
+
## Environment Variables
|
|
68
|
+
|
|
69
|
+
The package does not read env values directly. The host app should read env variables and map them into `apiConfig` and assistant props.
|
|
70
|
+
|
|
71
|
+
Suggested Docyrus host env shape:
|
|
72
|
+
|
|
73
|
+
```txt
|
|
74
|
+
EXPO_PUBLIC_API_BASE_URL=https://alpha-api.docyrus.com/v1
|
|
75
|
+
EXPO_PUBLIC_ASSISTANT_AGENT_ID=your-agent-id
|
|
76
|
+
EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID=your-thread-data-source-id
|
|
77
|
+
EXPO_PUBLIC_OAUTH2_BASE_URL=https://alpha-api.docyrus.com
|
|
78
|
+
EXPO_PUBLIC_OAUTH2_CLIENT_ID=your-oauth-client-id
|
|
79
|
+
EXPO_PUBLIC_OAUTH2_SCOPES=openid profile offline_access User.Read Users.Read.All DS.Read.All DS.ReadWrite.All AI.Read.All AI.ReadWrite.All
|
|
80
|
+
EXPO_PUBLIC_OAUTH2_REDIRECT_URI=your-app-scheme://auth/callback
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Recommended Docyrus scopes:
|
|
84
|
+
|
|
85
|
+
- `User.Read`
|
|
86
|
+
- `Users.Read.All`
|
|
87
|
+
- `DS.Read.All`
|
|
88
|
+
- `DS.ReadWrite.All`
|
|
89
|
+
- `AI.Read.All`
|
|
90
|
+
- `AI.ReadWrite.All`
|
|
91
|
+
|
|
92
|
+
Minimum deployment-read requirement:
|
|
93
|
+
|
|
94
|
+
- `AI.Read.All` or `AI.ReadWrite.All`
|
|
95
|
+
|
|
96
|
+
If OAuth scopes change, the user should sign out and sign in again so the host app receives a fresh token.
|
|
97
|
+
|
|
98
|
+
## Native Permissions
|
|
99
|
+
|
|
100
|
+
If the host app enables voice recording or media attachments, the host app must define the required native permission strings.
|
|
101
|
+
|
|
102
|
+
For Expo apps, add these keys in `app.config.ts` or `app.json` under `ios.infoPlist`:
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
ios: {
|
|
106
|
+
infoPlist: {
|
|
107
|
+
NSMicrophoneUsageDescription: 'Docyrus Assistant uses the microphone for voice prompts and transcription.',
|
|
108
|
+
NSCameraUsageDescription: 'Docyrus Assistant uses the camera so you can attach photos to prompts.',
|
|
109
|
+
NSPhotoLibraryUsageDescription: 'Docyrus Assistant uses your photo library so you can attach images to prompts.',
|
|
110
|
+
NSPhotoLibraryAddUsageDescription: 'Docyrus Assistant saves exported images and files to your photo library when requested.'
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Notes:
|
|
116
|
+
|
|
117
|
+
- these keys belong to the host app, not the package
|
|
118
|
+
- after changing native permission keys, rebuild the iOS app with a fresh native build such as `run:ios`
|
|
119
|
+
- microphone permission is requested only when the user starts recording
|
|
120
|
+
|
|
121
|
+
## Quick Start
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
import {
|
|
125
|
+
DocyrusRNAssistant,
|
|
126
|
+
createDocyrusRNAssistantConfig
|
|
127
|
+
} from '@docyrus/rn-assistant';
|
|
128
|
+
|
|
129
|
+
const assistantConfig = createDocyrusRNAssistantConfig({
|
|
130
|
+
baseUrl: process.env.EXPO_PUBLIC_API_BASE_URL || ''
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
export function AssistantScreen() {
|
|
134
|
+
return (
|
|
135
|
+
<DocyrusRNAssistant
|
|
136
|
+
apiConfig={assistantConfig}
|
|
137
|
+
agentId={process.env.EXPO_PUBLIC_ASSISTANT_AGENT_ID || ''}
|
|
138
|
+
dataSourceId={process.env.EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID}
|
|
139
|
+
credentials={{
|
|
140
|
+
token: session.accessToken,
|
|
141
|
+
userId: session.userId
|
|
142
|
+
}}
|
|
143
|
+
userId={session.userId}
|
|
144
|
+
showHeader
|
|
145
|
+
/>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Embedded Usage
|
|
151
|
+
|
|
152
|
+
Use this when the assistant lives inside a screen, tab, or routed page.
|
|
153
|
+
|
|
154
|
+
```tsx
|
|
155
|
+
import {
|
|
156
|
+
DocyrusRNAssistantEmbedded,
|
|
157
|
+
createDocyrusRNAssistantConfig
|
|
158
|
+
} from '@docyrus/rn-assistant';
|
|
159
|
+
|
|
160
|
+
const assistantConfig = createDocyrusRNAssistantConfig({
|
|
161
|
+
baseUrl: process.env.EXPO_PUBLIC_API_BASE_URL || ''
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
export function AssistantTab() {
|
|
165
|
+
return (
|
|
166
|
+
<DocyrusRNAssistantEmbedded
|
|
167
|
+
apiConfig={assistantConfig}
|
|
168
|
+
agentId={process.env.EXPO_PUBLIC_ASSISTANT_AGENT_ID || ''}
|
|
169
|
+
dataSourceId={process.env.EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID}
|
|
170
|
+
credentials={{
|
|
171
|
+
token: session.accessToken,
|
|
172
|
+
userId: session.userId
|
|
173
|
+
}}
|
|
174
|
+
userId={session.userId}
|
|
175
|
+
showHeader
|
|
176
|
+
/>
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Modal Usage
|
|
182
|
+
|
|
183
|
+
Use this when the assistant opens from a dedicated trigger or overlay flow.
|
|
184
|
+
|
|
185
|
+
```tsx
|
|
186
|
+
import { useState } from 'react';
|
|
187
|
+
|
|
188
|
+
import {
|
|
189
|
+
DocyrusRNAssistantModal,
|
|
190
|
+
createDocyrusRNAssistantConfig
|
|
191
|
+
} from '@docyrus/rn-assistant';
|
|
192
|
+
|
|
193
|
+
const assistantConfig = createDocyrusRNAssistantConfig({
|
|
194
|
+
baseUrl: process.env.EXPO_PUBLIC_API_BASE_URL || ''
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
export function AssistantLauncher() {
|
|
198
|
+
const [open, setOpen] = useState(false);
|
|
199
|
+
|
|
200
|
+
return (
|
|
201
|
+
<>
|
|
202
|
+
<Button title="Open Assistant" onPress={() => setOpen(true)} />
|
|
203
|
+
|
|
204
|
+
<DocyrusRNAssistantModal
|
|
205
|
+
visible={open}
|
|
206
|
+
onClose={() => setOpen(false)}
|
|
207
|
+
apiConfig={assistantConfig}
|
|
208
|
+
agentId={process.env.EXPO_PUBLIC_ASSISTANT_AGENT_ID || ''}
|
|
209
|
+
dataSourceId={process.env.EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID}
|
|
210
|
+
credentials={{
|
|
211
|
+
token: session.accessToken,
|
|
212
|
+
userId: session.userId
|
|
213
|
+
}}
|
|
214
|
+
userId={session.userId}
|
|
215
|
+
showHeader
|
|
216
|
+
modalAnimationType="slide"
|
|
217
|
+
/>
|
|
218
|
+
</>
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Bottom Sheet Usage
|
|
224
|
+
|
|
225
|
+
Use this when the assistant should open from a bottom menu or action-sheet style trigger.
|
|
226
|
+
|
|
227
|
+
```tsx
|
|
228
|
+
import { useState } from 'react';
|
|
229
|
+
|
|
230
|
+
import {
|
|
231
|
+
DocyrusRNAssistantSheet,
|
|
232
|
+
createDocyrusRNAssistantConfig
|
|
233
|
+
} from '@docyrus/rn-assistant';
|
|
234
|
+
|
|
235
|
+
const assistantConfig = createDocyrusRNAssistantConfig({
|
|
236
|
+
baseUrl: process.env.EXPO_PUBLIC_API_BASE_URL || ''
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
export function AssistantBottomSheet() {
|
|
240
|
+
const [open, setOpen] = useState(false);
|
|
241
|
+
|
|
242
|
+
return (
|
|
243
|
+
<>
|
|
244
|
+
<Button title="Open Assistant Sheet" onPress={() => setOpen(true)} />
|
|
245
|
+
|
|
246
|
+
<DocyrusRNAssistantSheet
|
|
247
|
+
visible={open}
|
|
248
|
+
onClose={() => setOpen(false)}
|
|
249
|
+
sheetDetent="large"
|
|
250
|
+
apiConfig={assistantConfig}
|
|
251
|
+
agentId={process.env.EXPO_PUBLIC_ASSISTANT_AGENT_ID || ''}
|
|
252
|
+
dataSourceId={process.env.EXPO_PUBLIC_ASSISTANT_DATA_SOURCE_ID}
|
|
253
|
+
credentials={{
|
|
254
|
+
token: session.accessToken,
|
|
255
|
+
userId: session.userId
|
|
256
|
+
}}
|
|
257
|
+
userId={session.userId}
|
|
258
|
+
showHeader
|
|
259
|
+
/>
|
|
260
|
+
</>
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## One Component, Multiple Presentation Modes
|
|
266
|
+
|
|
267
|
+
If you want to switch presentation with a prop:
|
|
268
|
+
|
|
269
|
+
```tsx
|
|
270
|
+
import { DocyrusRNAssistant } from '@docyrus/rn-assistant';
|
|
271
|
+
|
|
272
|
+
<DocyrusRNAssistant
|
|
273
|
+
presentation="embedded"
|
|
274
|
+
apiConfig={assistantConfig}
|
|
275
|
+
agentId={agentId}
|
|
276
|
+
dataSourceId={dataSourceId}
|
|
277
|
+
credentials={{ token, userId }}
|
|
278
|
+
/>;
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
```tsx
|
|
282
|
+
import { DocyrusRNAssistant } from '@docyrus/rn-assistant';
|
|
283
|
+
|
|
284
|
+
<DocyrusRNAssistant
|
|
285
|
+
presentation="modal"
|
|
286
|
+
visible={isOpen}
|
|
287
|
+
onClose={() => setIsOpen(false)}
|
|
288
|
+
modalAnimationType="slide"
|
|
289
|
+
apiConfig={assistantConfig}
|
|
290
|
+
agentId={agentId}
|
|
291
|
+
dataSourceId={dataSourceId}
|
|
292
|
+
credentials={{ token, userId }}
|
|
293
|
+
/>;
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
```tsx
|
|
297
|
+
import { DocyrusRNAssistant } from '@docyrus/rn-assistant';
|
|
298
|
+
|
|
299
|
+
<DocyrusRNAssistant
|
|
300
|
+
presentation="sheet"
|
|
301
|
+
visible={isOpen}
|
|
302
|
+
onClose={() => setIsOpen(false)}
|
|
303
|
+
sheetDetent="large"
|
|
304
|
+
apiConfig={assistantConfig}
|
|
305
|
+
agentId={agentId}
|
|
306
|
+
dataSourceId={dataSourceId}
|
|
307
|
+
credentials={{ token, userId }}
|
|
308
|
+
/>;
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Authentication Model
|
|
312
|
+
|
|
313
|
+
The assistant package does not implement the host app login screen. Recommended flow:
|
|
314
|
+
|
|
315
|
+
1. Host app signs the user in.
|
|
316
|
+
2. Host app receives `accessToken` and `userId`.
|
|
317
|
+
3. Host app passes them to the assistant through `credentials` and `userId`.
|
|
318
|
+
|
|
319
|
+
Example:
|
|
320
|
+
|
|
321
|
+
```tsx
|
|
322
|
+
<DocyrusRNAssistantEmbedded
|
|
323
|
+
apiConfig={assistantConfig}
|
|
324
|
+
agentId={agentId}
|
|
325
|
+
dataSourceId={dataSourceId}
|
|
326
|
+
credentials={{
|
|
327
|
+
token: session.accessToken,
|
|
328
|
+
userId: session.userId
|
|
329
|
+
}}
|
|
330
|
+
userId={session.userId}
|
|
331
|
+
/>
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
If you do not pass a valid token:
|
|
335
|
+
|
|
336
|
+
- UI may still render
|
|
337
|
+
- authenticated chat and session requests may fail
|
|
338
|
+
- deployment loading may fail if the token does not include required AI scopes
|
|
339
|
+
|
|
340
|
+
## API Config Helper
|
|
341
|
+
|
|
342
|
+
The default helper is for the Docyrus backend contract:
|
|
343
|
+
|
|
344
|
+
```tsx
|
|
345
|
+
import { createDocyrusRNAssistantConfig } from '@docyrus/rn-assistant';
|
|
346
|
+
|
|
347
|
+
const assistantConfig = createDocyrusRNAssistantConfig({
|
|
348
|
+
baseUrl: 'https://alpha-api.docyrus.com/v1',
|
|
349
|
+
token: accessToken
|
|
350
|
+
});
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
It prepares:
|
|
354
|
+
|
|
355
|
+
- Docyrus endpoint paths
|
|
356
|
+
- Docyrus response unwrapping with `transformResponse`
|
|
357
|
+
- optional `Authorization` header if `token` is provided
|
|
358
|
+
|
|
359
|
+
Default endpoints included by the helper:
|
|
360
|
+
|
|
361
|
+
- deployment: `/ai/agent-deployments/base/:agentId`
|
|
362
|
+
- chat: `/ai/agents/:agentId/chat`
|
|
363
|
+
- sessions: `/apps/base/data-sources/thread/items`
|
|
364
|
+
- messages: `/apps/base/data-sources/message/items`
|
|
365
|
+
- create thread: `/apps/base/data-sources/thread/items`
|
|
366
|
+
- delete session: `/apps/base/data-sources/thread/items/:sessionId`
|
|
367
|
+
- transcribe: `/ai/transcribe`
|
|
368
|
+
|
|
369
|
+
## Custom Backend Config
|
|
370
|
+
|
|
371
|
+
If another app uses the same UI package with different endpoints, pass a custom `apiConfig` object:
|
|
372
|
+
|
|
373
|
+
```tsx
|
|
374
|
+
import { type AIAPIConfig } from '@docyrus/rn-assistant';
|
|
375
|
+
|
|
376
|
+
const assistantConfig: AIAPIConfig = {
|
|
377
|
+
baseUrl: 'https://my-api.example.com',
|
|
378
|
+
transformResponse: (response) => response.result,
|
|
379
|
+
endpoints: {
|
|
380
|
+
deployment: '/assistant/deployments/:agentId',
|
|
381
|
+
chat: '/assistant/chat/:agentId',
|
|
382
|
+
sessions: '/assistant/sessions',
|
|
383
|
+
messages: '/assistant/messages',
|
|
384
|
+
createThread: '/assistant/sessions',
|
|
385
|
+
deleteSession: '/assistant/sessions/:sessionId',
|
|
386
|
+
transcribe: '/assistant/transcribe'
|
|
387
|
+
},
|
|
388
|
+
headers: {
|
|
389
|
+
Authorization: `Bearer ${accessToken}`,
|
|
390
|
+
'x-app-name': 'my-rn-app'
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
## Main Props
|
|
396
|
+
|
|
397
|
+
Required:
|
|
398
|
+
|
|
399
|
+
- `apiConfig`
|
|
400
|
+
- `agentId`
|
|
401
|
+
|
|
402
|
+
Usually required in real usage:
|
|
403
|
+
|
|
404
|
+
- `dataSourceId`
|
|
405
|
+
- `credentials.token`
|
|
406
|
+
- `credentials.userId`
|
|
407
|
+
- `userId`
|
|
408
|
+
|
|
409
|
+
Common optional props:
|
|
410
|
+
|
|
411
|
+
- `deploymentId`
|
|
412
|
+
- `headers`
|
|
413
|
+
- `initialMode`
|
|
414
|
+
- `onError`
|
|
415
|
+
- `showHeader`
|
|
416
|
+
- `onClose`
|
|
417
|
+
- `enableVoice`
|
|
418
|
+
- `enableAttachment`
|
|
419
|
+
- `allowedAttachmentTypes`
|
|
420
|
+
- `maxAttachmentSize`
|
|
421
|
+
- `maxAttachments`
|
|
422
|
+
- `showModelSelectorInInput`
|
|
423
|
+
- `theme`
|
|
424
|
+
- `presentation`
|
|
425
|
+
- `visible`
|
|
426
|
+
- `modalAnimationType`
|
|
427
|
+
- `sheetDetent`
|
|
428
|
+
- `containerStyle`
|
|
429
|
+
|
|
430
|
+
## Theming
|
|
431
|
+
|
|
432
|
+
The package includes its own theme layer. Override only the values you need:
|
|
433
|
+
|
|
434
|
+
```tsx
|
|
435
|
+
<DocyrusRNAssistant
|
|
436
|
+
apiConfig={assistantConfig}
|
|
437
|
+
agentId={agentId}
|
|
438
|
+
credentials={{ token, userId }}
|
|
439
|
+
theme={{
|
|
440
|
+
colors: {
|
|
441
|
+
primary: '#0f766e',
|
|
442
|
+
primaryForeground: '#ffffff',
|
|
443
|
+
background: '#f8fafc'
|
|
444
|
+
}
|
|
445
|
+
}}
|
|
446
|
+
/>
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
The default theme follows device light and dark appearance automatically.
|
|
450
|
+
|
|
451
|
+
## Public Exports
|
|
452
|
+
|
|
453
|
+
Components:
|
|
454
|
+
|
|
455
|
+
- `DocyrusRNAssistant`
|
|
456
|
+
- `DocyrusRNAssistantEmbedded`
|
|
457
|
+
- `DocyrusRNAssistantModal`
|
|
458
|
+
- `DocyrusRNAssistantSheet`
|
|
459
|
+
- `DocyrusRNAssistantProvider`
|
|
460
|
+
|
|
461
|
+
Config and types:
|
|
462
|
+
|
|
463
|
+
- `createDocyrusRNAssistantConfig`
|
|
464
|
+
- `createDocyrusAPIConfig`
|
|
465
|
+
- `AIAPIConfig`
|
|
466
|
+
|
|
467
|
+
Hooks:
|
|
468
|
+
|
|
469
|
+
- `useAssistant`
|
|
470
|
+
- `useAgentModels`
|
|
471
|
+
- `useVoiceRecorder`
|
|
472
|
+
- `useAttachmentPicker`
|
|
473
|
+
|
|
474
|
+
Compatibility aliases:
|
|
475
|
+
|
|
476
|
+
- `DocyAssistant`
|
|
477
|
+
- `DocyAssistantProps`
|