@dxos/plugin-assistant 0.8.4-main.67995b8 → 0.8.4-main.dedc0f3
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/{BlueprintContainer-IZ4AK5EO.mjs → BlueprintContainer-BFNN6K46.mjs} +4 -3
- package/dist/lib/browser/ChatCompanion-YYYCHZYV.mjs +126 -0
- package/dist/lib/browser/ChatCompanion-YYYCHZYV.mjs.map +7 -0
- package/dist/lib/browser/{ChatContainer-RP3QEXYX.mjs → ChatContainer-G6YHR6GJ.mjs} +34 -13
- package/dist/lib/browser/ChatContainer-G6YHR6GJ.mjs.map +7 -0
- package/dist/lib/browser/{ChatDialog-ZVLXFHEY.mjs → ChatDialog-HJ7VDRQO.mjs} +28 -12
- package/dist/lib/browser/ChatDialog-HJ7VDRQO.mjs.map +7 -0
- package/dist/lib/browser/{SequenceContainer-3UDVKWPA.mjs → SequenceContainer-TF5QNXYM.mjs} +5 -17
- package/dist/lib/browser/SequenceContainer-TF5QNXYM.mjs.map +7 -0
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs +22 -0
- package/dist/lib/browser/ai-service-YC2EQPHA.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-XSEOKJLG.mjs → app-graph-builder-3C43MLCD.mjs} +25 -36
- package/dist/lib/browser/app-graph-builder-3C43MLCD.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-VHFSRTEJ.mjs +12 -0
- package/dist/lib/browser/blueprint-definition-VHFSRTEJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-EZUSNS2J.mjs +19 -0
- package/dist/lib/browser/chunk-EZUSNS2J.mjs.map +7 -0
- package/dist/lib/browser/chunk-GLWD66TA.mjs +161 -0
- package/dist/lib/browser/chunk-GLWD66TA.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-O4LUJEDV.mjs +20 -0
- package/dist/lib/browser/{chunk-FDCJSQYF.mjs.map → chunk-O4LUJEDV.mjs.map} +2 -2
- package/dist/lib/browser/chunk-PL4O4ZJU.mjs +1974 -0
- package/dist/lib/browser/chunk-PL4O4ZJU.mjs.map +7 -0
- package/dist/lib/browser/chunk-PPJAIE2T.mjs +299 -0
- package/dist/lib/browser/chunk-PPJAIE2T.mjs.map +7 -0
- package/dist/lib/browser/chunk-PQI3MGDN.mjs +169 -0
- package/dist/lib/browser/chunk-PQI3MGDN.mjs.map +7 -0
- package/dist/lib/browser/chunk-R6LRGW3I.mjs +216 -0
- package/dist/lib/browser/chunk-R6LRGW3I.mjs.map +7 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs +202 -0
- package/dist/lib/browser/chunk-SMIVXXAI.mjs.map +7 -0
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs +155 -0
- package/dist/lib/browser/compute-runtime-X6IREJN3.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs +22 -0
- package/dist/lib/browser/edge-model-resolver-JNEB355N.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +148 -62
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/intent-resolver-I6M3ZDAS.mjs +112 -0
- package/dist/lib/browser/intent-resolver-I6M3ZDAS.mjs.map +7 -0
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs +21 -0
- package/dist/lib/browser/local-model-resolver-EUXSRZ7X.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-3GYEHQRP.mjs → react-surface-WNLA2636.mjs} +25 -66
- package/dist/lib/browser/react-surface-WNLA2636.mjs.map +7 -0
- package/dist/lib/browser/{settings-5GTTCVGD.mjs → settings-36V3VUMW.mjs} +6 -5
- package/dist/lib/{node-esm/settings-J2EXEM5H.mjs.map → browser/settings-36V3VUMW.mjs.map} +1 -1
- package/dist/lib/browser/state-AINRYS5W.mjs +21 -0
- package/dist/lib/browser/state-AINRYS5W.mjs.map +7 -0
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs +191 -0
- package/dist/lib/browser/toolkit-Y5OYX5PO.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -4
- package/dist/lib/node-esm/{BlueprintContainer-RGTMNLNX.mjs → BlueprintContainer-X4MRBKDR.mjs} +4 -3
- package/dist/lib/{browser/BlueprintContainer-IZ4AK5EO.mjs.map → node-esm/BlueprintContainer-X4MRBKDR.mjs.map} +1 -1
- package/dist/lib/node-esm/ChatCompanion-PUAFRIEC.mjs +127 -0
- package/dist/lib/node-esm/ChatCompanion-PUAFRIEC.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatContainer-W3W6FWV3.mjs → ChatContainer-EZZF7RSQ.mjs} +34 -13
- package/dist/lib/node-esm/ChatContainer-EZZF7RSQ.mjs.map +7 -0
- package/dist/lib/node-esm/{ChatDialog-QW4JRKVO.mjs → ChatDialog-PTQLZNJU.mjs} +28 -12
- package/dist/lib/node-esm/ChatDialog-PTQLZNJU.mjs.map +7 -0
- package/dist/lib/node-esm/{SequenceContainer-RQQH5XOC.mjs → SequenceContainer-UXOVZPZO.mjs} +5 -17
- package/dist/lib/node-esm/SequenceContainer-UXOVZPZO.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs +23 -0
- package/dist/lib/node-esm/ai-service-XUMZVFCK.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-PANCJUHV.mjs → app-graph-builder-NM3JDLQ2.mjs} +25 -36
- package/dist/lib/node-esm/app-graph-builder-NM3JDLQ2.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-4E6XTLVN.mjs +13 -0
- package/dist/lib/node-esm/blueprint-definition-4E6XTLVN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs +170 -0
- package/dist/lib/node-esm/chunk-4WLFSXZG.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs +203 -0
- package/dist/lib/node-esm/chunk-7YOGZI66.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-LVTG5JTW.mjs +217 -0
- package/dist/lib/node-esm/chunk-LVTG5JTW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QG2KT3AT.mjs +163 -0
- package/dist/lib/node-esm/chunk-QG2KT3AT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VFY2JG62.mjs +22 -0
- package/dist/lib/node-esm/{chunk-QN2H2EHV.mjs.map → chunk-VFY2JG62.mjs.map} +2 -2
- package/dist/lib/node-esm/chunk-VH3LTD76.mjs +300 -0
- package/dist/lib/node-esm/chunk-VH3LTD76.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XD4CDA4R.mjs +20 -0
- package/dist/lib/node-esm/chunk-XD4CDA4R.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZIDP7HBI.mjs +1975 -0
- package/dist/lib/node-esm/chunk-ZIDP7HBI.mjs.map +7 -0
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs +156 -0
- package/dist/lib/node-esm/compute-runtime-NRHLLTSC.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs +23 -0
- package/dist/lib/node-esm/edge-model-resolver-UE5TLLJZ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +148 -62
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/intent-resolver-VIINHFMT.mjs +113 -0
- package/dist/lib/node-esm/intent-resolver-VIINHFMT.mjs.map +7 -0
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs +22 -0
- package/dist/lib/node-esm/local-model-resolver-JBEFVVZA.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-QDQWJ7FZ.mjs → react-surface-GP3LU6DX.mjs} +25 -66
- package/dist/lib/node-esm/react-surface-GP3LU6DX.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-J2EXEM5H.mjs → settings-7ZCZ6AS5.mjs} +6 -5
- package/dist/lib/{browser/settings-5GTTCVGD.mjs.map → node-esm/settings-7ZCZ6AS5.mjs.map} +1 -1
- package/dist/lib/node-esm/state-EQS5KP6M.mjs +22 -0
- package/dist/lib/node-esm/state-EQS5KP6M.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs +192 -0
- package/dist/lib/node-esm/toolkit-2F2OL6WB.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -4
- package/dist/types/src/AssistantPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/ai-service.d.ts +5 -0
- package/dist/types/src/capabilities/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +7 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +32 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts +5 -0
- package/dist/types/src/capabilities/compute-runtime.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts +4 -0
- package/dist/types/src/capabilities/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +12 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver.d.ts +10 -0
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit.d.ts +4 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +20 -17
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +5 -0
- package/dist/types/src/components/Chat/events.d.ts.map +1 -1
- package/dist/types/src/components/ChatCompanion.d.ts +13 -0
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -0
- package/dist/types/src/components/ChatContainer.d.ts +4 -4
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts.map +1 -1
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts +7 -0
- package/dist/types/src/components/ChatProgress/ChatProgress.d.ts.map +1 -0
- package/dist/types/src/components/ChatProgress/index.d.ts +2 -0
- package/dist/types/src/components/ChatProgress/index.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatActions.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts +20 -0
- package/dist/types/src/components/ChatPrompt/ChatOptions.d.ts.map +1 -0
- package/dist/types/src/components/ChatPrompt/ChatPresets.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts +4 -5
- package/dist/types/src/components/ChatPrompt/ChatReferences.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts +6 -4
- package/dist/types/src/components/ChatPrompt/ChatStatusIndicator.d.ts.map +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts +1 -1
- package/dist/types/src/components/ChatPrompt/index.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.d.ts +10 -7
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +115 -32
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/Link.d.ts +9 -0
- package/dist/types/src/components/ChatThread/Link.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts +40 -0
- package/dist/types/src/components/ChatThread/reducers.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/registry.d.ts +11 -0
- package/dist/types/src/components/ChatThread/registry.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.d.ts +36 -0
- package/dist/types/src/components/ChatThread/sync.d.ts.map +1 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts +2 -0
- package/dist/types/src/components/ChatThread/sync.test.d.ts.map +1 -0
- package/dist/types/src/components/PromptSettings.d.ts.map +1 -1
- package/dist/types/src/components/SequenceContainer.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +1 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +261 -2
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts +0 -5
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +261 -6
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +258 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts +12 -0
- package/dist/types/src/components/TemplateEditor/handlebars-extension.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts +19 -0
- package/dist/types/src/components/ToolBlock/ToolBlock.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts +2 -0
- package/dist/types/src/components/ToolBlock/ToolBlockWidget.d.ts.map +1 -0
- package/dist/types/src/components/ToolBlock/index.d.ts +3 -0
- package/dist/types/src/components/ToolBlock/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts +5 -0
- package/dist/types/src/components/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/index.d.ts +2 -0
- package/dist/types/src/components/Toolbar/index.d.ts.map +1 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts +11 -0
- package/dist/types/src/components/Toolbar/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/components/Toolbox/Toolbox.d.ts +4 -9
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +262 -4
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +4 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +1 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/execution-graph/execution-graph.d.ts +21 -0
- package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
- package/dist/types/src/execution-graph/index.d.ts +2 -0
- package/dist/types/src/execution-graph/index.d.ts.map +1 -0
- package/dist/types/src/functions/analysis.d.ts +5 -0
- package/dist/types/src/functions/analysis.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +4 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/list.d.ts +10 -0
- package/dist/types/src/functions/list.d.ts.map +1 -0
- package/dist/types/src/functions/load.d.ts +8 -0
- package/dist/types/src/functions/load.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +9 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +24 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +8 -21
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +5 -6
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +8 -0
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +4 -0
- package/dist/types/src/hooks/useContextBinder.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextObjects.d.ts +15 -0
- package/dist/types/src/hooks/useContextObjects.d.ts.map +1 -0
- package/dist/types/src/hooks/useExecutionGraph.d.ts +6 -0
- package/dist/types/src/hooks/useExecutionGraph.d.ts.map +1 -0
- package/dist/types/src/hooks/useFlush.d.ts +6 -0
- package/dist/types/src/hooks/useFlush.d.ts.map +1 -0
- package/dist/types/src/hooks/useItemTypes.d.ts +4 -0
- package/dist/types/src/hooks/useItemTypes.d.ts.map +1 -0
- package/dist/types/src/hooks/useOnline.d.ts +3 -0
- package/dist/types/src/hooks/useOnline.d.ts.map +1 -0
- package/dist/types/src/hooks/usePresets.d.ts +7 -0
- package/dist/types/src/hooks/usePresets.d.ts.map +1 -0
- package/dist/types/src/hooks/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +3 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/{hooks → processor}/presets.d.ts +2 -2
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +73 -0
- package/dist/types/src/processor/processor.d.ts.map +1 -0
- package/dist/types/src/processor/processor.test.d.ts +2 -0
- package/dist/types/src/processor/processor.test.d.ts.map +1 -0
- package/dist/types/src/stories/Chat.stories.d.ts +25 -202
- package/dist/types/src/stories/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/stories/components/BlueprintContainer.d.ts +4 -0
- package/dist/types/src/stories/components/BlueprintContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ChessContainer.d.ts +4 -0
- package/dist/types/src/stories/components/ChessContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/CommentsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/CommentsContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/DebugCard.d.ts +8 -0
- package/dist/types/src/stories/components/DebugCard.d.ts.map +1 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts +6 -0
- package/dist/types/src/stories/components/GraphContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/InvocationsContainer.d.ts +4 -0
- package/dist/types/src/stories/components/InvocationsContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/LoggingContainer.d.ts +7 -0
- package/dist/types/src/stories/components/LoggingContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/MessageContainer.d.ts +4 -0
- package/dist/types/src/stories/components/MessageContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts +6 -0
- package/dist/types/src/stories/components/PromptContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchInputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts +4 -0
- package/dist/types/src/stories/components/ResearchOutputStack.d.ts.map +1 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts +4 -0
- package/dist/types/src/stories/components/TasksContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts +3 -0
- package/dist/types/src/stories/components/TokenManagerContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts +14 -0
- package/dist/types/src/stories/components/TriggersContainer.d.ts.map +1 -0
- package/dist/types/src/stories/components/index.d.ts +16 -0
- package/dist/types/src/stories/components/index.d.ts.map +1 -0
- package/dist/types/src/stories/components/types.d.ts +7 -0
- package/dist/types/src/stories/components/types.d.ts.map +1 -0
- package/dist/types/src/stories/testing/data.d.ts +9 -0
- package/dist/types/src/stories/testing/data.d.ts.map +1 -0
- package/dist/types/src/stories/testing/index.d.ts +3 -0
- package/dist/types/src/stories/testing/index.d.ts.map +1 -0
- package/dist/types/src/stories/testing/schema.d.ts +7 -0
- package/dist/types/src/stories/testing/schema.d.ts.map +1 -0
- package/dist/types/src/stories/testing/testing.d.ts +48 -0
- package/dist/types/src/stories/testing/testing.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-data.d.ts +14 -0
- package/dist/types/src/testing/test-data.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +5 -2
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +7 -0
- package/dist/types/src/testing/test-generator.d.ts.map +1 -0
- package/dist/types/src/testing/test-sequence.d.ts +0 -4
- package/dist/types/src/testing/test-sequence.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +28 -12
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +42 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +107 -0
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
- package/dist/types/src/types/defs.d.ts +2 -0
- package/dist/types/src/types/defs.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 +6 -3
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +108 -86
- package/src/AssistantPlugin.tsx +61 -17
- package/src/capabilities/ai-service.ts +28 -0
- package/src/capabilities/app-graph-builder.ts +41 -48
- package/src/capabilities/blueprint-definition.ts +58 -0
- package/src/capabilities/capabilities.ts +71 -0
- package/src/capabilities/compute-runtime.ts +124 -0
- package/src/capabilities/edge-model-resolver.ts +27 -0
- package/src/capabilities/index.ts +10 -0
- package/src/capabilities/intent-resolver.ts +45 -23
- package/src/capabilities/local-model-resolver.ts +32 -0
- package/src/capabilities/react-surface.tsx +10 -57
- package/src/capabilities/state.ts +20 -0
- package/src/capabilities/toolkit.ts +163 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +83 -76
- package/src/components/Chat/Chat.tsx +175 -174
- package/src/components/Chat/events.ts +7 -0
- package/src/components/ChatCompanion.tsx +111 -0
- package/src/components/ChatContainer.tsx +19 -13
- package/src/components/ChatDialog.tsx +18 -14
- package/src/components/ChatProgress/ChatProgress.tsx +68 -0
- package/src/components/ChatProgress/index.ts +5 -0
- package/src/components/ChatPrompt/ChatActions.tsx +10 -24
- package/src/components/ChatPrompt/ChatOptions.tsx +233 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +31 -36
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
- package/src/components/ChatPrompt/index.ts +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +97 -110
- package/src/components/ChatThread/ChatThread.tsx +65 -29
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/reducers.ts +151 -0
- package/src/components/ChatThread/registry.tsx +189 -0
- package/src/components/ChatThread/sync.test.ts +81 -0
- package/src/components/ChatThread/sync.ts +113 -0
- package/src/components/PromptSettings.tsx +1 -0
- package/src/components/SequenceContainer.tsx +27 -28
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +5 -4
- package/src/components/SequenceEditor/SequenceEditor.tsx +1 -1
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +25 -12
- package/src/components/TemplateEditor/TemplateEditor.tsx +14 -47
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +12 -5
- package/src/components/TemplateEditor/TemplateForm.tsx +3 -1
- package/src/components/TemplateEditor/handlebars-extension.ts +165 -0
- package/src/components/ToolBlock/ToolBlock.tsx +152 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbar/Toolbar.tsx +21 -0
- package/src/components/Toolbar/index.ts +5 -0
- package/src/components/Toolbar/useChatToolbarActions.ts +126 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +10 -16
- package/src/components/Toolbox/Toolbox.tsx +21 -51
- package/src/components/index.ts +3 -4
- package/src/events.ts +2 -2
- package/src/execution-graph/execution-graph.ts +211 -0
- package/src/execution-graph/index.ts +5 -0
- package/src/functions/analysis.ts +20 -0
- package/src/functions/index.ts +7 -0
- package/src/functions/list.ts +46 -0
- package/src/functions/load.ts +42 -0
- package/src/hooks/index.ts +9 -4
- package/src/hooks/useBlueprintRegistry.ts +80 -0
- package/src/hooks/useChatProcessor.ts +21 -98
- package/src/hooks/useChatServices.ts +29 -48
- package/src/hooks/useComputeRuntimeCallback.ts +25 -0
- package/src/hooks/useContextBinder.ts +18 -0
- package/src/hooks/useContextObjects.ts +58 -0
- package/src/hooks/useExecutionGraph.ts +20 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useItemTypes.ts +37 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +44 -0
- package/src/hooks/useReferencesProvider.ts +11 -9
- package/src/meta.ts +1 -1
- package/src/processor/index.ts +6 -0
- package/src/{hooks → processor}/presets.ts +14 -6
- package/src/processor/processor.test.ts +77 -0
- package/src/processor/processor.ts +302 -0
- package/src/queue-logger.ts +10 -10
- package/src/stories/Chat.stories.tsx +594 -308
- package/src/stories/components/BlueprintContainer.tsx +34 -0
- package/src/stories/components/ChatContainer.tsx +74 -0
- package/src/stories/components/ChessContainer.tsx +17 -0
- package/src/stories/components/CommentsContainer.tsx +25 -0
- package/src/stories/components/DebugCard.tsx +61 -0
- package/src/stories/components/GraphContainer.tsx +119 -0
- package/src/stories/components/InvocationsContainer.tsx +17 -0
- package/src/stories/components/LoggingContainer.tsx +33 -0
- package/src/stories/components/MessageContainer.tsx +22 -0
- package/src/stories/components/PromptContainer.tsx +52 -0
- package/src/stories/components/ResearchInputStack.tsx +30 -0
- package/src/stories/components/ResearchOutputStack.tsx +29 -0
- package/src/stories/components/TasksContainer.tsx +49 -0
- package/src/stories/components/TokenManagerContainer.tsx +14 -0
- package/src/stories/components/TriggersContainer.tsx +75 -0
- package/src/stories/components/index.ts +20 -0
- package/src/stories/components/types.ts +11 -0
- package/src/stories/testing/data.ts +142 -0
- package/src/stories/testing/index.ts +6 -0
- package/src/stories/testing/schema.ts +17 -0
- package/src/stories/testing/testing.tsx +279 -0
- package/src/testing/index.ts +3 -1
- package/src/testing/test-data.ts +245 -0
- package/src/testing/test-functions.ts +8 -3
- package/src/testing/test-generator.ts +257 -0
- package/src/testing/test-sequence.ts +2 -27
- package/src/translations.ts +31 -12
- package/src/types/Assistant.ts +61 -0
- package/src/types/AssistantAction.ts +62 -0
- package/src/types/defs.ts +5 -0
- package/src/types/index.ts +4 -1
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/ChatContainer-RP3QEXYX.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-ZVLXFHEY.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-XSEOKJLG.mjs.map +0 -7
- package/dist/lib/browser/chunk-63GG6U6D.mjs +0 -2226
- package/dist/lib/browser/chunk-63GG6U6D.mjs.map +0 -7
- package/dist/lib/browser/chunk-7W7LHTRH.mjs +0 -171
- package/dist/lib/browser/chunk-7W7LHTRH.mjs.map +0 -7
- package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
- package/dist/lib/browser/chunk-KFXSBNZR.mjs +0 -89
- package/dist/lib/browser/chunk-KFXSBNZR.mjs.map +0 -7
- package/dist/lib/browser/chunk-LERGF5YG.mjs +0 -108
- package/dist/lib/browser/chunk-LERGF5YG.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs +0 -75
- package/dist/lib/browser/intent-resolver-MV3VSZLS.mjs.map +0 -7
- package/dist/lib/browser/react-surface-3GYEHQRP.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-W3W6FWV3.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-QW4JRKVO.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-PANCJUHV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BFO3KHYL.mjs +0 -2227
- package/dist/lib/node-esm/chunk-BFO3KHYL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MS3PJARN.mjs +0 -109
- package/dist/lib/node-esm/chunk-MS3PJARN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
- package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs +0 -90
- package/dist/lib/node-esm/chunk-VIIMA3XQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Z7PUODRT.mjs +0 -172
- package/dist/lib/node-esm/chunk-Z7PUODRT.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs +0 -76
- package/dist/lib/node-esm/intent-resolver-3FMC3GHC.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-QDQWJ7FZ.mjs.map +0 -7
- package/dist/types/src/capability-definitions.d.ts +0 -7
- package/dist/types/src/capability-definitions.d.ts.map +0 -1
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts +0 -9
- package/dist/types/src/components/ChatPrompt/ChatOptionsMenu.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts +0 -17
- package/dist/types/src/components/ChatThread/ChatMessage.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts +0 -19
- package/dist/types/src/components/ChatThread/ToolBlock.d.ts.map +0 -1
- package/dist/types/src/components/ChatThread/reducer.d.ts +0 -12
- package/dist/types/src/components/ChatThread/reducer.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.d.ts +0 -86
- package/dist/types/src/hooks/chat-processor.d.ts.map +0 -1
- package/dist/types/src/hooks/chat-processor.test.d.ts +0 -2
- package/dist/types/src/hooks/chat-processor.test.d.ts.map +0 -1
- package/dist/types/src/hooks/presets.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlueprints.d.ts +0 -9
- package/dist/types/src/hooks/useBlueprints.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.d.ts +0 -4
- package/dist/types/src/parser/filter-generator.d.ts.map +0 -1
- package/dist/types/src/parser/filter-generator.test.d.ts +0 -2
- package/dist/types/src/parser/filter-generator.test.d.ts.map +0 -1
- package/dist/types/src/parser/index.d.ts +0 -4
- package/dist/types/src/parser/index.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.d.ts +0 -15
- package/dist/types/src/parser/query-parser.d.ts.map +0 -1
- package/dist/types/src/parser/query-parser.test.d.ts +0 -2
- package/dist/types/src/parser/query-parser.test.d.ts.map +0 -1
- package/dist/types/src/parser/types.d.ts +0 -24
- package/dist/types/src/parser/types.d.ts.map +0 -1
- package/dist/types/src/tools/function.d.ts +0 -5
- package/dist/types/src/tools/function.d.ts.map +0 -1
- package/dist/types/src/tools/index.d.ts +0 -3
- package/dist/types/src/tools/index.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.d.ts +0 -10
- package/dist/types/src/tools/openapi.d.ts.map +0 -1
- package/dist/types/src/tools/openapi.test.d.ts +0 -2
- package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -120
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capability-definitions.ts +0 -15
- package/src/components/ChatPrompt/ChatOptionsMenu.tsx +0 -52
- package/src/components/ChatThread/ChatMessage.tsx +0 -268
- package/src/components/ChatThread/ToolBlock.tsx +0 -121
- package/src/components/ChatThread/reducer.ts +0 -52
- package/src/hooks/chat-processor.test.ts +0 -16
- package/src/hooks/chat-processor.ts +0 -314
- package/src/hooks/useBlueprints.ts +0 -57
- package/src/parser/filter-generator.test.ts +0 -32
- package/src/parser/filter-generator.ts +0 -81
- package/src/parser/index.ts +0 -7
- package/src/parser/query-parser.test.ts +0 -139
- package/src/parser/query-parser.ts +0 -199
- package/src/parser/types.ts +0 -34
- package/src/shims.d.ts +0 -8
- package/src/tools/function.ts +0 -46
- package/src/tools/index.ts +0 -6
- package/src/tools/openapi.test.ts +0 -217
- package/src/tools/openapi.ts +0 -338
- package/src/types/schema.ts +0 -108
- package/src/typings.d.ts +0 -9
- /package/dist/lib/{node-esm/BlueprintContainer-RGTMNLNX.mjs.map → browser/BlueprintContainer-BFNN6K46.mjs.map} +0 -0
|
@@ -5,37 +5,43 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, useCapability } from '@dxos/app-framework';
|
|
8
|
-
import { type AssociatedArtifact } from '@dxos/blueprints';
|
|
9
8
|
import { getSpace } from '@dxos/client/echo';
|
|
9
|
+
import { type Obj } from '@dxos/echo';
|
|
10
10
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
import { useChatProcessor, useChatServices } from '../hooks';
|
|
12
|
+
import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '../hooks';
|
|
14
13
|
import { meta } from '../meta';
|
|
15
14
|
import { type Assistant } from '../types';
|
|
16
15
|
|
|
16
|
+
import { Chat } from './Chat';
|
|
17
|
+
import { Toolbar } from './Toolbar';
|
|
18
|
+
|
|
17
19
|
export type ChatContainerProps = {
|
|
18
|
-
role: string;
|
|
19
20
|
chat: Assistant.Chat;
|
|
20
|
-
|
|
21
|
+
companionTo?: Obj.Any;
|
|
22
|
+
role?: string;
|
|
21
23
|
};
|
|
22
24
|
|
|
23
|
-
export const ChatContainer = ({
|
|
25
|
+
export const ChatContainer = ({ chat, companionTo }: ChatContainerProps) => {
|
|
24
26
|
const space = getSpace(chat);
|
|
25
27
|
const settings = useCapability(Capabilities.SettingsStore).getStore<Assistant.Settings>(meta.id)?.value;
|
|
26
|
-
const services = useChatServices({ space });
|
|
27
|
-
const
|
|
28
|
+
const services = useChatServices({ space, chat });
|
|
29
|
+
const [online, setOnline] = useOnline();
|
|
30
|
+
const { preset, ...chatProps } = usePresets(online);
|
|
31
|
+
const blueprintRegistry = useBlueprintRegistry();
|
|
32
|
+
const processor = useChatProcessor({ chat, preset, services, blueprintRegistry, settings });
|
|
33
|
+
|
|
28
34
|
if (!processor) {
|
|
29
35
|
return null;
|
|
30
36
|
}
|
|
31
37
|
|
|
32
|
-
// TODO(burdon): Add attention attributes.
|
|
33
38
|
return (
|
|
34
|
-
<StackItem.Content classNames='container-max-width'>
|
|
35
|
-
<
|
|
39
|
+
<StackItem.Content toolbar={!!companionTo} classNames='container-max-width'>
|
|
40
|
+
{!!companionTo && <Toolbar chat={chat} companionTo={companionTo} />}
|
|
41
|
+
<Chat.Root chat={chat} processor={processor}>
|
|
36
42
|
<Chat.Thread />
|
|
37
|
-
<div className='
|
|
38
|
-
<Chat.Prompt
|
|
43
|
+
<div className='p-2'>
|
|
44
|
+
<Chat.Prompt {...chatProps} outline preset={preset?.id} online={online} onOnlineChange={setOnline} />
|
|
39
45
|
</div>
|
|
40
46
|
</Chat.Root>
|
|
41
47
|
</StackItem.Content>
|
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, useCapability } from '@dxos/app-framework';
|
|
8
8
|
import { getSpace } from '@dxos/client/echo';
|
|
9
9
|
import { useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import { ChatDialog as
|
|
10
|
+
import { ChatDialog as NaturalChatDialog } from '@dxos/react-ui-chat';
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
import { useChatProcessor, useChatServices } from '../hooks';
|
|
12
|
+
import { useBlueprintRegistry, useChatProcessor, useChatServices, useOnline, usePresets } from '../hooks';
|
|
14
13
|
import { meta } from '../meta';
|
|
15
14
|
import { type Assistant } from '../types';
|
|
16
15
|
|
|
16
|
+
import { Chat, type ChatRootProps } from './Chat';
|
|
17
|
+
|
|
17
18
|
export type ChatDialogProps = {
|
|
18
19
|
chat?: Assistant.Chat;
|
|
19
20
|
};
|
|
@@ -23,8 +24,11 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
|
|
|
23
24
|
|
|
24
25
|
const space = getSpace(chat);
|
|
25
26
|
const settings = useCapability(Capabilities.SettingsStore).getStore<Assistant.Settings>(meta.id)?.value;
|
|
26
|
-
const services = useChatServices({ space });
|
|
27
|
-
const
|
|
27
|
+
const services = useChatServices({ space, chat });
|
|
28
|
+
const [online, setOnline] = useOnline();
|
|
29
|
+
const { preset, ...chatProps } = usePresets(online);
|
|
30
|
+
const blueprintRegistry = useBlueprintRegistry();
|
|
31
|
+
const processor = useChatProcessor({ chat, preset, services, blueprintRegistry, settings });
|
|
28
32
|
|
|
29
33
|
// TODO(burdon): Refocus when open.
|
|
30
34
|
const [open, setOpen] = useState(true);
|
|
@@ -48,15 +52,15 @@ export const ChatDialog = ({ chat }: ChatDialogProps) => {
|
|
|
48
52
|
|
|
49
53
|
return (
|
|
50
54
|
<Chat.Root chat={chat} processor={processor} onEvent={handleEvent}>
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
<
|
|
55
|
+
<NaturalChatDialog.Root open={open} expanded={expanded} onOpenChange={setOpen}>
|
|
56
|
+
<NaturalChatDialog.Header title={t('assistant dialog title')} />
|
|
57
|
+
<NaturalChatDialog.Content>
|
|
54
58
|
<Chat.Thread />
|
|
55
|
-
</
|
|
56
|
-
<
|
|
57
|
-
<Chat.Prompt expandable />
|
|
58
|
-
</
|
|
59
|
-
</
|
|
59
|
+
</NaturalChatDialog.Content>
|
|
60
|
+
<NaturalChatDialog.Footer classNames='p-1.5'>
|
|
61
|
+
<Chat.Prompt {...chatProps} preset={preset?.id} online={online} onOnlineChange={setOnline} expandable />
|
|
62
|
+
</NaturalChatDialog.Footer>
|
|
63
|
+
</NaturalChatDialog.Root>
|
|
60
64
|
</Chat.Root>
|
|
61
65
|
);
|
|
62
66
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { addEventListener } from '@dxos/async';
|
|
8
|
+
import { Flex, ProgressBar, type ProgressBarProps, TextCrawl } from '@dxos/react-ui-components';
|
|
9
|
+
|
|
10
|
+
import { useExecutionGraph } from '../../hooks';
|
|
11
|
+
import { type Assistant } from '../../types';
|
|
12
|
+
|
|
13
|
+
// TODO(burdon): Reset after each session.
|
|
14
|
+
// TODO(burdon): Show after delay.
|
|
15
|
+
// TODO(burdon): Test with errors.
|
|
16
|
+
// TODO(burdon): Filter out empty trace messages.
|
|
17
|
+
|
|
18
|
+
// {
|
|
19
|
+
// "id": "01K3TE3C2VAXETP500QKDHK3C4_block_3",
|
|
20
|
+
// "branch": "main",
|
|
21
|
+
// "parents": [],
|
|
22
|
+
// "icon": "ph--robot--regular",
|
|
23
|
+
// "message": "\n"
|
|
24
|
+
// }
|
|
25
|
+
|
|
26
|
+
export type ChatProgressProps = {
|
|
27
|
+
chat: Assistant.Chat;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const ChatProgress = ({ chat }: ChatProgressProps) => {
|
|
31
|
+
const { commits } = useExecutionGraph(chat.traceQueue?.target, true);
|
|
32
|
+
const nodes = useMemo(() => commits.map((commit) => ({ id: commit.id, message: commit.message })), [commits]);
|
|
33
|
+
const lines = useMemo(() => commits.map((commit) => commit.message), [commits]);
|
|
34
|
+
|
|
35
|
+
const [index, setIndex] = useState<number | undefined>(undefined);
|
|
36
|
+
const handleSelect = useCallback<NonNullable<ProgressBarProps['onSelect']>>(({ index }) => {
|
|
37
|
+
setIndex((current) => {
|
|
38
|
+
return current === index ? undefined : index;
|
|
39
|
+
});
|
|
40
|
+
}, []);
|
|
41
|
+
|
|
42
|
+
const ref = useRef<HTMLDivElement>(null);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (!ref.current) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return addEventListener(ref.current, 'keydown', (event) => {
|
|
49
|
+
switch (event.key) {
|
|
50
|
+
case 'ArrowLeft': {
|
|
51
|
+
setIndex((current) => (current === undefined || current <= 0 ? 0 : current - 1));
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
case 'ArrowRight': {
|
|
55
|
+
setIndex((current) => (current === undefined || current >= nodes.length ? nodes.length - 1 : current + 1));
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}, [nodes.length]);
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Flex column tabIndex={0} ref={ref} classNames='outline-none'>
|
|
64
|
+
<ProgressBar nodes={nodes} index={index} onSelect={handleSelect} />
|
|
65
|
+
<TextCrawl lines={lines} index={index} autoAdvance classNames='pis-4 text-sm text-subdued' />
|
|
66
|
+
</Flex>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
@@ -26,34 +26,20 @@ export const ChatActions = ({ classNames, children, microphone, recording, proce
|
|
|
26
26
|
<div className={mx('flex items-center mie-1', classNames)}>
|
|
27
27
|
{children}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
onClick={() => onEvent?.({ type: 'cancel' })}
|
|
39
|
-
/>
|
|
40
|
-
)) || (
|
|
41
|
-
<IconButton
|
|
42
|
-
disabled
|
|
43
|
-
classNames='px-1.5'
|
|
44
|
-
variant='ghost'
|
|
45
|
-
size={5}
|
|
46
|
-
icon='ph--arrow-down--regular'
|
|
47
|
-
iconOnly
|
|
48
|
-
label={t('button scroll down')}
|
|
49
|
-
onClick={() => onEvent?.({ type: 'scroll-to-bottom' })}
|
|
50
|
-
/>
|
|
51
|
-
)}
|
|
29
|
+
<IconButton
|
|
30
|
+
disabled={!processing}
|
|
31
|
+
variant='ghost'
|
|
32
|
+
size={5}
|
|
33
|
+
icon='ph--x--regular'
|
|
34
|
+
iconOnly
|
|
35
|
+
label={t('button cancel processing')}
|
|
36
|
+
onClick={() => onEvent?.({ type: 'cancel' })}
|
|
37
|
+
/>
|
|
52
38
|
|
|
53
39
|
{microphone && (
|
|
54
40
|
<IconButton
|
|
55
41
|
disabled={!processing}
|
|
56
|
-
classNames={mx(
|
|
42
|
+
classNames={mx(recording && 'bg-primary-500')}
|
|
57
43
|
variant='ghost'
|
|
58
44
|
size={5}
|
|
59
45
|
icon='ph--microphone--regular'
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { type JSX, useMemo, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { type AiContextBinder } from '@dxos/assistant';
|
|
8
|
+
import { type Blueprint } from '@dxos/blueprints';
|
|
9
|
+
import { Filter, Obj, Type } from '@dxos/echo';
|
|
10
|
+
import { type Space, useQuery } from '@dxos/react-client/echo';
|
|
11
|
+
import { Icon, IconButton, Popover, Select, useTranslation } from '@dxos/react-ui';
|
|
12
|
+
import { SearchList } from '@dxos/react-ui-searchlist';
|
|
13
|
+
import { Tabs } from '@dxos/react-ui-tabs';
|
|
14
|
+
|
|
15
|
+
import { useActiveBlueprints, useBlueprintHandlers, useBlueprints, useContextObjects, useItemTypes } from '../../hooks';
|
|
16
|
+
import { meta } from '../../meta';
|
|
17
|
+
|
|
18
|
+
const panelClassNames = 'is-[calc(100dvw-.5rem)] sm:is-max md:is-[25rem] max-is-[--text-content]';
|
|
19
|
+
|
|
20
|
+
export type ChatOptionsProps = {
|
|
21
|
+
space: Space;
|
|
22
|
+
context: AiContextBinder;
|
|
23
|
+
blueprintRegistry?: Blueprint.Registry;
|
|
24
|
+
presets?: { id: string; label: string }[];
|
|
25
|
+
preset?: string;
|
|
26
|
+
onPresetChange?: (id: string) => void;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Manages the runtime context for the chat.
|
|
31
|
+
*/
|
|
32
|
+
export const ChatOptions = ({
|
|
33
|
+
space,
|
|
34
|
+
context,
|
|
35
|
+
blueprintRegistry,
|
|
36
|
+
presets,
|
|
37
|
+
preset,
|
|
38
|
+
onPresetChange,
|
|
39
|
+
}: ChatOptionsProps) => {
|
|
40
|
+
const { t } = useTranslation(meta.id);
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div role='none' className='flex gap-0.5'>
|
|
44
|
+
<Popover.Root>
|
|
45
|
+
<Popover.Trigger asChild>
|
|
46
|
+
<IconButton variant='ghost' icon='ph--plus--regular' iconOnly size={5} label={t('button context objects')} />
|
|
47
|
+
</Popover.Trigger>
|
|
48
|
+
<Popover.Portal>
|
|
49
|
+
<Popover.Content side='top' classNames={panelClassNames}>
|
|
50
|
+
<ObjectsPanel space={space} context={context} />
|
|
51
|
+
<Popover.Arrow />
|
|
52
|
+
</Popover.Content>
|
|
53
|
+
</Popover.Portal>
|
|
54
|
+
</Popover.Root>
|
|
55
|
+
|
|
56
|
+
<Popover.Root>
|
|
57
|
+
<Popover.Trigger asChild>
|
|
58
|
+
<IconButton
|
|
59
|
+
variant='ghost'
|
|
60
|
+
icon='ph--sliders-horizontal--regular'
|
|
61
|
+
iconOnly
|
|
62
|
+
size={5}
|
|
63
|
+
label={t('button context settings')}
|
|
64
|
+
/>
|
|
65
|
+
</Popover.Trigger>
|
|
66
|
+
<Popover.Portal>
|
|
67
|
+
<Popover.Content side='top' classNames={panelClassNames}>
|
|
68
|
+
<Tabs.Root orientation='horizontal' defaultValue='blueprints' defaultActivePart='list'>
|
|
69
|
+
<Tabs.Viewport classNames='max-bs-[--radix-popover-content-available-height] grid grid-rows-[1fr_min-content] [&_[cmdk-root]]:contents [&_[role="tabpanel"]]:grid [&_[role="tabpanel"]]:grid-rows-[1fr_min-content] [&_[role="listbox"]]:min-bs-0 [&_[role="listbox"]]:overflow-y-auto [&_[role="tabpanel"]]:min-bs-0 [&_[role="tabpanel"]]:pli-cardSpacingChrome [&_[role="tabpanel"][data-state="active"]]:order-first [&_[role="tabpanel"][data-state="inactive"]]:hidden'>
|
|
70
|
+
<Tabs.Tabpanel value='blueprints'>
|
|
71
|
+
<BlueprintsPanel blueprintRegistry={blueprintRegistry} space={space} context={context} />
|
|
72
|
+
</Tabs.Tabpanel>
|
|
73
|
+
<Tabs.Tabpanel value='model'>
|
|
74
|
+
<ModelsPanel presets={presets} preset={preset} onPresetChange={onPresetChange} />
|
|
75
|
+
</Tabs.Tabpanel>
|
|
76
|
+
<Tabs.Tablist classNames='sm:overflow-x-hidden justify-center p-[--dx-cardSpacingChrome] border-bs border-subduedSeparator order-last'>
|
|
77
|
+
<Tabs.IconTab
|
|
78
|
+
value='blueprints'
|
|
79
|
+
icon='ph--blueprint--regular'
|
|
80
|
+
label={t('blueprints in context title')}
|
|
81
|
+
/>
|
|
82
|
+
<Tabs.IconTab value='model' label={t('chat model title')} icon='ph--cpu--regular' />
|
|
83
|
+
</Tabs.Tablist>
|
|
84
|
+
</Tabs.Viewport>
|
|
85
|
+
</Tabs.Root>
|
|
86
|
+
<Popover.Arrow />
|
|
87
|
+
</Popover.Content>
|
|
88
|
+
</Popover.Portal>
|
|
89
|
+
</Popover.Root>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const BlueprintsPanel = ({
|
|
95
|
+
blueprintRegistry,
|
|
96
|
+
space,
|
|
97
|
+
context,
|
|
98
|
+
}: Pick<ChatOptionsProps, 'blueprintRegistry' | 'space' | 'context'>) => {
|
|
99
|
+
const { t } = useTranslation(meta.id);
|
|
100
|
+
|
|
101
|
+
const blueprints = useBlueprints({ blueprintRegistry });
|
|
102
|
+
const activeBlueprints = useActiveBlueprints({ context });
|
|
103
|
+
const { onUpdateBlueprint } = useBlueprintHandlers({ space, context, blueprintRegistry });
|
|
104
|
+
|
|
105
|
+
return (
|
|
106
|
+
<SearchList.Root>
|
|
107
|
+
<SearchList.Content classNames='plb-cardSpacingChrome'>
|
|
108
|
+
{blueprints.map((blueprint) => {
|
|
109
|
+
const isActive = activeBlueprints.has(blueprint.key);
|
|
110
|
+
return (
|
|
111
|
+
<SearchList.Item
|
|
112
|
+
classNames='flex items-center overflow-hidden'
|
|
113
|
+
key={blueprint.key}
|
|
114
|
+
value={blueprint.name}
|
|
115
|
+
onSelect={() => onUpdateBlueprint?.(blueprint.key, !isActive)}
|
|
116
|
+
>
|
|
117
|
+
<div className='grow truncate'>{blueprint.name}</div>
|
|
118
|
+
<Icon icon='ph--check--regular' classNames={[!isActive && 'invisible']} />
|
|
119
|
+
</SearchList.Item>
|
|
120
|
+
);
|
|
121
|
+
})}
|
|
122
|
+
</SearchList.Content>
|
|
123
|
+
<SearchList.Input placeholder={t('search placeholder')} classNames='mbe-cardSpacingChrome' />
|
|
124
|
+
</SearchList.Root>
|
|
125
|
+
);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const ModelsPanel = ({
|
|
129
|
+
presets,
|
|
130
|
+
preset,
|
|
131
|
+
onPresetChange,
|
|
132
|
+
}: Pick<ChatOptionsProps, 'presets' | 'preset' | 'onPresetChange'>) => {
|
|
133
|
+
return (
|
|
134
|
+
<ul role='listbox' className='plb-cardSpacingChrome'>
|
|
135
|
+
{presets?.map(({ id, label }) => {
|
|
136
|
+
const isActive = preset === id;
|
|
137
|
+
return (
|
|
138
|
+
<li
|
|
139
|
+
role='option'
|
|
140
|
+
key={id}
|
|
141
|
+
aria-selected={isActive}
|
|
142
|
+
tabIndex={0}
|
|
143
|
+
className='overflow-hidden dx-focus-ring flex gap-2 p-1 pis-2 pie-2 items-center rounded-sm select-none cursor-pointer hover:bg-hoverOverlay'
|
|
144
|
+
onClick={() => onPresetChange?.(id)}
|
|
145
|
+
>
|
|
146
|
+
<div className='grow truncate'>{label}</div>
|
|
147
|
+
<Icon icon='ph--check--regular' classNames={[!isActive && 'invisible']} />
|
|
148
|
+
</li>
|
|
149
|
+
);
|
|
150
|
+
})}
|
|
151
|
+
</ul>
|
|
152
|
+
);
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const ANY = '__any__';
|
|
156
|
+
|
|
157
|
+
const ObjectsPanel = ({ space, context }: Pick<ChatOptionsProps, 'space' | 'context'>): JSX.Element => {
|
|
158
|
+
const { t } = useTranslation(meta.id);
|
|
159
|
+
|
|
160
|
+
// Item types sorted by label.
|
|
161
|
+
const types = useItemTypes(space);
|
|
162
|
+
const typenames = useMemo(() => {
|
|
163
|
+
const typenames = types.map((type) => {
|
|
164
|
+
const typename = Type.getTypename(type);
|
|
165
|
+
return {
|
|
166
|
+
typename,
|
|
167
|
+
label: t('typename label', { ns: typename, defaultValue: typename }),
|
|
168
|
+
};
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
typenames.sort((a, b) => a.label.localeCompare(b.label));
|
|
172
|
+
return typenames;
|
|
173
|
+
}, [types]);
|
|
174
|
+
|
|
175
|
+
// Current type and filter.
|
|
176
|
+
const [typename, setTypename] = useState<string>(ANY);
|
|
177
|
+
const anyFilter = useMemo(
|
|
178
|
+
() => Filter.or(...typenames.map(({ typename }) => Filter.typename(typename))),
|
|
179
|
+
[typenames],
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
// Context objects.
|
|
183
|
+
const objects = useQuery(space, typename === ANY ? anyFilter : Filter.typename(typename));
|
|
184
|
+
const { objects: contextObjects, onUpdateObject } = useContextObjects({ space, context });
|
|
185
|
+
|
|
186
|
+
return (
|
|
187
|
+
<SearchList.Root classNames='pis-2 pie-2'>
|
|
188
|
+
<SearchList.Content classNames='plb-cardSpacingChrome [&:has([cmdk-list-sizer]:empty)]:plb-0'>
|
|
189
|
+
{objects.length ? (
|
|
190
|
+
objects.map((object) => {
|
|
191
|
+
const label = Obj.getLabel(object) ?? Obj.getTypename(object) ?? object.id;
|
|
192
|
+
const isActive = contextObjects.findIndex((obj) => obj.id === object.id) !== -1;
|
|
193
|
+
return (
|
|
194
|
+
<SearchList.Item
|
|
195
|
+
classNames='flex items-center overflow-hidden'
|
|
196
|
+
key={object.id}
|
|
197
|
+
value={object.id}
|
|
198
|
+
onSelect={() => onUpdateObject?.(Obj.getDXN(object), !isActive)}
|
|
199
|
+
>
|
|
200
|
+
<div className='grow truncate'>{label}</div>
|
|
201
|
+
<Icon icon='ph--check--regular' classNames={[!isActive && 'invisible']} />
|
|
202
|
+
</SearchList.Item>
|
|
203
|
+
);
|
|
204
|
+
})
|
|
205
|
+
) : (
|
|
206
|
+
<SearchList.Item>{t('no results')}</SearchList.Item>
|
|
207
|
+
)}
|
|
208
|
+
</SearchList.Content>
|
|
209
|
+
|
|
210
|
+
<div role='none' className='grid grid-cols-[min-content_1fr] gap-2 mbe-cardSpacingChrome'>
|
|
211
|
+
<Select.Root value={typename === ANY ? undefined : typename} onValueChange={setTypename}>
|
|
212
|
+
<Select.TriggerButton density='fine' placeholder={t('type filter placeholder')} />
|
|
213
|
+
<Select.Portal>
|
|
214
|
+
<Select.Content>
|
|
215
|
+
<Select.ScrollUpButton />
|
|
216
|
+
<Select.Viewport>
|
|
217
|
+
<Select.Option value={ANY}>{t('any type filter label')}</Select.Option>
|
|
218
|
+
{typenames.map(({ typename, label }) => (
|
|
219
|
+
<Select.Option key={typename} value={typename}>
|
|
220
|
+
{label}
|
|
221
|
+
</Select.Option>
|
|
222
|
+
))}
|
|
223
|
+
</Select.Viewport>
|
|
224
|
+
<Select.ScrollDownButton />
|
|
225
|
+
<Select.Arrow />
|
|
226
|
+
</Select.Content>
|
|
227
|
+
</Select.Portal>
|
|
228
|
+
</Select.Root>
|
|
229
|
+
<SearchList.Input placeholder={t('search placeholder')} classNames='mbe-0' />
|
|
230
|
+
</div>
|
|
231
|
+
</SearchList.Root>
|
|
232
|
+
);
|
|
233
|
+
};
|
|
@@ -2,52 +2,47 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React
|
|
5
|
+
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { type ThemedClassName,
|
|
11
|
-
import { TagPicker, type TagPickerItemData, type TagPickerOptions } from '@dxos/react-ui-tag-picker';
|
|
7
|
+
import { type AiContextBinder } from '@dxos/assistant';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
9
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
10
|
+
import { IconButton, type Label, type ThemedClassName, toLocalizedString, useTranslation } from '@dxos/react-ui';
|
|
12
11
|
import { mx } from '@dxos/react-ui-theme';
|
|
13
|
-
import { isNonNullable } from '@dxos/util';
|
|
14
12
|
|
|
13
|
+
import { useContextObjects } from '../../hooks';
|
|
15
14
|
import { meta } from '../../meta';
|
|
16
15
|
|
|
17
16
|
export type ChatReferencesProps = ThemedClassName<{
|
|
17
|
+
context: AiContextBinder;
|
|
18
18
|
space: Space;
|
|
19
|
-
context: ContextBinder;
|
|
20
|
-
onUpdate?: (ids: string[]) => void;
|
|
21
19
|
}>;
|
|
22
20
|
|
|
23
|
-
export const ChatReferences = ({ classNames,
|
|
24
|
-
const { t
|
|
25
|
-
|
|
26
|
-
const [items] = useAsyncState<TagPickerItemData[]>(async () => {
|
|
27
|
-
const objects = await Ref.Array.loadAll(context.objects.value ?? []);
|
|
28
|
-
return objects.filter(isNonNullable).map((obj) => ({ id: obj.id, label: Obj.getLabel(obj) ?? obj.id }));
|
|
29
|
-
}, [context]);
|
|
30
|
-
|
|
31
|
-
const handleSearch = useCallback<NonNullable<TagPickerOptions['onSearch']>>(
|
|
32
|
-
(text, ids) => {
|
|
33
|
-
// TODO(burdon): Filter by Item tag (e.g., exclude "contacts") and Query by object label.
|
|
34
|
-
// TODO(burdon): Change to Filter.text().
|
|
35
|
-
const objects = space.db.query(Filter.everything()).runSync();
|
|
36
|
-
return objects
|
|
37
|
-
.map(({ object }) => ({ id: object.id, label: Obj.getLabel(object) ?? '' }))
|
|
38
|
-
.filter(({ id, label }) => !ids.includes(id) && label.toLocaleLowerCase().includes(text.toLocaleLowerCase()));
|
|
39
|
-
},
|
|
40
|
-
[space],
|
|
41
|
-
);
|
|
21
|
+
export const ChatReferences = ({ classNames, context, space }: ChatReferencesProps) => {
|
|
22
|
+
const { t } = useTranslation(meta.id);
|
|
23
|
+
const { objects, onUpdateObject } = useContextObjects({ space, context });
|
|
42
24
|
|
|
43
25
|
return (
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
26
|
+
<ul className={mx('flex flex-wrap', classNames)}>
|
|
27
|
+
{objects.map((obj) => {
|
|
28
|
+
const dxn = Obj.getDXN(obj);
|
|
29
|
+
const typename = Obj.getTypename(obj);
|
|
30
|
+
const label: Label = Obj.getLabel(obj) ?? (typename ? ['object name placeholder', { ns: typename }] : obj.id);
|
|
31
|
+
return (
|
|
32
|
+
<li key={dxn.toString()} className='dx-tag plb-0 pis-2 flex items-center' data-hue='neutral'>
|
|
33
|
+
{toLocalizedString(label, t)}
|
|
34
|
+
<IconButton
|
|
35
|
+
iconOnly
|
|
36
|
+
variant='ghost'
|
|
37
|
+
label={t('remove object in context label')}
|
|
38
|
+
classNames='p-0 hover:bg-transparent'
|
|
39
|
+
size={3}
|
|
40
|
+
icon='ph--x--bold'
|
|
41
|
+
onClick={() => onUpdateObject?.(dxn, false)}
|
|
42
|
+
/>
|
|
43
|
+
</li>
|
|
44
|
+
);
|
|
45
|
+
})}
|
|
46
|
+
</ul>
|
|
52
47
|
);
|
|
53
48
|
};
|
|
@@ -4,36 +4,39 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { Spinner } from '@dxos/react-ui-sfx';
|
|
9
|
-
import {
|
|
7
|
+
import { type ThemedClassName, Tooltip, useTimeout } from '@dxos/react-ui';
|
|
8
|
+
import { Spinner, type SpinnerProps } from '@dxos/react-ui-sfx';
|
|
9
|
+
import { mx } from '@dxos/react-ui-theme';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const period = 3_000;
|
|
12
|
+
|
|
13
|
+
export type ChatStatusIndicatorProps = ThemedClassName<
|
|
14
|
+
{
|
|
15
|
+
preset?: string;
|
|
16
|
+
processing?: boolean;
|
|
17
|
+
error?: Error;
|
|
18
|
+
} & Pick<SpinnerProps, 'size' | 'onClick'>
|
|
19
|
+
>;
|
|
16
20
|
|
|
17
|
-
export const ChatStatusIndicator = ({ preset, error,
|
|
21
|
+
export const ChatStatusIndicator = ({ classNames, preset, processing, error, ...props }: ChatStatusIndicatorProps) => {
|
|
18
22
|
const [init, setInit] = useState(false);
|
|
19
|
-
useEffect(() =>
|
|
20
|
-
setInit(false);
|
|
21
|
-
}, [preset]);
|
|
23
|
+
useEffect(() => setInit(false), [preset]);
|
|
22
24
|
useTimeout(
|
|
23
25
|
async () => {
|
|
24
26
|
setInit(true);
|
|
25
27
|
},
|
|
26
|
-
|
|
28
|
+
period / 2,
|
|
27
29
|
[preset],
|
|
28
30
|
);
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
return (
|
|
33
|
+
<div role='none' className={mx('relative flex', classNames)}>
|
|
34
|
+
<Spinner duration={period} state={!init ? 'flash' : error ? 'error' : processing ? 'spin' : 'pulse'} {...props} />
|
|
35
|
+
{error && (
|
|
36
|
+
<Tooltip.Trigger asChild content={error.message}>
|
|
37
|
+
<div className='absolute inset-0' />
|
|
38
|
+
</Tooltip.Trigger>
|
|
39
|
+
)}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
39
42
|
};
|