@assistant-ui/core 0.1.0
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/dist/adapters/attachment.d.ts +36 -0
- package/dist/adapters/attachment.d.ts.map +1 -0
- package/dist/adapters/attachment.js +148 -0
- package/dist/adapters/attachment.js.map +1 -0
- package/dist/adapters/feedback.d.ts +10 -0
- package/dist/adapters/feedback.d.ts.map +1 -0
- package/dist/adapters/feedback.js +2 -0
- package/dist/adapters/feedback.js.map +1 -0
- package/dist/adapters/index.d.ts +8 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +3 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/speech.d.ts +76 -0
- package/dist/adapters/speech.d.ts.map +1 -0
- package/dist/adapters/speech.js +179 -0
- package/dist/adapters/speech.js.map +1 -0
- package/dist/adapters/suggestion.d.ts +10 -0
- package/dist/adapters/suggestion.d.ts.map +1 -0
- package/dist/adapters/suggestion.js +2 -0
- package/dist/adapters/suggestion.js.map +1 -0
- package/dist/adapters/thread-history.d.ts +43 -0
- package/dist/adapters/thread-history.d.ts.map +1 -0
- package/dist/adapters/thread-history.js +2 -0
- package/dist/adapters/thread-history.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +5 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +7 -0
- package/dist/internal.js.map +1 -0
- package/dist/model-context/frame/host.d.ts +21 -0
- package/dist/model-context/frame/host.d.ts.map +1 -0
- package/dist/model-context/frame/host.js +141 -0
- package/dist/model-context/frame/host.js.map +1 -0
- package/dist/model-context/frame/index.d.ts +5 -0
- package/dist/model-context/frame/index.d.ts.map +1 -0
- package/dist/model-context/frame/index.js +4 -0
- package/dist/model-context/frame/index.js.map +1 -0
- package/dist/model-context/frame/provider.d.ts +18 -0
- package/dist/model-context/frame/provider.d.ts.map +1 -0
- package/dist/model-context/frame/provider.js +133 -0
- package/dist/model-context/frame/provider.js.map +1 -0
- package/dist/model-context/frame/types.d.ts +29 -0
- package/dist/model-context/frame/types.d.ts.map +1 -0
- package/dist/model-context/frame/types.js +2 -0
- package/dist/model-context/frame/types.js.map +1 -0
- package/dist/model-context/index.d.ts +8 -0
- package/dist/model-context/index.d.ts.map +1 -0
- package/dist/model-context/index.js +9 -0
- package/dist/model-context/index.js.map +1 -0
- package/dist/model-context/registry-handles.d.ts +13 -0
- package/dist/model-context/registry-handles.d.ts.map +1 -0
- package/dist/model-context/registry-handles.js +2 -0
- package/dist/model-context/registry-handles.js.map +1 -0
- package/dist/model-context/registry.d.ts +17 -0
- package/dist/model-context/registry.d.ts.map +1 -0
- package/dist/model-context/registry.js +108 -0
- package/dist/model-context/registry.js.map +1 -0
- package/dist/model-context/tool.d.ts +3 -0
- package/dist/model-context/tool.d.ts.map +1 -0
- package/dist/model-context/tool.js +5 -0
- package/dist/model-context/tool.js.map +1 -0
- package/dist/model-context/types.d.ts +37 -0
- package/dist/model-context/types.d.ts.map +1 -0
- package/dist/model-context/types.js +43 -0
- package/dist/model-context/types.js.map +1 -0
- package/dist/runtime/api/assistant-runtime.d.ts +64 -0
- package/dist/runtime/api/assistant-runtime.d.ts.map +1 -0
- package/dist/runtime/api/assistant-runtime.js +46 -0
- package/dist/runtime/api/assistant-runtime.js.map +1 -0
- package/dist/runtime/api/attachment-runtime.d.ts +63 -0
- package/dist/runtime/api/attachment-runtime.d.ts.map +1 -0
- package/dist/runtime/api/attachment-runtime.js +56 -0
- package/dist/runtime/api/attachment-runtime.js.map +1 -0
- package/dist/runtime/api/bindings.d.ts +31 -0
- package/dist/runtime/api/bindings.d.ts.map +1 -0
- package/dist/runtime/api/bindings.js +2 -0
- package/dist/runtime/api/bindings.js.map +1 -0
- package/dist/runtime/api/composer-runtime.d.ts +181 -0
- package/dist/runtime/api/composer-runtime.d.ts.map +1 -0
- package/dist/runtime/api/composer-runtime.js +247 -0
- package/dist/runtime/api/composer-runtime.js.map +1 -0
- package/dist/runtime/api/message-part-runtime.d.ts +31 -0
- package/dist/runtime/api/message-part-runtime.d.ts.map +1 -0
- package/dist/runtime/api/message-part-runtime.js +67 -0
- package/dist/runtime/api/message-part-runtime.js.map +1 -0
- package/dist/runtime/api/message-runtime.d.ts +91 -0
- package/dist/runtime/api/message-runtime.d.ts.map +1 -0
- package/dist/runtime/api/message-runtime.js +199 -0
- package/dist/runtime/api/message-runtime.js.map +1 -0
- package/dist/runtime/api/paths.d.ts +64 -0
- package/dist/runtime/api/paths.d.ts.map +1 -0
- package/dist/runtime/api/paths.js +2 -0
- package/dist/runtime/api/paths.js.map +1 -0
- package/dist/runtime/api/thread-list-item-runtime.d.ts +50 -0
- package/dist/runtime/api/thread-list-item-runtime.d.ts.map +1 -0
- package/dist/runtime/api/thread-list-item-runtime.js +85 -0
- package/dist/runtime/api/thread-list-item-runtime.js.map +1 -0
- package/dist/runtime/api/thread-list-runtime.d.ts +44 -0
- package/dist/runtime/api/thread-list-runtime.d.ts.map +1 -0
- package/dist/runtime/api/thread-list-runtime.js +136 -0
- package/dist/runtime/api/thread-list-runtime.js.map +1 -0
- package/dist/runtime/api/thread-runtime.d.ts +272 -0
- package/dist/runtime/api/thread-runtime.d.ts.map +1 -0
- package/dist/runtime/api/thread-runtime.js +240 -0
- package/dist/runtime/api/thread-runtime.js.map +1 -0
- package/dist/runtime/base/base-assistant-runtime-core.d.ts +12 -0
- package/dist/runtime/base/base-assistant-runtime-core.d.ts.map +1 -0
- package/dist/runtime/base/base-assistant-runtime-core.js +11 -0
- package/dist/runtime/base/base-assistant-runtime-core.js.map +1 -0
- package/dist/runtime/base/base-composer-runtime-core.d.ts +55 -0
- package/dist/runtime/base/base-composer-runtime-core.d.ts.map +1 -0
- package/dist/runtime/base/base-composer-runtime-core.js +320 -0
- package/dist/runtime/base/base-composer-runtime-core.js.map +1 -0
- package/dist/runtime/base/base-thread-runtime-core.d.ts +67 -0
- package/dist/runtime/base/base-thread-runtime-core.d.ts.map +1 -0
- package/dist/runtime/base/base-thread-runtime-core.js +157 -0
- package/dist/runtime/base/base-thread-runtime-core.js.map +1 -0
- package/dist/runtime/base/default-edit-composer-runtime-core.d.ts +28 -0
- package/dist/runtime/base/default-edit-composer-runtime-core.d.ts.map +1 -0
- package/dist/runtime/base/default-edit-composer-runtime-core.js +49 -0
- package/dist/runtime/base/default-edit-composer-runtime-core.js.map +1 -0
- package/dist/runtime/base/default-thread-composer-runtime-core.d.ts +24 -0
- package/dist/runtime/base/default-thread-composer-runtime-core.d.ts.map +1 -0
- package/dist/runtime/base/default-thread-composer-runtime-core.js +41 -0
- package/dist/runtime/base/default-thread-composer-runtime-core.js.map +1 -0
- package/dist/runtime/index.d.ts +20 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +7 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/interfaces/assistant-runtime-core.d.ts +10 -0
- package/dist/runtime/interfaces/assistant-runtime-core.d.ts.map +1 -0
- package/dist/runtime/interfaces/assistant-runtime-core.js +2 -0
- package/dist/runtime/interfaces/assistant-runtime-core.js.map +1 -0
- package/dist/runtime/interfaces/composer-runtime-core.d.ts +38 -0
- package/dist/runtime/interfaces/composer-runtime-core.d.ts.map +1 -0
- package/dist/runtime/interfaces/composer-runtime-core.js +2 -0
- package/dist/runtime/interfaces/composer-runtime-core.js.map +1 -0
- package/dist/runtime/interfaces/thread-list-runtime-core.d.ts +37 -0
- package/dist/runtime/interfaces/thread-list-runtime-core.d.ts.map +1 -0
- package/dist/runtime/interfaces/thread-list-runtime-core.js +2 -0
- package/dist/runtime/interfaces/thread-list-runtime-core.js.map +1 -0
- package/dist/runtime/interfaces/thread-runtime-core.d.ts +97 -0
- package/dist/runtime/interfaces/thread-runtime-core.d.ts.map +1 -0
- package/dist/runtime/interfaces/thread-runtime-core.js +2 -0
- package/dist/runtime/interfaces/thread-runtime-core.js.map +1 -0
- package/dist/runtime/internal.d.ts +23 -0
- package/dist/runtime/internal.d.ts.map +1 -0
- package/dist/runtime/internal.js +25 -0
- package/dist/runtime/internal.js.map +1 -0
- package/dist/runtime/utils/auto-status.d.ts +5 -0
- package/dist/runtime/utils/auto-status.d.ts.map +1 -0
- package/dist/runtime/utils/auto-status.js +32 -0
- package/dist/runtime/utils/auto-status.js.map +1 -0
- package/dist/runtime/utils/chat-model-adapter.d.ts +40 -0
- package/dist/runtime/utils/chat-model-adapter.d.ts.map +1 -0
- package/dist/runtime/utils/chat-model-adapter.js +2 -0
- package/dist/runtime/utils/chat-model-adapter.js.map +1 -0
- package/dist/runtime/utils/external-store-message.d.ts +10 -0
- package/dist/runtime/utils/external-store-message.d.ts.map +1 -0
- package/dist/runtime/utils/external-store-message.js +22 -0
- package/dist/runtime/utils/external-store-message.js.map +1 -0
- package/dist/runtime/utils/message-repository.d.ts +43 -0
- package/dist/runtime/utils/message-repository.d.ts.map +1 -0
- package/dist/runtime/utils/message-repository.js +257 -0
- package/dist/runtime/utils/message-repository.js.map +1 -0
- package/dist/runtime/utils/thread-message-like.d.ts +34 -0
- package/dist/runtime/utils/thread-message-like.d.ts.map +1 -0
- package/dist/runtime/utils/thread-message-like.js +129 -0
- package/dist/runtime/utils/thread-message-like.js.map +1 -0
- package/dist/runtimes/assistant-transport/utils.d.ts +11 -0
- package/dist/runtimes/assistant-transport/utils.d.ts.map +1 -0
- package/dist/runtimes/assistant-transport/utils.js +20 -0
- package/dist/runtimes/assistant-transport/utils.js.map +1 -0
- package/dist/runtimes/external-store/external-store-adapter.d.ts +81 -0
- package/dist/runtimes/external-store/external-store-adapter.d.ts.map +1 -0
- package/dist/runtimes/external-store/external-store-adapter.js +2 -0
- package/dist/runtimes/external-store/external-store-adapter.js.map +1 -0
- package/dist/runtimes/external-store/external-store-runtime-core.d.ts +9 -0
- package/dist/runtimes/external-store/external-store-runtime-core.d.ts.map +1 -0
- package/dist/runtimes/external-store/external-store-runtime-core.js +19 -0
- package/dist/runtimes/external-store/external-store-runtime-core.js.map +1 -0
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts +42 -0
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.d.ts.map +1 -0
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.js +174 -0
- package/dist/runtimes/external-store/external-store-thread-list-runtime-core.js.map +1 -0
- package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts +47 -0
- package/dist/runtimes/external-store/external-store-thread-runtime-core.d.ts.map +1 -0
- package/dist/runtimes/external-store/external-store-thread-runtime-core.js +260 -0
- package/dist/runtimes/external-store/external-store-thread-runtime-core.js.map +1 -0
- package/dist/runtimes/external-store/index.d.ts +8 -0
- package/dist/runtimes/external-store/index.d.ts.map +1 -0
- package/dist/runtimes/external-store/index.js +5 -0
- package/dist/runtimes/external-store/index.js.map +1 -0
- package/dist/runtimes/external-store/thread-message-converter.d.ts +7 -0
- package/dist/runtimes/external-store/thread-message-converter.d.ts.map +1 -0
- package/dist/runtimes/external-store/thread-message-converter.js +12 -0
- package/dist/runtimes/external-store/thread-message-converter.js.map +1 -0
- package/dist/runtimes/index.d.ts +6 -0
- package/dist/runtimes/index.d.ts.map +1 -0
- package/dist/runtimes/index.js +4 -0
- package/dist/runtimes/index.js.map +1 -0
- package/dist/runtimes/internal.d.ts +18 -0
- package/dist/runtimes/internal.d.ts.map +1 -0
- package/dist/runtimes/internal.js +15 -0
- package/dist/runtimes/internal.js.map +1 -0
- package/dist/runtimes/local/index.d.ts +7 -0
- package/dist/runtimes/local/index.d.ts.map +1 -0
- package/dist/runtimes/local/index.js +5 -0
- package/dist/runtimes/local/index.js.map +1 -0
- package/dist/runtimes/local/local-runtime-core.d.ts +11 -0
- package/dist/runtimes/local/local-runtime-core.d.ts.map +1 -0
- package/dist/runtimes/local/local-runtime-core.js +22 -0
- package/dist/runtimes/local/local-runtime-core.js.map +1 -0
- package/dist/runtimes/local/local-runtime-options.d.ts +23 -0
- package/dist/runtimes/local/local-runtime-options.d.ts.map +1 -0
- package/dist/runtimes/local/local-runtime-options.js +2 -0
- package/dist/runtimes/local/local-runtime-options.js.map +1 -0
- package/dist/runtimes/local/local-thread-list-runtime-core.d.ts +46 -0
- package/dist/runtimes/local/local-thread-list-runtime-core.d.ts.map +1 -0
- package/dist/runtimes/local/local-thread-list-runtime-core.js +87 -0
- package/dist/runtimes/local/local-thread-list-runtime-core.js.map +1 -0
- package/dist/runtimes/local/local-thread-runtime-core.d.ts +59 -0
- package/dist/runtimes/local/local-thread-runtime-core.d.ts.map +1 -0
- package/dist/runtimes/local/local-thread-runtime-core.js +423 -0
- package/dist/runtimes/local/local-thread-runtime-core.js.map +1 -0
- package/dist/runtimes/local/should-continue.d.ts +3 -0
- package/dist/runtimes/local/should-continue.d.ts.map +1 -0
- package/dist/runtimes/local/should-continue.js +14 -0
- package/dist/runtimes/local/should-continue.js.map +1 -0
- package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts +13 -0
- package/dist/runtimes/remote-thread-list/adapter/in-memory.d.ts.map +1 -0
- package/dist/runtimes/remote-thread-list/adapter/in-memory.js +29 -0
- package/dist/runtimes/remote-thread-list/adapter/in-memory.js.map +1 -0
- package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts +3 -0
- package/dist/runtimes/remote-thread-list/empty-thread-core.d.ts.map +1 -0
- package/dist/runtimes/remote-thread-list/empty-thread-core.js +146 -0
- package/dist/runtimes/remote-thread-list/empty-thread-core.js.map +1 -0
- package/dist/runtimes/remote-thread-list/optimistic-state.d.ts +23 -0
- package/dist/runtimes/remote-thread-list/optimistic-state.d.ts.map +1 -0
- package/dist/runtimes/remote-thread-list/optimistic-state.js +57 -0
- package/dist/runtimes/remote-thread-list/optimistic-state.js.map +1 -0
- package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts +37 -0
- package/dist/runtimes/remote-thread-list/remote-thread-state.d.ts.map +1 -0
- package/dist/runtimes/remote-thread-list/remote-thread-state.js +62 -0
- package/dist/runtimes/remote-thread-list/remote-thread-state.js.map +1 -0
- package/dist/runtimes/remote-thread-list/types.d.ts +38 -0
- package/dist/runtimes/remote-thread-list/types.d.ts.map +1 -0
- package/dist/runtimes/remote-thread-list/types.js +2 -0
- package/dist/runtimes/remote-thread-list/types.js.map +1 -0
- package/dist/store/clients/chain-of-thought-client.d.ts +15 -0
- package/dist/store/clients/chain-of-thought-client.d.ts.map +1 -0
- package/dist/store/clients/chain-of-thought-client.js +18 -0
- package/dist/store/clients/chain-of-thought-client.js.map +1 -0
- package/dist/store/clients/index.d.ts +6 -0
- package/dist/store/clients/index.d.ts.map +1 -0
- package/dist/store/clients/index.js +6 -0
- package/dist/store/clients/index.js.map +1 -0
- package/dist/store/clients/model-context-client.d.ts +3 -0
- package/dist/store/clients/model-context-client.d.ts.map +1 -0
- package/dist/store/clients/model-context-client.js +14 -0
- package/dist/store/clients/model-context-client.js.map +1 -0
- package/dist/store/clients/no-op-composer-client.d.ts +7 -0
- package/dist/store/clients/no-op-composer-client.d.ts.map +1 -0
- package/dist/store/clients/no-op-composer-client.js +61 -0
- package/dist/store/clients/no-op-composer-client.js.map +1 -0
- package/dist/store/clients/suggestions.d.ts +11 -0
- package/dist/store/clients/suggestions.d.ts.map +1 -0
- package/dist/store/clients/suggestions.js +37 -0
- package/dist/store/clients/suggestions.js.map +1 -0
- package/dist/store/clients/thread-message-client.d.ts +11 -0
- package/dist/store/clients/thread-message-client.d.ts.map +1 -0
- package/dist/store/clients/thread-message-client.js +112 -0
- package/dist/store/clients/thread-message-client.js.map +1 -0
- package/dist/store/index.d.ts +14 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +14 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/internal.d.ts +11 -0
- package/dist/store/internal.d.ts.map +1 -0
- package/dist/store/internal.js +12 -0
- package/dist/store/internal.js.map +1 -0
- package/dist/store/runtime-clients/attachment-runtime-client.d.ts +8 -0
- package/dist/store/runtime-clients/attachment-runtime-client.d.ts.map +1 -0
- package/dist/store/runtime-clients/attachment-runtime-client.js +11 -0
- package/dist/store/runtime-clients/attachment-runtime-client.js.map +1 -0
- package/dist/store/runtime-clients/composer-runtime-client.d.ts +13 -0
- package/dist/store/runtime-clients/composer-runtime-client.d.ts.map +1 -0
- package/dist/store/runtime-clients/composer-runtime-client.js +83 -0
- package/dist/store/runtime-clients/composer-runtime-client.js.map +1 -0
- package/dist/store/runtime-clients/index.d.ts +8 -0
- package/dist/store/runtime-clients/index.d.ts.map +1 -0
- package/dist/store/runtime-clients/index.js +8 -0
- package/dist/store/runtime-clients/index.js.map +1 -0
- package/dist/store/runtime-clients/message-part-runtime-client.d.ts +8 -0
- package/dist/store/runtime-clients/message-part-runtime-client.d.ts.map +1 -0
- package/dist/store/runtime-clients/message-part-runtime-client.js +12 -0
- package/dist/store/runtime-clients/message-part-runtime-client.js.map +1 -0
- package/dist/store/runtime-clients/message-runtime-client.d.ts +11 -0
- package/dist/store/runtime-clients/message-runtime-client.d.ts.map +1 -0
- package/dist/store/runtime-clients/message-runtime-client.js +78 -0
- package/dist/store/runtime-clients/message-runtime-client.js.map +1 -0
- package/dist/store/runtime-clients/tap-subscribable.d.ts +3 -0
- package/dist/store/runtime-clients/tap-subscribable.d.ts.map +1 -0
- package/dist/store/runtime-clients/tap-subscribable.js +12 -0
- package/dist/store/runtime-clients/tap-subscribable.js.map +1 -0
- package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts +8 -0
- package/dist/store/runtime-clients/thread-list-item-runtime-client.d.ts.map +1 -0
- package/dist/store/runtime-clients/thread-list-item-runtime-client.js +41 -0
- package/dist/store/runtime-clients/thread-list-item-runtime-client.js.map +1 -0
- package/dist/store/runtime-clients/thread-list-runtime-client.d.ts +10 -0
- package/dist/store/runtime-clients/thread-list-runtime-client.d.ts.map +1 -0
- package/dist/store/runtime-clients/thread-list-runtime-client.js +54 -0
- package/dist/store/runtime-clients/thread-list-runtime-client.js.map +1 -0
- package/dist/store/runtime-clients/thread-runtime-client.d.ts +8 -0
- package/dist/store/runtime-clients/thread-runtime-client.d.ts.map +1 -0
- package/dist/store/runtime-clients/thread-runtime-client.js +91 -0
- package/dist/store/runtime-clients/thread-runtime-client.js.map +1 -0
- package/dist/store/scopes/attachment.d.ts +23 -0
- package/dist/store/scopes/attachment.d.ts.map +1 -0
- package/dist/store/scopes/attachment.js +2 -0
- package/dist/store/scopes/attachment.js.map +1 -0
- package/dist/store/scopes/chain-of-thought.d.ts +39 -0
- package/dist/store/scopes/chain-of-thought.d.ts.map +1 -0
- package/dist/store/scopes/chain-of-thought.js +2 -0
- package/dist/store/scopes/chain-of-thought.js.map +1 -0
- package/dist/store/scopes/composer.d.ts +75 -0
- package/dist/store/scopes/composer.d.ts.map +1 -0
- package/dist/store/scopes/composer.js +2 -0
- package/dist/store/scopes/composer.js.map +1 -0
- package/dist/store/scopes/index.d.ts +12 -0
- package/dist/store/scopes/index.d.ts.map +1 -0
- package/dist/store/scopes/index.js +2 -0
- package/dist/store/scopes/index.js.map +1 -0
- package/dist/store/scopes/message.d.ts +86 -0
- package/dist/store/scopes/message.d.ts.map +1 -0
- package/dist/store/scopes/message.js +2 -0
- package/dist/store/scopes/message.js.map +1 -0
- package/dist/store/scopes/model-context.d.ts +11 -0
- package/dist/store/scopes/model-context.d.ts.map +1 -0
- package/dist/store/scopes/model-context.js +2 -0
- package/dist/store/scopes/model-context.js.map +1 -0
- package/dist/store/scopes/part.d.ts +44 -0
- package/dist/store/scopes/part.d.ts.map +1 -0
- package/dist/store/scopes/part.js +2 -0
- package/dist/store/scopes/part.js.map +1 -0
- package/dist/store/scopes/suggestion.d.ts +19 -0
- package/dist/store/scopes/suggestion.d.ts.map +1 -0
- package/dist/store/scopes/suggestion.js +2 -0
- package/dist/store/scopes/suggestion.js.map +1 -0
- package/dist/store/scopes/suggestions.d.ts +19 -0
- package/dist/store/scopes/suggestions.d.ts.map +1 -0
- package/dist/store/scopes/suggestions.js +2 -0
- package/dist/store/scopes/suggestions.js.map +1 -0
- package/dist/store/scopes/thread-list-item.d.ts +50 -0
- package/dist/store/scopes/thread-list-item.d.ts.map +1 -0
- package/dist/store/scopes/thread-list-item.js +2 -0
- package/dist/store/scopes/thread-list-item.js.map +1 -0
- package/dist/store/scopes/thread.d.ts +135 -0
- package/dist/store/scopes/thread.d.ts.map +1 -0
- package/dist/store/scopes/thread.js +2 -0
- package/dist/store/scopes/thread.js.map +1 -0
- package/dist/store/scopes/threads.d.ts +29 -0
- package/dist/store/scopes/threads.d.ts.map +1 -0
- package/dist/store/scopes/threads.js +2 -0
- package/dist/store/scopes/threads.js.map +1 -0
- package/dist/store/types/client.d.ts +137 -0
- package/dist/store/types/client.d.ts.map +1 -0
- package/dist/store/types/client.js +2 -0
- package/dist/store/types/client.js.map +1 -0
- package/dist/store/types/events.d.ts +33 -0
- package/dist/store/types/events.d.ts.map +1 -0
- package/dist/store/types/events.js +8 -0
- package/dist/store/types/events.js.map +1 -0
- package/dist/store/types/index.d.ts +3 -0
- package/dist/store/types/index.d.ts.map +1 -0
- package/dist/store/types/index.js +2 -0
- package/dist/store/types/index.js.map +1 -0
- package/dist/store/utils/attach-transform-scopes.d.ts +11 -0
- package/dist/store/utils/attach-transform-scopes.d.ts.map +1 -0
- package/dist/store/utils/attach-transform-scopes.js +12 -0
- package/dist/store/utils/attach-transform-scopes.js.map +1 -0
- package/dist/store/utils/base-proxy-handler.d.ts +23 -0
- package/dist/store/utils/base-proxy-handler.d.ts.map +1 -0
- package/dist/store/utils/base-proxy-handler.js +46 -0
- package/dist/store/utils/base-proxy-handler.js.map +1 -0
- package/dist/store/utils/derived.d.ts +34 -0
- package/dist/store/utils/derived.d.ts.map +1 -0
- package/dist/store/utils/derived.js +24 -0
- package/dist/store/utils/derived.js.map +1 -0
- package/dist/store/utils/index.d.ts +7 -0
- package/dist/store/utils/index.d.ts.map +1 -0
- package/dist/store/utils/index.js +7 -0
- package/dist/store/utils/index.js.map +1 -0
- package/dist/store/utils/notification-manager.d.ts +11 -0
- package/dist/store/utils/notification-manager.d.ts.map +1 -0
- package/dist/store/utils/notification-manager.js +84 -0
- package/dist/store/utils/notification-manager.js.map +1 -0
- package/dist/store/utils/proxied-assistant-state.d.ts +8 -0
- package/dist/store/utils/proxied-assistant-state.d.ts.map +1 -0
- package/dist/store/utils/proxied-assistant-state.js +33 -0
- package/dist/store/utils/proxied-assistant-state.js.map +1 -0
- package/dist/store/utils/split-clients.d.ts +10 -0
- package/dist/store/utils/split-clients.d.ts.map +1 -0
- package/dist/store/utils/split-clients.js +53 -0
- package/dist/store/utils/split-clients.js.map +1 -0
- package/dist/store/utils/tap-assistant-context.d.ts +19 -0
- package/dist/store/utils/tap-assistant-context.d.ts.map +1 -0
- package/dist/store/utils/tap-assistant-context.js +23 -0
- package/dist/store/utils/tap-assistant-context.js.map +1 -0
- package/dist/store/utils/tap-client-list.d.ts +28 -0
- package/dist/store/utils/tap-client-list.d.ts.map +1 -0
- package/dist/store/utils/tap-client-list.js +68 -0
- package/dist/store/utils/tap-client-list.js.map +1 -0
- package/dist/store/utils/tap-client-lookup.d.ts +15 -0
- package/dist/store/utils/tap-client-lookup.d.ts.map +1 -0
- package/dist/store/utils/tap-client-lookup.js +42 -0
- package/dist/store/utils/tap-client-lookup.js.map +1 -0
- package/dist/store/utils/tap-client-resource.d.ts +13 -0
- package/dist/store/utils/tap-client-resource.d.ts.map +1 -0
- package/dist/store/utils/tap-client-resource.js +114 -0
- package/dist/store/utils/tap-client-resource.js.map +1 -0
- package/dist/store/utils/tap-client-stack-context.d.ts +23 -0
- package/dist/store/utils/tap-client-stack-context.d.ts.map +1 -0
- package/dist/store/utils/tap-client-stack-context.js +28 -0
- package/dist/store/utils/tap-client-stack-context.js.map +1 -0
- package/dist/store/utils/wrapper-resource.d.ts +3 -0
- package/dist/store/utils/wrapper-resource.d.ts.map +1 -0
- package/dist/store/utils/wrapper-resource.js +11 -0
- package/dist/store/utils/wrapper-resource.js.map +1 -0
- package/dist/subscribable/index.d.ts +3 -0
- package/dist/subscribable/index.d.ts.map +1 -0
- package/dist/subscribable/index.js +8 -0
- package/dist/subscribable/index.js.map +1 -0
- package/dist/subscribable/subscribable.d.ts +68 -0
- package/dist/subscribable/subscribable.d.ts.map +1 -0
- package/dist/subscribable/subscribable.js +237 -0
- package/dist/subscribable/subscribable.js.map +1 -0
- package/dist/types/attachment.d.ts +35 -0
- package/dist/types/attachment.d.ts.map +1 -0
- package/dist/types/attachment.js +2 -0
- package/dist/types/attachment.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/message.d.ts +179 -0
- package/dist/types/message.d.ts.map +1 -0
- package/dist/types/message.js +2 -0
- package/dist/types/message.js.map +1 -0
- package/dist/types/quote.d.ts +5 -0
- package/dist/types/quote.d.ts.map +1 -0
- package/dist/types/quote.js +2 -0
- package/dist/types/quote.js.map +1 -0
- package/dist/types/unsubscribe.d.ts +2 -0
- package/dist/types/unsubscribe.d.ts.map +1 -0
- package/dist/types/unsubscribe.js +2 -0
- package/dist/types/unsubscribe.js.map +1 -0
- package/dist/utils/composite-context-provider.d.ts +10 -0
- package/dist/utils/composite-context-provider.d.ts.map +1 -0
- package/dist/utils/composite-context-provider.js +29 -0
- package/dist/utils/composite-context-provider.js.map +1 -0
- package/dist/utils/id.d.ts +6 -0
- package/dist/utils/id.d.ts.map +1 -0
- package/dist/utils/id.js +9 -0
- package/dist/utils/id.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/text.d.ts +3 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +5 -0
- package/dist/utils/text.js.map +1 -0
- package/package.json +85 -0
- package/src/adapters/attachment.ts +209 -0
- package/src/adapters/feedback.ts +10 -0
- package/src/adapters/index.ts +30 -0
- package/src/adapters/speech.ts +338 -0
- package/src/adapters/suggestion.ts +14 -0
- package/src/adapters/thread-history.ts +72 -0
- package/src/index.ts +7 -0
- package/src/internal.ts +7 -0
- package/src/model-context/frame/host.ts +195 -0
- package/src/model-context/frame/index.ts +10 -0
- package/src/model-context/frame/provider.ts +193 -0
- package/src/model-context/frame/types.ts +40 -0
- package/src/model-context/index.ts +35 -0
- package/src/model-context/registry-handles.ts +18 -0
- package/src/model-context/registry.ts +159 -0
- package/src/model-context/tool.ts +9 -0
- package/src/model-context/types.ts +104 -0
- package/src/runtime/api/assistant-runtime.ts +115 -0
- package/src/runtime/api/attachment-runtime.ts +119 -0
- package/src/runtime/api/bindings.ts +49 -0
- package/src/runtime/api/composer-runtime.ts +505 -0
- package/src/runtime/api/message-part-runtime.ts +108 -0
- package/src/runtime/api/message-runtime.ts +335 -0
- package/src/runtime/api/paths.ts +61 -0
- package/src/runtime/api/thread-list-item-runtime.ts +145 -0
- package/src/runtime/api/thread-list-runtime.ts +227 -0
- package/src/runtime/api/thread-runtime.ts +568 -0
- package/src/runtime/base/base-assistant-runtime-core.ts +20 -0
- package/src/runtime/base/base-composer-runtime-core.ts +418 -0
- package/src/runtime/base/base-thread-runtime-core.ts +234 -0
- package/src/runtime/base/default-edit-composer-runtime-core.ts +71 -0
- package/src/runtime/base/default-thread-composer-runtime-core.ts +65 -0
- package/src/runtime/index.ts +108 -0
- package/src/runtime/interfaces/assistant-runtime-core.ts +12 -0
- package/src/runtime/interfaces/composer-runtime-core.ts +64 -0
- package/src/runtime/interfaces/thread-list-runtime-core.ts +49 -0
- package/src/runtime/interfaces/thread-runtime-core.ts +142 -0
- package/src/runtime/internal.ts +64 -0
- package/src/runtime/utils/auto-status.ts +67 -0
- package/src/runtime/utils/chat-model-adapter.ts +66 -0
- package/src/runtime/utils/external-store-message.ts +37 -0
- package/src/runtime/utils/message-repository.ts +390 -0
- package/src/runtime/utils/thread-message-like.ts +225 -0
- package/src/runtimes/assistant-transport/utils.ts +37 -0
- package/src/runtimes/external-store/external-store-adapter.ts +111 -0
- package/src/runtimes/external-store/external-store-runtime-core.ts +26 -0
- package/src/runtimes/external-store/external-store-thread-list-runtime-core.ts +235 -0
- package/src/runtimes/external-store/external-store-thread-runtime-core.ts +368 -0
- package/src/runtimes/external-store/index.ts +15 -0
- package/src/runtimes/external-store/thread-message-converter.ts +23 -0
- package/src/runtimes/index.ts +28 -0
- package/src/runtimes/internal.ts +36 -0
- package/src/runtimes/local/index.ts +6 -0
- package/src/runtimes/local/local-runtime-core.ts +32 -0
- package/src/runtimes/local/local-runtime-options.ts +27 -0
- package/src/runtimes/local/local-thread-list-runtime-core.ts +116 -0
- package/src/runtimes/local/local-thread-runtime-core.ts +534 -0
- package/src/runtimes/local/should-continue.ts +26 -0
- package/src/runtimes/remote-thread-list/adapter/in-memory.ts +43 -0
- package/src/runtimes/remote-thread-list/empty-thread-core.ts +200 -0
- package/src/runtimes/remote-thread-list/optimistic-state.ts +89 -0
- package/src/runtimes/remote-thread-list/remote-thread-state.ts +123 -0
- package/src/runtimes/remote-thread-list/types.ts +48 -0
- package/src/store/clients/chain-of-thought-client.ts +40 -0
- package/src/store/clients/index.ts +8 -0
- package/src/store/clients/model-context-client.ts +20 -0
- package/src/store/clients/no-op-composer-client.ts +66 -0
- package/src/store/clients/suggestions.ts +69 -0
- package/src/store/clients/thread-message-client.ts +170 -0
- package/src/store/index.ts +44 -0
- package/src/store/internal.ts +32 -0
- package/src/store/runtime-clients/attachment-runtime-client.ts +16 -0
- package/src/store/runtime-clients/composer-runtime-client.ts +131 -0
- package/src/store/runtime-clients/index.ts +7 -0
- package/src/store/runtime-clients/message-part-runtime-client.ts +17 -0
- package/src/store/runtime-clients/message-runtime-client.ts +141 -0
- package/src/store/runtime-clients/tap-subscribable.ts +16 -0
- package/src/store/runtime-clients/thread-list-item-runtime-client.ts +53 -0
- package/src/store/runtime-clients/thread-list-runtime-client.ts +86 -0
- package/src/store/runtime-clients/thread-runtime-client.ts +141 -0
- package/src/store/scopes/attachment.ts +20 -0
- package/src/store/scopes/chain-of-thought.ts +38 -0
- package/src/store/scopes/composer.ts +80 -0
- package/src/store/scopes/index.ts +68 -0
- package/src/store/scopes/message.ts +75 -0
- package/src/store/scopes/model-context.ts +13 -0
- package/src/store/scopes/part.ts +47 -0
- package/src/store/scopes/suggestion.ts +19 -0
- package/src/store/scopes/suggestions.ts +20 -0
- package/src/store/scopes/thread-list-item.ts +44 -0
- package/src/store/scopes/thread.ts +135 -0
- package/src/store/scopes/threads.ts +34 -0
- package/src/store/types/client.ts +203 -0
- package/src/store/types/events.ts +77 -0
- package/src/store/types/index.ts +23 -0
- package/src/store/utils/attach-transform-scopes.ts +38 -0
- package/src/store/utils/base-proxy-handler.ts +50 -0
- package/src/store/utils/derived.ts +46 -0
- package/src/store/utils/index.ts +28 -0
- package/src/store/utils/notification-manager.ts +114 -0
- package/src/store/utils/proxied-assistant-state.ts +55 -0
- package/src/store/utils/split-clients.ts +82 -0
- package/src/store/utils/tap-assistant-context.ts +58 -0
- package/src/store/utils/tap-client-list.ts +121 -0
- package/src/store/utils/tap-client-lookup.ts +79 -0
- package/src/store/utils/tap-client-resource.ts +187 -0
- package/src/store/utils/tap-client-stack-context.ts +51 -0
- package/src/store/utils/wrapper-resource.ts +17 -0
- package/src/subscribable/index.ts +21 -0
- package/src/subscribable/subscribable.ts +317 -0
- package/src/tests/BaseSubscribable.test.ts +54 -0
- package/src/tests/MessageRepository.test.ts +607 -0
- package/src/tests/OptimisticState-delete-crash.test.ts +206 -0
- package/src/types/attachment.ts +45 -0
- package/src/types/index.ts +39 -0
- package/src/types/message.ts +248 -0
- package/src/types/quote.ts +4 -0
- package/src/types/unsubscribe.ts +1 -0
- package/src/utils/composite-context-provider.ts +36 -0
- package/src/utils/id.ts +14 -0
- package/src/utils/index.ts +14 -0
- package/src/utils/text.ts +11 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ThreadMessage } from "../../types/index.js";
|
|
2
|
+
import type { ClientOutput } from "../types/client.js";
|
|
3
|
+
export type ThreadMessageClientProps = {
|
|
4
|
+
message: ThreadMessage;
|
|
5
|
+
index: number;
|
|
6
|
+
isLast?: boolean;
|
|
7
|
+
branchNumber?: number;
|
|
8
|
+
branchCount?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const ThreadMessageClient: (props: ThreadMessageClientProps) => import("@assistant-ui/tap").ResourceElement<ClientOutput<"message">, ThreadMessageClientProps>;
|
|
11
|
+
//# sourceMappingURL=thread-message-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-message-client.d.ts","sourceRoot":"","sources":["../../../src/store/clients/thread-message-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,aAAa,EACd,6BAAoB;AAQrB,OAAO,KAAK,EAAE,YAAY,EAAE,2BAAwB;AAwCpD,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,mBAAmB,qIA4G/B,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { resource, tapMemo, tapState, tapResource, withKey, } from "@assistant-ui/tap";
|
|
2
|
+
import { tapClientLookup } from "../utils/tap-client-lookup.js";
|
|
3
|
+
import { NoOpComposerClient } from "./no-op-composer-client.js";
|
|
4
|
+
const ThreadMessagePartClient = resource(({ part, }) => {
|
|
5
|
+
const state = tapMemo(() => {
|
|
6
|
+
return {
|
|
7
|
+
...part,
|
|
8
|
+
status: { type: "complete" },
|
|
9
|
+
};
|
|
10
|
+
}, [part]);
|
|
11
|
+
return {
|
|
12
|
+
getState: () => state,
|
|
13
|
+
addToolResult: () => {
|
|
14
|
+
throw new Error("Not supported");
|
|
15
|
+
},
|
|
16
|
+
resumeToolCall: () => {
|
|
17
|
+
throw new Error("Not supported");
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
const ThreadMessageAttachmentClient = resource(({ attachment }) => {
|
|
22
|
+
return {
|
|
23
|
+
getState: () => attachment,
|
|
24
|
+
remove: () => {
|
|
25
|
+
throw new Error("Not supported");
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
export const ThreadMessageClient = resource(({ message, index, isLast = true, branchNumber = 1, branchCount = 1, }) => {
|
|
30
|
+
const [isCopiedState, setIsCopied] = tapState(false);
|
|
31
|
+
const [isHoveringState, setIsHovering] = tapState(false);
|
|
32
|
+
const parts = tapClientLookup(() => message.content.map((part, idx) => withKey("toolCallId" in part && part.toolCallId != null
|
|
33
|
+
? `toolCallId-${part.toolCallId}`
|
|
34
|
+
: `index-${idx}`, ThreadMessagePartClient({ part }))), [message.content]);
|
|
35
|
+
const attachments = tapClientLookup(() => (message.attachments ?? []).map((attachment) => withKey(attachment.id, ThreadMessageAttachmentClient({ attachment }))), [message.attachments]);
|
|
36
|
+
const composer = tapResource(NoOpComposerClient({ type: "edit" }));
|
|
37
|
+
const composerState = composer.getState();
|
|
38
|
+
const state = tapMemo(() => {
|
|
39
|
+
return {
|
|
40
|
+
...message,
|
|
41
|
+
parts: parts.state,
|
|
42
|
+
composer: composerState,
|
|
43
|
+
parentId: null,
|
|
44
|
+
index,
|
|
45
|
+
isLast,
|
|
46
|
+
branchNumber,
|
|
47
|
+
branchCount,
|
|
48
|
+
speech: undefined,
|
|
49
|
+
submittedFeedback: message.metadata.submittedFeedback,
|
|
50
|
+
isCopied: isCopiedState,
|
|
51
|
+
isHovering: isHoveringState,
|
|
52
|
+
};
|
|
53
|
+
}, [
|
|
54
|
+
message,
|
|
55
|
+
index,
|
|
56
|
+
isCopiedState,
|
|
57
|
+
isHoveringState,
|
|
58
|
+
isLast,
|
|
59
|
+
parts.state,
|
|
60
|
+
composerState,
|
|
61
|
+
branchNumber,
|
|
62
|
+
branchCount,
|
|
63
|
+
]);
|
|
64
|
+
return {
|
|
65
|
+
getState: () => state,
|
|
66
|
+
composer: () => composer,
|
|
67
|
+
part: (selector) => {
|
|
68
|
+
if ("index" in selector) {
|
|
69
|
+
return parts.get({ index: selector.index });
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return parts.get({ key: `toolCallId-${selector.toolCallId}` });
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
attachment: (selector) => {
|
|
76
|
+
if ("id" in selector) {
|
|
77
|
+
return attachments.get({ key: selector.id });
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
return attachments.get(selector);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
reload: () => {
|
|
84
|
+
throw new Error("Not supported in ThreadMessageProvider");
|
|
85
|
+
},
|
|
86
|
+
speak: () => {
|
|
87
|
+
throw new Error("Not supported in ThreadMessageProvider");
|
|
88
|
+
},
|
|
89
|
+
stopSpeaking: () => {
|
|
90
|
+
throw new Error("Not supported in ThreadMessageProvider");
|
|
91
|
+
},
|
|
92
|
+
submitFeedback: () => {
|
|
93
|
+
throw new Error("Not supported in ThreadMessageProvider");
|
|
94
|
+
},
|
|
95
|
+
switchToBranch: () => {
|
|
96
|
+
throw new Error("Not supported in ThreadMessageProvider");
|
|
97
|
+
},
|
|
98
|
+
getCopyText: () => {
|
|
99
|
+
return message.content
|
|
100
|
+
.map((part) => {
|
|
101
|
+
if ("text" in part && typeof part.text === "string") {
|
|
102
|
+
return part.text;
|
|
103
|
+
}
|
|
104
|
+
return "";
|
|
105
|
+
})
|
|
106
|
+
.join("\n");
|
|
107
|
+
},
|
|
108
|
+
setIsCopied,
|
|
109
|
+
setIsHovering,
|
|
110
|
+
};
|
|
111
|
+
});
|
|
112
|
+
//# sourceMappingURL=thread-message-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-message-client.js","sourceRoot":"","sources":["../../../src/store/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AAC;QAC5D,CAAC;QACD,cAAc,EAAE,GAAG,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,WAAW,EAAE,GAAG,EAAE;YAChB,OAAO,OAAO,CAAC,OAAO;iBACnB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBACZ,IAAI,MAAM,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBACpD,OAAO,IAAI,CAAC,IAAI,CAAC;gBACnB,CAAC;gBACD,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC;QACD,WAAW;QACX,aAAa;KACd,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { Derived } from "./utils/derived.js";
|
|
2
|
+
export type { DerivedElement } from "./utils/derived.js";
|
|
3
|
+
export { attachTransformScopes } from "./utils/attach-transform-scopes.js";
|
|
4
|
+
export type { ScopesConfig } from "./utils/attach-transform-scopes.js";
|
|
5
|
+
export { tapAssistantClientRef, tapAssistantEmit, } from "./utils/tap-assistant-context.js";
|
|
6
|
+
export { tapClientResource } from "./utils/tap-client-resource.js";
|
|
7
|
+
export { tapClientLookup } from "./utils/tap-client-lookup.js";
|
|
8
|
+
export { tapClientList } from "./utils/tap-client-list.js";
|
|
9
|
+
export type { ScopeRegistry, ClientOutput, AssistantClient, AssistantState, ClientMethods, ClientSchema, ClientNames, ClientEvents, ClientMeta, ClientElement, Unsubscribe, AssistantClientAccessor, } from "./types/client.js";
|
|
10
|
+
export type { AssistantEventName, AssistantEventCallback, AssistantEventPayload, AssistantEventSelector, AssistantEventScope, } from "./types/events.js";
|
|
11
|
+
export { normalizeEventSelector } from "./types/events.js";
|
|
12
|
+
export * from "./scopes/index.js";
|
|
13
|
+
export * from "./clients/index.js";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAC1C,YAAY,EAAE,cAAc,EAAE,2BAAwB;AACtD,OAAO,EAAE,qBAAqB,EAAE,2CAAwC;AACxE,YAAY,EAAE,YAAY,EAAE,2CAAwC;AAGpE,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GACjB,yCAAsC;AACvC,OAAO,EAAE,iBAAiB,EAAE,uCAAoC;AAChE,OAAO,EAAE,eAAe,EAAE,qCAAkC;AAC5D,OAAO,EAAE,aAAa,EAAE,mCAAgC;AAGxD,YAAY,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,uBAAuB,GACxB,0BAAuB;AACxB,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,GACpB,0BAAuB;AACxB,OAAO,EAAE,sBAAsB,EAAE,0BAAuB;AAGxD,kCAAyB;AAGzB,mCAA0B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// resources
|
|
2
|
+
export { Derived } from "./utils/derived.js";
|
|
3
|
+
export { attachTransformScopes } from "./utils/attach-transform-scopes.js";
|
|
4
|
+
// tap hooks
|
|
5
|
+
export { tapAssistantClientRef, tapAssistantEmit, } from "./utils/tap-assistant-context.js";
|
|
6
|
+
export { tapClientResource } from "./utils/tap-client-resource.js";
|
|
7
|
+
export { tapClientLookup } from "./utils/tap-client-lookup.js";
|
|
8
|
+
export { tapClientList } from "./utils/tap-client-list.js";
|
|
9
|
+
export { normalizeEventSelector } from "./types/events.js";
|
|
10
|
+
// scopes
|
|
11
|
+
export * from "./scopes/index.js";
|
|
12
|
+
// clients
|
|
13
|
+
export * from "./clients/index.js";
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAE1C,OAAO,EAAE,qBAAqB,EAAE,2CAAwC;AAGxE,YAAY;AACZ,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GACjB,yCAAsC;AACvC,OAAO,EAAE,iBAAiB,EAAE,uCAAoC;AAChE,OAAO,EAAE,eAAe,EAAE,qCAAkC;AAC5D,OAAO,EAAE,aAAa,EAAE,mCAAgC;AAwBxD,OAAO,EAAE,sBAAsB,EAAE,0BAAuB;AAExD,SAAS;AACT,kCAAyB;AAEzB,UAAU;AACV,mCAA0B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { BaseProxyHandler, handleIntrospectionProp, } from "./utils/base-proxy-handler.js";
|
|
2
|
+
export { SYMBOL_CLIENT_INDEX, getClientIndex, type ClientStack, tapClientStack, tapWithClientStack, } from "./utils/tap-client-stack-context.js";
|
|
3
|
+
export { type AssistantTapContextValue, withAssistantTapContextProvider, } from "./utils/tap-assistant-context.js";
|
|
4
|
+
export { NotificationManager } from "./utils/notification-manager.js";
|
|
5
|
+
export { PROXIED_ASSISTANT_STATE_SYMBOL, createProxiedAssistantState, getProxiedAssistantState, } from "./utils/proxied-assistant-state.js";
|
|
6
|
+
export { type RootClients, type DerivedClients, tapSplitClients, } from "./utils/split-clients.js";
|
|
7
|
+
export { getClientState, ClientResource } from "./utils/tap-client-resource.js";
|
|
8
|
+
export { wrapperResource } from "./utils/wrapper-resource.js";
|
|
9
|
+
export { getTransformScopes } from "./utils/attach-transform-scopes.js";
|
|
10
|
+
export * from "./runtime-clients/index.js";
|
|
11
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/store/internal.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,uBAAuB,GACxB,sCAAmC;AACpC,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,KAAK,WAAW,EAChB,cAAc,EACd,kBAAkB,GACnB,4CAAyC;AAC1C,OAAO,EACL,KAAK,wBAAwB,EAC7B,+BAA+B,GAChC,yCAAsC;AACvC,OAAO,EAAE,mBAAmB,EAAE,wCAAqC;AACnE,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,wBAAwB,GACzB,2CAAwC;AACzC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,eAAe,GAChB,iCAA8B;AAC/B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,uCAAoC;AAC7E,OAAO,EAAE,eAAe,EAAE,oCAAiC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,2CAAwC;AACrE,2CAAkC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Internal utilities — consumed by @assistant-ui/store, not public API.
|
|
2
|
+
export { BaseProxyHandler, handleIntrospectionProp, } from "./utils/base-proxy-handler.js";
|
|
3
|
+
export { SYMBOL_CLIENT_INDEX, getClientIndex, tapClientStack, tapWithClientStack, } from "./utils/tap-client-stack-context.js";
|
|
4
|
+
export { withAssistantTapContextProvider, } from "./utils/tap-assistant-context.js";
|
|
5
|
+
export { NotificationManager } from "./utils/notification-manager.js";
|
|
6
|
+
export { PROXIED_ASSISTANT_STATE_SYMBOL, createProxiedAssistantState, getProxiedAssistantState, } from "./utils/proxied-assistant-state.js";
|
|
7
|
+
export { tapSplitClients, } from "./utils/split-clients.js";
|
|
8
|
+
export { getClientState, ClientResource } from "./utils/tap-client-resource.js";
|
|
9
|
+
export { wrapperResource } from "./utils/wrapper-resource.js";
|
|
10
|
+
export { getTransformScopes } from "./utils/attach-transform-scopes.js";
|
|
11
|
+
export * from "./runtime-clients/index.js";
|
|
12
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/store/internal.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE,OAAO,EACL,gBAAgB,EAChB,uBAAuB,GACxB,sCAAmC;AACpC,OAAO,EACL,mBAAmB,EACnB,cAAc,EAEd,cAAc,EACd,kBAAkB,GACnB,4CAAyC;AAC1C,OAAO,EAEL,+BAA+B,GAChC,yCAAsC;AACvC,OAAO,EAAE,mBAAmB,EAAE,wCAAqC;AACnE,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,wBAAwB,GACzB,2CAAwC;AACzC,OAAO,EAGL,eAAe,GAChB,iCAA8B;AAC/B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,uCAAoC;AAC7E,OAAO,EAAE,eAAe,EAAE,oCAAiC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,2CAAwC;AACrE,2CAAkC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ClientOutput } from "..//index.js";
|
|
2
|
+
import { AttachmentRuntime } from "../../runtime/index.js";
|
|
3
|
+
export declare const AttachmentRuntimeClient: (props: {
|
|
4
|
+
runtime: AttachmentRuntime;
|
|
5
|
+
}) => import("@assistant-ui/tap").ResourceElement<ClientOutput<"attachment">, {
|
|
6
|
+
runtime: AttachmentRuntime;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=attachment-runtime-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment-runtime-client.d.ts","sourceRoot":"","sources":["../../../src/store/runtime-clients/attachment-runtime-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,qBAAY;AACxC,OAAO,EAAE,iBAAiB,EAAE,+BAAsB;AAGlD,eAAO,MAAM,uBAAuB;aACT,iBAAiB;;aAAjB,iBAAiB;EAS3C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { resource } from "@assistant-ui/tap";
|
|
2
|
+
import { tapSubscribable } from "./tap-subscribable.js";
|
|
3
|
+
export const AttachmentRuntimeClient = resource(({ runtime }) => {
|
|
4
|
+
const state = tapSubscribable(runtime);
|
|
5
|
+
return {
|
|
6
|
+
getState: () => state,
|
|
7
|
+
remove: runtime.remove,
|
|
8
|
+
__internal_getRuntime: () => runtime,
|
|
9
|
+
};
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=attachment-runtime-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment-runtime-client.js","sourceRoot":"","sources":["../../../src/store/runtime-clients/attachment-runtime-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,eAAe,EAAE,8BAA2B;AAErD,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAC7C,CAAC,EAAE,OAAO,EAAkC,EAA8B,EAAE;IAC1E,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAEvC,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;QACrB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,qBAAqB,EAAE,GAAG,EAAE,CAAC,OAAO;KACrC,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type tapRef } from "@assistant-ui/tap";
|
|
2
|
+
import { type ClientOutput } from "..//index.js";
|
|
3
|
+
import { ComposerRuntime } from "../../runtime/index.js";
|
|
4
|
+
export declare const ComposerClient: (props: {
|
|
5
|
+
threadIdRef: tapRef.RefObject<string>;
|
|
6
|
+
messageIdRef?: tapRef.RefObject<string>;
|
|
7
|
+
runtime: ComposerRuntime;
|
|
8
|
+
}) => import("@assistant-ui/tap").ResourceElement<ClientOutput<"composer">, {
|
|
9
|
+
threadIdRef: tapRef.RefObject<string>;
|
|
10
|
+
messageIdRef?: tapRef.RefObject<string>;
|
|
11
|
+
runtime: ComposerRuntime;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=composer-runtime-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer-runtime-client.d.ts","sourceRoot":"","sources":["../../../src/store/runtime-clients/composer-runtime-client.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,MAAM,EAEZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,YAAY,EAAqC,qBAAY;AAC3E,OAAO,EACL,eAAe,EAGhB,+BAAsB;AAoBvB,eAAO,MAAM,cAAc;iBAMV,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;mBACtB,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;aAC9B,eAAe;;iBAFX,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;mBACtB,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;aAC9B,eAAe;EAwF3B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { resource, tapMemo, tapEffect, tapResource, withKey, } from "@assistant-ui/tap";
|
|
2
|
+
import { tapAssistantEmit, tapClientLookup } from "..//index.js";
|
|
3
|
+
import { AttachmentRuntimeClient } from "./attachment-runtime-client.js";
|
|
4
|
+
import { tapSubscribable } from "./tap-subscribable.js";
|
|
5
|
+
const ComposerAttachmentClientByIndex = resource(({ runtime, index }) => {
|
|
6
|
+
const attachmentRuntime = tapMemo(() => runtime.getAttachmentByIndex(index), [runtime, index]);
|
|
7
|
+
return tapResource(AttachmentRuntimeClient({
|
|
8
|
+
runtime: attachmentRuntime,
|
|
9
|
+
}));
|
|
10
|
+
});
|
|
11
|
+
export const ComposerClient = resource(({ threadIdRef, messageIdRef, runtime, }) => {
|
|
12
|
+
const runtimeState = tapSubscribable(runtime);
|
|
13
|
+
const emit = tapAssistantEmit();
|
|
14
|
+
// Bind composer events to event manager
|
|
15
|
+
tapEffect(() => {
|
|
16
|
+
const unsubscribers = [];
|
|
17
|
+
// Subscribe to composer events
|
|
18
|
+
const composerEvents = [
|
|
19
|
+
"send",
|
|
20
|
+
"attachmentAdd",
|
|
21
|
+
];
|
|
22
|
+
for (const event of composerEvents) {
|
|
23
|
+
const unsubscribe = runtime.unstable_on(event, () => {
|
|
24
|
+
emit(`composer.${event}`, {
|
|
25
|
+
threadId: threadIdRef.current,
|
|
26
|
+
...(messageIdRef && { messageId: messageIdRef.current }),
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
unsubscribers.push(unsubscribe);
|
|
30
|
+
}
|
|
31
|
+
return () => {
|
|
32
|
+
for (const unsub of unsubscribers)
|
|
33
|
+
unsub();
|
|
34
|
+
};
|
|
35
|
+
}, [runtime, emit, threadIdRef, messageIdRef]);
|
|
36
|
+
const attachments = tapClientLookup(() => runtimeState.attachments.map((attachment, idx) => withKey(attachment.id, ComposerAttachmentClientByIndex({
|
|
37
|
+
runtime,
|
|
38
|
+
index: idx,
|
|
39
|
+
}))), [runtimeState.attachments, runtime]);
|
|
40
|
+
const state = tapMemo(() => {
|
|
41
|
+
return {
|
|
42
|
+
text: runtimeState.text,
|
|
43
|
+
role: runtimeState.role,
|
|
44
|
+
attachments: attachments.state,
|
|
45
|
+
runConfig: runtimeState.runConfig,
|
|
46
|
+
isEditing: runtimeState.isEditing,
|
|
47
|
+
canCancel: runtimeState.canCancel,
|
|
48
|
+
attachmentAccept: runtimeState.attachmentAccept,
|
|
49
|
+
isEmpty: runtimeState.isEmpty,
|
|
50
|
+
type: runtimeState.type ?? "thread",
|
|
51
|
+
dictation: runtimeState.dictation,
|
|
52
|
+
quote: runtimeState.quote,
|
|
53
|
+
};
|
|
54
|
+
}, [runtimeState, attachments.state]);
|
|
55
|
+
return {
|
|
56
|
+
getState: () => state,
|
|
57
|
+
setText: runtime.setText,
|
|
58
|
+
setRole: runtime.setRole,
|
|
59
|
+
setRunConfig: runtime.setRunConfig,
|
|
60
|
+
addAttachment: runtime.addAttachment,
|
|
61
|
+
reset: runtime.reset,
|
|
62
|
+
clearAttachments: runtime.clearAttachments,
|
|
63
|
+
send: runtime.send,
|
|
64
|
+
cancel: runtime.cancel,
|
|
65
|
+
beginEdit: runtime.beginEdit ??
|
|
66
|
+
(() => {
|
|
67
|
+
throw new Error("beginEdit is not supported in this runtime");
|
|
68
|
+
}),
|
|
69
|
+
startDictation: runtime.startDictation,
|
|
70
|
+
stopDictation: runtime.stopDictation,
|
|
71
|
+
setQuote: runtime.setQuote,
|
|
72
|
+
attachment: (selector) => {
|
|
73
|
+
if ("id" in selector) {
|
|
74
|
+
return attachments.get({ key: selector.id });
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
return attachments.get(selector);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
__internal_getRuntime: () => runtime,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=composer-runtime-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composer-runtime-client.js","sourceRoot":"","sources":["../../../src/store/runtime-clients/composer-runtime-client.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,SAAS,EACT,WAAW,EAEX,OAAO,GACR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAqB,gBAAgB,EAAE,eAAe,EAAE,qBAAY;AAO3E,OAAO,EAAE,uBAAuB,EAAE,uCAAoC;AACtE,OAAO,EAAE,eAAe,EAAE,8BAA2B;AAErD,MAAM,+BAA+B,GAAG,QAAQ,CAC9C,CAAC,EAAE,OAAO,EAAE,KAAK,EAA+C,EAAE,EAAE;IAClE,MAAM,iBAAiB,GAAG,OAAO,CAC/B,GAAG,EAAE,CAAC,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,EACzC,CAAC,OAAO,EAAE,KAAK,CAAC,CACjB,CAAC;IAEF,OAAO,WAAW,CAChB,uBAAuB,CAAC;QACtB,OAA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AU,EAAE,CAAC,QAAQ,EAAE,EAAE;YACvB,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;gBACrB,OAAO,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;YAC/C,CAAC;iBAAM,CAAC;gBACN,OAAO,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;QACD,qBAAqB,EAAE,GAAG,EAAE,CAAC,OAAO;KACrC,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { AttachmentRuntimeClient } from "./attachment-runtime-client.js";
|
|
2
|
+
export { MessagePartClient } from "./message-part-runtime-client.js";
|
|
3
|
+
export { ComposerClient } from "./composer-runtime-client.js";
|
|
4
|
+
export { MessageClient } from "./message-runtime-client.js";
|
|
5
|
+
export { ThreadClient } from "./thread-runtime-client.js";
|
|
6
|
+
export { ThreadListItemClient } from "./thread-list-item-runtime-client.js";
|
|
7
|
+
export { ThreadListClient } from "./thread-list-runtime-client.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/runtime-clients/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uCAAoC;AACtE,OAAO,EAAE,iBAAiB,EAAE,yCAAsC;AAClE,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,aAAa,EAAE,oCAAiC;AACzD,OAAO,EAAE,YAAY,EAAE,mCAAgC;AACvD,OAAO,EAAE,oBAAoB,EAAE,6CAA0C;AACzE,OAAO,EAAE,gBAAgB,EAAE,wCAAqC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { AttachmentRuntimeClient } from "./attachment-runtime-client.js";
|
|
2
|
+
export { MessagePartClient } from "./message-part-runtime-client.js";
|
|
3
|
+
export { ComposerClient } from "./composer-runtime-client.js";
|
|
4
|
+
export { MessageClient } from "./message-runtime-client.js";
|
|
5
|
+
export { ThreadClient } from "./thread-runtime-client.js";
|
|
6
|
+
export { ThreadListItemClient } from "./thread-list-item-runtime-client.js";
|
|
7
|
+
export { ThreadListClient } from "./thread-list-runtime-client.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/runtime-clients/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uCAAoC;AACtE,OAAO,EAAE,iBAAiB,EAAE,yCAAsC;AAClE,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,aAAa,EAAE,oCAAiC;AACzD,OAAO,EAAE,YAAY,EAAE,mCAAgC;AACvD,OAAO,EAAE,oBAAoB,EAAE,6CAA0C;AACzE,OAAO,EAAE,gBAAgB,EAAE,wCAAqC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ClientOutput } from "..//index.js";
|
|
2
|
+
import { MessagePartRuntime } from "../../runtime/index.js";
|
|
3
|
+
export declare const MessagePartClient: (props: {
|
|
4
|
+
runtime: MessagePartRuntime;
|
|
5
|
+
}) => import("@assistant-ui/tap").ResourceElement<ClientOutput<"part">, {
|
|
6
|
+
runtime: MessagePartRuntime;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=message-part-runtime-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-part-runtime-client.d.ts","sourceRoot":"","sources":["../../../src/store/runtime-clients/message-part-runtime-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,qBAAY;AACxC,OAAO,EAAE,kBAAkB,EAAE,+BAAsB;AAGnD,eAAO,MAAM,iBAAiB;aACH,kBAAkB;;aAAlB,kBAAkB;EAU5C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { resource } from "@assistant-ui/tap";
|
|
2
|
+
import { tapSubscribable } from "./tap-subscribable.js";
|
|
3
|
+
export const MessagePartClient = resource(({ runtime }) => {
|
|
4
|
+
const state = tapSubscribable(runtime);
|
|
5
|
+
return {
|
|
6
|
+
getState: () => state,
|
|
7
|
+
addToolResult: (result) => runtime.addToolResult(result),
|
|
8
|
+
resumeToolCall: (payload) => runtime.resumeToolCall(payload),
|
|
9
|
+
__internal_getRuntime: () => runtime,
|
|
10
|
+
};
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=message-part-runtime-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-part-runtime-client.js","sourceRoot":"","sources":["../../../src/store/runtime-clients/message-part-runtime-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAG7C,OAAO,EAAE,eAAe,EAAE,8BAA2B;AAErD,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CACvC,CAAC,EAAE,OAAO,EAAmC,EAAwB,EAAE;IACrE,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IAEvC,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;QACrB,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC;QACxD,cAAc,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC;QAC5D,qBAAqB,EAAE,GAAG,EAAE,CAAC,OAAO;KACrC,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type tapRef } from "@assistant-ui/tap";
|
|
2
|
+
import { type ClientOutput } from "..//index.js";
|
|
3
|
+
import { MessageRuntime } from "../../runtime/index.js";
|
|
4
|
+
export declare const MessageClient: (props: {
|
|
5
|
+
runtime: MessageRuntime;
|
|
6
|
+
threadIdRef: tapRef.RefObject<string>;
|
|
7
|
+
}) => import("@assistant-ui/tap").ResourceElement<ClientOutput<"message">, {
|
|
8
|
+
runtime: MessageRuntime;
|
|
9
|
+
threadIdRef: tapRef.RefObject<string>;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=message-runtime-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-runtime-client.d.ts","sourceRoot":"","sources":["../../../src/store/runtime-clients/message-runtime-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,YAAY,EAAsC,qBAAY;AAC5E,OAAO,EAAE,cAAc,EAAE,+BAAsB;AA2B/C,eAAO,MAAM,aAAa;aAKb,cAAc;iBACV,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;;aAD5B,cAAc;iBACV,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;EAkGxC,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { withKey, resource, tapResource, tapMemo, tapState, } from "@assistant-ui/tap";
|
|
2
|
+
import { tapClientLookup, tapClientResource } from "..//index.js";
|
|
3
|
+
import { tapSubscribable } from "./tap-subscribable.js";
|
|
4
|
+
import { ComposerClient } from "./composer-runtime-client.js";
|
|
5
|
+
import { MessagePartClient } from "./message-part-runtime-client.js";
|
|
6
|
+
import { AttachmentRuntimeClient } from "./attachment-runtime-client.js";
|
|
7
|
+
const MessageAttachmentClientByIndex = resource(({ runtime, index }) => {
|
|
8
|
+
const attachmentRuntime = tapMemo(() => runtime.getAttachmentByIndex(index), [runtime, index]);
|
|
9
|
+
return tapResource(AttachmentRuntimeClient({ runtime: attachmentRuntime }));
|
|
10
|
+
});
|
|
11
|
+
const MessagePartByIndex = resource(({ runtime, index }) => {
|
|
12
|
+
const partRuntime = tapMemo(() => runtime.getMessagePartByIndex(index), [runtime, index]);
|
|
13
|
+
return tapResource(MessagePartClient({ runtime: partRuntime }));
|
|
14
|
+
});
|
|
15
|
+
export const MessageClient = resource(({ runtime, threadIdRef, }) => {
|
|
16
|
+
const runtimeState = tapSubscribable(runtime);
|
|
17
|
+
const [isCopiedState, setIsCopied] = tapState(false);
|
|
18
|
+
const [isHoveringState, setIsHovering] = tapState(false);
|
|
19
|
+
const messageIdRef = tapMemo(() => ({
|
|
20
|
+
get current() {
|
|
21
|
+
return runtime.getState().id;
|
|
22
|
+
},
|
|
23
|
+
}), [runtime]);
|
|
24
|
+
const composer = tapClientResource(ComposerClient({
|
|
25
|
+
runtime: runtime.composer,
|
|
26
|
+
threadIdRef,
|
|
27
|
+
messageIdRef,
|
|
28
|
+
}));
|
|
29
|
+
const parts = tapClientLookup(() => runtimeState.content.map((part, idx) => withKey("toolCallId" in part && part.toolCallId != null
|
|
30
|
+
? `toolCallId-${part.toolCallId}`
|
|
31
|
+
: `index-${idx}`, MessagePartByIndex({ runtime, index: idx }))), [runtimeState.content, runtime]);
|
|
32
|
+
const attachments = tapClientLookup(() => (runtimeState.attachments ?? []).map((attachment, idx) => withKey(attachment.id, MessageAttachmentClientByIndex({ runtime, index: idx }))), [runtimeState.attachments, runtime]);
|
|
33
|
+
const state = tapMemo(() => {
|
|
34
|
+
return {
|
|
35
|
+
...runtimeState,
|
|
36
|
+
parts: parts.state,
|
|
37
|
+
composer: composer.state,
|
|
38
|
+
isCopied: isCopiedState,
|
|
39
|
+
isHovering: isHoveringState,
|
|
40
|
+
};
|
|
41
|
+
}, [
|
|
42
|
+
runtimeState,
|
|
43
|
+
parts.state,
|
|
44
|
+
composer.state,
|
|
45
|
+
isCopiedState,
|
|
46
|
+
isHoveringState,
|
|
47
|
+
]);
|
|
48
|
+
return {
|
|
49
|
+
getState: () => state,
|
|
50
|
+
composer: () => composer.methods,
|
|
51
|
+
reload: (config) => runtime.reload(config),
|
|
52
|
+
speak: () => runtime.speak(),
|
|
53
|
+
stopSpeaking: () => runtime.stopSpeaking(),
|
|
54
|
+
submitFeedback: (feedback) => runtime.submitFeedback(feedback),
|
|
55
|
+
switchToBranch: (options) => runtime.switchToBranch(options),
|
|
56
|
+
getCopyText: () => runtime.unstable_getCopyText(),
|
|
57
|
+
part: (selector) => {
|
|
58
|
+
if ("index" in selector) {
|
|
59
|
+
return parts.get({ index: selector.index });
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return parts.get({ key: `toolCallId-${selector.toolCallId}` });
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
attachment: (selector) => {
|
|
66
|
+
if ("id" in selector) {
|
|
67
|
+
return attachments.get({ key: selector.id });
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
return attachments.get(selector);
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
setIsCopied,
|
|
74
|
+
setIsHovering,
|
|
75
|
+
__internal_getRuntime: () => runtime,
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=message-runtime-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-runtime-client.js","sourceRoot":"","sources":["../../../src/store/runtime-clients/message-runtime-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,WAAW,EACX,OAAO,EACP,QAAQ,GAET,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAqB,eAAe,EAAE,iBAAiB,EAAE,qBAAY;AAE5E,OAAO,EAAE,eAAe,EAAE,8BAA2B;AACrD,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,yCAAsC;AAElE,OAAO,EAAE,uBAAuB,EAAE,uCAAoC;AAEtE,MAAM,8BAA8B,GAAG,QAAQ,CAC7C,CAAC,EAAE,OAAO,EAAE,KAAK,EAA8C,EAAE,EAAE;IACjE,MAAM,iBAAiB,GAAG,OAAO,CAC/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qB,EAAE,oCAA2B;AAEhE,eAAO,MAAM,eAAe,GAAI,CAAC,EAC/B,cAAc,IAAI,CAAC,qBAAqB,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAW1D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { tapState, tapEffect } from "@assistant-ui/tap";
|
|
2
|
+
export const tapSubscribable = (subscribable) => {
|
|
3
|
+
const [, setState] = tapState(subscribable.getState);
|
|
4
|
+
tapEffect(() => {
|
|
5
|
+
setState(subscribable.getState());
|
|
6
|
+
return subscribable.subscribe(() => {
|
|
7
|
+
setState(subscribable.getState());
|
|
8
|
+
});
|
|
9
|
+
}, [subscribable]);
|
|
10
|
+
return subscribable.getState();
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=tap-subscribable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tap-subscribable.js","sourceRoot":"","sources":["../../../src/store/runtime-clients/tap-subscribable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,YAAyD,EACzD,EAAE;IACF,MAAM,CAAC,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACrD,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;QAClC,OAAO,YAAY,CAAC,SAAS,CAAC,GAAG,EAAE;YACjC,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,YAAY,CAAC,QAAQ,EAAE,CAAC;AACjC,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ClientOutput } from "..//index.js";
|
|
2
|
+
import { ThreadListItemRuntime } from "../../runtime/index.js";
|
|
3
|
+
export declare const ThreadListItemClient: (props: {
|
|
4
|
+
runtime: ThreadListItemRuntime;
|
|
5
|
+
}) => import("@assistant-ui/tap").ResourceElement<ClientOutput<"threadListItem">, {
|
|
6
|
+
runtime: ThreadListItemRuntime;
|
|
7
|
+
}>;
|
|
8
|
+
//# sourceMappingURL=thread-list-item-runtime-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-list-item-runtime-client.d.ts","sourceRoot":"","sources":["../../../src/store/runtime-clients/thread-list-item-runtime-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAoB,qBAAY;AAC1D,OAAO,EAA2B,qBAAqB,EAAE,+BAAsB;AAG/E,eAAO,MAAM,oBAAoB;aAIpB,qBAAqB;;aAArB,qBAAqB;EA0CjC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { resource, tapEffect } from "@assistant-ui/tap";
|
|
2
|
+
import { tapAssistantEmit } from "..//index.js";
|
|
3
|
+
import { tapSubscribable } from "./tap-subscribable.js";
|
|
4
|
+
export const ThreadListItemClient = resource(({ runtime, }) => {
|
|
5
|
+
const state = tapSubscribable(runtime);
|
|
6
|
+
const emit = tapAssistantEmit();
|
|
7
|
+
// Bind thread list item events to event manager
|
|
8
|
+
tapEffect(() => {
|
|
9
|
+
const unsubscribers = [];
|
|
10
|
+
// Subscribe to thread list item events
|
|
11
|
+
const threadListItemEvents = [
|
|
12
|
+
"switchedTo",
|
|
13
|
+
"switchedAway",
|
|
14
|
+
];
|
|
15
|
+
for (const event of threadListItemEvents) {
|
|
16
|
+
const unsubscribe = runtime.unstable_on(event, () => {
|
|
17
|
+
emit(`threadListItem.${event}`, {
|
|
18
|
+
threadId: runtime.getState().id,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
unsubscribers.push(unsubscribe);
|
|
22
|
+
}
|
|
23
|
+
return () => {
|
|
24
|
+
for (const unsub of unsubscribers)
|
|
25
|
+
unsub();
|
|
26
|
+
};
|
|
27
|
+
}, [runtime, emit]);
|
|
28
|
+
return {
|
|
29
|
+
getState: () => state,
|
|
30
|
+
switchTo: runtime.switchTo,
|
|
31
|
+
rename: runtime.rename,
|
|
32
|
+
archive: runtime.archive,
|
|
33
|
+
unarchive: runtime.unarchive,
|
|
34
|
+
delete: runtime.delete,
|
|
35
|
+
generateTitle: runtime.generateTitle,
|
|
36
|
+
initialize: runtime.initialize,
|
|
37
|
+
detach: runtime.detach,
|
|
38
|
+
__internal_getRuntime: () => runtime,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=thread-list-item-runtime-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-list-item-runtime-client.js","sourceRoot":"","sources":["../../../src/store/runtime-clients/thread-list-item-runtime-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAqB,gBAAgB,EAAE,qBAAY;AAE1D,OAAO,EAAE,eAAe,EAAE,8BAA2B;AAErD,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAC1C,CAAC,EACC,OAAO,GAGR,EAAkC,EAAE;IACnC,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,IAAI,GAAG,gBAAgB,EAAE,CAAC;IAEhC,gDAAgD;IAChD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,aAAa,GAAkB,EAAE,CAAC;QAExC,uCAAuC;QACvC,MAAM,oBAAoB,GAA8B;YACtD,YAAY;YACZ,cAAc;SACf,CAAC;QAEF,KAAK,MAAM,KAAK,IAAI,oBAAoB,EAAE,CAAC;YACzC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE;gBAClD,IAAI,CAAC,kBAAkB,KAAK,EAAE,EAAE;oBAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAG,CAAC,EAAE;iBACjC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YACH,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,GAAG,EAAE;YACV,KAAK,MAAM,KAAK,IAAI,aAAa;gBAAE,KAAK,EAAE,CAAC;QAC7C,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAEpB,OAAO;QACL,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;QACrB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,qBAAqB,EAAE,GAAG,EAAE,CAAC,OAAO;KACrC,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ClientOutput } from "..//index.js";
|
|
2
|
+
import { ThreadListRuntime, AssistantRuntime } from "../../runtime/index.js";
|
|
3
|
+
export declare const ThreadListClient: (props: {
|
|
4
|
+
runtime: ThreadListRuntime;
|
|
5
|
+
__internal_assistantRuntime: AssistantRuntime;
|
|
6
|
+
}) => import("@assistant-ui/tap").ResourceElement<ClientOutput<"threads">, {
|
|
7
|
+
runtime: ThreadListRuntime;
|
|
8
|
+
__internal_assistantRuntime: AssistantRuntime;
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=thread-list-runtime-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-list-runtime-client.d.ts","sourceRoot":"","sources":["../../../src/store/runtime-clients/thread-list-runtime-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAsC,qBAAY;AAC5E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,+BAAsB;AAoBpE,eAAO,MAAM,gBAAgB;aAKhB,iBAAiB;iCACG,gBAAgB;;aADpC,iBAAiB;iCACG,gBAAgB;EAyDhD,CAAC"}
|