@dxos/plugin-assistant 0.8.4-main.ae835ea → 0.8.4-main.bcb3aa67d6
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/lib/browser/AssistantSettings-PTNCDWC6.mjs +100 -0
- package/dist/lib/browser/AssistantSettings-PTNCDWC6.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/chunk-EZRS3J25.mjs +30 -0
- package/dist/lib/browser/chunk-EZRS3J25.mjs.map +7 -0
- package/dist/lib/browser/chunk-OWBVGFDF.mjs +345 -0
- package/dist/lib/browser/chunk-OWBVGFDF.mjs.map +7 -0
- package/dist/lib/browser/chunk-RUV2WOQH.mjs +154 -0
- package/dist/lib/browser/chunk-RUV2WOQH.mjs.map +7 -0
- package/dist/lib/browser/chunk-YD4JTOO5.mjs +173 -0
- package/dist/lib/browser/chunk-YD4JTOO5.mjs.map +7 -0
- package/dist/lib/browser/create-chat-6G6WROW2.mjs +89 -0
- package/dist/lib/browser/create-chat-6G6WROW2.mjs.map +7 -0
- package/dist/lib/browser/ensure-companion-chat-F46BGW2T.mjs +65 -0
- package/dist/lib/browser/ensure-companion-chat-F46BGW2T.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +2511 -311
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-F5HHB3GI.mjs +22 -0
- package/dist/lib/browser/on-create-space-F5HHB3GI.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/resolve-navigation-targets-5Y7FT4CQ.mjs +22 -0
- package/dist/lib/browser/resolve-navigation-targets-5Y7FT4CQ.mjs.map +7 -0
- package/dist/lib/browser/run-prompt-in-new-chat-XSPRWOSR.mjs +144 -0
- package/dist/lib/browser/run-prompt-in-new-chat-XSPRWOSR.mjs.map +7 -0
- package/dist/lib/browser/set-current-chat-JPWBMS7N.mjs +35 -0
- package/dist/lib/browser/set-current-chat-JPWBMS7N.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +5 -4
- package/dist/lib/browser/update-chat-name-AEMFSIJX.mjs +60 -0
- package/dist/lib/browser/update-chat-name-AEMFSIJX.mjs.map +7 -0
- package/dist/lib/node-esm/AssistantSettings-Z5ZZWWSN.mjs +101 -0
- package/dist/lib/node-esm/AssistantSettings-Z5ZZWWSN.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs +32 -0
- package/dist/lib/node-esm/chunk-NZIKC7AN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-POJO5MTX.mjs +347 -0
- package/dist/lib/node-esm/chunk-POJO5MTX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PY4X6FJT.mjs +155 -0
- package/dist/lib/node-esm/chunk-PY4X6FJT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QHPGS4A4.mjs +174 -0
- package/dist/lib/node-esm/chunk-QHPGS4A4.mjs.map +7 -0
- package/dist/lib/node-esm/create-chat-EEMDTQRE.mjs +90 -0
- package/dist/lib/node-esm/create-chat-EEMDTQRE.mjs.map +7 -0
- package/dist/lib/node-esm/ensure-companion-chat-YAKJY7TB.mjs +66 -0
- package/dist/lib/node-esm/ensure-companion-chat-YAKJY7TB.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +2511 -311
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/on-create-space-YE5NQ3D2.mjs +23 -0
- package/dist/lib/node-esm/on-create-space-YE5NQ3D2.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/resolve-navigation-targets-W3GTFXDD.mjs +23 -0
- package/dist/lib/node-esm/resolve-navigation-targets-W3GTFXDD.mjs.map +7 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-Q2CLUUM4.mjs +145 -0
- package/dist/lib/node-esm/run-prompt-in-new-chat-Q2CLUUM4.mjs.map +7 -0
- package/dist/lib/node-esm/set-current-chat-ZBEFWS6P.mjs +36 -0
- package/dist/lib/node-esm/set-current-chat-ZBEFWS6P.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +5 -4
- package/dist/lib/node-esm/update-chat-name-6F7COUGR.mjs +61 -0
- package/dist/lib/node-esm/update-chat-name-6F7COUGR.mjs.map +7 -0
- package/dist/types/src/AssistantPlugin.d.ts +2 -1
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/assistant/blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/assistant/blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/assistant/index.d.ts +2 -0
- package/dist/types/src/blueprints/assistant/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service.d.ts +4 -2
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +4 -6
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts +9 -0
- package/dist/types/src/capabilities/companion-chat-provisioner.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +6 -3
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +41 -12
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +6 -3
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +16 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +19 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +4 -2
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -4
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts +511 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/index.d.ts +2 -1
- package/dist/types/src/components/AssistantSettings/index.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +36 -15
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +5 -1
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +6 -3
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +3 -3
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +3 -3
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +7 -10
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +504 -257
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts +1 -1
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/sync.d.ts +12 -6
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -1
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +14 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +8 -0
- package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
- package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
- package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +9 -4
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +488 -244
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +11 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +489 -245
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts +3 -0
- package/dist/types/src/components/TemplateEditor/extensions/index.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts +8 -0
- package/dist/types/src/components/TemplateEditor/extensions/xml-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +10 -8
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +17 -12
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +488 -244
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts +12 -0
- package/dist/types/src/components/Typewriter/AssistantToolbar.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/Typewriter.d.ts +11 -0
- package/dist/types/src/components/Typewriter/Typewriter.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts +7 -0
- package/dist/types/src/components/Typewriter/Typewriter.stories.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts +5 -0
- package/dist/types/src/components/Typewriter/assistant-extension.d.ts.map +1 -0
- package/dist/types/src/components/Typewriter/index.d.ts +2 -0
- package/dist/types/src/components/Typewriter/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +3 -7
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts +6 -0
- package/dist/types/src/containers/BlueprintArticle/BlueprintArticle.d.ts.map +1 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts +3 -0
- package/dist/types/src/containers/BlueprintArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts +14 -0
- package/dist/types/src/containers/ChatCompanion/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts +3 -0
- package/dist/types/src/containers/ChatCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +20 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ChatDialog}/ChatDialog.d.ts +2 -3
- package/dist/types/src/containers/ChatDialog/ChatDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts +3 -0
- package/dist/types/src/containers/ChatDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/ProjectArticle/ProjectArticle.d.ts +6 -0
- package/dist/types/src/containers/ProjectArticle/ProjectArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ProjectArticle/index.d.ts +3 -0
- package/dist/types/src/containers/ProjectArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ProjectSettings/ProjectSettings.d.ts +6 -0
- package/dist/types/src/containers/ProjectSettings/ProjectSettings.d.ts.map +1 -0
- package/dist/types/src/containers/ProjectSettings/index.d.ts +3 -0
- package/dist/types/src/containers/ProjectSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts +6 -0
- package/dist/types/src/containers/PromptArticle/PromptArticle.d.ts.map +1 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts +3 -0
- package/dist/types/src/containers/PromptArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/PromptList/PromptList.d.ts +6 -0
- package/dist/types/src/containers/PromptList/PromptList.d.ts.map +1 -0
- package/dist/types/src/containers/PromptList/PromptList.stories.d.ts +517 -0
- package/dist/types/src/containers/PromptList/PromptList.stories.d.ts.map +1 -0
- package/dist/types/src/containers/PromptList/index.d.ts +3 -0
- package/dist/types/src/containers/PromptList/index.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts +6 -0
- package/dist/types/src/containers/TracePanel/TracePanel.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts +19 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts +2 -0
- package/dist/types/src/containers/TracePanel/dxn-extractor.test.d.ts.map +1 -0
- package/dist/types/src/containers/TracePanel/index.d.ts +4 -0
- package/dist/types/src/containers/TracePanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts +4 -0
- package/dist/types/src/containers/TriggerStatus/TriggerStatus.d.ts.map +1 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts +3 -0
- package/dist/types/src/containers/TriggerStatus/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +12 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +2 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -0
- package/dist/types/src/extensions/prompt-extension.d.ts +10 -0
- package/dist/types/src/extensions/prompt-extension.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +5 -5
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts +9 -6
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +5 -8
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +2 -2
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -1
- package/dist/types/src/hooks/useContextObjects.d.ts +7 -7
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -1
- package/dist/types/src/hooks/useFilteredTypes.d.ts +3 -0
- package/dist/types/src/hooks/useFilteredTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +1 -1
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -1
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +4 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-chat.d.ts +5 -0
- package/dist/types/src/operations/create-chat.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +134 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/ensure-companion-chat.d.ts +5 -0
- package/dist/types/src/operations/ensure-companion-chat.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/on-create-space.d.ts +5 -0
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +15 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts +5 -0
- package/dist/types/src/operations/run-prompt-in-new-chat.d.ts.map +1 -0
- package/dist/types/src/operations/set-current-chat.d.ts +5 -0
- package/dist/types/src/operations/set-current-chat.d.ts.map +1 -0
- package/dist/types/src/operations/update-chat-name.d.ts +5 -0
- package/dist/types/src/operations/update-chat-name.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +34 -34
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- package/dist/types/src/processor/update-name.d.ts +2 -2
- package/dist/types/src/processor/update-name.d.ts.map +1 -1
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +5 -4
- package/dist/types/src/testing/test-generator.d.ts.map +1 -1
- package/dist/types/src/testing/test-services.d.ts +1 -1
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +492 -83
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +18 -46
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +10 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +44 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +10 -212
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +139 -91
- package/src/AssistantPlugin.tsx +186 -123
- package/src/blueprints/assistant/blueprint.conversations.json +1 -0
- package/src/blueprints/assistant/blueprint.test.ts +46 -0
- package/src/blueprints/assistant/blueprint.ts +31 -0
- package/src/blueprints/assistant/index.ts +5 -0
- package/src/{components/ChatToolbar → blueprints}/index.ts +1 -1
- package/src/capabilities/ai-service.ts +20 -17
- package/src/capabilities/app-graph-builder.ts +184 -170
- package/src/capabilities/blueprint-definition.ts +47 -55
- package/src/capabilities/companion-chat-provisioner.ts +165 -0
- package/src/capabilities/edge-model-resolver.ts +22 -14
- package/src/capabilities/index.ts +21 -14
- package/src/capabilities/local-model-resolver.ts +21 -13
- package/src/capabilities/markdown.ts +39 -0
- package/src/capabilities/migrations.ts +34 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +141 -59
- package/src/capabilities/settings.ts +24 -12
- package/src/capabilities/state.ts +27 -12
- package/src/capabilities/toolkit.ts +7 -13
- package/src/components/AssistantSettings/AssistantSettings.stories.tsx +35 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +105 -85
- package/src/components/AssistantSettings/index.ts +4 -2
- package/src/components/Chat/Chat.tsx +201 -136
- package/src/components/Chat/events.ts +7 -1
- package/src/components/ChatProgress/ChatProgress.tsx +11 -22
- package/src/components/ChatPrompt/ChatActions.tsx +13 -7
- package/src/components/ChatPrompt/ChatOptions.tsx +117 -90
- package/src/components/ChatPrompt/ChatReferences.tsx +23 -14
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +59 -38
- package/src/components/ChatThread/ChatThread.tsx +41 -38
- package/src/components/ChatThread/Link.tsx +4 -4
- package/src/components/ChatThread/registry.tsx +74 -51
- package/src/components/ChatThread/sync.test.ts +36 -18
- package/src/components/ChatThread/sync.ts +61 -14
- package/src/components/ChatThread/testing/thread.md +37 -0
- package/src/components/ProcessTree/ProcessTree.stories.tsx +109 -0
- package/src/components/ProcessTree/ProcessTree.tsx +85 -0
- package/src/components/ProcessTree/index.ts +5 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +15 -11
- package/src/components/TemplateEditor/TemplateEditor.tsx +54 -42
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +19 -9
- package/src/components/TemplateEditor/TemplateForm.tsx +83 -37
- package/src/components/TemplateEditor/extensions/handlebars-extension.ts +274 -0
- package/src/components/TemplateEditor/extensions/index.ts +6 -0
- package/src/components/TemplateEditor/extensions/xml-extension.ts +64 -0
- package/src/components/ToolBlock/ToolBlock.tsx +44 -53
- package/src/components/Toolbox/Toolbox.stories.tsx +11 -13
- package/src/components/Toolbox/Toolbox.tsx +69 -65
- package/src/components/Typewriter/AssistantToolbar.tsx +161 -0
- package/src/components/Typewriter/Typewriter.stories.tsx +86 -0
- package/src/components/Typewriter/Typewriter.tsx +50 -0
- package/src/components/Typewriter/assistant-extension.tsx +141 -0
- package/src/components/Typewriter/index.ts +5 -0
- package/src/components/index.ts +3 -8
- package/src/containers/BlueprintArticle/BlueprintArticle.tsx +29 -0
- package/src/containers/BlueprintArticle/index.ts +7 -0
- package/src/containers/ChatCompanion/ChatCompanion.tsx +143 -0
- package/src/containers/ChatCompanion/index.ts +7 -0
- package/src/containers/ChatContainer/ChatContainer.tsx +95 -0
- package/src/containers/ChatContainer/index.ts +7 -0
- package/src/{components → containers/ChatDialog}/ChatDialog.tsx +19 -15
- package/src/containers/ChatDialog/index.ts +7 -0
- package/src/containers/ProjectArticle/ProjectArticle.tsx +127 -0
- package/src/containers/ProjectArticle/index.ts +7 -0
- package/src/containers/ProjectSettings/ProjectSettings.tsx +139 -0
- package/src/containers/ProjectSettings/index.ts +7 -0
- package/src/containers/PromptArticle/PromptArticle.tsx +59 -0
- package/src/containers/PromptArticle/index.ts +7 -0
- package/src/containers/PromptList/PromptList.stories.tsx +130 -0
- package/src/containers/PromptList/PromptList.tsx +49 -0
- package/src/containers/PromptList/index.ts +7 -0
- package/src/containers/TracePanel/TracePanel.tsx +258 -0
- package/src/containers/TracePanel/dxn-extractor.test.ts +153 -0
- package/src/containers/TracePanel/dxn-extractor.ts +178 -0
- package/src/containers/TracePanel/index.ts +9 -0
- package/src/containers/TriggerStatus/TriggerStatus.tsx +144 -0
- package/src/containers/TriggerStatus/index.ts +7 -0
- package/src/containers/index.ts +16 -0
- package/src/extensions/index.ts +5 -0
- package/src/extensions/prompt-extension.ts +111 -0
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useBlueprintRegistry.ts +36 -21
- package/src/hooks/useChatProcessor.ts +32 -23
- package/src/hooks/useChatServices.ts +9 -31
- package/src/hooks/useChatToolbarActions.ts +122 -0
- package/src/hooks/useContextBinder.ts +9 -7
- package/src/hooks/useContextObjects.ts +16 -24
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/usePresets.ts +1 -1
- package/src/hooks/useReferencesProvider.ts +5 -8
- package/src/index.ts +1 -2
- package/src/meta.ts +7 -4
- package/src/operations/create-chat.ts +79 -0
- package/src/operations/definitions.ts +126 -0
- package/src/operations/ensure-companion-chat.ts +59 -0
- package/src/operations/index.ts +17 -0
- package/src/operations/on-create-space.ts +24 -0
- package/src/operations/resolve-navigation-targets.ts +26 -0
- package/src/operations/run-prompt-in-new-chat.ts +114 -0
- package/src/operations/set-current-chat.ts +35 -0
- package/src/operations/update-chat-name.ts +55 -0
- package/src/processor/presets.ts +1 -1
- package/src/processor/processor.test.ts +21 -63
- package/src/processor/processor.ts +168 -139
- package/src/processor/update-name.ts +6 -5
- package/src/queue-logger.ts +8 -9
- package/src/testing/test-generator.ts +14 -13
- package/src/testing/test-sequence.ts +3 -3
- package/src/testing/test-services.ts +9 -7
- package/src/translations.ts +129 -76
- package/src/types/Assistant.ts +8 -57
- package/src/types/Settings.ts +21 -0
- package/src/types/capabilities.ts +35 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +5 -1
- package/src/types/service.ts +14 -11
- package/dist/lib/browser/BlueprintContainer-GMSYKGSO.mjs +0 -36
- package/dist/lib/browser/BlueprintContainer-GMSYKGSO.mjs.map +0 -7
- package/dist/lib/browser/ChatCompanion-M3FDKTQM.mjs +0 -151
- package/dist/lib/browser/ChatCompanion-M3FDKTQM.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-KAH7XITI.mjs +0 -74
- package/dist/lib/browser/ChatContainer-KAH7XITI.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-ZWRGABW6.mjs +0 -87
- package/dist/lib/browser/ChatDialog-ZWRGABW6.mjs.map +0 -7
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs +0 -19
- package/dist/lib/browser/ai-service-ERTZBTP3.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-R5T7BJPC.mjs +0 -183
- package/dist/lib/browser/app-graph-builder-R5T7BJPC.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-AGTDXTXO.mjs +0 -13
- package/dist/lib/browser/chunk-357IHWQL.mjs +0 -1519
- package/dist/lib/browser/chunk-357IHWQL.mjs.map +0 -7
- package/dist/lib/browser/chunk-A2NVNXPL.mjs +0 -170
- package/dist/lib/browser/chunk-A2NVNXPL.mjs.map +0 -7
- package/dist/lib/browser/chunk-CQW6UPJM.mjs +0 -199
- package/dist/lib/browser/chunk-CQW6UPJM.mjs.map +0 -7
- package/dist/lib/browser/chunk-GNI6HL6G.mjs +0 -219
- package/dist/lib/browser/chunk-GNI6HL6G.mjs.map +0 -7
- package/dist/lib/browser/chunk-GXHZTOWJ.mjs +0 -378
- package/dist/lib/browser/chunk-GXHZTOWJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-L5OA5OGS.mjs +0 -262
- package/dist/lib/browser/chunk-L5OA5OGS.mjs.map +0 -7
- package/dist/lib/browser/chunk-MEN5WTLA.mjs +0 -182
- package/dist/lib/browser/chunk-MEN5WTLA.mjs.map +0 -7
- package/dist/lib/browser/chunk-PUG24BEC.mjs +0 -277
- package/dist/lib/browser/chunk-PUG24BEC.mjs.map +0 -7
- package/dist/lib/browser/chunk-SJJV3HEX.mjs +0 -16
- package/dist/lib/browser/chunk-SJJV3HEX.mjs.map +0 -7
- package/dist/lib/browser/chunk-WBG5PTSX.mjs +0 -23
- package/dist/lib/browser/chunk-WBG5PTSX.mjs.map +0 -7
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs +0 -18
- package/dist/lib/browser/edge-model-resolver-O6OFYIO2.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3C5TABOX.mjs +0 -136
- package/dist/lib/browser/intent-resolver-3C5TABOX.mjs.map +0 -7
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs +0 -17
- package/dist/lib/browser/local-model-resolver-GO6ZEMLL.mjs.map +0 -7
- package/dist/lib/browser/react-surface-EYKA5IFU.mjs +0 -90
- package/dist/lib/browser/react-surface-EYKA5IFU.mjs.map +0 -7
- package/dist/lib/browser/settings-VMVBYZLN.mjs +0 -23
- package/dist/lib/browser/settings-VMVBYZLN.mjs.map +0 -7
- package/dist/lib/browser/state-CFREPBB6.mjs +0 -21
- package/dist/lib/browser/state-CFREPBB6.mjs.map +0 -7
- package/dist/lib/browser/toolkit-F3NQ7TSI.mjs +0 -21
- package/dist/lib/browser/toolkit-F3NQ7TSI.mjs.map +0 -7
- package/dist/lib/node-esm/BlueprintContainer-6GBLMK4Z.mjs +0 -37
- package/dist/lib/node-esm/BlueprintContainer-6GBLMK4Z.mjs.map +0 -7
- package/dist/lib/node-esm/ChatCompanion-OV426GCP.mjs +0 -152
- package/dist/lib/node-esm/ChatCompanion-OV426GCP.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-UKY7NHFY.mjs +0 -75
- package/dist/lib/node-esm/ChatContainer-UKY7NHFY.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-2BDQIEXH.mjs +0 -88
- package/dist/lib/node-esm/ChatDialog-2BDQIEXH.mjs.map +0 -7
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs +0 -20
- package/dist/lib/node-esm/ai-service-MUYLV3NT.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-I52RYVWH.mjs +0 -184
- package/dist/lib/node-esm/app-graph-builder-I52RYVWH.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-CFCUD2VC.mjs +0 -14
- package/dist/lib/node-esm/chunk-2CAETDW2.mjs +0 -183
- package/dist/lib/node-esm/chunk-2CAETDW2.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4J5FYNNM.mjs +0 -171
- package/dist/lib/node-esm/chunk-4J5FYNNM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5ARE4R2I.mjs +0 -220
- package/dist/lib/node-esm/chunk-5ARE4R2I.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7ZYOYW7F.mjs +0 -264
- package/dist/lib/node-esm/chunk-7ZYOYW7F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HJPIYMWD.mjs +0 -1520
- package/dist/lib/node-esm/chunk-HJPIYMWD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-O36P4LN5.mjs +0 -200
- package/dist/lib/node-esm/chunk-O36P4LN5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs +0 -25
- package/dist/lib/node-esm/chunk-WE6KTH72.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XM4BVQQR.mjs +0 -278
- package/dist/lib/node-esm/chunk-XM4BVQQR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XQBL2SBL.mjs +0 -17
- package/dist/lib/node-esm/chunk-XQBL2SBL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YIO5MEPR.mjs +0 -380
- package/dist/lib/node-esm/chunk-YIO5MEPR.mjs.map +0 -7
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs +0 -19
- package/dist/lib/node-esm/edge-model-resolver-2ARXDOYS.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-HQ27YALS.mjs +0 -137
- package/dist/lib/node-esm/intent-resolver-HQ27YALS.mjs.map +0 -7
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs +0 -18
- package/dist/lib/node-esm/local-model-resolver-WOQ2D2R2.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-UOC3CBPH.mjs +0 -91
- package/dist/lib/node-esm/react-surface-UOC3CBPH.mjs.map +0 -7
- package/dist/lib/node-esm/settings-7AUVNDM2.mjs +0 -24
- package/dist/lib/node-esm/settings-7AUVNDM2.mjs.map +0 -7
- package/dist/lib/node-esm/state-XXND44OW.mjs +0 -22
- package/dist/lib/node-esm/state-XXND44OW.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-7CH5UNSQ.mjs +0 -22
- package/dist/lib/node-esm/toolkit-7CH5UNSQ.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -11
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/BlueprintContainer.d.ts +0 -8
- package/dist/types/src/components/BlueprintContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatCompanion.d.ts +0 -13
- package/dist/types/src/components/ChatCompanion.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -11
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducers.d.ts +0 -40
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +0 -1
- package/dist/types/src/components/ChatToolbar/ChatToolbar.d.ts +0 -6
- package/dist/types/src/components/ChatToolbar/ChatToolbar.d.ts.map +0 -1
- package/dist/types/src/components/ChatToolbar/index.d.ts +0 -2
- package/dist/types/src/components/ChatToolbar/index.d.ts.map +0 -1
- package/dist/types/src/components/ChatToolbar/useChatToolbarActions.d.ts +0 -9
- package/dist/types/src/components/ChatToolbar/useChatToolbarActions.d.ts.map +0 -1
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/functions/analysis.d.ts +0 -5
- package/dist/types/src/functions/analysis.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -4
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/object-list.d.ts +0 -10
- package/dist/types/src/functions/object-list.d.ts.map +0 -1
- package/dist/types/src/functions/object-load.d.ts +0 -8
- package/dist/types/src/functions/object-load.d.ts.map +0 -1
- package/dist/types/src/hooks/useItemTypes.d.ts +0 -4
- package/dist/types/src/hooks/useItemTypes.d.ts.map +0 -1
- package/dist/types/src/toolkits/AssistantToolkit.d.ts +0 -21
- package/dist/types/src/toolkits/AssistantToolkit.d.ts.map +0 -1
- package/dist/types/src/toolkits/SystemToolkit.d.ts +0 -69
- package/dist/types/src/toolkits/SystemToolkit.d.ts.map +0 -1
- package/dist/types/src/toolkits/index.d.ts +0 -3
- package/dist/types/src/toolkits/index.d.ts.map +0 -1
- package/dist/types/src/types/AssistantAction.d.ts +0 -119
- package/dist/types/src/types/AssistantAction.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -18
- package/src/capabilities/intent-resolver.ts +0 -121
- package/src/components/BlueprintContainer.tsx +0 -30
- package/src/components/ChatCompanion.tsx +0 -136
- package/src/components/ChatContainer.tsx +0 -51
- package/src/components/ChatThread/reducers.ts +0 -151
- package/src/components/ChatToolbar/ChatToolbar.tsx +0 -23
- package/src/components/ChatToolbar/useChatToolbarActions.ts +0 -126
- package/src/components/TemplateEditor/handlebars-extension.ts +0 -166
- package/src/events.ts +0 -11
- package/src/functions/analysis.ts +0 -22
- package/src/functions/index.ts +0 -7
- package/src/functions/object-list.ts +0 -48
- package/src/functions/object-load.ts +0 -45
- package/src/hooks/useItemTypes.ts +0 -37
- package/src/toolkits/AssistantToolkit.ts +0 -55
- package/src/toolkits/SystemToolkit.ts +0 -292
- package/src/toolkits/index.ts +0 -6
- package/src/types/AssistantAction.ts +0 -70
- /package/dist/lib/browser/{blueprint-definition-AGTDXTXO.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{blueprint-definition-CFCUD2VC.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/types/src/components/TemplateEditor/{handlebars-extension.d.ts → extensions/handlebars-extension.d.ts} +0 -0
|
@@ -4,27 +4,29 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Extension, Prec } from '@codemirror/state';
|
|
6
6
|
import { keymap } from '@codemirror/view';
|
|
7
|
-
import {
|
|
7
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
8
8
|
import { createContext } from '@radix-ui/react-context';
|
|
9
9
|
import * as Array from 'effect/Array';
|
|
10
10
|
import * as Option from 'effect/Option';
|
|
11
11
|
import React, { type PropsWithChildren, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
12
12
|
|
|
13
|
+
import { type Chat as ChatModule } from '@dxos/assistant-toolkit';
|
|
13
14
|
import { Event } from '@dxos/async';
|
|
14
|
-
import { Obj } from '@dxos/echo';
|
|
15
|
+
import { type Database, Filter, Obj } from '@dxos/echo';
|
|
15
16
|
import { useVoiceInput } from '@dxos/plugin-transcription';
|
|
16
|
-
import { type
|
|
17
|
+
import { type Queue, useQuery } from '@dxos/react-client/echo';
|
|
17
18
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
18
19
|
import { Input, type ThemedClassName, useDynamicRef, useTranslation } from '@dxos/react-ui';
|
|
19
|
-
import { ChatEditor, type ChatEditorController, type ChatEditorProps
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
20
|
+
import { ChatEditor, type ChatEditorController, type ChatEditorProps } from '@dxos/react-ui-chat';
|
|
21
|
+
import { type MarkdownStreamController } from '@dxos/react-ui-components';
|
|
22
|
+
import { Menu, MenuRootProps } from '@dxos/react-ui-menu';
|
|
23
|
+
import { Message } from '@dxos/types';
|
|
24
|
+
import { composable, composableProps, mx } from '@dxos/ui-theme';
|
|
22
25
|
import { isTruthy } from '@dxos/util';
|
|
23
26
|
|
|
24
|
-
import {
|
|
25
|
-
import { meta } from '
|
|
27
|
+
import { useChatToolbarActions } from '#hooks';
|
|
28
|
+
import { meta } from '#meta';
|
|
26
29
|
import { type AiChatProcessor } from '../../processor';
|
|
27
|
-
import { type Assistant } from '../../types';
|
|
28
30
|
import {
|
|
29
31
|
ChatActions,
|
|
30
32
|
type ChatActionsProps,
|
|
@@ -33,11 +35,7 @@ import {
|
|
|
33
35
|
ChatReferences,
|
|
34
36
|
ChatStatusIndicator,
|
|
35
37
|
} from '../ChatPrompt';
|
|
36
|
-
import {
|
|
37
|
-
type ChatThreadController,
|
|
38
|
-
ChatThread as NaturalChatThread,
|
|
39
|
-
type ChatThreadProps as NaturalChatThreadProps,
|
|
40
|
-
} from '../ChatThread';
|
|
38
|
+
import { ChatThread as NaturalChatThread, type ChatThreadProps as NaturalChatThreadProps } from '../ChatThread';
|
|
41
39
|
|
|
42
40
|
import { type ChatEvent } from './events';
|
|
43
41
|
|
|
@@ -50,9 +48,9 @@ import { type ChatEvent } from './events';
|
|
|
50
48
|
type ChatContextValue = {
|
|
51
49
|
debug?: boolean;
|
|
52
50
|
event: Event<ChatEvent>;
|
|
53
|
-
|
|
54
|
-
chat
|
|
55
|
-
messages:
|
|
51
|
+
db?: Database.Database;
|
|
52
|
+
chat?: ChatModule.Chat;
|
|
53
|
+
messages: Message.Message[];
|
|
56
54
|
processor: AiChatProcessor;
|
|
57
55
|
};
|
|
58
56
|
|
|
@@ -62,28 +60,24 @@ export const [ChatContextProvider, useChatContext] = createContext<ChatContextVa
|
|
|
62
60
|
// Root
|
|
63
61
|
//
|
|
64
62
|
|
|
65
|
-
type ChatRootProps =
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
>
|
|
63
|
+
type ChatRootProps = PropsWithChildren<
|
|
64
|
+
Pick<ChatContextValue, 'db' | 'chat' | 'processor'> & {
|
|
65
|
+
queue?: Queue;
|
|
66
|
+
onEvent?: (event: ChatEvent) => void;
|
|
67
|
+
}
|
|
71
68
|
>;
|
|
72
69
|
|
|
73
|
-
const ChatRoot = ({
|
|
70
|
+
const ChatRoot = ({ children, chat, queue, processor, onEvent, ...props }: ChatRootProps) => {
|
|
74
71
|
const [debug, setDebug] = useState(false);
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
// Messages.
|
|
78
|
-
const queue = useQueue<DataType.Message>(chat?.queue.dxn);
|
|
79
|
-
const pending = useRxValue(processor.messages);
|
|
80
|
-
const streaming = useRxValue(processor.streaming);
|
|
72
|
+
const pending = useAtomValue(processor.messages);
|
|
73
|
+
const streaming = useAtomValue(processor.streaming);
|
|
81
74
|
const lastPrompt = useRef<string | undefined>(undefined);
|
|
82
75
|
|
|
76
|
+
// Messages.
|
|
77
|
+
const storedMessages = useQuery(queue, Filter.type(Message.Message));
|
|
83
78
|
const messages = useMemo(() => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}, [queue?.objects, pending]);
|
|
79
|
+
return Array.dedupeWith([...storedMessages, ...pending], ({ id: a }, { id: b }) => a === b);
|
|
80
|
+
}, [storedMessages, pending]);
|
|
87
81
|
|
|
88
82
|
// Events.
|
|
89
83
|
const event = useMemo(() => new Event<ChatEvent>(), []);
|
|
@@ -91,7 +85,26 @@ const ChatRoot = ({ classNames, children, chat, processor, onEvent, ...props }:
|
|
|
91
85
|
return event.on((ev) => {
|
|
92
86
|
switch (ev.type) {
|
|
93
87
|
case 'toggle-debug': {
|
|
94
|
-
setDebug((
|
|
88
|
+
setDebug((debug) => !debug);
|
|
89
|
+
|
|
90
|
+
// Dump state to console.
|
|
91
|
+
queueMicrotask(async () => {
|
|
92
|
+
const objects = processor.context.getObjects();
|
|
93
|
+
const blueprints = processor.context.getBlueprints();
|
|
94
|
+
const tools = await processor.getTools();
|
|
95
|
+
const system = await processor.getSystemPrompt();
|
|
96
|
+
// eslint-disable-next-line no-console
|
|
97
|
+
console.log('Chat processor state:', { objects, blueprints });
|
|
98
|
+
// eslint-disable-next-line no-console
|
|
99
|
+
console.log(`
|
|
100
|
+
==== System Prompt ====
|
|
101
|
+
${system}
|
|
102
|
+
==== Tools ====
|
|
103
|
+
${Object.values(tools)
|
|
104
|
+
.map((tool) => JSON.stringify(tool, null, 2))
|
|
105
|
+
.join('\n')}
|
|
106
|
+
`);
|
|
107
|
+
});
|
|
95
108
|
break;
|
|
96
109
|
}
|
|
97
110
|
|
|
@@ -120,41 +133,112 @@ const ChatRoot = ({ classNames, children, chat, processor, onEvent, ...props }:
|
|
|
120
133
|
}
|
|
121
134
|
break;
|
|
122
135
|
}
|
|
123
|
-
|
|
124
|
-
default: {
|
|
125
|
-
onEvent?.(ev);
|
|
126
|
-
}
|
|
127
136
|
}
|
|
137
|
+
|
|
138
|
+
onEvent?.(ev);
|
|
128
139
|
});
|
|
129
140
|
}, [event, processor, streaming, onEvent]);
|
|
130
141
|
|
|
131
|
-
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
142
|
+
const db = props.db ?? (chat && Obj.getDatabase(chat));
|
|
134
143
|
|
|
135
144
|
return (
|
|
136
145
|
<ChatContextProvider
|
|
137
146
|
debug={debug}
|
|
138
147
|
event={event}
|
|
148
|
+
db={db}
|
|
139
149
|
chat={chat}
|
|
140
|
-
space={space}
|
|
141
150
|
messages={messages}
|
|
142
151
|
processor={processor}
|
|
143
152
|
{...props}
|
|
144
153
|
>
|
|
145
|
-
|
|
146
|
-
{children}
|
|
147
|
-
</div>
|
|
154
|
+
{children}
|
|
148
155
|
</ChatContextProvider>
|
|
149
156
|
);
|
|
150
157
|
};
|
|
151
158
|
|
|
152
159
|
ChatRoot.displayName = 'Chat.Root';
|
|
153
160
|
|
|
161
|
+
//
|
|
162
|
+
// Viewport
|
|
163
|
+
//
|
|
164
|
+
|
|
165
|
+
const CHAT_VIEWPORT_NAME = 'Chat.Viewport';
|
|
166
|
+
|
|
167
|
+
type ChatViewportProps = {};
|
|
168
|
+
|
|
169
|
+
const ChatViewport = composable<HTMLDivElement, ChatViewportProps>(({ children, ...props }, forwardedRef) => {
|
|
170
|
+
return (
|
|
171
|
+
<div {...composableProps(props, { classNames: 'dx-expander flex flex-col' })} ref={forwardedRef}>
|
|
172
|
+
{children}
|
|
173
|
+
</div>
|
|
174
|
+
);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
ChatViewport.displayName = CHAT_VIEWPORT_NAME;
|
|
178
|
+
|
|
179
|
+
//
|
|
180
|
+
// Thread
|
|
181
|
+
//
|
|
182
|
+
|
|
183
|
+
const CHAT_THREAD_NAME = 'Chat.Thread';
|
|
184
|
+
|
|
185
|
+
type ChatThreadProps = Omit<NaturalChatThreadProps, 'identity' | 'messages' | 'tools'>;
|
|
186
|
+
|
|
187
|
+
const ChatThread = (props: ChatThreadProps) => {
|
|
188
|
+
const { debug, event, messages, processor } = useChatContext(CHAT_THREAD_NAME);
|
|
189
|
+
const identity = useIdentity();
|
|
190
|
+
const error = useAtomValue(processor.error).pipe(Option.getOrUndefined);
|
|
191
|
+
|
|
192
|
+
const controllerRef = useRef<MarkdownStreamController | null>(null);
|
|
193
|
+
useEffect(() => {
|
|
194
|
+
return event.on((event) => {
|
|
195
|
+
switch (event.type) {
|
|
196
|
+
case 'submit':
|
|
197
|
+
case 'scroll-to-bottom':
|
|
198
|
+
controllerRef.current?.scrollToBottom();
|
|
199
|
+
break;
|
|
200
|
+
case 'nav-previous':
|
|
201
|
+
controllerRef.current?.navigatePrevious();
|
|
202
|
+
break;
|
|
203
|
+
case 'nav-next':
|
|
204
|
+
controllerRef.current?.navigateNext();
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}, [event]);
|
|
209
|
+
|
|
210
|
+
const handleEvent = useCallback<NonNullable<NaturalChatThreadProps['onEvent']>>(
|
|
211
|
+
(ev) => {
|
|
212
|
+
event.emit(ev);
|
|
213
|
+
},
|
|
214
|
+
[event],
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
if (!identity) {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return (
|
|
222
|
+
<NaturalChatThread
|
|
223
|
+
{...props}
|
|
224
|
+
identity={identity}
|
|
225
|
+
messages={messages}
|
|
226
|
+
error={error}
|
|
227
|
+
debug={debug}
|
|
228
|
+
onEvent={handleEvent}
|
|
229
|
+
ref={controllerRef}
|
|
230
|
+
/>
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
ChatThread.displayName = CHAT_THREAD_NAME;
|
|
235
|
+
|
|
154
236
|
//
|
|
155
237
|
// Prompt
|
|
156
238
|
//
|
|
157
239
|
|
|
240
|
+
const CHAT_PROMPT_NAME = 'Chat.Prompt';
|
|
241
|
+
|
|
158
242
|
type ChatPromptProps = ThemedClassName<
|
|
159
243
|
{
|
|
160
244
|
outline?: boolean;
|
|
@@ -181,11 +265,11 @@ const ChatPrompt = ({
|
|
|
181
265
|
onOnlineChange,
|
|
182
266
|
}: ChatPromptProps) => {
|
|
183
267
|
const { t } = useTranslation(meta.id);
|
|
184
|
-
const {
|
|
268
|
+
const { db, processor, event } = useChatContext(CHAT_PROMPT_NAME);
|
|
185
269
|
|
|
186
|
-
const error =
|
|
187
|
-
const streaming =
|
|
188
|
-
const active =
|
|
270
|
+
const error = useAtomValue(processor.error).pipe(Option.getOrUndefined);
|
|
271
|
+
const streaming = useAtomValue(processor.streaming);
|
|
272
|
+
const active = useAtomValue(processor.active);
|
|
189
273
|
const activeRef = useDynamicRef(active);
|
|
190
274
|
|
|
191
275
|
const editorRef = useRef<ChatEditorController>(null);
|
|
@@ -218,43 +302,46 @@ const ChatPrompt = ({
|
|
|
218
302
|
},
|
|
219
303
|
});
|
|
220
304
|
|
|
221
|
-
// TODO(burdon): Reconcile with object tags.
|
|
222
|
-
const referencesProvider = useReferencesProvider(space);
|
|
223
305
|
const extensions = useMemo<Extension[]>(() => {
|
|
224
306
|
return [
|
|
225
|
-
referencesProvider && references({ provider: referencesProvider }),
|
|
226
307
|
Prec.highest(
|
|
227
|
-
keymap.of(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
return true;
|
|
235
|
-
},
|
|
308
|
+
keymap.of([
|
|
309
|
+
{
|
|
310
|
+
key: 'Mod-d',
|
|
311
|
+
preventDefault: true,
|
|
312
|
+
run: () => {
|
|
313
|
+
event.emit({ type: 'toggle-debug' });
|
|
314
|
+
return true;
|
|
236
315
|
},
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
key: 'Mod-ArrowUp',
|
|
319
|
+
preventDefault: true,
|
|
320
|
+
run: () => {
|
|
321
|
+
event.emit({ type: 'nav-previous' });
|
|
322
|
+
return true;
|
|
244
323
|
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
run: () => {
|
|
249
|
-
event.emit({ type: 'thread-close' });
|
|
250
|
-
return true;
|
|
251
|
-
},
|
|
324
|
+
shift: () => {
|
|
325
|
+
event.emit({ type: 'thread-open' });
|
|
326
|
+
return true;
|
|
252
327
|
},
|
|
253
|
-
|
|
254
|
-
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
key: 'Mod-ArrowDown',
|
|
331
|
+
preventDefault: true,
|
|
332
|
+
run: () => {
|
|
333
|
+
event.emit({ type: 'nav-next' });
|
|
334
|
+
return true;
|
|
335
|
+
},
|
|
336
|
+
shift: () => {
|
|
337
|
+
event.emit({ type: 'thread-close' });
|
|
338
|
+
return true;
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
]),
|
|
255
342
|
),
|
|
256
343
|
].filter(isTruthy);
|
|
257
|
-
}, [event, expandable
|
|
344
|
+
}, [event, expandable]);
|
|
258
345
|
|
|
259
346
|
const handleSubmit = useCallback<NonNullable<ChatEditorProps['onSubmit']>>(
|
|
260
347
|
(text) => {
|
|
@@ -277,31 +364,29 @@ const ChatPrompt = ({
|
|
|
277
364
|
<div
|
|
278
365
|
role='group'
|
|
279
366
|
className={mx(
|
|
280
|
-
'flex flex-col
|
|
281
|
-
outline &&
|
|
282
|
-
'
|
|
283
|
-
],
|
|
367
|
+
'flex flex-col w-full dx-density-fine',
|
|
368
|
+
outline &&
|
|
369
|
+
'bg-group-surface border border-subdued-separator transition transition-border [&:has(.cm-content:focus)]:border-separator rounded-sm',
|
|
284
370
|
classNames,
|
|
285
371
|
)}
|
|
286
372
|
>
|
|
287
|
-
<div role='none' className='flex gap-2'>
|
|
373
|
+
<div role='none' className='flex p-2 gap-2'>
|
|
288
374
|
<ChatStatusIndicator classNames='p-1' preset={preset} error={error} processing={streaming} />
|
|
289
|
-
|
|
290
375
|
<ChatEditor
|
|
291
376
|
ref={editorRef}
|
|
292
377
|
autoFocus
|
|
293
378
|
lineWrapping
|
|
294
|
-
classNames='col-span-2
|
|
295
|
-
placeholder={placeholder ?? t('prompt
|
|
379
|
+
classNames='col-span-2 pt-0.5'
|
|
380
|
+
placeholder={placeholder ?? t('prompt.placeholder')}
|
|
296
381
|
extensions={extensions}
|
|
297
382
|
onSubmit={handleSubmit}
|
|
298
383
|
/>
|
|
299
384
|
</div>
|
|
300
385
|
|
|
301
|
-
{settings && (
|
|
302
|
-
<div role='none' className='flex
|
|
386
|
+
{db && settings && (
|
|
387
|
+
<div role='none' className='flex items-center overflow-hidden'>
|
|
303
388
|
<ChatOptions
|
|
304
|
-
|
|
389
|
+
db={db}
|
|
305
390
|
blueprintRegistry={processor.blueprintRegistry}
|
|
306
391
|
context={processor.context}
|
|
307
392
|
preset={preset}
|
|
@@ -309,8 +394,8 @@ const ChatPrompt = ({
|
|
|
309
394
|
onPresetChange={onPresetChange}
|
|
310
395
|
/>
|
|
311
396
|
|
|
312
|
-
<div role='none' className='
|
|
313
|
-
<ChatReferences
|
|
397
|
+
<div role='none' className='flex grow overflow-x-auto scrollbar-none'>
|
|
398
|
+
<ChatReferences db={db} context={processor.context} />
|
|
314
399
|
</div>
|
|
315
400
|
|
|
316
401
|
<ChatActions
|
|
@@ -320,10 +405,11 @@ const ChatPrompt = ({
|
|
|
320
405
|
processing={streaming}
|
|
321
406
|
onEvent={handleEvent}
|
|
322
407
|
>
|
|
408
|
+
{/* TODO(burdon): Move offline switch into dialog. */}
|
|
323
409
|
{online !== undefined && (
|
|
324
410
|
<Input.Root>
|
|
325
|
-
<Input.Label srOnly>{t('online
|
|
326
|
-
<Input.Switch classNames='
|
|
411
|
+
<Input.Label srOnly>{t('online-switch.label')}</Input.Label>
|
|
412
|
+
<Input.Switch classNames='mx-2' checked={online} onCheckedChange={onOnlineChange} />
|
|
327
413
|
</Input.Root>
|
|
328
414
|
)}
|
|
329
415
|
</ChatActions>
|
|
@@ -333,55 +419,32 @@ const ChatPrompt = ({
|
|
|
333
419
|
);
|
|
334
420
|
};
|
|
335
421
|
|
|
336
|
-
ChatPrompt.displayName =
|
|
422
|
+
ChatPrompt.displayName = CHAT_PROMPT_NAME;
|
|
337
423
|
|
|
338
424
|
//
|
|
339
|
-
//
|
|
425
|
+
// Toolbar
|
|
340
426
|
//
|
|
341
427
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
const ChatThread = (props: ChatThreadProps) => {
|
|
345
|
-
const { event, messages, processor } = useChatContext(ChatThread.displayName);
|
|
346
|
-
const identity = useIdentity();
|
|
347
|
-
const error = useRxValue(processor.error).pipe(Option.getOrUndefined);
|
|
348
|
-
|
|
349
|
-
const scrollerRef = useRef<ChatThreadController | null>(null);
|
|
350
|
-
useEffect(() => {
|
|
351
|
-
return event.on((event) => {
|
|
352
|
-
switch (event.type) {
|
|
353
|
-
case 'submit':
|
|
354
|
-
case 'scroll-to-bottom':
|
|
355
|
-
scrollerRef.current?.scrollToBottom();
|
|
356
|
-
break;
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
}, [event]);
|
|
428
|
+
const CHAT_TOOLBAR_NAME = 'Chat.Toolbar';
|
|
360
429
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
},
|
|
365
|
-
[event],
|
|
366
|
-
);
|
|
430
|
+
type ChatToolbarProps = Pick<MenuRootProps, 'attendableId'> & {
|
|
431
|
+
companionTo?: Obj.Unknown;
|
|
432
|
+
};
|
|
367
433
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
434
|
+
const ChatToolbar = composable<HTMLDivElement, ChatToolbarProps>(
|
|
435
|
+
({ attendableId, companionTo, ...props }, forwardedRef) => {
|
|
436
|
+
const { chat } = useChatContext(CHAT_TOOLBAR_NAME);
|
|
437
|
+
const menuActions = useChatToolbarActions({ chat, companionTo });
|
|
371
438
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
onEvent={handleEvent}
|
|
380
|
-
/>
|
|
381
|
-
);
|
|
382
|
-
};
|
|
439
|
+
return (
|
|
440
|
+
<Menu.Root {...menuActions} attendableId={attendableId}>
|
|
441
|
+
<Menu.Toolbar {...composableProps(props)} ref={forwardedRef} />
|
|
442
|
+
</Menu.Root>
|
|
443
|
+
);
|
|
444
|
+
},
|
|
445
|
+
);
|
|
383
446
|
|
|
384
|
-
|
|
447
|
+
ChatToolbar.displayName = CHAT_TOOLBAR_NAME;
|
|
385
448
|
|
|
386
449
|
//
|
|
387
450
|
// Chat
|
|
@@ -389,8 +452,10 @@ ChatThread.displayName = 'Chat.Thread';
|
|
|
389
452
|
|
|
390
453
|
export const Chat = {
|
|
391
454
|
Root: ChatRoot,
|
|
392
|
-
|
|
455
|
+
Viewport: ChatViewport,
|
|
393
456
|
Thread: ChatThread,
|
|
457
|
+
Prompt: ChatPrompt,
|
|
458
|
+
Toolbar: ChatToolbar,
|
|
394
459
|
};
|
|
395
460
|
|
|
396
|
-
export type { ChatRootProps, ChatThreadProps, ChatPromptProps, ChatEvent };
|
|
461
|
+
export type { ChatRootProps, ChatViewportProps, ChatThreadProps, ChatPromptProps, ChatToolbarProps, ChatEvent };
|
|
@@ -31,7 +31,7 @@ export type ChatEvent =
|
|
|
31
31
|
}
|
|
32
32
|
| {
|
|
33
33
|
type: 'add';
|
|
34
|
-
object: Obj.
|
|
34
|
+
object: Obj.Unknown;
|
|
35
35
|
}
|
|
36
36
|
//
|
|
37
37
|
// UX
|
|
@@ -43,6 +43,12 @@ export type ChatEvent =
|
|
|
43
43
|
| {
|
|
44
44
|
type: 'scroll-to-bottom';
|
|
45
45
|
}
|
|
46
|
+
| {
|
|
47
|
+
type: 'nav-previous';
|
|
48
|
+
}
|
|
49
|
+
| {
|
|
50
|
+
type: 'nav-next';
|
|
51
|
+
}
|
|
46
52
|
| {
|
|
47
53
|
type: 'thread-open';
|
|
48
54
|
}
|
|
@@ -5,29 +5,18 @@
|
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { addEventListener } from '@dxos/async';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { type Assistant } from '../../types';
|
|
11
|
-
|
|
12
|
-
// TODO(burdon): Reset after each session.
|
|
13
|
-
// TODO(burdon): Show after delay.
|
|
14
|
-
// TODO(burdon): Test with errors.
|
|
15
|
-
// TODO(burdon): Filter out empty trace messages.
|
|
16
|
-
|
|
17
|
-
// {
|
|
18
|
-
// "id": "01K3TE3C2VAXETP500QKDHK3C4_block_3",
|
|
19
|
-
// "branch": "main",
|
|
20
|
-
// "parents": [],
|
|
21
|
-
// "icon": "ph--robot--regular",
|
|
22
|
-
// "message": "\n"
|
|
23
|
-
// }
|
|
8
|
+
import { type Queue } from '@dxos/echo-db';
|
|
9
|
+
import { ProgressBar, type ProgressBarProps, TextCrawl, useExecutionGraph } from '@dxos/react-ui-components';
|
|
24
10
|
|
|
25
11
|
export type ChatProgressProps = {
|
|
26
|
-
|
|
12
|
+
traceQueue?: Queue;
|
|
27
13
|
};
|
|
28
14
|
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Displays execution progress from the space's invocation trace queue.
|
|
17
|
+
*/
|
|
18
|
+
export const ChatProgress = ({ traceQueue }: ChatProgressProps) => {
|
|
19
|
+
const { commits } = useExecutionGraph(traceQueue, true);
|
|
31
20
|
const nodes = useMemo(() => commits.map((commit) => ({ id: commit.id, message: commit.message })), [commits]);
|
|
32
21
|
const lines = useMemo(() => commits.map((commit) => commit.message), [commits]);
|
|
33
22
|
|
|
@@ -59,9 +48,9 @@ export const ChatProgress = ({ chat }: ChatProgressProps) => {
|
|
|
59
48
|
}, [nodes.length]);
|
|
60
49
|
|
|
61
50
|
return (
|
|
62
|
-
<
|
|
51
|
+
<div role='none' tabIndex={0} ref={ref} className='flex flex-col outline-hidden'>
|
|
63
52
|
<ProgressBar nodes={nodes} index={index} onSelect={handleSelect} />
|
|
64
|
-
<TextCrawl
|
|
65
|
-
</
|
|
53
|
+
<TextCrawl classNames='ps-4 text-sm text-description' lines={lines} autoAdvance />
|
|
54
|
+
</div>
|
|
66
55
|
);
|
|
67
56
|
};
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import React, { type PropsWithChildren } from 'react';
|
|
6
6
|
|
|
7
7
|
import { IconButton, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { mx } from '@dxos/
|
|
8
|
+
import { mx } from '@dxos/ui-theme';
|
|
9
9
|
|
|
10
|
-
import { meta } from '
|
|
10
|
+
import { meta } from '#meta';
|
|
11
11
|
import { type ChatEvent } from '../Chat';
|
|
12
12
|
|
|
13
13
|
export type ChatActionsProps = ThemedClassName<
|
|
@@ -23,16 +23,15 @@ export const ChatActions = ({ classNames, children, microphone, recording, proce
|
|
|
23
23
|
const { t } = useTranslation(meta.id);
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
|
-
<div className={mx('flex items-center
|
|
26
|
+
<div className={mx('flex items-center me-1', classNames)}>
|
|
27
27
|
{children}
|
|
28
28
|
|
|
29
29
|
<IconButton
|
|
30
30
|
disabled={!processing}
|
|
31
31
|
variant='ghost'
|
|
32
|
-
size={5}
|
|
33
32
|
icon='ph--x--regular'
|
|
34
33
|
iconOnly
|
|
35
|
-
label={t('
|
|
34
|
+
label={t('cancel-processing.button')}
|
|
36
35
|
onClick={() => onEvent?.({ type: 'cancel' })}
|
|
37
36
|
/>
|
|
38
37
|
|
|
@@ -41,17 +40,24 @@ export const ChatActions = ({ classNames, children, microphone, recording, proce
|
|
|
41
40
|
disabled={!processing}
|
|
42
41
|
classNames={mx(recording && 'bg-primary-500')}
|
|
43
42
|
variant='ghost'
|
|
44
|
-
size={5}
|
|
45
43
|
icon='ph--microphone--regular'
|
|
46
44
|
iconOnly
|
|
47
45
|
noTooltip
|
|
48
|
-
label={t('button
|
|
46
|
+
label={t('microphone.button')}
|
|
49
47
|
onMouseDown={() => onEvent?.({ type: 'record-start' })}
|
|
50
48
|
onMouseUp={() => onEvent?.({ type: 'record-stop' })}
|
|
51
49
|
onTouchStart={() => onEvent?.({ type: 'record-start' })}
|
|
52
50
|
onTouchEnd={() => onEvent?.({ type: 'record-stop' })}
|
|
53
51
|
/>
|
|
54
52
|
)}
|
|
53
|
+
|
|
54
|
+
<IconButton
|
|
55
|
+
variant='ghost'
|
|
56
|
+
icon='ph--wrench--regular'
|
|
57
|
+
iconOnly
|
|
58
|
+
label={t('debug.button')}
|
|
59
|
+
onClick={() => onEvent?.({ type: 'toggle-debug' })}
|
|
60
|
+
/>
|
|
55
61
|
</div>
|
|
56
62
|
);
|
|
57
63
|
};
|