@dxos/plugin-assistant 0.8.4-main.ae835ea → 0.8.4-main.bc674ce
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/BlueprintArticle-WP3G5GLG.mjs +31 -0
- package/dist/lib/browser/BlueprintArticle-WP3G5GLG.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-ECQYUQ2B.mjs +153 -0
- package/dist/lib/browser/ChatCompanion-ECQYUQ2B.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-QCCOFBUX.mjs +73 -0
- package/dist/lib/browser/ChatContainer-QCCOFBUX.mjs.map +7 -0
- package/dist/lib/browser/ChatDialog-SMK4RSZU.mjs +85 -0
- package/dist/lib/browser/ChatDialog-SMK4RSZU.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs +53 -0
- package/dist/lib/browser/PromptArticle-K362ZPAE.mjs.map +7 -0
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs +21 -0
- package/dist/lib/browser/ai-service-5GUDOEWF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs +212 -0
- package/dist/lib/browser/app-graph-builder-DSNH2OMY.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-DGHH7MUU.mjs +14 -0
- package/dist/lib/browser/blueprints/index.mjs +12 -0
- package/dist/lib/browser/chunk-3JYPE2MM.mjs +1832 -0
- package/dist/lib/browser/chunk-3JYPE2MM.mjs.map +7 -0
- package/dist/lib/browser/chunk-DKQMSMBN.mjs +326 -0
- package/dist/lib/browser/chunk-DKQMSMBN.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WBG5PTSX.mjs → chunk-EXVT7D4B.mjs} +1 -1
- package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +7 -0
- package/dist/lib/browser/{chunk-L5OA5OGS.mjs → chunk-ML3QCFKA.mjs} +40 -37
- package/dist/lib/browser/chunk-ML3QCFKA.mjs.map +7 -0
- package/dist/lib/browser/chunk-MRJVYGLU.mjs +208 -0
- package/dist/lib/browser/chunk-MRJVYGLU.mjs.map +7 -0
- package/dist/lib/browser/chunk-V772AMZM.mjs +250 -0
- package/dist/lib/browser/chunk-V772AMZM.mjs.map +7 -0
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs +41 -0
- package/dist/lib/browser/chunk-WGQTU6UJ.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs +20 -0
- package/dist/lib/browser/edge-model-resolver-26BOY6HY.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +201 -214
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs +19 -0
- package/dist/lib/browser/local-model-resolver-ZFIM6GGV.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs +132 -0
- package/dist/lib/browser/operation-resolver-7XJLBRQY.mjs.map +7 -0
- package/dist/lib/browser/react-surface-NCITRSJJ.mjs +109 -0
- package/dist/lib/browser/react-surface-NCITRSJJ.mjs.map +7 -0
- package/dist/lib/browser/repair-6QGAKOVM.mjs +54 -0
- package/dist/lib/browser/repair-6QGAKOVM.mjs.map +7 -0
- package/dist/lib/browser/settings-4ZDLUMYE.mjs +32 -0
- package/dist/lib/browser/settings-4ZDLUMYE.mjs.map +7 -0
- package/dist/lib/browser/state-AN6336ZX.mjs +26 -0
- package/dist/lib/browser/state-AN6336ZX.mjs.map +7 -0
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs +18 -0
- package/dist/lib/browser/toolkit-7AVTEPMA.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -4
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs +32 -0
- package/dist/lib/node-esm/BlueprintArticle-WZ76E2C4.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-Q4FUZ2MW.mjs +154 -0
- package/dist/lib/node-esm/ChatCompanion-Q4FUZ2MW.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-AKI33HIB.mjs +74 -0
- package/dist/lib/node-esm/ChatContainer-AKI33HIB.mjs.map +7 -0
- package/dist/lib/node-esm/ChatDialog-AP45PVZR.mjs +86 -0
- package/dist/lib/node-esm/ChatDialog-AP45PVZR.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs +54 -0
- package/dist/lib/node-esm/PromptArticle-D4HAIIC6.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs +22 -0
- package/dist/lib/node-esm/ai-service-PXKKCFIF.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs +213 -0
- package/dist/lib/node-esm/app-graph-builder-TJCUEXW5.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-CFCUD2VC.mjs → blueprint-definition-SEMDEIYG.mjs} +6 -5
- package/dist/lib/node-esm/blueprint-definition-SEMDEIYG.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +13 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-355W5B27.mjs +251 -0
- package/dist/lib/node-esm/chunk-355W5B27.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs +327 -0
- package/dist/lib/node-esm/chunk-75PHXBN3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs +209 -0
- package/dist/lib/node-esm/chunk-DCA5QWQT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs +42 -0
- package/dist/lib/node-esm/chunk-MSBPC4RJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WE6KTH72.mjs → chunk-POWB2BPC.mjs} +1 -1
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XI5T3MJC.mjs +1833 -0
- package/dist/lib/node-esm/chunk-XI5T3MJC.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7ZYOYW7F.mjs → chunk-ZRIPP7YF.mjs} +40 -37
- package/dist/lib/node-esm/chunk-ZRIPP7YF.mjs.map +7 -0
- package/dist/lib/node-esm/{edge-model-resolver-2ARXDOYS.mjs → edge-model-resolver-G5KMODPO.mjs} +9 -7
- package/dist/lib/node-esm/edge-model-resolver-G5KMODPO.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +201 -214
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs +20 -0
- package/dist/lib/node-esm/local-model-resolver-KDZLYI7Y.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs +133 -0
- package/dist/lib/node-esm/operation-resolver-SX4WMNA7.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-ST6V7LPE.mjs +110 -0
- package/dist/lib/node-esm/react-surface-ST6V7LPE.mjs.map +7 -0
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs +55 -0
- package/dist/lib/node-esm/repair-QJ7CQDKU.mjs.map +7 -0
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs +33 -0
- package/dist/lib/node-esm/settings-CQEOHR3R.mjs.map +7 -0
- package/dist/lib/node-esm/state-HDON4REW.mjs +27 -0
- package/dist/lib/node-esm/state-HDON4REW.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs +19 -0
- package/dist/lib/node-esm/toolkit-OWGCEKOO.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -4
- 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 +209 -0
- package/dist/types/src/blueprints/assistant-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +7 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts +5 -0
- package/dist/types/src/capabilities/ai-service/ai-service.d.ts.map +1 -0
- package/dist/types/src/capabilities/ai-service/index.d.ts +3 -0
- package/dist/types/src/capabilities/ai-service/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +21 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +4 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts +6 -0
- package/dist/types/src/capabilities/edge-model-resolver/edge-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/edge-model-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -11
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/local-model-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts +12 -0
- package/dist/types/src/capabilities/local-model-resolver/local-model-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +15 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +17 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +11 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +13 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts +3 -0
- package/dist/types/src/capabilities/toolkit/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts +5 -0
- package/dist/types/src/capabilities/toolkit/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts +4 -2
- package/dist/types/src/components/AssistantSettings/AssistantSettings.d.ts.map +1 -1
- package/dist/types/src/components/BlueprintArticle.d.ts +7 -0
- package/dist/types/src/components/BlueprintArticle.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +21 -12
- 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/ChatCompanion.d.ts +2 -2
- package/dist/types/src/components/ChatCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +13 -5
- 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.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 +128 -73
- 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/PromptArticle.d.ts +7 -0
- package/dist/types/src/components/PromptArticle.d.ts.map +1 -0
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +112 -60
- 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 +113 -61
- 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 +4 -5
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +112 -60
- 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 +10 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +1 -1
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/functions/object-list.d.ts +2 -2
- package/dist/types/src/functions/object-list.d.ts.map +1 -1
- package/dist/types/src/functions/object-load.d.ts +1 -1
- package/dist/types/src/functions/object-load.d.ts.map +1 -1
- package/dist/types/src/functions/object-search.d.ts +10 -0
- package/dist/types/src/functions/object-search.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 +3 -1
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +3 -3
- 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/useReferencesProvider.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/processor/processor.d.ts +17 -16
- package/dist/types/src/processor/processor.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/types/src/translations.d.ts +243 -26
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +16 -22
- package/dist/types/src/types/Assistant.d.ts.map +1 -1
- package/dist/types/src/types/AssistantAction.d.ts +88 -112
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +33 -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 +113 -90
- package/src/AssistantPlugin.tsx +70 -105
- package/src/blueprints/assistant-blueprint.ts +62 -0
- package/src/blueprints/index.ts +12 -0
- package/src/capabilities/ai-service/ai-service.ts +29 -0
- package/src/capabilities/ai-service/index.ts +7 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +180 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +60 -0
- package/src/capabilities/blueprint-definition/index.ts +8 -0
- package/src/capabilities/edge-model-resolver/edge-model-resolver.ts +32 -0
- package/src/capabilities/edge-model-resolver/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/local-model-resolver/index.ts +7 -0
- package/src/capabilities/local-model-resolver/local-model-resolver.ts +37 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +110 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +95 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/repair/repair.ts +63 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +30 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +27 -0
- package/src/capabilities/toolkit/index.ts +7 -0
- package/src/capabilities/toolkit/toolkit.ts +26 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +13 -5
- package/src/components/BlueprintArticle.tsx +29 -0
- package/src/components/Chat/Chat.tsx +160 -125
- package/src/components/Chat/events.ts +7 -1
- package/src/components/ChatCompanion.tsx +132 -105
- package/src/components/ChatContainer.tsx +40 -30
- package/src/components/ChatDialog.tsx +13 -7
- package/src/components/ChatProgress/ChatProgress.tsx +4 -17
- package/src/components/ChatPrompt/ChatActions.tsx +3 -5
- package/src/components/ChatPrompt/ChatOptions.tsx +93 -80
- package/src/components/ChatPrompt/ChatReferences.tsx +7 -8
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +57 -36
- package/src/components/ChatThread/ChatThread.tsx +26 -36
- package/src/components/ChatThread/Link.tsx +3 -3
- package/src/components/ChatThread/registry.tsx +25 -35
- package/src/components/ChatThread/sync.test.ts +33 -17
- package/src/components/ChatThread/sync.ts +53 -12
- package/src/components/ChatThread/testing/thread.md +37 -0
- package/src/components/PromptArticle.tsx +50 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +12 -4
- package/src/components/TemplateEditor/TemplateEditor.tsx +14 -10
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +15 -7
- package/src/components/TemplateEditor/TemplateForm.tsx +76 -29
- 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 +36 -45
- package/src/components/Toolbox/Toolbox.stories.tsx +9 -10
- package/src/components/Toolbox/Toolbox.tsx +16 -17
- package/src/components/Typewriter/AssistantToolbar.tsx +161 -0
- package/src/components/Typewriter/Typewriter.stories.tsx +83 -0
- package/src/components/Typewriter/Typewriter.tsx +54 -0
- package/src/components/Typewriter/assistant-extension.tsx +144 -0
- package/src/components/Typewriter/index.ts +5 -0
- package/src/components/index.ts +2 -3
- package/src/functions/index.ts +1 -1
- package/src/functions/object-list.ts +4 -3
- package/src/functions/object-load.ts +7 -5
- package/src/functions/object-search.ts +46 -0
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useBlueprintRegistry.ts +31 -20
- package/src/hooks/useChatProcessor.ts +15 -12
- package/src/hooks/useChatServices.ts +13 -14
- package/src/hooks/useChatToolbarActions.ts +121 -0
- package/src/hooks/useContextBinder.ts +9 -7
- package/src/hooks/useContextObjects.ts +13 -25
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/useReferencesProvider.ts +7 -6
- package/src/index.ts +0 -1
- package/src/meta.ts +2 -2
- package/src/processor/presets.ts +1 -1
- package/src/processor/processor.test.ts +8 -17
- package/src/processor/processor.ts +41 -43
- package/src/processor/update-name.ts +4 -2
- package/src/queue-logger.ts +8 -9
- package/src/testing/test-generator.ts +14 -13
- package/src/testing/test-services.ts +8 -6
- package/src/translations.ts +27 -16
- package/src/types/Assistant.ts +9 -10
- package/src/types/AssistantAction.ts +59 -54
- package/src/types/capabilities.ts +27 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +3 -1
- package/src/types/service.ts +10 -7
- 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.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.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/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.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.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.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/ai-service.d.ts +0 -4
- package/dist/types/src/capabilities/ai-service.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -7
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- 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/edge-model-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/edge-model-resolver.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/capabilities/local-model-resolver.d.ts +0 -10
- package/dist/types/src/capabilities/local-model-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -4
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/capabilities/toolkit.d.ts +0 -4
- package/dist/types/src/capabilities/toolkit.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/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/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/src/capabilities/ai-service.ts +0 -27
- package/src/capabilities/app-graph-builder.ts +0 -194
- package/src/capabilities/blueprint-definition.ts +0 -66
- package/src/capabilities/capabilities.ts +0 -18
- package/src/capabilities/edge-model-resolver.ts +0 -25
- package/src/capabilities/intent-resolver.ts +0 -121
- package/src/capabilities/local-model-resolver.ts +0 -30
- package/src/capabilities/react-surface.tsx +0 -71
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -20
- package/src/capabilities/toolkit.ts +0 -19
- package/src/components/BlueprintContainer.tsx +0 -30
- package/src/components/ChatThread/reducers.ts +0 -151
- package/src/components/ChatToolbar/ChatToolbar.tsx +0 -23
- package/src/components/ChatToolbar/index.ts +0 -5
- 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/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/dist/lib/browser/{blueprint-definition-AGTDXTXO.mjs.map → blueprint-definition-DGHH7MUU.mjs.map} +0 -0
- /package/dist/lib/{node-esm/blueprint-definition-CFCUD2VC.mjs.map → browser/blueprints/index.mjs.map} +0 -0
- /package/dist/types/src/components/TemplateEditor/{handlebars-extension.d.ts → extensions/handlebars-extension.d.ts} +0 -0
|
@@ -3,30 +3,65 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import type * as Schema from 'effect/Schema';
|
|
6
|
-
import React, { Fragment, useEffect } from 'react';
|
|
6
|
+
import React, { Fragment, useCallback, useEffect } from 'react';
|
|
7
7
|
|
|
8
8
|
import { type Template } from '@dxos/blueprints';
|
|
9
|
+
import { type Obj } from '@dxos/echo';
|
|
9
10
|
import { Input, Select, useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import { attentionSurface, groupBorder, mx } from '@dxos/
|
|
11
|
+
import { attentionSurface, groupBorder, mx } from '@dxos/ui-theme';
|
|
11
12
|
import { isNonNullable } from '@dxos/util';
|
|
12
13
|
|
|
13
14
|
import { meta } from '../../meta';
|
|
14
15
|
|
|
15
16
|
import { TemplateEditor } from './TemplateEditor';
|
|
16
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Callback type for mutating template within a parent object's Obj.change context.
|
|
20
|
+
*/
|
|
21
|
+
export type TemplateChangeCallback = (mutate: (template: Obj.Mutable<Template.Template>) => void) => void;
|
|
22
|
+
|
|
17
23
|
export type TemplateFormProps = {
|
|
18
24
|
id: string;
|
|
19
25
|
template: Template.Template;
|
|
20
26
|
schema?: Schema.Schema<any, any, any>;
|
|
21
27
|
commandEditable?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Callback to mutate the template. Should wrap mutations in parent's Obj.change.
|
|
30
|
+
* If not provided, the component is read-only.
|
|
31
|
+
*/
|
|
32
|
+
onChange?: TemplateChangeCallback;
|
|
22
33
|
};
|
|
23
34
|
|
|
24
|
-
export const TemplateForm = ({ id, template, commandEditable = true }: TemplateFormProps) => {
|
|
35
|
+
export const TemplateForm = ({ id, template, commandEditable = true, onChange }: TemplateFormProps) => {
|
|
25
36
|
const { t } = useTranslation(meta.id);
|
|
26
|
-
usePromptInputs(template);
|
|
37
|
+
usePromptInputs(template, onChange);
|
|
38
|
+
|
|
39
|
+
const handleInputKindChange = useCallback(
|
|
40
|
+
(inputName: string, kind: Template.InputKind) => {
|
|
41
|
+
onChange?.((t) => {
|
|
42
|
+
const input = t.inputs?.find((i) => i?.name === inputName);
|
|
43
|
+
if (input) {
|
|
44
|
+
input.kind = kind;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
[onChange],
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const handleInputDefaultChange = useCallback(
|
|
52
|
+
(inputName: string, value: string) => {
|
|
53
|
+
onChange?.((t) => {
|
|
54
|
+
const input = t.inputs?.find((i) => i?.name === inputName);
|
|
55
|
+
if (input) {
|
|
56
|
+
input.default = value;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
[onChange],
|
|
61
|
+
);
|
|
27
62
|
|
|
28
63
|
return (
|
|
29
|
-
<div className={mx('flex flex-col
|
|
64
|
+
<div className={mx('flex flex-col is-full overflow-hidden gap-4', groupBorder)}>
|
|
30
65
|
{/* {commandEditable && (
|
|
31
66
|
<div className='flex items-center pl-4'>
|
|
32
67
|
<span className='text-neutral-500'>/</span>
|
|
@@ -36,7 +71,9 @@ export const TemplateForm = ({ id, template, commandEditable = true }: TemplateF
|
|
|
36
71
|
classNames='is-full bg-transparent m-2'
|
|
37
72
|
value={template.command ?? ''}
|
|
38
73
|
onChange={(event) => {
|
|
39
|
-
|
|
74
|
+
onChange?.((t) => {
|
|
75
|
+
t.command = event.target.value.replace(/\w/g, '');
|
|
76
|
+
});
|
|
40
77
|
}}
|
|
41
78
|
/>
|
|
42
79
|
</Input.Root>
|
|
@@ -54,9 +91,7 @@ export const TemplateForm = ({ id, template, commandEditable = true }: TemplateF
|
|
|
54
91
|
<Input.Root>
|
|
55
92
|
<Select.Root
|
|
56
93
|
value={input.kind}
|
|
57
|
-
onValueChange={(kind) =>
|
|
58
|
-
input.kind = kind as Template.InputKind;
|
|
59
|
-
}}
|
|
94
|
+
onValueChange={(kind) => handleInputKindChange(input.name, kind as Template.InputKind)}
|
|
60
95
|
>
|
|
61
96
|
<Select.TriggerButton placeholder='Type' classNames='is-full' />
|
|
62
97
|
<Select.Portal>
|
|
@@ -82,9 +117,7 @@ export const TemplateForm = ({ id, template, commandEditable = true }: TemplateF
|
|
|
82
117
|
placeholder={t('command placeholder')}
|
|
83
118
|
classNames='is-full bg-transparent'
|
|
84
119
|
value={input.default ?? ''}
|
|
85
|
-
onChange={(event) =>
|
|
86
|
-
input.default = event.target.value;
|
|
87
|
-
}}
|
|
120
|
+
onChange={(event) => handleInputDefaultChange(input.name, event.target.value)}
|
|
88
121
|
/>
|
|
89
122
|
</Input.Root>
|
|
90
123
|
</div>
|
|
@@ -136,13 +169,14 @@ const inputs: { kind: Template.InputKind; label: string }[] = [
|
|
|
136
169
|
|
|
137
170
|
export const NAME_REGEXP = /\{\{([\w-]+)\}\}/;
|
|
138
171
|
|
|
139
|
-
const usePromptInputs = (template: Template.Template) => {
|
|
172
|
+
const usePromptInputs = (template: Template.Template, onChange?: TemplateChangeCallback) => {
|
|
140
173
|
useEffect(() => {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
template.inputs = []; // TODO(burdon): Required?
|
|
174
|
+
if (!onChange) {
|
|
175
|
+
return;
|
|
144
176
|
}
|
|
145
177
|
|
|
178
|
+
const text = template.source ?? '';
|
|
179
|
+
|
|
146
180
|
const regex = new RegExp(NAME_REGEXP, 'g');
|
|
147
181
|
const variables = new Set<string>([...(text.target?.content.matchAll(regex) ?? [])].map((m) => m[1]));
|
|
148
182
|
|
|
@@ -161,19 +195,32 @@ const usePromptInputs = (template: Template.Template) => {
|
|
|
161
195
|
|
|
162
196
|
// Match or create new inputs.
|
|
163
197
|
const values = unclaimed.values();
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
next.name = name;
|
|
168
|
-
} else {
|
|
169
|
-
template.inputs?.push({ name });
|
|
198
|
+
onChange((t) => {
|
|
199
|
+
if (!t.inputs) {
|
|
200
|
+
t.inputs = [];
|
|
170
201
|
}
|
|
171
|
-
});
|
|
172
202
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
203
|
+
missing.forEach((name) => {
|
|
204
|
+
const next = values.next().value;
|
|
205
|
+
if (next) {
|
|
206
|
+
// Find the input in the mutable draft and update it.
|
|
207
|
+
const inputIndex = t.inputs!.findIndex((i) => i?.name === next.name);
|
|
208
|
+
if (inputIndex !== -1) {
|
|
209
|
+
t.inputs![inputIndex].name = name;
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
t.inputs!.push({ name });
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// Remove unclaimed (deleted) inputs.
|
|
217
|
+
// TODO(burdon): If user types incorrect name value, it will be deleted. Garbage collect?
|
|
218
|
+
for (const input of values) {
|
|
219
|
+
const inputIndex = t.inputs!.findIndex((i) => i?.name === input.name);
|
|
220
|
+
if (inputIndex !== -1) {
|
|
221
|
+
t.inputs!.splice(inputIndex, 1);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}, [template.source, onChange]);
|
|
179
226
|
};
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
type CompletionContext,
|
|
7
|
+
type CompletionResult,
|
|
8
|
+
autocompletion,
|
|
9
|
+
completionKeymap,
|
|
10
|
+
} from '@codemirror/autocomplete';
|
|
11
|
+
import { type Extension, RangeSetBuilder } from '@codemirror/state';
|
|
12
|
+
import {
|
|
13
|
+
Decoration,
|
|
14
|
+
type DecorationSet,
|
|
15
|
+
type EditorView,
|
|
16
|
+
ViewPlugin,
|
|
17
|
+
type ViewUpdate,
|
|
18
|
+
WidgetType,
|
|
19
|
+
keymap,
|
|
20
|
+
} from '@codemirror/view';
|
|
21
|
+
|
|
22
|
+
import { Domino, mx } from '@dxos/ui';
|
|
23
|
+
|
|
24
|
+
export type HandlebarsOptions = {};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Simple Handlebars plugin for CodeMirror.
|
|
28
|
+
* Supports:
|
|
29
|
+
* - Comments: {{! comment }}
|
|
30
|
+
* - Commands: {{#command}} {{/command}}
|
|
31
|
+
* - Variables: {{var}}
|
|
32
|
+
* - Commands with variables: {{#each items}} {{/each}}
|
|
33
|
+
*/
|
|
34
|
+
export const handlebars = (_: HandlebarsOptions = {}): Extension => {
|
|
35
|
+
return [
|
|
36
|
+
handlebarsHighlightPlugin,
|
|
37
|
+
autocompletion({
|
|
38
|
+
activateOnTyping: true,
|
|
39
|
+
aboveCursor: true,
|
|
40
|
+
closeOnBlur: true,
|
|
41
|
+
override: [handlebarsCompletions],
|
|
42
|
+
}),
|
|
43
|
+
keymap.of(completionKeymap),
|
|
44
|
+
];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const regex = {
|
|
48
|
+
// {{! comment }}
|
|
49
|
+
comment: /\{\{!\s*[^}]*\}\}/g,
|
|
50
|
+
|
|
51
|
+
// {{var}}
|
|
52
|
+
brackets: /\{\{[^}]*\}\}/g,
|
|
53
|
+
|
|
54
|
+
// {{#command}} {{/command}}
|
|
55
|
+
command: /\{\{[#/]([^}]+)\}\}/g,
|
|
56
|
+
|
|
57
|
+
// {{var}}
|
|
58
|
+
var: /\{\{(?!\s*!)(\w[^}]*)\}\}/g,
|
|
59
|
+
|
|
60
|
+
// @dxn:queue:data:xxx
|
|
61
|
+
dxn: /@?dxn:[\w@:]+/g,
|
|
62
|
+
|
|
63
|
+
// dxos.org/type/xxx
|
|
64
|
+
url: /[\w.-]+\.[\w.-]+\/[\w/]+/g,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const tagPadding = 'mli-0.5 pli-1 rounded-sm';
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* ViewPlugin that decorates Handlebars syntax.
|
|
71
|
+
*/
|
|
72
|
+
const handlebarsHighlightPlugin = ViewPlugin.fromClass(
|
|
73
|
+
class {
|
|
74
|
+
decorations: DecorationSet;
|
|
75
|
+
|
|
76
|
+
constructor(view: EditorView) {
|
|
77
|
+
this.decorations = this.buildDecorations(view);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
update(update: ViewUpdate) {
|
|
81
|
+
if (update.docChanged || update.viewportChanged || update.selectionSet) {
|
|
82
|
+
this.decorations = this.buildDecorations(update.view);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// NOTE: Decorations may clash with other extensions (e.g., markdown).
|
|
87
|
+
buildDecorations(view: EditorView) {
|
|
88
|
+
const selection = view.state.selection.main;
|
|
89
|
+
const decorations: Array<{
|
|
90
|
+
from: number;
|
|
91
|
+
to: number;
|
|
92
|
+
decoration: Decoration;
|
|
93
|
+
}> = [];
|
|
94
|
+
|
|
95
|
+
for (const { from, to } of view.visibleRanges) {
|
|
96
|
+
const text = view.state.doc.sliceString(from, to);
|
|
97
|
+
|
|
98
|
+
// Match DXN.
|
|
99
|
+
{
|
|
100
|
+
let match;
|
|
101
|
+
while ((match = regex.dxn.exec(text)) !== null) {
|
|
102
|
+
const start = from + match.index;
|
|
103
|
+
const end = start + match[0].length;
|
|
104
|
+
// Only show widget if selection doesn't overlap with the match range.
|
|
105
|
+
const overlaps = selection.to > start && selection.from <= end;
|
|
106
|
+
if (!overlaps) {
|
|
107
|
+
decorations.push({
|
|
108
|
+
from: start,
|
|
109
|
+
to: end,
|
|
110
|
+
decoration: Decoration.widget({
|
|
111
|
+
widget: new DXNWidget(match[0]),
|
|
112
|
+
}),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Match URLs.
|
|
119
|
+
{
|
|
120
|
+
let match;
|
|
121
|
+
while ((match = regex.url.exec(text)) !== null) {
|
|
122
|
+
const start = from + match.index;
|
|
123
|
+
const end = start + match[0].length;
|
|
124
|
+
decorations.push({
|
|
125
|
+
from: start,
|
|
126
|
+
to: end,
|
|
127
|
+
decoration: Decoration.mark({
|
|
128
|
+
class: mx('dx-tag--blue', tagPadding),
|
|
129
|
+
}),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Match brackets: {{ and }}.
|
|
135
|
+
{
|
|
136
|
+
let match;
|
|
137
|
+
while ((match = regex.brackets.exec(text)) !== null) {
|
|
138
|
+
const start = from + match.index;
|
|
139
|
+
const end = start + match[0].length;
|
|
140
|
+
decorations.push({
|
|
141
|
+
from: start,
|
|
142
|
+
to: end,
|
|
143
|
+
decoration: Decoration.mark({ class: 'text-subdued' }),
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Match commands: {{#command}} and {{/command}}.
|
|
149
|
+
{
|
|
150
|
+
let match;
|
|
151
|
+
while ((match = regex.command.exec(text)) !== null) {
|
|
152
|
+
const start = from + match.index + 2;
|
|
153
|
+
let end = start + match[0].length - 4;
|
|
154
|
+
const text = view.state.doc.sliceString(start, end);
|
|
155
|
+
const parts = text.split(/\s+/);
|
|
156
|
+
if (parts.length > 1) {
|
|
157
|
+
const idx = start + parts[0].length;
|
|
158
|
+
decorations.push({
|
|
159
|
+
from: idx,
|
|
160
|
+
to: end,
|
|
161
|
+
decoration: Decoration.mark({ class: 'text-greenText' }),
|
|
162
|
+
});
|
|
163
|
+
end = idx;
|
|
164
|
+
}
|
|
165
|
+
decorations.push({
|
|
166
|
+
from: start,
|
|
167
|
+
to: end,
|
|
168
|
+
decoration: Decoration.mark({ class: 'text-blueText' }),
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Match variables: {{var}}.
|
|
174
|
+
{
|
|
175
|
+
let match;
|
|
176
|
+
while ((match = regex.var.exec(text)) !== null) {
|
|
177
|
+
const start = from + match.index + 2;
|
|
178
|
+
const end = start + match[0].length - 4;
|
|
179
|
+
decorations.push({
|
|
180
|
+
from: start,
|
|
181
|
+
to: end,
|
|
182
|
+
decoration: Decoration.mark({ class: 'text-greenText' }),
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Sort decorations by position to satisfy RangeSetBuilder requirements.
|
|
189
|
+
decorations.sort((a, b) => a.from - b.from || a.to - b.to);
|
|
190
|
+
|
|
191
|
+
// Add sorted decorations to builder.
|
|
192
|
+
const builder = new RangeSetBuilder<Decoration>();
|
|
193
|
+
for (const { from, to, decoration } of decorations) {
|
|
194
|
+
builder.add(from, to, decoration);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return builder.finish();
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
decorations: (v) => v.decorations,
|
|
202
|
+
},
|
|
203
|
+
);
|
|
204
|
+
|
|
205
|
+
class DXNWidget extends WidgetType {
|
|
206
|
+
constructor(private readonly _identifier: string) {
|
|
207
|
+
super();
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
override ignoreEvent() {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
override eq(other: this) {
|
|
215
|
+
return this._identifier === other._identifier;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
override toDOM() {
|
|
219
|
+
const text = this._identifier
|
|
220
|
+
.split(':')
|
|
221
|
+
.map((part) => {
|
|
222
|
+
const len = 16;
|
|
223
|
+
const plen = 4;
|
|
224
|
+
if (part.length > len) {
|
|
225
|
+
return `[${part.slice(0, plen)}…${part.slice(-plen)}]`;
|
|
226
|
+
}
|
|
227
|
+
return part;
|
|
228
|
+
})
|
|
229
|
+
.join(':');
|
|
230
|
+
return Domino.of('span').classNames(mx('font-mono dx-tag--blue', tagPadding)).text(text).root;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// TODO(burdon): Pass in variables.
|
|
235
|
+
const variables = ['this'];
|
|
236
|
+
const commands = ['this', 'each', 'if', 'unless', 'with'];
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Provides completions for Handlebars variables.
|
|
240
|
+
*/
|
|
241
|
+
function handlebarsCompletions(context: CompletionContext): CompletionResult | null {
|
|
242
|
+
const match = context.matchBefore(/\{\{[^}]*/);
|
|
243
|
+
if (!match || match.from === match.to) {
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
let type = 'variable';
|
|
248
|
+
let text = match.text.slice(2);
|
|
249
|
+
let from = match.from + 2;
|
|
250
|
+
let matches = [];
|
|
251
|
+
if (text.startsWith('#') || text.startsWith('/')) {
|
|
252
|
+
const idx = text.lastIndexOf(' ');
|
|
253
|
+
if (idx !== -1) {
|
|
254
|
+
type = 'variable';
|
|
255
|
+
matches = variables;
|
|
256
|
+
text = text.slice(idx + 1);
|
|
257
|
+
from += idx + 1;
|
|
258
|
+
} else {
|
|
259
|
+
type = 'command';
|
|
260
|
+
text = text.slice(1);
|
|
261
|
+
matches = commands;
|
|
262
|
+
from += 1;
|
|
263
|
+
}
|
|
264
|
+
} else {
|
|
265
|
+
type = 'variable';
|
|
266
|
+
matches = variables;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const options = matches.filter((name) => name.startsWith(text)).map((name) => ({ type, label: name }));
|
|
270
|
+
return {
|
|
271
|
+
from,
|
|
272
|
+
options,
|
|
273
|
+
};
|
|
274
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { syntaxTree } from '@codemirror/language';
|
|
6
|
+
import { type Extension, RangeSetBuilder } from '@codemirror/state';
|
|
7
|
+
import { Decoration, type DecorationSet, type EditorView, ViewPlugin, type ViewUpdate } from '@codemirror/view';
|
|
8
|
+
|
|
9
|
+
export type XmlOptions = {};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* XML decorator plugin for CodeMirror.
|
|
13
|
+
* Decorates XML tags with monospace font using the XML language grammar.
|
|
14
|
+
*/
|
|
15
|
+
export const xmlDecorator = (_: XmlOptions = {}): Extension => {
|
|
16
|
+
return [xmlDecoratorPlugin];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* ViewPlugin that decorates XML tags using syntax tree.
|
|
21
|
+
*/
|
|
22
|
+
const xmlDecoratorPlugin = ViewPlugin.fromClass(
|
|
23
|
+
class {
|
|
24
|
+
decorations: DecorationSet;
|
|
25
|
+
|
|
26
|
+
constructor(view: EditorView) {
|
|
27
|
+
this.decorations = this.buildDecorations(view);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
update(update: ViewUpdate) {
|
|
31
|
+
if (update.docChanged || update.viewportChanged) {
|
|
32
|
+
this.decorations = this.buildDecorations(update.view);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
buildDecorations(view: EditorView) {
|
|
37
|
+
const builder = new RangeSetBuilder<Decoration>();
|
|
38
|
+
|
|
39
|
+
for (const { from, to } of view.visibleRanges) {
|
|
40
|
+
syntaxTree(view.state).iterate({
|
|
41
|
+
from,
|
|
42
|
+
to,
|
|
43
|
+
enter: (node) => {
|
|
44
|
+
// Decorate XML elements (opening tags, closing tags, self-closing tags).
|
|
45
|
+
if (
|
|
46
|
+
node.name === 'HTMLTag' ||
|
|
47
|
+
node.name === 'OpenTag' ||
|
|
48
|
+
node.name === 'CloseTag' ||
|
|
49
|
+
node.name === 'SelfClosingTag' ||
|
|
50
|
+
node.name === 'Element'
|
|
51
|
+
) {
|
|
52
|
+
builder.add(node.from, node.to, Decoration.mark({ class: 'font-mono text-subdued' }));
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return builder.finish();
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
decorations: (v) => v.decorations,
|
|
63
|
+
},
|
|
64
|
+
);
|
|
@@ -3,45 +3,29 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import type * as Tool from '@effect/ai/Tool';
|
|
6
|
-
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import { type AgentStatus } from '@dxos/ai';
|
|
9
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import {
|
|
11
|
-
NumericTabs,
|
|
12
|
-
TextCrawl,
|
|
13
|
-
ToggleContainer,
|
|
14
|
-
chatMessageJson,
|
|
15
|
-
chatMessagePanel,
|
|
16
|
-
chatMessagePanelContent,
|
|
17
|
-
chatMessagePanelHeader,
|
|
18
|
-
} from '@dxos/react-ui-components';
|
|
9
|
+
import { NumericTabs, TextCrawl, ToggleContainer, type ToggleContainerRootProps } from '@dxos/react-ui-components';
|
|
19
10
|
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
20
|
-
import { type ContentBlock, type
|
|
11
|
+
import { type ContentBlock, type Message } from '@dxos/types';
|
|
12
|
+
import { type XmlWidgetProps } from '@dxos/ui-editor';
|
|
21
13
|
import { isNonNullable, safeParseJson } from '@dxos/util';
|
|
22
14
|
|
|
23
15
|
import { meta } from '../../meta';
|
|
24
16
|
|
|
25
|
-
export const isToolMessage = (message:
|
|
26
|
-
return message.blocks.some((block) => block._tag === 'toolCall' || block._tag === 'toolResult');
|
|
17
|
+
export const isToolMessage = (message: Message.Message) => {
|
|
18
|
+
return message.blocks.some((block: ContentBlock.Any) => block._tag === 'toolCall' || block._tag === 'toolResult');
|
|
27
19
|
};
|
|
28
20
|
|
|
29
|
-
export type ToolBlockProps = {
|
|
21
|
+
export type ToolBlockProps = XmlWidgetProps<{
|
|
30
22
|
blocks: ContentBlock.Any[];
|
|
31
|
-
}
|
|
23
|
+
}>;
|
|
32
24
|
|
|
33
|
-
export const ToolBlock = ({ blocks = [] }: ToolBlockProps) => {
|
|
25
|
+
export const ToolBlock = ({ view, blocks = [] }: ToolBlockProps) => {
|
|
34
26
|
const { t } = useTranslation(meta.id);
|
|
35
27
|
|
|
36
|
-
const
|
|
37
|
-
if (!tool) {
|
|
38
|
-
return t('calling tool label');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return status?.message ?? tool.description ?? [t('calling label'), tool.name].join(' ');
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const items = useMemo(() => {
|
|
28
|
+
const items = useMemo<ToolContainerProps['items']>(() => {
|
|
45
29
|
let lastToolCall: { tool: Tool.Any | undefined; block: ContentBlock.ToolCall } | undefined;
|
|
46
30
|
// TODO(burdon): Get from context?
|
|
47
31
|
const tools: Tool.Any[] = []; //processor.conversation.toolkit?.tools ?? [];
|
|
@@ -57,7 +41,7 @@ export const ToolBlock = ({ blocks = [] }: ToolBlockProps) => {
|
|
|
57
41
|
const tool = tools.find((tool) => tool.name === block.name);
|
|
58
42
|
lastToolCall = { tool, block };
|
|
59
43
|
return {
|
|
60
|
-
title:
|
|
44
|
+
title: tool?.description ?? [t('tool call label'), tool?.name].join(' '),
|
|
61
45
|
content: {
|
|
62
46
|
...block,
|
|
63
47
|
input: safeParseJson(block.input),
|
|
@@ -69,12 +53,13 @@ export const ToolBlock = ({ blocks = [] }: ToolBlockProps) => {
|
|
|
69
53
|
// TODO(burdon): Parse error type.
|
|
70
54
|
if (block.error) {
|
|
71
55
|
return {
|
|
72
|
-
title: t('error label'),
|
|
56
|
+
title: t('tool error label'),
|
|
73
57
|
content: block,
|
|
74
58
|
};
|
|
75
59
|
}
|
|
76
60
|
|
|
77
|
-
const title =
|
|
61
|
+
const title =
|
|
62
|
+
lastToolCall?.tool?.description ?? [t('tool result label'), lastToolCall?.tool?.name].join(' ');
|
|
78
63
|
lastToolCall = undefined;
|
|
79
64
|
return {
|
|
80
65
|
title,
|
|
@@ -100,46 +85,52 @@ export const ToolBlock = ({ blocks = [] }: ToolBlockProps) => {
|
|
|
100
85
|
.filter(isNonNullable);
|
|
101
86
|
}, [blocks]);
|
|
102
87
|
|
|
88
|
+
const handleChangeOpen = useCallback(() => {
|
|
89
|
+
setTimeout(() => {
|
|
90
|
+
// Measure after animation.
|
|
91
|
+
view?.requestMeasure();
|
|
92
|
+
}, 1_000);
|
|
93
|
+
}, [view]);
|
|
94
|
+
|
|
103
95
|
if (!items.length) {
|
|
104
96
|
return null;
|
|
105
97
|
}
|
|
106
98
|
|
|
107
|
-
return <ToolContainer items={items} />;
|
|
99
|
+
return <ToolContainer items={items} onChangeOpen={handleChangeOpen} />;
|
|
108
100
|
};
|
|
109
101
|
|
|
110
102
|
ToolBlock.displayName = 'ToolBlock';
|
|
111
103
|
|
|
112
|
-
type
|
|
104
|
+
type ToolContainerProps = {
|
|
113
105
|
items: { title: string; content: any }[];
|
|
114
|
-
}
|
|
106
|
+
} & Pick<ToggleContainerRootProps, 'onChangeOpen'>;
|
|
115
107
|
|
|
116
|
-
|
|
117
|
-
export const ToolContainer = ({ items }: ToolContainerParams) => {
|
|
108
|
+
export const ToolContainer = ({ items, onChangeOpen }: ToolContainerProps) => {
|
|
118
109
|
const tabsRef = useRef<HTMLDivElement>(null);
|
|
119
110
|
const [selected, setSelected] = useState(0);
|
|
120
111
|
const [open, setOpen] = useState(false);
|
|
112
|
+
|
|
121
113
|
useEffect(() => {
|
|
114
|
+
onChangeOpen?.(open);
|
|
122
115
|
if (open) {
|
|
123
116
|
tabsRef.current?.focus();
|
|
124
117
|
}
|
|
125
|
-
}, [open]);
|
|
118
|
+
}, [open, onChangeOpen]);
|
|
126
119
|
|
|
127
|
-
const handleSelect = (index: number) => {
|
|
120
|
+
const handleSelect = useCallback((index: number) => {
|
|
128
121
|
setSelected(index);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const data = items[selected]?.content;
|
|
122
|
+
}, []);
|
|
132
123
|
|
|
133
124
|
return (
|
|
134
|
-
<ToggleContainer.Root classNames=
|
|
135
|
-
<ToggleContainer.Header classNames=
|
|
136
|
-
<TextCrawl key='status-roll' lines={items.map((item) => item.title)} />
|
|
125
|
+
<ToggleContainer.Root classNames='mbs-2 is-full rounded-sm' open={open} onChangeOpen={setOpen}>
|
|
126
|
+
<ToggleContainer.Header classNames='text-sm text-placeholder'>
|
|
127
|
+
<TextCrawl key='status-roll' lines={items.map((item) => item.title)} autoAdvance greedy />
|
|
137
128
|
</ToggleContainer.Header>
|
|
138
|
-
<ToggleContainer.Content classNames=
|
|
129
|
+
<ToggleContainer.Content classNames='grid grid-cols-[32px_1fr]'>
|
|
139
130
|
<NumericTabs ref={tabsRef} classNames='p-1' length={items.length} selected={selected} onSelect={handleSelect} />
|
|
140
131
|
<Json
|
|
141
|
-
data={
|
|
142
|
-
classNames=
|
|
132
|
+
data={items[selected]?.content}
|
|
133
|
+
classNames='p-1 text-xs bg-transparent'
|
|
143
134
|
replacer={{
|
|
144
135
|
maxDepth: 3,
|
|
145
136
|
maxArrayLen: 10,
|