@assistant-ui/react 0.7.42 → 0.7.44
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/AssistantRuntime.d.ts +11 -3
- package/dist/api/AssistantRuntime.d.ts.map +1 -1
- package/dist/api/AssistantRuntime.js +8 -17
- package/dist/api/AssistantRuntime.js.map +1 -1
- package/dist/api/AssistantRuntime.mjs +8 -17
- package/dist/api/AssistantRuntime.mjs.map +1 -1
- package/dist/api/RuntimePathTypes.d.ts +4 -1
- package/dist/api/RuntimePathTypes.d.ts.map +1 -1
- package/dist/api/RuntimePathTypes.js.map +1 -1
- package/dist/api/ThreadListItemRuntime.d.ts +8 -0
- package/dist/api/ThreadListItemRuntime.d.ts.map +1 -1
- package/dist/api/ThreadListItemRuntime.js +4 -0
- package/dist/api/ThreadListItemRuntime.js.map +1 -1
- package/dist/api/ThreadListItemRuntime.mjs +4 -0
- package/dist/api/ThreadListItemRuntime.mjs.map +1 -1
- package/dist/api/ThreadListRuntime.d.ts +11 -1
- package/dist/api/ThreadListRuntime.d.ts.map +1 -1
- package/dist/api/ThreadListRuntime.js +37 -1
- package/dist/api/ThreadListRuntime.js.map +1 -1
- package/dist/api/ThreadListRuntime.mjs +39 -1
- package/dist/api/ThreadListRuntime.mjs.map +1 -1
- package/dist/runtimes/adapters/RuntimeAdapterProvider.d.ts +15 -0
- package/dist/runtimes/adapters/RuntimeAdapterProvider.d.ts.map +1 -0
- package/dist/runtimes/adapters/RuntimeAdapterProvider.js +45 -0
- package/dist/runtimes/adapters/RuntimeAdapterProvider.js.map +1 -0
- package/dist/runtimes/adapters/RuntimeAdapterProvider.mjs +19 -0
- package/dist/runtimes/adapters/RuntimeAdapterProvider.mjs.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/AttachmentAdapter.d.ts +1 -1
- package/dist/runtimes/adapters/attachment/AttachmentAdapter.d.ts.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/AttachmentAdapter.js +1 -1
- package/dist/runtimes/adapters/attachment/AttachmentAdapter.js.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/CompositeAttachmentAdapter.d.ts +2 -2
- package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.d.ts.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/CompositeAttachmentAdapter.js +1 -1
- package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.js.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/CompositeAttachmentAdapter.mjs +1 -1
- package/dist/runtimes/adapters/attachment/CompositeAttachmentAdapter.mjs.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/SimpleImageAttachmentAdapter.d.ts +1 -1
- package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.d.ts.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/SimpleImageAttachmentAdapter.js +1 -1
- package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.js.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/SimpleImageAttachmentAdapter.mjs +1 -1
- package/dist/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.mjs.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/SimpleTextAttachmentAdapter.d.ts +1 -1
- package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.d.ts.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/SimpleTextAttachmentAdapter.js +1 -1
- package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.js.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/SimpleTextAttachmentAdapter.mjs +1 -1
- package/dist/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.mjs.map +1 -0
- package/dist/runtimes/adapters/attachment/index.d.ts.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/index.js +1 -1
- package/dist/runtimes/adapters/attachment/index.js.map +1 -0
- package/dist/runtimes/{attachment → adapters/attachment}/index.mjs +1 -1
- package/dist/runtimes/adapters/attachment/index.mjs.map +1 -0
- package/dist/runtimes/{feedback → adapters/feedback}/FeedbackAdapter.d.ts +1 -1
- package/dist/runtimes/adapters/feedback/FeedbackAdapter.d.ts.map +1 -0
- package/dist/runtimes/{feedback → adapters/feedback}/FeedbackAdapter.js +1 -1
- package/dist/runtimes/adapters/feedback/FeedbackAdapter.js.map +1 -0
- package/dist/runtimes/adapters/feedback/index.d.ts.map +1 -0
- package/dist/runtimes/{feedback → adapters/feedback}/index.js +1 -1
- package/dist/runtimes/adapters/feedback/index.js.map +1 -0
- package/dist/runtimes/adapters/index.d.ts +4 -0
- package/dist/runtimes/adapters/index.d.ts.map +1 -0
- package/dist/runtimes/adapters/index.js +29 -0
- package/dist/runtimes/adapters/index.js.map +1 -0
- package/dist/runtimes/adapters/index.mjs +5 -0
- package/dist/runtimes/adapters/index.mjs.map +1 -0
- package/dist/runtimes/{speech → adapters/speech}/SpeechAdapterTypes.d.ts +1 -1
- package/dist/runtimes/adapters/speech/SpeechAdapterTypes.d.ts.map +1 -0
- package/dist/runtimes/{speech → adapters/speech}/SpeechAdapterTypes.js +1 -1
- package/dist/runtimes/adapters/speech/SpeechAdapterTypes.js.map +1 -0
- package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.d.ts.map +1 -0
- package/dist/runtimes/{speech → adapters/speech}/WebSpeechSynthesisAdapter.js +1 -1
- package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.js.map +1 -0
- package/dist/runtimes/{speech → adapters/speech}/WebSpeechSynthesisAdapter.mjs +1 -1
- package/dist/runtimes/adapters/speech/WebSpeechSynthesisAdapter.mjs.map +1 -0
- package/dist/runtimes/adapters/speech/index.d.ts.map +1 -0
- package/dist/runtimes/{speech → adapters/speech}/index.js +1 -1
- package/dist/runtimes/adapters/speech/index.js.map +1 -0
- package/dist/runtimes/{speech → adapters/speech}/index.mjs +1 -1
- package/dist/runtimes/adapters/speech/index.mjs.map +1 -0
- package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.d.ts +6 -0
- package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.d.ts.map +1 -0
- package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.js +19 -0
- package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.js.map +1 -0
- package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.mjs +1 -0
- package/dist/runtimes/adapters/thread-history/ThreadHistoryAdapter.mjs.map +1 -0
- package/dist/runtimes/composer/BaseComposerRuntimeCore.d.ts +1 -1
- package/dist/runtimes/composer/BaseComposerRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/composer/BaseComposerRuntimeCore.js.map +1 -1
- package/dist/runtimes/composer/BaseComposerRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.d.ts +1 -1
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.js.map +1 -1
- package/dist/runtimes/composer/DefaultEditComposerRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.d.ts +1 -1
- package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.js.map +1 -1
- package/dist/runtimes/composer/DefaultThreadComposerRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/core/AssistantRuntimeCore.d.ts +1 -1
- package/dist/runtimes/core/AssistantRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/AssistantRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/BaseAssistantRuntimeCore.d.ts +1 -1
- package/dist/runtimes/core/BaseAssistantRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/BaseAssistantRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/BaseAssistantRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts +3 -3
- package/dist/runtimes/core/BaseThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/BaseThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/BaseThreadRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/core/ThreadListRuntimeCore.d.ts +5 -0
- package/dist/runtimes/core/ThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/ThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/core/ThreadRuntimeCore.d.ts +2 -2
- package/dist/runtimes/core/ThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/core/ThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreAdapter.d.ts +3 -3
- package/dist/runtimes/external-store/ExternalStoreAdapter.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreAdapter.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.d.ts +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js +4 -4
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.mjs +4 -4
- package/dist/runtimes/external-store/ExternalStoreRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.d.ts +2 -0
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js +6 -0
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.mjs +6 -0
- package/dist/runtimes/external-store/ExternalStoreThreadListRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js +7 -0
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.mjs +7 -0
- package/dist/runtimes/external-store/ExternalStoreThreadRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/index.d.ts +1 -3
- package/dist/runtimes/index.d.ts.map +1 -1
- package/dist/runtimes/index.js +3 -7
- package/dist/runtimes/index.js.map +1 -1
- package/dist/runtimes/index.mjs +1 -3
- package/dist/runtimes/index.mjs.map +1 -1
- package/dist/runtimes/local/LocalRuntimeCore.d.ts +1 -1
- package/dist/runtimes/local/LocalRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/local/LocalRuntimeCore.js +5 -5
- package/dist/runtimes/local/LocalRuntimeCore.js.map +1 -1
- package/dist/runtimes/local/LocalRuntimeCore.mjs +5 -5
- package/dist/runtimes/local/LocalRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/local/LocalRuntimeOptions.d.ts +6 -3
- package/dist/runtimes/local/LocalRuntimeOptions.d.ts.map +1 -1
- package/dist/runtimes/local/LocalRuntimeOptions.js.map +1 -1
- package/dist/runtimes/local/LocalRuntimeOptions.mjs.map +1 -1
- package/dist/runtimes/local/LocalThreadListRuntimeCore.d.ts +2 -0
- package/dist/runtimes/local/LocalThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/local/LocalThreadListRuntimeCore.js +8 -0
- package/dist/runtimes/local/LocalThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/local/LocalThreadListRuntimeCore.mjs +8 -0
- package/dist/runtimes/local/LocalThreadListRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.d.ts +1 -0
- package/dist/runtimes/local/LocalThreadRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.js +7 -3
- package/dist/runtimes/local/LocalThreadRuntimeCore.js.map +1 -1
- package/dist/runtimes/local/LocalThreadRuntimeCore.mjs +7 -3
- package/dist/runtimes/local/LocalThreadRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/local/useLocalRuntime.js +1 -1
- package/dist/runtimes/local/useLocalRuntime.js.map +1 -1
- package/dist/runtimes/local/useLocalRuntime.mjs +1 -1
- package/dist/runtimes/local/useLocalRuntime.mjs.map +1 -1
- package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts +32 -2
- package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js +13 -7
- package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.js.map +1 -1
- package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.mjs +13 -7
- package/dist/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.mjs.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAPI.d.ts +3 -2
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAPI.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAPI.js +9 -4
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAPI.js.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAPI.mjs +9 -4
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAPI.mjs.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAuthStrategy.d.ts +6 -3
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAuthStrategy.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAuthStrategy.js +13 -1
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAuthStrategy.js.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAuthStrategy.mjs +13 -1
- package/dist/runtimes/remote-thread-list/cloud/AssistantCloudAuthStrategy.mjs.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/index.d.ts +0 -1
- package/dist/runtimes/remote-thread-list/cloud/index.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/index.js +0 -3
- package/dist/runtimes/remote-thread-list/cloud/index.js.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/index.mjs +0 -2
- package/dist/runtimes/remote-thread-list/cloud/index.mjs.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/useCloudThreadListRuntime.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/useCloudThreadListRuntime.js +26 -49
- package/dist/runtimes/remote-thread-list/cloud/useCloudThreadListRuntime.js.map +1 -1
- package/dist/runtimes/remote-thread-list/cloud/useCloudThreadListRuntime.mjs +27 -56
- package/dist/runtimes/remote-thread-list/cloud/useCloudThreadListRuntime.mjs.map +1 -1
- package/dist/runtimes/remote-thread-list/types.d.ts +2 -2
- package/dist/runtimes/remote-thread-list/types.d.ts.map +1 -1
- package/dist/runtimes/remote-thread-list/types.js.map +1 -1
- package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.js +5 -5
- package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.js.map +1 -1
- package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.mjs +5 -5
- package/dist/runtimes/remote-thread-list/useRemoteThreadListRuntime.mjs.map +1 -1
- package/dist/runtimes/utils/MessageRepository.d.ts +4 -0
- package/dist/runtimes/utils/MessageRepository.d.ts.map +1 -1
- package/dist/runtimes/utils/MessageRepository.js.map +1 -1
- package/dist/runtimes/utils/MessageRepository.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/AssistantRuntime.ts +19 -18
- package/src/api/RuntimePathTypes.ts +6 -1
- package/src/api/ThreadListItemRuntime.ts +9 -0
- package/src/api/ThreadListRuntime.ts +56 -1
- package/src/runtimes/adapters/RuntimeAdapterProvider.tsx +31 -0
- package/src/runtimes/{attachment → adapters/attachment}/AttachmentAdapter.ts +1 -1
- package/src/runtimes/{attachment → adapters/attachment}/CompositeAttachmentAdapter.ts +1 -1
- package/src/runtimes/{attachment → adapters/attachment}/SimpleImageAttachmentAdapter.ts +1 -1
- package/src/runtimes/{attachment → adapters/attachment}/SimpleTextAttachmentAdapter.ts +1 -1
- package/src/runtimes/{feedback → adapters/feedback}/FeedbackAdapter.ts +1 -1
- package/src/runtimes/adapters/index.ts +3 -0
- package/src/runtimes/{speech → adapters/speech}/SpeechAdapterTypes.ts +1 -1
- package/src/runtimes/adapters/thread-history/ThreadHistoryAdapter.ts +9 -0
- package/src/runtimes/composer/BaseComposerRuntimeCore.tsx +1 -1
- package/src/runtimes/composer/DefaultEditComposerRuntimeCore.tsx +1 -1
- package/src/runtimes/composer/DefaultThreadComposerRuntimeCore.tsx +1 -1
- package/src/runtimes/core/AssistantRuntimeCore.tsx +1 -1
- package/src/runtimes/core/BaseAssistantRuntimeCore.tsx +1 -1
- package/src/runtimes/core/BaseThreadRuntimeCore.tsx +3 -3
- package/src/runtimes/core/ThreadListRuntimeCore.tsx +6 -0
- package/src/runtimes/core/ThreadRuntimeCore.tsx +2 -1
- package/src/runtimes/external-store/ExternalStoreAdapter.tsx +3 -3
- package/src/runtimes/external-store/ExternalStoreRuntimeCore.tsx +4 -4
- package/src/runtimes/external-store/ExternalStoreThreadListRuntimeCore.tsx +8 -0
- package/src/runtimes/external-store/ExternalStoreThreadRuntimeCore.tsx +8 -0
- package/src/runtimes/index.ts +1 -3
- package/src/runtimes/local/LocalRuntimeCore.tsx +5 -5
- package/src/runtimes/local/LocalRuntimeOptions.tsx +5 -3
- package/src/runtimes/local/LocalThreadListRuntimeCore.tsx +10 -0
- package/src/runtimes/local/LocalThreadRuntimeCore.tsx +7 -3
- package/src/runtimes/local/useLocalRuntime.tsx +1 -1
- package/src/runtimes/remote-thread-list/RemoteThreadListThreadListRuntimeCore.tsx +16 -14
- package/src/runtimes/remote-thread-list/cloud/AssistantCloudAPI.tsx +13 -5
- package/src/runtimes/remote-thread-list/cloud/AssistantCloudAuthStrategy.tsx +24 -4
- package/src/runtimes/remote-thread-list/cloud/index.ts +0 -1
- package/src/runtimes/remote-thread-list/cloud/useCloudThreadListRuntime.tsx +36 -60
- package/src/runtimes/remote-thread-list/types.tsx +2 -5
- package/src/runtimes/remote-thread-list/useRemoteThreadListRuntime.tsx +5 -5
- package/src/runtimes/utils/MessageRepository.tsx +5 -0
- package/dist/runtimes/attachment/AttachmentAdapter.d.ts.map +0 -1
- package/dist/runtimes/attachment/AttachmentAdapter.js.map +0 -1
- package/dist/runtimes/attachment/CompositeAttachmentAdapter.d.ts.map +0 -1
- package/dist/runtimes/attachment/CompositeAttachmentAdapter.js.map +0 -1
- package/dist/runtimes/attachment/CompositeAttachmentAdapter.mjs.map +0 -1
- package/dist/runtimes/attachment/SimpleImageAttachmentAdapter.d.ts.map +0 -1
- package/dist/runtimes/attachment/SimpleImageAttachmentAdapter.js.map +0 -1
- package/dist/runtimes/attachment/SimpleImageAttachmentAdapter.mjs.map +0 -1
- package/dist/runtimes/attachment/SimpleTextAttachmentAdapter.d.ts.map +0 -1
- package/dist/runtimes/attachment/SimpleTextAttachmentAdapter.js.map +0 -1
- package/dist/runtimes/attachment/SimpleTextAttachmentAdapter.mjs.map +0 -1
- package/dist/runtimes/attachment/index.d.ts.map +0 -1
- package/dist/runtimes/attachment/index.js.map +0 -1
- package/dist/runtimes/attachment/index.mjs.map +0 -1
- package/dist/runtimes/feedback/FeedbackAdapter.d.ts.map +0 -1
- package/dist/runtimes/feedback/FeedbackAdapter.js.map +0 -1
- package/dist/runtimes/feedback/index.d.ts.map +0 -1
- package/dist/runtimes/feedback/index.js.map +0 -1
- package/dist/runtimes/remote-thread-list/cloud/CloudThreadListItemRuntime.d.ts +0 -22
- package/dist/runtimes/remote-thread-list/cloud/CloudThreadListItemRuntime.d.ts.map +0 -1
- package/dist/runtimes/remote-thread-list/cloud/CloudThreadListItemRuntime.js +0 -85
- package/dist/runtimes/remote-thread-list/cloud/CloudThreadListItemRuntime.js.map +0 -1
- package/dist/runtimes/remote-thread-list/cloud/CloudThreadListItemRuntime.mjs +0 -60
- package/dist/runtimes/remote-thread-list/cloud/CloudThreadListItemRuntime.mjs.map +0 -1
- package/dist/runtimes/speech/SpeechAdapterTypes.d.ts.map +0 -1
- package/dist/runtimes/speech/SpeechAdapterTypes.js.map +0 -1
- package/dist/runtimes/speech/WebSpeechSynthesisAdapter.d.ts.map +0 -1
- package/dist/runtimes/speech/WebSpeechSynthesisAdapter.js.map +0 -1
- package/dist/runtimes/speech/WebSpeechSynthesisAdapter.mjs.map +0 -1
- package/dist/runtimes/speech/index.d.ts.map +0 -1
- package/dist/runtimes/speech/index.js.map +0 -1
- package/dist/runtimes/speech/index.mjs.map +0 -1
- package/src/runtimes/remote-thread-list/cloud/CloudThreadListItemRuntime.tsx +0 -89
- /package/dist/runtimes/{attachment → adapters/attachment}/AttachmentAdapter.mjs +0 -0
- /package/dist/runtimes/{attachment → adapters/attachment}/AttachmentAdapter.mjs.map +0 -0
- /package/dist/runtimes/{attachment → adapters/attachment}/index.d.ts +0 -0
- /package/dist/runtimes/{feedback → adapters/feedback}/FeedbackAdapter.mjs +0 -0
- /package/dist/runtimes/{feedback → adapters/feedback}/FeedbackAdapter.mjs.map +0 -0
- /package/dist/runtimes/{feedback → adapters/feedback}/index.d.ts +0 -0
- /package/dist/runtimes/{feedback → adapters/feedback}/index.mjs +0 -0
- /package/dist/runtimes/{feedback → adapters/feedback}/index.mjs.map +0 -0
- /package/dist/runtimes/{speech → adapters/speech}/SpeechAdapterTypes.mjs +0 -0
- /package/dist/runtimes/{speech → adapters/speech}/SpeechAdapterTypes.mjs.map +0 -0
- /package/dist/runtimes/{speech → adapters/speech}/WebSpeechSynthesisAdapter.d.ts +0 -0
- /package/dist/runtimes/{speech → adapters/speech}/index.d.ts +0 -0
- /package/src/runtimes/{attachment → adapters/attachment}/index.ts +0 -0
- /package/src/runtimes/{feedback → adapters/feedback}/index.ts +0 -0
- /package/src/runtimes/{speech → adapters/speech}/WebSpeechSynthesisAdapter.ts +0 -0
- /package/src/runtimes/{speech → adapters/speech}/index.ts +0 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
import { FC } from "react";
|
2
|
+
import { ThreadHistoryAdapter } from "./thread-history/ThreadHistoryAdapter";
|
3
|
+
export type RuntimeAdapters = {
|
4
|
+
history: ThreadHistoryAdapter;
|
5
|
+
};
|
6
|
+
declare namespace RuntimeAdapterProvider {
|
7
|
+
type Props = {
|
8
|
+
adapters: RuntimeAdapters;
|
9
|
+
children: React.ReactNode;
|
10
|
+
};
|
11
|
+
}
|
12
|
+
export declare const RuntimeAdapterProvider: FC<RuntimeAdapterProvider.Props>;
|
13
|
+
export declare const useRuntimeAdapters: () => RuntimeAdapters | null;
|
14
|
+
export {};
|
15
|
+
//# sourceMappingURL=RuntimeAdapterProvider.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RuntimeAdapterProvider.d.ts","sourceRoot":"","sources":["../../../src/runtimes/adapters/RuntimeAdapterProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,EAAE,EAAc,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAIF,kBAAU,sBAAsB,CAAC;IAC/B,KAAY,KAAK,GAAG;QAClB,QAAQ,EAAE,eAAe,CAAC;QAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;KAC3B,CAAC;CACH;AAED,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,CASnE,CAAC;AAEF,eAAO,MAAM,kBAAkB,8BAG9B,CAAC"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
|
20
|
+
// src/runtimes/adapters/RuntimeAdapterProvider.tsx
|
21
|
+
var RuntimeAdapterProvider_exports = {};
|
22
|
+
__export(RuntimeAdapterProvider_exports, {
|
23
|
+
RuntimeAdapterProvider: () => RuntimeAdapterProvider,
|
24
|
+
useRuntimeAdapters: () => useRuntimeAdapters
|
25
|
+
});
|
26
|
+
module.exports = __toCommonJS(RuntimeAdapterProvider_exports);
|
27
|
+
var import_react = require("react");
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
29
|
+
var RuntimeAdaptersContext = (0, import_react.createContext)(null);
|
30
|
+
var RuntimeAdapterProvider = ({
|
31
|
+
adapters,
|
32
|
+
children
|
33
|
+
}) => {
|
34
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RuntimeAdaptersContext.Provider, { value: adapters, children });
|
35
|
+
};
|
36
|
+
var useRuntimeAdapters = () => {
|
37
|
+
const adapters = (0, import_react.useContext)(RuntimeAdaptersContext);
|
38
|
+
return adapters;
|
39
|
+
};
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
41
|
+
0 && (module.exports = {
|
42
|
+
RuntimeAdapterProvider,
|
43
|
+
useRuntimeAdapters
|
44
|
+
});
|
45
|
+
//# sourceMappingURL=RuntimeAdapterProvider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/adapters/RuntimeAdapterProvider.tsx"],"sourcesContent":["import { createContext, FC, useContext } from \"react\";\nimport { ThreadHistoryAdapter } from \"./thread-history/ThreadHistoryAdapter\";\n\nexport type RuntimeAdapters = {\n history: ThreadHistoryAdapter;\n};\n\nconst RuntimeAdaptersContext = createContext<RuntimeAdapters | null>(null);\n\nnamespace RuntimeAdapterProvider {\n export type Props = {\n adapters: RuntimeAdapters;\n children: React.ReactNode;\n };\n}\n\nexport const RuntimeAdapterProvider: FC<RuntimeAdapterProvider.Props> = ({\n adapters,\n children,\n}) => {\n return (\n <RuntimeAdaptersContext.Provider value={adapters}>\n {children}\n </RuntimeAdaptersContext.Provider>\n );\n};\n\nexport const useRuntimeAdapters = () => {\n const adapters = useContext(RuntimeAdaptersContext);\n return adapters;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8C;AAqB1C;AAdJ,IAAM,6BAAyB,4BAAsC,IAAI;AASlE,IAAM,yBAA2D,CAAC;AAAA,EACvE;AAAA,EACA;AACF,MAAM;AACJ,SACE,4CAAC,uBAAuB,UAAvB,EAAgC,OAAO,UACrC,UACH;AAEJ;AAEO,IAAM,qBAAqB,MAAM;AACtC,QAAM,eAAW,yBAAW,sBAAsB;AAClD,SAAO;AACT;","names":[]}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// src/runtimes/adapters/RuntimeAdapterProvider.tsx
|
2
|
+
import { createContext, useContext } from "react";
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
4
|
+
var RuntimeAdaptersContext = createContext(null);
|
5
|
+
var RuntimeAdapterProvider = ({
|
6
|
+
adapters,
|
7
|
+
children
|
8
|
+
}) => {
|
9
|
+
return /* @__PURE__ */ jsx(RuntimeAdaptersContext.Provider, { value: adapters, children });
|
10
|
+
};
|
11
|
+
var useRuntimeAdapters = () => {
|
12
|
+
const adapters = useContext(RuntimeAdaptersContext);
|
13
|
+
return adapters;
|
14
|
+
};
|
15
|
+
export {
|
16
|
+
RuntimeAdapterProvider,
|
17
|
+
useRuntimeAdapters
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=RuntimeAdapterProvider.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/adapters/RuntimeAdapterProvider.tsx"],"sourcesContent":["import { createContext, FC, useContext } from \"react\";\nimport { ThreadHistoryAdapter } from \"./thread-history/ThreadHistoryAdapter\";\n\nexport type RuntimeAdapters = {\n history: ThreadHistoryAdapter;\n};\n\nconst RuntimeAdaptersContext = createContext<RuntimeAdapters | null>(null);\n\nnamespace RuntimeAdapterProvider {\n export type Props = {\n adapters: RuntimeAdapters;\n children: React.ReactNode;\n };\n}\n\nexport const RuntimeAdapterProvider: FC<RuntimeAdapterProvider.Props> = ({\n adapters,\n children,\n}) => {\n return (\n <RuntimeAdaptersContext.Provider value={adapters}>\n {children}\n </RuntimeAdaptersContext.Provider>\n );\n};\n\nexport const useRuntimeAdapters = () => {\n const adapters = useContext(RuntimeAdaptersContext);\n return adapters;\n};\n"],"mappings":";AAAA,SAAS,eAAmB,kBAAkB;AAqB1C;AAdJ,IAAM,yBAAyB,cAAsC,IAAI;AASlE,IAAM,yBAA2D,CAAC;AAAA,EACvE;AAAA,EACA;AACF,MAAM;AACJ,SACE,oBAAC,uBAAuB,UAAvB,EAAgC,OAAO,UACrC,UACH;AAEJ;AAEO,IAAM,qBAAqB,MAAM;AACtC,QAAM,WAAW,WAAW,sBAAsB;AAClD,SAAO;AACT;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AttachmentAdapter.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/attachment/AttachmentAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AAExC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IAEf,GAAG,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACvD,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAClE,CAAC"}
|
@@ -13,7 +13,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
13
13
|
};
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
15
15
|
|
16
|
-
// src/runtimes/attachment/AttachmentAdapter.ts
|
16
|
+
// src/runtimes/adapters/attachment/AttachmentAdapter.ts
|
17
17
|
var AttachmentAdapter_exports = {};
|
18
18
|
module.exports = __toCommonJS(AttachmentAdapter_exports);
|
19
19
|
//# sourceMappingURL=AttachmentAdapter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/attachment/AttachmentAdapter.ts"],"sourcesContent":["import {\n Attachment,\n PendingAttachment,\n CompleteAttachment,\n} from \"../../../types/AttachmentTypes\";\n\nexport type AttachmentAdapter = {\n accept: string;\n\n add(state: { file: File }): Promise<PendingAttachment>;\n remove(attachment: Attachment): Promise<void>;\n send(attachment: PendingAttachment): Promise<CompleteAttachment>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Attachment, PendingAttachment } from "
|
1
|
+
import { Attachment, PendingAttachment } from "../../../types/AttachmentTypes";
|
2
2
|
import { AttachmentAdapter } from "./AttachmentAdapter";
|
3
3
|
export declare class CompositeAttachmentAdapter implements AttachmentAdapter {
|
4
4
|
private _adapters;
|
@@ -7,7 +7,7 @@ export declare class CompositeAttachmentAdapter implements AttachmentAdapter {
|
|
7
7
|
add(state: {
|
8
8
|
file: File;
|
9
9
|
}): Promise<PendingAttachment>;
|
10
|
-
send(attachment: PendingAttachment): Promise<import("
|
10
|
+
send(attachment: PendingAttachment): Promise<import("../../..").CompleteAttachment>;
|
11
11
|
remove(attachment: Attachment): Promise<void>;
|
12
12
|
}
|
13
13
|
//# sourceMappingURL=CompositeAttachmentAdapter.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CompositeAttachmentAdapter.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/attachment/CompositeAttachmentAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AA6CxD,qBAAa,0BAA2B,YAAW,iBAAiB;IAClE,OAAO,CAAC,SAAS,CAAsB;IAEhC,MAAM,EAAE,MAAM,CAAC;gBAEV,QAAQ,EAAE,iBAAiB,EAAE;IAgB5B,GAAG,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE;IASzB,IAAI,CAAC,UAAU,EAAE,iBAAiB;IAUlC,MAAM,CAAC,UAAU,EAAE,UAAU;CAiB3C"}
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
|
20
|
-
// src/runtimes/attachment/CompositeAttachmentAdapter.ts
|
20
|
+
// src/runtimes/adapters/attachment/CompositeAttachmentAdapter.ts
|
21
21
|
var CompositeAttachmentAdapter_exports = {};
|
22
22
|
__export(CompositeAttachmentAdapter_exports, {
|
23
23
|
CompositeAttachmentAdapter: () => CompositeAttachmentAdapter
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/attachment/CompositeAttachmentAdapter.ts"],"sourcesContent":["import { Attachment, PendingAttachment } from \"../../../types/AttachmentTypes\";\nimport { AttachmentAdapter } from \"./AttachmentAdapter\";\n\nfunction fileMatchesAccept(\n file: { name: string; type: string },\n acceptString: string,\n) {\n // Check if the accept string is \"*\", which allows any file\n if (acceptString === \"*\") {\n return true;\n }\n\n // Split the accept string into an array of allowed types\n const allowedTypes = acceptString\n .split(\",\")\n .map((type) => type.trim().toLowerCase());\n\n // Get the file's extension and MIME type\n const fileExtension = \".\" + file.name.split(\".\").pop()!.toLowerCase();\n const fileMimeType = file.type.toLowerCase();\n\n for (const type of allowedTypes) {\n // Check for file extension match\n if (type.startsWith(\".\") && type === fileExtension) {\n return true;\n }\n\n // Check for exact MIME type match\n if (type.includes(\"/\") && type === fileMimeType) {\n return true;\n }\n\n if (type === \"image/*\" || type === \"video/*\" || type === \"audio/*\") {\n // Check for wildcard MIME type match\n if (type.endsWith(\"/*\")) {\n const generalType = type.split(\"/\")[0]!;\n if (fileMimeType.startsWith(generalType + \"/\")) {\n return true;\n }\n }\n }\n }\n\n return false;\n}\n\nexport class CompositeAttachmentAdapter implements AttachmentAdapter {\n private _adapters: AttachmentAdapter[];\n\n public accept: string;\n\n constructor(adapters: AttachmentAdapter[]) {\n this._adapters = adapters;\n\n const wildcardIdx = adapters.findIndex((a) => a.accept === \"*\");\n if (wildcardIdx !== -1) {\n if (wildcardIdx !== adapters.length - 1)\n throw new Error(\n \"A wildcard adapter (handling all files) can only be specified as the last adapter.\",\n );\n\n this.accept = \"*\";\n } else {\n this.accept = adapters.map((a) => a.accept).join(\",\");\n }\n }\n\n public async add(state: { file: File }) {\n for (const adapter of this._adapters) {\n if (fileMatchesAccept(state.file, adapter.accept)) {\n return adapter.add(state);\n }\n }\n throw new Error(\"No matching adapter found for file\");\n }\n\n public async send(attachment: PendingAttachment) {\n const adapters = this._adapters.slice();\n for (const adapter of adapters) {\n if (fileMatchesAccept(attachment.file, adapter.accept)) {\n return adapter.send(attachment);\n }\n }\n throw new Error(\"No matching adapter found for attachment\");\n }\n\n public async remove(attachment: Attachment) {\n const adapters = this._adapters.slice();\n for (const adapter of adapters) {\n if (\n fileMatchesAccept(\n {\n name: attachment.name,\n type: attachment.contentType,\n },\n adapter.accept,\n )\n ) {\n return adapter.remove(attachment);\n }\n }\n throw new Error(\"No matching adapter found for attachment\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,SAAS,kBACP,MACA,cACA;AAEA,MAAI,iBAAiB,KAAK;AACxB,WAAO;AAAA,EACT;AAGA,QAAM,eAAe,aAClB,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE,YAAY,CAAC;AAG1C,QAAM,gBAAgB,MAAM,KAAK,KAAK,MAAM,GAAG,EAAE,IAAI,EAAG,YAAY;AACpE,QAAM,eAAe,KAAK,KAAK,YAAY;AAE3C,aAAW,QAAQ,cAAc;AAE/B,QAAI,KAAK,WAAW,GAAG,KAAK,SAAS,eAAe;AAClD,aAAO;AAAA,IACT;AAGA,QAAI,KAAK,SAAS,GAAG,KAAK,SAAS,cAAc;AAC/C,aAAO;AAAA,IACT;AAEA,QAAI,SAAS,aAAa,SAAS,aAAa,SAAS,WAAW;AAElE,UAAI,KAAK,SAAS,IAAI,GAAG;AACvB,cAAM,cAAc,KAAK,MAAM,GAAG,EAAE,CAAC;AACrC,YAAI,aAAa,WAAW,cAAc,GAAG,GAAG;AAC9C,iBAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,IAAM,6BAAN,MAA8D;AAAA,EAC3D;AAAA,EAED;AAAA,EAEP,YAAY,UAA+B;AACzC,SAAK,YAAY;AAEjB,UAAM,cAAc,SAAS,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG;AAC9D,QAAI,gBAAgB,IAAI;AACtB,UAAI,gBAAgB,SAAS,SAAS;AACpC,cAAM,IAAI;AAAA,UACR;AAAA,QACF;AAEF,WAAK,SAAS;AAAA,IAChB,OAAO;AACL,WAAK,SAAS,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG;AAAA,IACtD;AAAA,EACF;AAAA,EAEA,MAAa,IAAI,OAAuB;AACtC,eAAW,WAAW,KAAK,WAAW;AACpC,UAAI,kBAAkB,MAAM,MAAM,QAAQ,MAAM,GAAG;AACjD,eAAO,QAAQ,IAAI,KAAK;AAAA,MAC1B;AAAA,IACF;AACA,UAAM,IAAI,MAAM,oCAAoC;AAAA,EACtD;AAAA,EAEA,MAAa,KAAK,YAA+B;AAC/C,UAAM,WAAW,KAAK,UAAU,MAAM;AACtC,eAAW,WAAW,UAAU;AAC9B,UAAI,kBAAkB,WAAW,MAAM,QAAQ,MAAM,GAAG;AACtD,eAAO,QAAQ,KAAK,UAAU;AAAA,MAChC;AAAA,IACF;AACA,UAAM,IAAI,MAAM,0CAA0C;AAAA,EAC5D;AAAA,EAEA,MAAa,OAAO,YAAwB;AAC1C,UAAM,WAAW,KAAK,UAAU,MAAM;AACtC,eAAW,WAAW,UAAU;AAC9B,UACE;AAAA,QACE;AAAA,UACE,MAAM,WAAW;AAAA,UACjB,MAAM,WAAW;AAAA,QACnB;AAAA,QACA,QAAQ;AAAA,MACV,GACA;AACA,eAAO,QAAQ,OAAO,UAAU;AAAA,MAClC;AAAA,IACF;AACA,UAAM,IAAI,MAAM,0CAA0C;AAAA,EAC5D;AACF;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/attachment/CompositeAttachmentAdapter.ts"],"sourcesContent":["import { Attachment, PendingAttachment } from \"../../../types/AttachmentTypes\";\nimport { AttachmentAdapter } from \"./AttachmentAdapter\";\n\nfunction fileMatchesAccept(\n file: { name: string; type: string },\n acceptString: string,\n) {\n // Check if the accept string is \"*\", which allows any file\n if (acceptString === \"*\") {\n return true;\n }\n\n // Split the accept string into an array of allowed types\n const allowedTypes = acceptString\n .split(\",\")\n .map((type) => type.trim().toLowerCase());\n\n // Get the file's extension and MIME type\n const fileExtension = \".\" + file.name.split(\".\").pop()!.toLowerCase();\n const fileMimeType = file.type.toLowerCase();\n\n for (const type of allowedTypes) {\n // Check for file extension match\n if (type.startsWith(\".\") && type === fileExtension) {\n return true;\n }\n\n // Check for exact MIME type match\n if (type.includes(\"/\") && type === fileMimeType) {\n return true;\n }\n\n if (type === \"image/*\" || type === \"video/*\" || type === \"audio/*\") {\n // Check for wildcard MIME type match\n if (type.endsWith(\"/*\")) {\n const generalType = type.split(\"/\")[0]!;\n if (fileMimeType.startsWith(generalType + \"/\")) {\n return true;\n }\n }\n }\n }\n\n return false;\n}\n\nexport class CompositeAttachmentAdapter implements AttachmentAdapter {\n private _adapters: AttachmentAdapter[];\n\n public accept: string;\n\n constructor(adapters: AttachmentAdapter[]) {\n this._adapters = adapters;\n\n const wildcardIdx = adapters.findIndex((a) => a.accept === \"*\");\n if (wildcardIdx !== -1) {\n if (wildcardIdx !== adapters.length - 1)\n throw new Error(\n \"A wildcard adapter (handling all files) can only be specified as the last adapter.\",\n );\n\n this.accept = \"*\";\n } else {\n this.accept = adapters.map((a) => a.accept).join(\",\");\n }\n }\n\n public async add(state: { file: File }) {\n for (const adapter of this._adapters) {\n if (fileMatchesAccept(state.file, adapter.accept)) {\n return adapter.add(state);\n }\n }\n throw new Error(\"No matching adapter found for file\");\n }\n\n public async send(attachment: PendingAttachment) {\n const adapters = this._adapters.slice();\n for (const adapter of adapters) {\n if (fileMatchesAccept(attachment.file, adapter.accept)) {\n return adapter.send(attachment);\n }\n }\n throw new Error(\"No matching adapter found for attachment\");\n }\n\n public async remove(attachment: Attachment) {\n const adapters = this._adapters.slice();\n for (const adapter of adapters) {\n if (\n fileMatchesAccept(\n {\n name: attachment.name,\n type: attachment.contentType,\n },\n adapter.accept,\n )\n ) {\n return adapter.remove(attachment);\n }\n }\n throw new Error(\"No matching adapter found for attachment\");\n }\n}\n"],"mappings":";AAGA,SAAS,kBACP,MACA,cACA;AAEA,MAAI,iBAAiB,KAAK;AACxB,WAAO;AAAA,EACT;AAGA,QAAM,eAAe,aAClB,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE,YAAY,CAAC;AAG1C,QAAM,gBAAgB,MAAM,KAAK,KAAK,MAAM,GAAG,EAAE,IAAI,EAAG,YAAY;AACpE,QAAM,eAAe,KAAK,KAAK,YAAY;AAE3C,aAAW,QAAQ,cAAc;AAE/B,QAAI,KAAK,WAAW,GAAG,KAAK,SAAS,eAAe;AAClD,aAAO;AAAA,IACT;AAGA,QAAI,KAAK,SAAS,GAAG,KAAK,SAAS,cAAc;AAC/C,aAAO;AAAA,IACT;AAEA,QAAI,SAAS,aAAa,SAAS,aAAa,SAAS,WAAW;AAElE,UAAI,KAAK,SAAS,IAAI,GAAG;AACvB,cAAM,cAAc,KAAK,MAAM,GAAG,EAAE,CAAC;AACrC,YAAI,aAAa,WAAW,cAAc,GAAG,GAAG;AAC9C,iBAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,IAAM,6BAAN,MAA8D;AAAA,EAC3D;AAAA,EAED;AAAA,EAEP,YAAY,UAA+B;AACzC,SAAK,YAAY;AAEjB,UAAM,cAAc,SAAS,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG;AAC9D,QAAI,gBAAgB,IAAI;AACtB,UAAI,gBAAgB,SAAS,SAAS;AACpC,cAAM,IAAI;AAAA,UACR;AAAA,QACF;AAEF,WAAK,SAAS;AAAA,IAChB,OAAO;AACL,WAAK,SAAS,SAAS,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,GAAG;AAAA,IACtD;AAAA,EACF;AAAA,EAEA,MAAa,IAAI,OAAuB;AACtC,eAAW,WAAW,KAAK,WAAW;AACpC,UAAI,kBAAkB,MAAM,MAAM,QAAQ,MAAM,GAAG;AACjD,eAAO,QAAQ,IAAI,KAAK;AAAA,MAC1B;AAAA,IACF;AACA,UAAM,IAAI,MAAM,oCAAoC;AAAA,EACtD;AAAA,EAEA,MAAa,KAAK,YAA+B;AAC/C,UAAM,WAAW,KAAK,UAAU,MAAM;AACtC,eAAW,WAAW,UAAU;AAC9B,UAAI,kBAAkB,WAAW,MAAM,QAAQ,MAAM,GAAG;AACtD,eAAO,QAAQ,KAAK,UAAU;AAAA,MAChC;AAAA,IACF;AACA,UAAM,IAAI,MAAM,0CAA0C;AAAA,EAC5D;AAAA,EAEA,MAAa,OAAO,YAAwB;AAC1C,UAAM,WAAW,KAAK,UAAU,MAAM;AACtC,eAAW,WAAW,UAAU;AAC9B,UACE;AAAA,QACE;AAAA,UACE,MAAM,WAAW;AAAA,UACjB,MAAM,WAAW;AAAA,QACnB;AAAA,QACA,QAAQ;AAAA,MACV,GACA;AACA,eAAO,QAAQ,OAAO,UAAU;AAAA,MAClC;AAAA,IACF;AACA,UAAM,IAAI,MAAM,0CAA0C;AAAA,EAC5D;AACF;","names":[]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PendingAttachment, CompleteAttachment } from "
|
1
|
+
import { PendingAttachment, CompleteAttachment } from "../../../types/AttachmentTypes";
|
2
2
|
import { AttachmentAdapter } from "./AttachmentAdapter";
|
3
3
|
export declare class SimpleImageAttachmentAdapter implements AttachmentAdapter {
|
4
4
|
accept: string;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SimpleImageAttachmentAdapter.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBAAa,4BAA6B,YAAW,iBAAiB;IAC7D,MAAM,SAAa;IAEb,GAAG,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAWtD,IAAI,CACf,UAAU,EAAE,iBAAiB,GAC5B,OAAO,CAAC,kBAAkB,CAAC;IAajB,MAAM;CAGpB"}
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
|
20
|
-
// src/runtimes/attachment/SimpleImageAttachmentAdapter.ts
|
20
|
+
// src/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.ts
|
21
21
|
var SimpleImageAttachmentAdapter_exports = {};
|
22
22
|
__export(SimpleImageAttachmentAdapter_exports, {
|
23
23
|
SimpleImageAttachmentAdapter: () => SimpleImageAttachmentAdapter
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.ts"],"sourcesContent":["import {\n PendingAttachment,\n CompleteAttachment,\n} from \"../../../types/AttachmentTypes\";\nimport { AttachmentAdapter } from \"./AttachmentAdapter\";\n\nexport class SimpleImageAttachmentAdapter implements AttachmentAdapter {\n public accept = \"image/*\";\n\n public async add(state: { file: File }): Promise<PendingAttachment> {\n return {\n id: state.file.name,\n type: \"image\",\n name: state.file.name,\n contentType: state.file.type,\n file: state.file,\n status: { type: \"requires-action\", reason: \"composer-send\" },\n };\n }\n\n public async send(\n attachment: PendingAttachment,\n ): Promise<CompleteAttachment> {\n return {\n ...attachment,\n status: { type: \"complete\" },\n content: [\n {\n type: \"image\",\n image: await getFileDataURL(attachment.file),\n },\n ],\n };\n }\n\n public async remove() {\n // noop\n }\n}\n\nconst getFileDataURL = (file: File) =>\n new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = (error) => reject(error);\n\n reader.readAsDataURL(file);\n });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,+BAAN,MAAgE;AAAA,EAC9D,SAAS;AAAA,EAEhB,MAAa,IAAI,OAAmD;AAClE,WAAO;AAAA,MACL,IAAI,MAAM,KAAK;AAAA,MACf,MAAM;AAAA,MACN,MAAM,MAAM,KAAK;AAAA,MACjB,aAAa,MAAM,KAAK;AAAA,MACxB,MAAM,MAAM;AAAA,MACZ,QAAQ,EAAE,MAAM,mBAAmB,QAAQ,gBAAgB;AAAA,IAC7D;AAAA,EACF;AAAA,EAEA,MAAa,KACX,YAC6B;AAC7B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,EAAE,MAAM,WAAW;AAAA,MAC3B,SAAS;AAAA,QACP;AAAA,UACE,MAAM;AAAA,UACN,OAAO,MAAM,eAAe,WAAW,IAAI;AAAA,QAC7C;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAa,SAAS;AAAA,EAEtB;AACF;AAEA,IAAM,iBAAiB,CAAC,SACtB,IAAI,QAAgB,CAAC,SAAS,WAAW;AACvC,QAAM,SAAS,IAAI,WAAW;AAE9B,SAAO,SAAS,MAAM,QAAQ,OAAO,MAAgB;AACrD,SAAO,UAAU,CAAC,UAAU,OAAO,KAAK;AAExC,SAAO,cAAc,IAAI;AAC3B,CAAC;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/attachment/SimpleImageAttachmentAdapter.ts"],"sourcesContent":["import {\n PendingAttachment,\n CompleteAttachment,\n} from \"../../../types/AttachmentTypes\";\nimport { AttachmentAdapter } from \"./AttachmentAdapter\";\n\nexport class SimpleImageAttachmentAdapter implements AttachmentAdapter {\n public accept = \"image/*\";\n\n public async add(state: { file: File }): Promise<PendingAttachment> {\n return {\n id: state.file.name,\n type: \"image\",\n name: state.file.name,\n contentType: state.file.type,\n file: state.file,\n status: { type: \"requires-action\", reason: \"composer-send\" },\n };\n }\n\n public async send(\n attachment: PendingAttachment,\n ): Promise<CompleteAttachment> {\n return {\n ...attachment,\n status: { type: \"complete\" },\n content: [\n {\n type: \"image\",\n image: await getFileDataURL(attachment.file),\n },\n ],\n };\n }\n\n public async remove() {\n // noop\n }\n}\n\nconst getFileDataURL = (file: File) =>\n new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = (error) => reject(error);\n\n reader.readAsDataURL(file);\n });\n"],"mappings":";AAMO,IAAM,+BAAN,MAAgE;AAAA,EAC9D,SAAS;AAAA,EAEhB,MAAa,IAAI,OAAmD;AAClE,WAAO;AAAA,MACL,IAAI,MAAM,KAAK;AAAA,MACf,MAAM;AAAA,MACN,MAAM,MAAM,KAAK;AAAA,MACjB,aAAa,MAAM,KAAK;AAAA,MACxB,MAAM,MAAM;AAAA,MACZ,QAAQ,EAAE,MAAM,mBAAmB,QAAQ,gBAAgB;AAAA,IAC7D;AAAA,EACF;AAAA,EAEA,MAAa,KACX,YAC6B;AAC7B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,EAAE,MAAM,WAAW;AAAA,MAC3B,SAAS;AAAA,QACP;AAAA,UACE,MAAM;AAAA,UACN,OAAO,MAAM,eAAe,WAAW,IAAI;AAAA,QAC7C;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAa,SAAS;AAAA,EAEtB;AACF;AAEA,IAAM,iBAAiB,CAAC,SACtB,IAAI,QAAgB,CAAC,SAAS,WAAW;AACvC,QAAM,SAAS,IAAI,WAAW;AAE9B,SAAO,SAAS,MAAM,QAAQ,OAAO,MAAgB;AACrD,SAAO,UAAU,CAAC,UAAU,OAAO,KAAK;AAExC,SAAO,cAAc,IAAI;AAC3B,CAAC;","names":[]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CompleteAttachment, PendingAttachment } from "
|
1
|
+
import { CompleteAttachment, PendingAttachment } from "../../../types/AttachmentTypes";
|
2
2
|
import { AttachmentAdapter } from "./AttachmentAdapter";
|
3
3
|
export declare class SimpleTextAttachmentAdapter implements AttachmentAdapter {
|
4
4
|
accept: string;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SimpleTextAttachmentAdapter.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,qBAAa,2BAA4B,YAAW,iBAAiB;IAC5D,MAAM,SAC+D;IAE/D,GAAG,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAWtD,IAAI,CACf,UAAU,EAAE,iBAAiB,GAC5B,OAAO,CAAC,kBAAkB,CAAC;IAajB,MAAM;CAGpB"}
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
|
20
|
-
// src/runtimes/attachment/SimpleTextAttachmentAdapter.ts
|
20
|
+
// src/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.ts
|
21
21
|
var SimpleTextAttachmentAdapter_exports = {};
|
22
22
|
__export(SimpleTextAttachmentAdapter_exports, {
|
23
23
|
SimpleTextAttachmentAdapter: () => SimpleTextAttachmentAdapter
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.ts"],"sourcesContent":["import {\n CompleteAttachment,\n PendingAttachment,\n} from \"../../../types/AttachmentTypes\";\nimport { AttachmentAdapter } from \"./AttachmentAdapter\";\n\nexport class SimpleTextAttachmentAdapter implements AttachmentAdapter {\n public accept =\n \"text/plain,text/html,text/markdown,text/csv,text/xml,text/json,text/css\";\n\n public async add(state: { file: File }): Promise<PendingAttachment> {\n return {\n id: state.file.name,\n type: \"document\",\n name: state.file.name,\n contentType: state.file.type,\n file: state.file,\n status: { type: \"requires-action\", reason: \"composer-send\" },\n };\n }\n\n public async send(\n attachment: PendingAttachment,\n ): Promise<CompleteAttachment> {\n return {\n ...attachment,\n status: { type: \"complete\" },\n content: [\n {\n type: \"text\",\n text: `<attachment name=${attachment.name}>\\n${await getFileText(attachment.file)}\\n</attachment>`,\n },\n ],\n };\n }\n\n public async remove() {\n // noop\n }\n}\n\nconst getFileText = (file: File) =>\n new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = (error) => reject(error);\n\n reader.readAsText(file);\n });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,8BAAN,MAA+D;AAAA,EAC7D,SACL;AAAA,EAEF,MAAa,IAAI,OAAmD;AAClE,WAAO;AAAA,MACL,IAAI,MAAM,KAAK;AAAA,MACf,MAAM;AAAA,MACN,MAAM,MAAM,KAAK;AAAA,MACjB,aAAa,MAAM,KAAK;AAAA,MACxB,MAAM,MAAM;AAAA,MACZ,QAAQ,EAAE,MAAM,mBAAmB,QAAQ,gBAAgB;AAAA,IAC7D;AAAA,EACF;AAAA,EAEA,MAAa,KACX,YAC6B;AAC7B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,EAAE,MAAM,WAAW;AAAA,MAC3B,SAAS;AAAA,QACP;AAAA,UACE,MAAM;AAAA,UACN,MAAM,oBAAoB,WAAW,IAAI;AAAA,EAAM,MAAM,YAAY,WAAW,IAAI,CAAC;AAAA;AAAA,QACnF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAa,SAAS;AAAA,EAEtB;AACF;AAEA,IAAM,cAAc,CAAC,SACnB,IAAI,QAAgB,CAAC,SAAS,WAAW;AACvC,QAAM,SAAS,IAAI,WAAW;AAE9B,SAAO,SAAS,MAAM,QAAQ,OAAO,MAAgB;AACrD,SAAO,UAAU,CAAC,UAAU,OAAO,KAAK;AAExC,SAAO,WAAW,IAAI;AACxB,CAAC;","names":[]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// src/runtimes/attachment/SimpleTextAttachmentAdapter.ts
|
1
|
+
// src/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.ts
|
2
2
|
var SimpleTextAttachmentAdapter = class {
|
3
3
|
accept = "text/plain,text/html,text/markdown,text/csv,text/xml,text/json,text/css";
|
4
4
|
async add(state) {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/attachment/SimpleTextAttachmentAdapter.ts"],"sourcesContent":["import {\n CompleteAttachment,\n PendingAttachment,\n} from \"../../../types/AttachmentTypes\";\nimport { AttachmentAdapter } from \"./AttachmentAdapter\";\n\nexport class SimpleTextAttachmentAdapter implements AttachmentAdapter {\n public accept =\n \"text/plain,text/html,text/markdown,text/csv,text/xml,text/json,text/css\";\n\n public async add(state: { file: File }): Promise<PendingAttachment> {\n return {\n id: state.file.name,\n type: \"document\",\n name: state.file.name,\n contentType: state.file.type,\n file: state.file,\n status: { type: \"requires-action\", reason: \"composer-send\" },\n };\n }\n\n public async send(\n attachment: PendingAttachment,\n ): Promise<CompleteAttachment> {\n return {\n ...attachment,\n status: { type: \"complete\" },\n content: [\n {\n type: \"text\",\n text: `<attachment name=${attachment.name}>\\n${await getFileText(attachment.file)}\\n</attachment>`,\n },\n ],\n };\n }\n\n public async remove() {\n // noop\n }\n}\n\nconst getFileText = (file: File) =>\n new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = (error) => reject(error);\n\n reader.readAsText(file);\n });\n"],"mappings":";AAMO,IAAM,8BAAN,MAA+D;AAAA,EAC7D,SACL;AAAA,EAEF,MAAa,IAAI,OAAmD;AAClE,WAAO;AAAA,MACL,IAAI,MAAM,KAAK;AAAA,MACf,MAAM;AAAA,MACN,MAAM,MAAM,KAAK;AAAA,MACjB,aAAa,MAAM,KAAK;AAAA,MACxB,MAAM,MAAM;AAAA,MACZ,QAAQ,EAAE,MAAM,mBAAmB,QAAQ,gBAAgB;AAAA,IAC7D;AAAA,EACF;AAAA,EAEA,MAAa,KACX,YAC6B;AAC7B,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,EAAE,MAAM,WAAW;AAAA,MAC3B,SAAS;AAAA,QACP;AAAA,UACE,MAAM;AAAA,UACN,MAAM,oBAAoB,WAAW,IAAI;AAAA,EAAM,MAAM,YAAY,WAAW,IAAI,CAAC;AAAA;AAAA,QACnF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAa,SAAS;AAAA,EAEtB;AACF;AAEA,IAAM,cAAc,CAAC,SACnB,IAAI,QAAgB,CAAC,SAAS,WAAW;AACvC,QAAM,SAAS,IAAI,WAAW;AAE9B,SAAO,SAAS,MAAM,QAAQ,OAAO,MAAgB;AACrD,SAAO,UAAU,CAAC,UAAU,OAAO,KAAK;AAExC,SAAO,WAAW,IAAI;AACxB,CAAC;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/attachment/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
|
20
|
-
// src/runtimes/attachment/index.ts
|
20
|
+
// src/runtimes/adapters/attachment/index.ts
|
21
21
|
var attachment_exports = {};
|
22
22
|
__export(attachment_exports, {
|
23
23
|
CompositeAttachmentAdapter: () => import_CompositeAttachmentAdapter.CompositeAttachmentAdapter,
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/attachment/index.ts"],"sourcesContent":["export type { AttachmentAdapter } from \"./AttachmentAdapter\";\nexport { SimpleImageAttachmentAdapter } from \"./SimpleImageAttachmentAdapter\";\nexport { SimpleTextAttachmentAdapter } from \"./SimpleTextAttachmentAdapter\";\nexport { CompositeAttachmentAdapter } from \"./CompositeAttachmentAdapter\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0CAA6C;AAC7C,yCAA4C;AAC5C,wCAA2C;","names":[]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// src/runtimes/attachment/index.ts
|
1
|
+
// src/runtimes/adapters/attachment/index.ts
|
2
2
|
import { SimpleImageAttachmentAdapter } from "./SimpleImageAttachmentAdapter.mjs";
|
3
3
|
import { SimpleTextAttachmentAdapter } from "./SimpleTextAttachmentAdapter.mjs";
|
4
4
|
import { CompositeAttachmentAdapter } from "./CompositeAttachmentAdapter.mjs";
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/attachment/index.ts"],"sourcesContent":["export type { AttachmentAdapter } from \"./AttachmentAdapter\";\nexport { SimpleImageAttachmentAdapter } from \"./SimpleImageAttachmentAdapter\";\nexport { SimpleTextAttachmentAdapter } from \"./SimpleTextAttachmentAdapter\";\nexport { CompositeAttachmentAdapter } from \"./CompositeAttachmentAdapter\";\n"],"mappings":";AACA,SAAS,oCAAoC;AAC7C,SAAS,mCAAmC;AAC5C,SAAS,kCAAkC;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FeedbackAdapter.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/feedback/FeedbackAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,KAAK,uBAAuB,GAAG;IAC7B,OAAO,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,CAAC,QAAQ,EAAE,uBAAuB,KAAK,IAAI,CAAC;CACrD,CAAC"}
|
@@ -13,7 +13,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
13
13
|
};
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
15
15
|
|
16
|
-
// src/runtimes/feedback/FeedbackAdapter.ts
|
16
|
+
// src/runtimes/adapters/feedback/FeedbackAdapter.ts
|
17
17
|
var FeedbackAdapter_exports = {};
|
18
18
|
module.exports = __toCommonJS(FeedbackAdapter_exports);
|
19
19
|
//# sourceMappingURL=FeedbackAdapter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/feedback/FeedbackAdapter.ts"],"sourcesContent":["import { ThreadMessage } from \"../../../types/AssistantTypes\";\n\ntype FeedbackAdapterFeedback = {\n message: ThreadMessage;\n type: \"positive\" | \"negative\";\n};\n\nexport type FeedbackAdapter = {\n submit: (feedback: FeedbackAdapterFeedback) => void;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/feedback/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
@@ -13,7 +13,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
13
13
|
};
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
15
15
|
|
16
|
-
// src/runtimes/feedback/index.ts
|
16
|
+
// src/runtimes/adapters/feedback/index.ts
|
17
17
|
var feedback_exports = {};
|
18
18
|
module.exports = __toCommonJS(feedback_exports);
|
19
19
|
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/feedback/index.ts"],"sourcesContent":["export { type FeedbackAdapter } from \"./FeedbackAdapter\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtimes/adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
8
|
+
for (let key of __getOwnPropNames(from))
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
11
|
+
}
|
12
|
+
return to;
|
13
|
+
};
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
16
|
+
|
17
|
+
// src/runtimes/adapters/index.ts
|
18
|
+
var adapters_exports = {};
|
19
|
+
module.exports = __toCommonJS(adapters_exports);
|
20
|
+
__reExport(adapters_exports, require("./attachment/index.js"), module.exports);
|
21
|
+
__reExport(adapters_exports, require("./feedback/index.js"), module.exports);
|
22
|
+
__reExport(adapters_exports, require("./speech/index.js"), module.exports);
|
23
|
+
// Annotate the CommonJS export names for ESM import in node:
|
24
|
+
0 && (module.exports = {
|
25
|
+
...require("./attachment/index.js"),
|
26
|
+
...require("./feedback/index.js"),
|
27
|
+
...require("./speech/index.js")
|
28
|
+
});
|
29
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/adapters/index.ts"],"sourcesContent":["export * from \"./attachment\";\nexport * from \"./feedback\";\nexport * from \"./speech\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,kCAAd;AACA,6BAAc,gCADd;AAEA,6BAAc,8BAFd;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/runtimes/adapters/index.ts"],"sourcesContent":["export * from \"./attachment\";\nexport * from \"./feedback\";\nexport * from \"./speech\";\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SpeechAdapterTypes.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/speech/SpeechAdapterTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,yBAAiB,sBAAsB,CAAC;IACtC,KAAY,MAAM,GACd;QACE,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;KAC9B,GACD;QACE,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;QAC3C,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;IAEN,KAAY,SAAS,GAAG;QACtB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,IAAI,CAAC;QACnB,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,WAAW,CAAC;KAClD,CAAC;CACH;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,sBAAsB,CAAC,SAAS,CAAC;CAC3D,CAAC;AAEF,yBAAiB,wBAAwB,CAAC;IACxC,KAAY,MAAM,GACd;QACE,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;KAC9B,GACD;QACE,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;KAC3C,CAAC;IAEN,KAAY,MAAM,GAAG;QACnB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,KAAY,OAAO,GAAG;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QAC1B,MAAM,EAAE,MAAM,IAAI,CAAC;QACnB,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,WAAW,CAAC;QACrD,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,KAAK,WAAW,CAAC;QACjE,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,KAAK,WAAW,CAAC;KAC/D,CAAC;CACH;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,wBAAwB,CAAC,OAAO,CAAC;CAChD,CAAC"}
|
@@ -13,7 +13,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
13
13
|
};
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
15
15
|
|
16
|
-
// src/runtimes/speech/SpeechAdapterTypes.ts
|
16
|
+
// src/runtimes/adapters/speech/SpeechAdapterTypes.ts
|
17
17
|
var SpeechAdapterTypes_exports = {};
|
18
18
|
module.exports = __toCommonJS(SpeechAdapterTypes_exports);
|
19
19
|
//# sourceMappingURL=SpeechAdapterTypes.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/speech/SpeechAdapterTypes.ts"],"sourcesContent":["import { Unsubscribe } from \"../../../types\";\n\nexport namespace SpeechSynthesisAdapter {\n export type Status =\n | {\n type: \"starting\" | \"running\";\n }\n | {\n type: \"ended\";\n reason: \"finished\" | \"cancelled\" | \"error\";\n error?: unknown;\n };\n\n export type Utterance = {\n status: Status;\n cancel: () => void;\n subscribe: (callback: () => void) => Unsubscribe;\n };\n}\n\nexport type SpeechSynthesisAdapter = {\n speak: (text: string) => SpeechSynthesisAdapter.Utterance;\n};\n\nexport namespace SpeechRecognitionAdapter {\n export type Status =\n | {\n type: \"starting\" | \"running\";\n }\n | {\n type: \"ended\";\n reason: \"stopped\" | \"cancelled\" | \"error\";\n };\n\n export type Result = {\n transcript: string;\n };\n\n export type Session = {\n status: Status;\n stop: () => Promise<void>;\n cancel: () => void;\n onSpeechStart: (callback: () => void) => Unsubscribe;\n onSpeechEnd: (callback: (result: Result) => void) => Unsubscribe;\n onSpeech: (callback: (result: Result) => void) => Unsubscribe;\n };\n}\n\nexport type SpeechRecognitionAdapter = {\n listen: () => SpeechRecognitionAdapter.Session;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WebSpeechSynthesisAdapter.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/speech/WebSpeechSynthesisAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,qBAAa,yBAA0B,YAAW,sBAAsB;IACtE,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAAC,SAAS;CA4CtD"}
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
|
20
|
-
// src/runtimes/speech/WebSpeechSynthesisAdapter.ts
|
20
|
+
// src/runtimes/adapters/speech/WebSpeechSynthesisAdapter.ts
|
21
21
|
var WebSpeechSynthesisAdapter_exports = {};
|
22
22
|
__export(WebSpeechSynthesisAdapter_exports, {
|
23
23
|
WebSpeechSynthesisAdapter: () => WebSpeechSynthesisAdapter
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/speech/WebSpeechSynthesisAdapter.ts"],"sourcesContent":["import { SpeechSynthesisAdapter } from \"./SpeechAdapterTypes\";\n\nexport class WebSpeechSynthesisAdapter implements SpeechSynthesisAdapter {\n speak(text: string): SpeechSynthesisAdapter.Utterance {\n const utterance = new SpeechSynthesisUtterance(text);\n\n const subscribers = new Set<() => void>();\n const handleEnd = (\n reason: \"finished\" | \"error\" | \"cancelled\",\n error?: unknown,\n ) => {\n if (res.status.type === \"ended\") return;\n\n res.status = { type: \"ended\", reason, error };\n subscribers.forEach((handler) => handler());\n };\n\n utterance.addEventListener(\"end\", () => handleEnd(\"finished\"));\n utterance.addEventListener(\"error\", (e) => handleEnd(\"error\", e.error));\n\n window.speechSynthesis.speak(utterance);\n\n const res: SpeechSynthesisAdapter.Utterance = {\n status: { type: \"running\" },\n cancel: () => {\n window.speechSynthesis.cancel();\n handleEnd(\"cancelled\");\n },\n subscribe: (callback) => {\n if (res.status.type === \"ended\") {\n let cancelled = false;\n queueMicrotask(() => {\n if (!cancelled) callback();\n });\n return () => {\n cancelled = true;\n };\n } else {\n subscribers.add(callback);\n return () => {\n subscribers.delete(callback);\n };\n }\n },\n };\n return res;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,IAAM,4BAAN,MAAkE;AAAA,EACvE,MAAM,MAAgD;AACpD,UAAM,YAAY,IAAI,yBAAyB,IAAI;AAEnD,UAAM,cAAc,oBAAI,IAAgB;AACxC,UAAM,YAAY,CAChB,QACA,UACG;AACH,UAAI,IAAI,OAAO,SAAS,QAAS;AAEjC,UAAI,SAAS,EAAE,MAAM,SAAS,QAAQ,MAAM;AAC5C,kBAAY,QAAQ,CAAC,YAAY,QAAQ,CAAC;AAAA,IAC5C;AAEA,cAAU,iBAAiB,OAAO,MAAM,UAAU,UAAU,CAAC;AAC7D,cAAU,iBAAiB,SAAS,CAAC,MAAM,UAAU,SAAS,EAAE,KAAK,CAAC;AAEtE,WAAO,gBAAgB,MAAM,SAAS;AAEtC,UAAM,MAAwC;AAAA,MAC5C,QAAQ,EAAE,MAAM,UAAU;AAAA,MAC1B,QAAQ,MAAM;AACZ,eAAO,gBAAgB,OAAO;AAC9B,kBAAU,WAAW;AAAA,MACvB;AAAA,MACA,WAAW,CAAC,aAAa;AACvB,YAAI,IAAI,OAAO,SAAS,SAAS;AAC/B,cAAI,YAAY;AAChB,yBAAe,MAAM;AACnB,gBAAI,CAAC,UAAW,UAAS;AAAA,UAC3B,CAAC;AACD,iBAAO,MAAM;AACX,wBAAY;AAAA,UACd;AAAA,QACF,OAAO;AACL,sBAAY,IAAI,QAAQ;AACxB,iBAAO,MAAM;AACX,wBAAY,OAAO,QAAQ;AAAA,UAC7B;AAAA,QACF;AAAA,MACF;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/speech/WebSpeechSynthesisAdapter.ts"],"sourcesContent":["import { SpeechSynthesisAdapter } from \"./SpeechAdapterTypes\";\n\nexport class WebSpeechSynthesisAdapter implements SpeechSynthesisAdapter {\n speak(text: string): SpeechSynthesisAdapter.Utterance {\n const utterance = new SpeechSynthesisUtterance(text);\n\n const subscribers = new Set<() => void>();\n const handleEnd = (\n reason: \"finished\" | \"error\" | \"cancelled\",\n error?: unknown,\n ) => {\n if (res.status.type === \"ended\") return;\n\n res.status = { type: \"ended\", reason, error };\n subscribers.forEach((handler) => handler());\n };\n\n utterance.addEventListener(\"end\", () => handleEnd(\"finished\"));\n utterance.addEventListener(\"error\", (e) => handleEnd(\"error\", e.error));\n\n window.speechSynthesis.speak(utterance);\n\n const res: SpeechSynthesisAdapter.Utterance = {\n status: { type: \"running\" },\n cancel: () => {\n window.speechSynthesis.cancel();\n handleEnd(\"cancelled\");\n },\n subscribe: (callback) => {\n if (res.status.type === \"ended\") {\n let cancelled = false;\n queueMicrotask(() => {\n if (!cancelled) callback();\n });\n return () => {\n cancelled = true;\n };\n } else {\n subscribers.add(callback);\n return () => {\n subscribers.delete(callback);\n };\n }\n },\n };\n return res;\n }\n}\n"],"mappings":";AAEO,IAAM,4BAAN,MAAkE;AAAA,EACvE,MAAM,MAAgD;AACpD,UAAM,YAAY,IAAI,yBAAyB,IAAI;AAEnD,UAAM,cAAc,oBAAI,IAAgB;AACxC,UAAM,YAAY,CAChB,QACA,UACG;AACH,UAAI,IAAI,OAAO,SAAS,QAAS;AAEjC,UAAI,SAAS,EAAE,MAAM,SAAS,QAAQ,MAAM;AAC5C,kBAAY,QAAQ,CAAC,YAAY,QAAQ,CAAC;AAAA,IAC5C;AAEA,cAAU,iBAAiB,OAAO,MAAM,UAAU,UAAU,CAAC;AAC7D,cAAU,iBAAiB,SAAS,CAAC,MAAM,UAAU,SAAS,EAAE,KAAK,CAAC;AAEtE,WAAO,gBAAgB,MAAM,SAAS;AAEtC,UAAM,MAAwC;AAAA,MAC5C,QAAQ,EAAE,MAAM,UAAU;AAAA,MAC1B,QAAQ,MAAM;AACZ,eAAO,gBAAgB,OAAO;AAC9B,kBAAU,WAAW;AAAA,MACvB;AAAA,MACA,WAAW,CAAC,aAAa;AACvB,YAAI,IAAI,OAAO,SAAS,SAAS;AAC/B,cAAI,YAAY;AAChB,yBAAe,MAAM;AACnB,gBAAI,CAAC,UAAW,UAAS;AAAA,UAC3B,CAAC;AACD,iBAAO,MAAM;AACX,wBAAY;AAAA,UACd;AAAA,QACF,OAAO;AACL,sBAAY,IAAI,QAAQ;AACxB,iBAAO,MAAM;AACX,wBAAY,OAAO,QAAQ;AAAA,UAC7B;AAAA,QACF;AAAA,MACF;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/speech/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
|
20
|
-
// src/runtimes/speech/index.ts
|
20
|
+
// src/runtimes/adapters/speech/index.ts
|
21
21
|
var speech_exports = {};
|
22
22
|
__export(speech_exports, {
|
23
23
|
WebSpeechSynthesisAdapter: () => import_WebSpeechSynthesisAdapter.WebSpeechSynthesisAdapter
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/speech/index.ts"],"sourcesContent":["export type { SpeechSynthesisAdapter } from \"./SpeechAdapterTypes\";\nexport { WebSpeechSynthesisAdapter } from \"./WebSpeechSynthesisAdapter\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uCAA0C;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/speech/index.ts"],"sourcesContent":["export type { SpeechSynthesisAdapter } from \"./SpeechAdapterTypes\";\nexport { WebSpeechSynthesisAdapter } from \"./WebSpeechSynthesisAdapter\";\n"],"mappings":";AACA,SAAS,iCAAiC;","names":[]}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { ExportedMessageRepository, ExportedMessageRepositoryItem } from "../../utils/MessageRepository";
|
2
|
+
export type ThreadHistoryAdapter = {
|
3
|
+
load(): Promise<ExportedMessageRepository>;
|
4
|
+
append(item: ExportedMessageRepositoryItem): Promise<void>;
|
5
|
+
};
|
6
|
+
//# sourceMappingURL=ThreadHistoryAdapter.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ThreadHistoryAdapter.d.ts","sourceRoot":"","sources":["../../../../src/runtimes/adapters/thread-history/ThreadHistoryAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,6BAA6B,EAC9B,MAAM,+BAA+B,CAAC;AAEvC,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,IAAI,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC3C,MAAM,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
8
|
+
for (let key of __getOwnPropNames(from))
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
11
|
+
}
|
12
|
+
return to;
|
13
|
+
};
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
15
|
+
|
16
|
+
// src/runtimes/adapters/thread-history/ThreadHistoryAdapter.ts
|
17
|
+
var ThreadHistoryAdapter_exports = {};
|
18
|
+
module.exports = __toCommonJS(ThreadHistoryAdapter_exports);
|
19
|
+
//# sourceMappingURL=ThreadHistoryAdapter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/runtimes/adapters/thread-history/ThreadHistoryAdapter.ts"],"sourcesContent":["import {\n ExportedMessageRepository,\n ExportedMessageRepositoryItem,\n} from \"../../utils/MessageRepository\";\n\nexport type ThreadHistoryAdapter = {\n load(): Promise<ExportedMessageRepository>;\n append(item: ExportedMessageRepositoryItem): Promise<void>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=ThreadHistoryAdapter.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Attachment } from "../../types/AttachmentTypes";
|
2
2
|
import { AppendMessage } from "../../types";
|
3
|
-
import { AttachmentAdapter } from "../attachment";
|
3
|
+
import { AttachmentAdapter } from "../adapters/attachment";
|
4
4
|
import { ComposerRuntimeCore, ComposerRuntimeEventType } from "../core/ComposerRuntimeCore";
|
5
5
|
import { MessageRole, RunConfig } from "../../types/AssistantTypes";
|
6
6
|
import { BaseSubscribable } from "../remote-thread-list/BaseSubscribable";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BaseComposerRuntimeCore.d.ts","sourceRoot":"","sources":["../../../src/runtimes/composer/BaseComposerRuntimeCore.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAGX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"BaseComposerRuntimeCore.d.ts","sourceRoot":"","sources":["../../../src/runtimes/composer/BaseComposerRuntimeCore.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAGX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAK1E,8BAAsB,uBACpB,SAAQ,gBACR,YAAW,mBAAmB;IAE9B,SAAgB,SAAS,QAAQ;IAEjC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,IAAI,iBAAiB,GAAG,SAAS;IAEjE,mBAAmB,IAAI,MAAM;IAIpC,OAAO,CAAC,YAAY,CAA6B;IACjD,IAAW,WAAW,0BAErB;IAED,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE;IAKrD,aAAoB,SAAS,IAAI,OAAO,CAAC;IAEzC,IAAW,OAAO,YAEjB;IAED,OAAO,CAAC,KAAK,CAAM;IAEnB,IAAI,IAAI,WAEP;IAED,OAAO,CAAC,KAAK,CAAuB;IAEpC,IAAI,IAAI,gBAEP;IAED,OAAO,CAAC,UAAU,CAAiB;IAEnC,IAAI,SAAS,cAEZ;IAEM,OAAO,CAAC,KAAK,EAAE,MAAM;IAOrB,OAAO,CAAC,IAAI,EAAE,WAAW;IAOzB,YAAY,CAAC,SAAS,EAAE,SAAS;IAOxC,OAAO,CAAC,wBAAwB;YAMlB,mBAAmB;IAOpB,KAAK;IAkBL,gBAAgB;IAOhB,IAAI;IAyBV,MAAM;IAIb,SAAS,CAAC,QAAQ,CAAC,UAAU,CAC3B,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU,CAAC,GACpD,IAAI;IACP,SAAS,CAAC,QAAQ,CAAC,YAAY,IAAI,IAAI;IAEjC,aAAa,CAAC,IAAI,EAAE,IAAI;IAWxB,gBAAgB,CAAC,YAAY,EAAE,MAAM;IAkB3C,OAAO,CAAC,iBAAiB,CAGrB;IAEJ,SAAS,CAAC,uBAAuB,CAAC,KAAK,EAAE,wBAAwB;IAO1D,WAAW,CAAC,KAAK,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,IAAI;CAczE"}
|