@dxos/plugin-assistant 0.8.4-main.2e9d522 → 0.8.4-main.3eb6e50203
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-6SP2ZWJ2.mjs +30 -0
- package/dist/lib/browser/BlueprintArticle-6SP2ZWJ2.mjs.map +7 -0
- package/dist/lib/browser/ChatCompanion-CAKFZAWN.mjs +200 -0
- package/dist/lib/browser/ChatCompanion-CAKFZAWN.mjs.map +7 -0
- package/dist/lib/browser/ChatContainer-QB37VONJ.mjs +73 -0
- package/dist/lib/browser/ChatContainer-QB37VONJ.mjs.map +7 -0
- package/dist/lib/browser/ChatDialog-ASVBLOOS.mjs +85 -0
- package/dist/lib/browser/ChatDialog-ASVBLOOS.mjs.map +7 -0
- package/dist/lib/browser/InitiativeContainer-V522FCYH.mjs +266 -0
- package/dist/lib/browser/InitiativeContainer-V522FCYH.mjs.map +7 -0
- package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs +52 -0
- package/dist/lib/browser/PromptArticle-PK3CBRUB.mjs.map +7 -0
- package/dist/lib/browser/ai-service-CY2BYPH6.mjs +22 -0
- package/dist/lib/browser/ai-service-CY2BYPH6.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-MUZGUQSC.mjs +234 -0
- package/dist/lib/browser/app-graph-builder-MUZGUQSC.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-YAGWYVCL.mjs +14 -0
- package/dist/lib/browser/blueprint-definition-YAGWYVCL.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +12 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-3ETBCBMH.mjs +47 -0
- package/dist/lib/browser/chunk-3ETBCBMH.mjs.map +7 -0
- package/dist/lib/browser/chunk-6BVCG5SJ.mjs +230 -0
- package/dist/lib/browser/chunk-6BVCG5SJ.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-EXVT7D4B.mjs +23 -0
- package/dist/lib/browser/chunk-EXVT7D4B.mjs.map +7 -0
- package/dist/lib/browser/chunk-IJYAKPEU.mjs +286 -0
- package/dist/lib/browser/chunk-IJYAKPEU.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-JA7PUZC7.mjs +1974 -0
- package/dist/lib/browser/chunk-JA7PUZC7.mjs.map +7 -0
- package/dist/lib/browser/chunk-POPBT2AQ.mjs +198 -0
- package/dist/lib/browser/chunk-POPBT2AQ.mjs.map +7 -0
- package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs +21 -0
- package/dist/lib/browser/edge-model-resolver-YTMFQEN5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +310 -156
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs +20 -0
- package/dist/lib/browser/local-model-resolver-CGRQH37T.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-2673CFJS.mjs +133 -0
- package/dist/lib/browser/operation-resolver-2673CFJS.mjs.map +7 -0
- package/dist/lib/browser/react-surface-T3FN4GVP.mjs +125 -0
- package/dist/lib/browser/react-surface-T3FN4GVP.mjs.map +7 -0
- package/dist/lib/browser/repair-IRXDYF4R.mjs +51 -0
- package/dist/lib/browser/repair-IRXDYF4R.mjs.map +7 -0
- package/dist/lib/browser/settings-XF6GKHCG.mjs +33 -0
- package/dist/lib/browser/settings-XF6GKHCG.mjs.map +7 -0
- package/dist/lib/browser/state-OYDPWLKA.mjs +26 -0
- package/dist/lib/browser/state-OYDPWLKA.mjs.map +7 -0
- package/dist/lib/browser/toolkit-IDXQCSTX.mjs +19 -0
- package/dist/lib/browser/toolkit-IDXQCSTX.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +11 -4
- package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs +31 -0
- package/dist/lib/node-esm/BlueprintArticle-7LI6UXKZ.mjs.map +7 -0
- package/dist/lib/node-esm/ChatCompanion-W4PGOCGR.mjs +201 -0
- package/dist/lib/node-esm/ChatCompanion-W4PGOCGR.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-ECFQVH6O.mjs +74 -0
- package/dist/lib/node-esm/ChatContainer-ECFQVH6O.mjs.map +7 -0
- package/dist/lib/node-esm/ChatDialog-AFLPYSIU.mjs +86 -0
- package/dist/lib/node-esm/ChatDialog-AFLPYSIU.mjs.map +7 -0
- package/dist/lib/node-esm/InitiativeContainer-U4LGO3BW.mjs +267 -0
- package/dist/lib/node-esm/InitiativeContainer-U4LGO3BW.mjs.map +7 -0
- package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs +53 -0
- package/dist/lib/node-esm/PromptArticle-BHPABYLT.mjs.map +7 -0
- package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs +23 -0
- package/dist/lib/node-esm/ai-service-ZI3A6RVG.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-4QN5M6PD.mjs +235 -0
- package/dist/lib/node-esm/app-graph-builder-4QN5M6PD.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-H3LFAEK2.mjs +15 -0
- package/dist/lib/node-esm/blueprint-definition-H3LFAEK2.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-2LEN26ZQ.mjs +48 -0
- package/dist/lib/node-esm/chunk-2LEN26ZQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3XC7LQSO.mjs +1975 -0
- package/dist/lib/node-esm/chunk-3XC7LQSO.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-F6LA7XNS.mjs +199 -0
- package/dist/lib/node-esm/chunk-F6LA7XNS.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-LB72WG6R.mjs +231 -0
- package/dist/lib/node-esm/chunk-LB72WG6R.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MJD5XWQV.mjs +288 -0
- package/dist/lib/node-esm/chunk-MJD5XWQV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs +25 -0
- package/dist/lib/node-esm/chunk-POWB2BPC.mjs.map +7 -0
- package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs +22 -0
- package/dist/lib/node-esm/edge-model-resolver-CMJ3KNLQ.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +310 -156
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs +21 -0
- package/dist/lib/node-esm/local-model-resolver-FFDAKOXN.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-2ZD2DXOU.mjs +134 -0
- package/dist/lib/node-esm/operation-resolver-2ZD2DXOU.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-T4VMCCKZ.mjs +126 -0
- package/dist/lib/node-esm/react-surface-T4VMCCKZ.mjs.map +7 -0
- package/dist/lib/node-esm/repair-DMI55PON.mjs +52 -0
- package/dist/lib/node-esm/repair-DMI55PON.mjs.map +7 -0
- package/dist/lib/node-esm/settings-NGGZA7S7.mjs +34 -0
- package/dist/lib/node-esm/settings-NGGZA7S7.mjs.map +7 -0
- package/dist/lib/node-esm/state-VSCPGN7R.mjs +27 -0
- package/dist/lib/node-esm/state-VSCPGN7R.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-JPRJRDDB.mjs +20 -0
- package/dist/lib/node-esm/toolkit-JPRJRDDB.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +11 -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 +11 -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 +6 -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 +26 -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 +7 -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 +11 -4
- 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 +13 -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 +18 -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 +6 -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 +37 -21
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/Chat/events.d.ts +10 -1
- 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 +16 -8
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChatDialog.d.ts +2 -2
- 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 +5 -6
- 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 +13 -11
- package/dist/types/src/components/ChatThread/ChatThread.d.ts.map +1 -1
- package/dist/types/src/components/ChatThread/ChatThread.stories.d.ts +285 -71
- 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/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 +42 -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/InitiativeContainer.d.ts +9 -0
- package/dist/types/src/components/InitiativeContainer.d.ts.map +1 -0
- 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 +3 -6
- package/dist/types/src/components/TemplateEditor/TemplateEditor.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts +431 -7
- package/dist/types/src/components/TemplateEditor/TemplateEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts +13 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts +428 -2
- package/dist/types/src/components/TemplateEditor/TemplateForm.stories.d.ts.map +1 -1
- package/dist/types/src/components/TemplateEditor/extensions/handlebars-extension.d.ts +12 -0
- 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 +21 -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/Toolbox/Toolbox.d.ts +9 -15
- package/dist/types/src/components/Toolbox/Toolbox.d.ts.map +1 -1
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts +432 -5
- package/dist/types/src/components/Toolbox/Toolbox.stories.d.ts.map +1 -1
- package/dist/types/src/components/TriggerStatus/TriggerStatus.d.ts +4 -0
- package/dist/types/src/components/TriggerStatus/TriggerStatus.d.ts.map +1 -0
- package/dist/types/src/components/TriggerStatus/index.d.ts +2 -0
- package/dist/types/src/components/TriggerStatus/index.d.ts.map +1 -0
- 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 -7
- package/dist/types/src/components/index.d.ts.map +1 -1
- 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/object-list.d.ts +10 -0
- package/dist/types/src/functions/object-list.d.ts.map +1 -0
- package/dist/types/src/functions/object-load.d.ts +8 -0
- package/dist/types/src/functions/object-load.d.ts.map +1 -0
- 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 +8 -3
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts +25 -0
- package/dist/types/src/hooks/useBlueprintRegistry.d.ts.map +1 -0
- package/dist/types/src/hooks/useChatProcessor.d.ts +10 -20
- package/dist/types/src/hooks/useChatProcessor.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatServices.d.ts +7 -8
- package/dist/types/src/hooks/useChatServices.d.ts.map +1 -1
- package/dist/types/src/hooks/useChatToolbarActions.d.ts +8 -0
- package/dist/types/src/hooks/useChatToolbarActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useContextBinder.d.ts +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/useFilteredTypes.d.ts +3 -0
- package/dist/types/src/hooks/useFilteredTypes.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/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/index.d.ts +2 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/processor/index.d.ts +4 -0
- package/dist/types/src/processor/index.d.ts.map +1 -0
- package/dist/types/src/{hooks → processor}/presets.d.ts +3 -3
- package/dist/types/src/processor/presets.d.ts.map +1 -0
- package/dist/types/src/processor/processor.d.ts +79 -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/processor/update-name.d.ts +10 -0
- package/dist/types/src/processor/update-name.d.ts.map +1 -0
- package/dist/types/src/queue-logger.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/test-generator.d.ts +8 -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/testing/test-services.d.ts +2 -2
- package/dist/types/src/testing/test-services.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +376 -37
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Assistant.d.ts +20 -0
- package/dist/types/src/types/Assistant.d.ts.map +1 -0
- package/dist/types/src/types/AssistantAction.d.ts +97 -0
- package/dist/types/src/types/AssistantAction.d.ts.map +1 -0
- 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/defs.d.ts +2 -0
- package/dist/types/src/types/defs.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 +6 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/service.d.ts +14 -213
- package/dist/types/src/types/service.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +125 -96
- package/src/AssistantPlugin.tsx +159 -88
- package/src/blueprints/assistant-blueprint.ts +57 -0
- package/src/blueprints/index.ts +12 -0
- package/src/capabilities/ai-service/ai-service.ts +30 -0
- package/src/capabilities/ai-service/index.ts +7 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +200 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +74 -0
- package/src/capabilities/blueprint-definition/index.ts +8 -0
- package/src/capabilities/edge-model-resolver/edge-model-resolver.ts +33 -0
- package/src/capabilities/edge-model-resolver/index.ts +7 -0
- package/src/capabilities/index.ts +11 -6
- package/src/capabilities/local-model-resolver/index.ts +7 -0
- package/src/capabilities/local-model-resolver/local-model-resolver.ts +38 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +112 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +111 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/repair/repair.ts +62 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +31 -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 +27 -0
- package/src/components/AssistantSettings/AssistantSettings.tsx +92 -77
- package/src/components/BlueprintArticle.tsx +28 -0
- package/src/components/Chat/Chat.tsx +267 -197
- package/src/components/Chat/events.ts +14 -1
- package/src/components/ChatCompanion.tsx +226 -0
- package/src/components/ChatContainer.tsx +56 -33
- package/src/components/ChatDialog.tsx +30 -19
- package/src/components/ChatProgress/ChatProgress.tsx +53 -0
- package/src/components/{SequenceEditor → ChatProgress}/index.ts +1 -1
- package/src/components/ChatPrompt/ChatActions.tsx +19 -27
- package/src/components/ChatPrompt/ChatOptions.tsx +238 -0
- package/src/components/ChatPrompt/ChatPresets.tsx +1 -0
- package/src/components/ChatPrompt/ChatReferences.tsx +32 -38
- package/src/components/ChatPrompt/ChatStatusIndicator.tsx +25 -22
- package/src/components/ChatPrompt/index.ts +1 -1
- package/src/components/ChatThread/ChatThread.stories.tsx +123 -116
- package/src/components/ChatThread/ChatThread.tsx +75 -36
- package/src/components/ChatThread/Link.tsx +26 -0
- package/src/components/ChatThread/registry.tsx +174 -0
- package/src/components/ChatThread/sync.test.ts +97 -0
- package/src/components/ChatThread/sync.ts +154 -0
- package/src/components/ChatThread/testing/thread.md +37 -0
- package/src/components/InitiativeContainer.tsx +340 -0
- package/src/components/PromptArticle.tsx +49 -0
- package/src/components/TemplateEditor/TemplateEditor.stories.tsx +40 -19
- package/src/components/TemplateEditor/TemplateEditor.tsx +33 -52
- package/src/components/TemplateEditor/TemplateForm.stories.tsx +30 -17
- package/src/components/TemplateEditor/TemplateForm.tsx +82 -32
- 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 +143 -0
- package/src/components/ToolBlock/ToolBlockWidget.tsx +5 -0
- package/src/components/ToolBlock/index.ts +6 -0
- package/src/components/Toolbox/Toolbox.stories.tsx +18 -28
- package/src/components/Toolbox/Toolbox.tsx +70 -102
- package/src/components/TriggerStatus/TriggerStatus.tsx +142 -0
- package/src/components/TriggerStatus/index.ts +5 -0
- 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 +14 -9
- package/src/functions/index.ts +7 -0
- package/src/functions/object-list.ts +49 -0
- package/src/functions/object-load.ts +44 -0
- package/src/functions/object-search.ts +46 -0
- package/src/hooks/index.ts +8 -4
- package/src/hooks/useBlueprintRegistry.ts +105 -0
- package/src/hooks/useChatProcessor.ts +40 -105
- package/src/hooks/useChatServices.ts +31 -75
- package/src/hooks/useChatToolbarActions.ts +122 -0
- package/src/hooks/useContextBinder.ts +32 -0
- package/src/hooks/useContextObjects.ts +46 -0
- package/src/hooks/useFilteredTypes.ts +37 -0
- package/src/hooks/useFlush.ts +35 -0
- package/src/hooks/useOnline.ts +10 -0
- package/src/hooks/usePresets.ts +44 -0
- package/src/hooks/useReferencesProvider.ts +15 -12
- package/src/index.ts +2 -1
- package/src/meta.ts +11 -8
- package/src/processor/index.ts +7 -0
- package/src/{hooks → processor}/presets.ts +16 -8
- package/src/processor/processor.test.ts +72 -0
- package/src/processor/processor.ts +301 -0
- package/src/processor/update-name.ts +58 -0
- package/src/queue-logger.ts +17 -18
- package/src/testing/index.ts +1 -1
- package/src/testing/test-generator.ts +262 -0
- package/src/testing/test-sequence.ts +2 -27
- package/src/testing/test-services.ts +10 -14
- package/src/translations.ts +71 -28
- package/src/types/Assistant.ts +28 -0
- package/src/types/AssistantAction.ts +76 -0
- package/src/types/capabilities.ts +27 -0
- package/src/types/defs.ts +5 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +9 -1
- package/src/types/service.ts +25 -14
- package/src/vite-env.d.ts +30 -0
- package/dist/lib/browser/ChatContainer-M3IHQLRS.mjs +0 -54
- package/dist/lib/browser/ChatContainer-M3IHQLRS.mjs.map +0 -7
- package/dist/lib/browser/ChatDialog-X6VN6QZI.mjs +0 -72
- package/dist/lib/browser/ChatDialog-X6VN6QZI.mjs.map +0 -7
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs +0 -162
- package/dist/lib/browser/SequenceContainer-3UDVKWPA.mjs.map +0 -7
- package/dist/lib/browser/TemplateContainer-RPJ2LBOB.mjs +0 -27
- package/dist/lib/browser/TemplateContainer-RPJ2LBOB.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs +0 -223
- package/dist/lib/browser/app-graph-builder-JTXBKE7O.mjs.map +0 -7
- package/dist/lib/browser/chunk-AEAEKWOC.mjs +0 -98
- package/dist/lib/browser/chunk-AEAEKWOC.mjs.map +0 -7
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs +0 -108
- package/dist/lib/browser/chunk-EQDW6BYQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-FDCJSQYF.mjs +0 -40
- package/dist/lib/browser/chunk-FDCJSQYF.mjs.map +0 -7
- package/dist/lib/browser/chunk-JQBVLTM5.mjs +0 -158
- package/dist/lib/browser/chunk-JQBVLTM5.mjs.map +0 -7
- package/dist/lib/browser/chunk-OWY4CUQY.mjs +0 -2245
- package/dist/lib/browser/chunk-OWY4CUQY.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs +0 -60
- package/dist/lib/browser/intent-resolver-5RMMCMXG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-66VY37YQ.mjs +0 -150
- package/dist/lib/browser/react-surface-66VY37YQ.mjs.map +0 -7
- package/dist/lib/browser/settings-2DGP3UTS.mjs +0 -22
- package/dist/lib/browser/settings-2DGP3UTS.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-VZT74PO2.mjs +0 -55
- package/dist/lib/node-esm/ChatContainer-VZT74PO2.mjs.map +0 -7
- package/dist/lib/node-esm/ChatDialog-RJ6FDX4Q.mjs +0 -73
- package/dist/lib/node-esm/ChatDialog-RJ6FDX4Q.mjs.map +0 -7
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs +0 -163
- package/dist/lib/node-esm/SequenceContainer-RQQH5XOC.mjs.map +0 -7
- package/dist/lib/node-esm/TemplateContainer-A3NAQCZE.mjs +0 -28
- package/dist/lib/node-esm/TemplateContainer-A3NAQCZE.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs +0 -224
- package/dist/lib/node-esm/app-graph-builder-OWSOXFTD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2XL6MNPE.mjs +0 -99
- package/dist/lib/node-esm/chunk-2XL6MNPE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs +0 -159
- package/dist/lib/node-esm/chunk-BISJDTBK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs +0 -109
- package/dist/lib/node-esm/chunk-E33DNNDW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs +0 -41
- package/dist/lib/node-esm/chunk-QN2H2EHV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs +0 -2246
- package/dist/lib/node-esm/chunk-SENTQAEO.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs +0 -61
- package/dist/lib/node-esm/intent-resolver-YPPYELY3.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs +0 -151
- package/dist/lib/node-esm/react-surface-RJMRBR2M.mjs.map +0 -7
- package/dist/lib/node-esm/settings-47RYZOU4.mjs +0 -23
- package/dist/lib/node-esm/settings-47RYZOU4.mjs.map +0 -7
- 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/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-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/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/components/PromptSettings.d.ts +0 -6
- package/dist/types/src/components/PromptSettings.d.ts.map +0 -1
- package/dist/types/src/components/SequenceContainer.d.ts +0 -8
- package/dist/types/src/components/SequenceContainer.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts +0 -13
- package/dist/types/src/components/SequenceEditor/SequenceEditor.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts +0 -8
- package/dist/types/src/components/SequenceEditor/SequenceEditor.stories.d.ts.map +0 -1
- package/dist/types/src/components/SequenceEditor/index.d.ts +0 -2
- package/dist/types/src/components/SequenceEditor/index.d.ts.map +0 -1
- package/dist/types/src/components/TemplateContainer.d.ts +0 -8
- package/dist/types/src/components/TemplateContainer.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/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/stories/Chat.stories.d.ts +0 -249
- package/dist/types/src/stories/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/testing/test-functions.d.ts +0 -3
- package/dist/types/src/testing/test-functions.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 -88
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -253
- package/src/capabilities/intent-resolver.ts +0 -58
- package/src/capabilities/react-surface.tsx +0 -138
- package/src/capabilities/settings.ts +0 -19
- 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/components/PromptSettings.tsx +0 -89
- package/src/components/SequenceContainer.tsx +0 -132
- package/src/components/SequenceEditor/SequenceEditor.stories.tsx +0 -32
- package/src/components/SequenceEditor/SequenceEditor.tsx +0 -50
- package/src/components/TemplateContainer.tsx +0 -24
- package/src/events.ts +0 -11
- 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/stories/Chat.stories.tsx +0 -378
- package/src/testing/test-functions.ts +0 -11
- 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 -95
- package/src/typings.d.ts +0 -9
|
@@ -2,56 +2,95 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { type CSSProperties, forwardRef, useMemo } from 'react';
|
|
5
|
+
import React, { type CSSProperties, forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { PublicKey } from '@dxos/keys';
|
|
8
8
|
import { type Identity } from '@dxos/react-client/halo';
|
|
9
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { type ThemedClassName, useForwardedRef } from '@dxos/react-ui';
|
|
10
|
+
import { MarkdownStream, type MarkdownStreamController, type MarkdownStreamProps } from '@dxos/react-ui-components';
|
|
11
|
+
import { type Message } from '@dxos/types';
|
|
12
|
+
import { mx } from '@dxos/ui-theme';
|
|
13
13
|
import { keyToFallback } from '@dxos/util';
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
|
|
15
|
+
import { type ChatEvent } from '../Chat';
|
|
16
|
+
|
|
17
|
+
import { blockToMarkdown, componentRegistry } from './registry';
|
|
18
|
+
import { MessageSyncer } from './sync';
|
|
17
19
|
|
|
18
20
|
export type ChatThreadProps = ThemedClassName<
|
|
19
21
|
{
|
|
20
22
|
identity?: Identity;
|
|
21
|
-
messages?:
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
messages?: Message.Message[];
|
|
24
|
+
error?: Error;
|
|
25
|
+
onEvent?: (event: ChatEvent) => void;
|
|
26
|
+
} & Pick<MarkdownStreamProps, 'cursor' | 'fadeIn' | 'debug'>
|
|
24
27
|
>;
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
// TODO(burdon): Memo thread position.
|
|
30
|
+
export const ChatThread = forwardRef<MarkdownStreamController | null, ChatThreadProps>(
|
|
31
|
+
(
|
|
32
|
+
{ classNames, identity, messages = [], error, cursor = false, fadeIn = true, debug = false, onEvent },
|
|
33
|
+
forwardedRef,
|
|
34
|
+
) => {
|
|
35
|
+
const controllerRef = useForwardedRef(forwardedRef);
|
|
36
|
+
const [controller, setController] = useState<MarkdownStreamController | null>(null);
|
|
37
|
+
|
|
38
|
+
// Callback ref to capture when MarkdownStream is mounted and trigger re-render.
|
|
39
|
+
const refCallback = useCallback(
|
|
40
|
+
(node: MarkdownStreamController | null) => {
|
|
41
|
+
controllerRef.current = node;
|
|
42
|
+
setController(node);
|
|
43
|
+
},
|
|
44
|
+
[controllerRef],
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const userHue = useMemo(
|
|
48
|
+
() => identity?.profile?.data?.hue || keyToFallback(identity?.identityKey ?? PublicKey.random()).hue,
|
|
49
|
+
[identity],
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
// Show error.
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
controller?.scrollToBottom();
|
|
55
|
+
}, [controller, error]);
|
|
56
|
+
|
|
57
|
+
// Update document.
|
|
58
|
+
const syncer = useMemo(() => controller && new MessageSyncer(controller, blockToMarkdown), [controller]);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const reset = syncer?.append(messages, true);
|
|
61
|
+
if (reset) {
|
|
62
|
+
controller?.scrollToBottom('instant');
|
|
40
63
|
}
|
|
41
|
-
}, [
|
|
64
|
+
}, [syncer, messages]);
|
|
65
|
+
|
|
66
|
+
// Event adapter.
|
|
67
|
+
const handleEvent = useCallback<NonNullable<MarkdownStreamProps['onEvent']>>(
|
|
68
|
+
({ type, value }) => {
|
|
69
|
+
switch (type) {
|
|
70
|
+
case 'submit': {
|
|
71
|
+
value && onEvent?.({ type, text: value });
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
[onEvent],
|
|
77
|
+
);
|
|
42
78
|
|
|
43
79
|
return (
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
80
|
+
<div
|
|
81
|
+
role='none'
|
|
82
|
+
className={mx('flex bs-full is-full justify-center overflow-hidden', classNames)}
|
|
83
|
+
style={{ '--user-fill': `var(--dx-${userHue}Fill)` } as CSSProperties}
|
|
84
|
+
>
|
|
85
|
+
<MarkdownStream
|
|
86
|
+
ref={refCallback}
|
|
87
|
+
registry={componentRegistry}
|
|
88
|
+
cursor={cursor}
|
|
89
|
+
fadeIn={fadeIn}
|
|
90
|
+
debug={debug}
|
|
91
|
+
onEvent={handleEvent}
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
55
94
|
);
|
|
56
95
|
},
|
|
57
96
|
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { type Space } from '@dxos/client/echo';
|
|
8
|
+
import { Entity } from '@dxos/echo';
|
|
9
|
+
import { type DXN } from '@dxos/keys';
|
|
10
|
+
import { DxAnchor } from '@dxos/lit-ui/react';
|
|
11
|
+
|
|
12
|
+
export type ObjectLinkProps = {
|
|
13
|
+
space: Space;
|
|
14
|
+
dxn: DXN;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const ObjectLink = ({ space, dxn }: ObjectLinkProps) => {
|
|
18
|
+
const ref = useMemo(() => space.db.makeRef(dxn), [space, dxn.toString()]);
|
|
19
|
+
|
|
20
|
+
const title = (ref.target && Entity.getLabel(ref.target)) ?? ref.target?.id ?? ref.dxn.toString();
|
|
21
|
+
return (
|
|
22
|
+
<DxAnchor rootclassname='dx-tag--anchor' dxn={dxn.toString()}>
|
|
23
|
+
{title}
|
|
24
|
+
</DxAnchor>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { log } from '@dxos/log';
|
|
8
|
+
import { ToggleContainer } from '@dxos/react-ui-components';
|
|
9
|
+
import {
|
|
10
|
+
PromptWidget,
|
|
11
|
+
ReferenceWidget,
|
|
12
|
+
SelectWidget,
|
|
13
|
+
SuggestionWidget,
|
|
14
|
+
SummaryWidget,
|
|
15
|
+
} from '@dxos/react-ui-components';
|
|
16
|
+
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
17
|
+
import { ContentBlock, type Message } from '@dxos/types';
|
|
18
|
+
import { type XmlWidgetProps, type XmlWidgetRegistry, getXmlTextChild } from '@dxos/ui-editor';
|
|
19
|
+
|
|
20
|
+
import { ToolBlock } from '../ToolBlock';
|
|
21
|
+
|
|
22
|
+
import { type BlockRenderer, type MessageThreadContext } from './sync';
|
|
23
|
+
|
|
24
|
+
const Fallback = ({ _tag, ...props }: XmlWidgetProps<MessageThreadContext>) => {
|
|
25
|
+
return (
|
|
26
|
+
<ToggleContainer.Root classNames='rounded-sm'>
|
|
27
|
+
<ToggleContainer.Header classNames='bg-groupSurface'>{_tag}</ToggleContainer.Header>
|
|
28
|
+
<ToggleContainer.Content classNames='bg-modalSurface'>
|
|
29
|
+
<Json classNames='!p-2 text-sm' data={props} />
|
|
30
|
+
</ToggleContainer.Content>
|
|
31
|
+
</ToggleContainer.Root>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Custom XML tags registry.
|
|
37
|
+
*/
|
|
38
|
+
export const componentRegistry: XmlWidgetRegistry = {
|
|
39
|
+
//
|
|
40
|
+
// Widgets
|
|
41
|
+
//
|
|
42
|
+
|
|
43
|
+
['prompt' as const]: {
|
|
44
|
+
block: true,
|
|
45
|
+
factory: ({ children }) => {
|
|
46
|
+
const text = getXmlTextChild(children);
|
|
47
|
+
return text ? new PromptWidget(text) : null;
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
['reference' as const]: {
|
|
51
|
+
block: false,
|
|
52
|
+
factory: ({ children, ref }) => {
|
|
53
|
+
const text = getXmlTextChild(children);
|
|
54
|
+
return text && ref ? new ReferenceWidget(text, ref) : null;
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
['select' as const]: {
|
|
58
|
+
block: true,
|
|
59
|
+
factory: ({ children }) => {
|
|
60
|
+
const options = children
|
|
61
|
+
?.map((option: any) => option._tag === 'option' && getXmlTextChild(option.children))
|
|
62
|
+
.filter(Boolean);
|
|
63
|
+
return options?.length ? new SelectWidget(options) : null;
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
['suggestion' as const]: {
|
|
67
|
+
block: true,
|
|
68
|
+
factory: ({ children }) => {
|
|
69
|
+
const text = getXmlTextChild(children);
|
|
70
|
+
return text ? new SuggestionWidget(text) : null;
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
['summary' as const]: {
|
|
74
|
+
block: true,
|
|
75
|
+
factory: ({ children }) => {
|
|
76
|
+
const text = getXmlTextChild(children);
|
|
77
|
+
return text ? new SummaryWidget(text) : null;
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
//
|
|
82
|
+
// React
|
|
83
|
+
//
|
|
84
|
+
|
|
85
|
+
['toolCall' as const]: {
|
|
86
|
+
block: true,
|
|
87
|
+
Component: ToolBlock,
|
|
88
|
+
},
|
|
89
|
+
['toolResult' as const]: {
|
|
90
|
+
block: true,
|
|
91
|
+
Component: Fallback,
|
|
92
|
+
},
|
|
93
|
+
['toolkit' as const]: {
|
|
94
|
+
block: true,
|
|
95
|
+
Component: Fallback,
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
//
|
|
99
|
+
// Fallback
|
|
100
|
+
//
|
|
101
|
+
|
|
102
|
+
['json' as const]: {
|
|
103
|
+
block: true,
|
|
104
|
+
Component: Fallback,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Convert block to markdown.
|
|
110
|
+
*/
|
|
111
|
+
export const blockToMarkdown: BlockRenderer = (
|
|
112
|
+
context: MessageThreadContext,
|
|
113
|
+
message: Message.Message,
|
|
114
|
+
block: ContentBlock.Any,
|
|
115
|
+
) => {
|
|
116
|
+
let str = blockToMarkdownImpl(context, message, block);
|
|
117
|
+
if (str && !block.pending) {
|
|
118
|
+
return (str += '\n');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return str;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const blockToMarkdownImpl = (context: MessageThreadContext, message: Message.Message, block: ContentBlock.Any) => {
|
|
125
|
+
log('blockToMarkdown', { block: JSON.stringify(block) });
|
|
126
|
+
switch (block._tag) {
|
|
127
|
+
case 'text': {
|
|
128
|
+
if (message.sender.role === 'user') {
|
|
129
|
+
return `<prompt>${block.text}</prompt>`;
|
|
130
|
+
} else {
|
|
131
|
+
const text = block.text.trim();
|
|
132
|
+
if (text.length > 0) {
|
|
133
|
+
return text;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
case 'reference': {
|
|
139
|
+
const dxn = block.reference.dxn;
|
|
140
|
+
return `<reference ref="${dxn.toString()}">${context.getObjectLabel(dxn)}</reference>`;
|
|
141
|
+
}
|
|
142
|
+
case 'suggestion': {
|
|
143
|
+
if (block.pending) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
return `<suggestion>${block.text}</suggestion>`;
|
|
147
|
+
}
|
|
148
|
+
case 'select': {
|
|
149
|
+
if (block.pending || block.options.length === 0) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
return `<select>${block.options.map((option) => `<option>${option}</option>`).join('')}</select>`;
|
|
153
|
+
}
|
|
154
|
+
case 'toolCall': {
|
|
155
|
+
context.updateWidget<{ blocks: ContentBlock.Any[] }>(block.toolCallId, {
|
|
156
|
+
blocks: [block],
|
|
157
|
+
});
|
|
158
|
+
return `<toolCall id="${block.toolCallId}" />`;
|
|
159
|
+
}
|
|
160
|
+
case 'toolResult': {
|
|
161
|
+
context.updateWidget<{ blocks: ContentBlock.Any[] }>(block.toolCallId, ({ blocks = [] }) => ({
|
|
162
|
+
blocks: [...blocks, block],
|
|
163
|
+
}));
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
case 'summary': {
|
|
167
|
+
return `<summary>${ContentBlock.createSummaryMessage(block)}</summary>`;
|
|
168
|
+
}
|
|
169
|
+
default: {
|
|
170
|
+
// TODO(burdon): Needs stable ID.
|
|
171
|
+
return `<json id="${message.id}">\n${JSON.stringify(block)}\n</json>`;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { EditorView } from '@codemirror/view';
|
|
6
|
+
import { describe, it } from '@effect/vitest';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
10
|
+
import { type Mutable } from '@dxos/echo/internal';
|
|
11
|
+
import { type ContentBlock } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
import { createMessage } from '../../testing';
|
|
14
|
+
|
|
15
|
+
import { blockToMarkdown } from './registry';
|
|
16
|
+
import { MessageSyncer, type TextModel } from './sync';
|
|
17
|
+
|
|
18
|
+
class TestDocument implements TextModel {
|
|
19
|
+
private readonly _view = new EditorView({ extensions: [] });
|
|
20
|
+
|
|
21
|
+
get view() {
|
|
22
|
+
return this._view;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get content() {
|
|
26
|
+
return this._view.state.doc.toString();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async reset(text: string) {
|
|
30
|
+
this._view.dispatch({
|
|
31
|
+
changes: { from: 0, to: this._view.state.doc.length, insert: text },
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async append(text: string) {
|
|
36
|
+
this._view.dispatch({
|
|
37
|
+
changes: { from: this._view.state.doc.length, insert: text },
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
updateWidget(_id: string, _value: any) {}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
describe('reducers', () => {
|
|
45
|
+
it.effect(
|
|
46
|
+
'basic sync',
|
|
47
|
+
Effect.fn(function* ({ expect }) {
|
|
48
|
+
const doc = new TestDocument();
|
|
49
|
+
const syncer = new MessageSyncer(doc, blockToMarkdown);
|
|
50
|
+
|
|
51
|
+
const messages = [
|
|
52
|
+
createMessage('user', [{ _tag: 'text', text: 'Hello' }]),
|
|
53
|
+
createMessage('assistant', [{ _tag: 'text', text: 'Hi there!' }]),
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
syncer.append(messages);
|
|
57
|
+
expect(doc.content).toEqual(['<prompt>Hello</prompt>', 'Hi there!', ''].join('\n'));
|
|
58
|
+
|
|
59
|
+
Obj.change(messages[1], (m) => {
|
|
60
|
+
m.blocks.push({ _tag: 'text', text: 'How can I help?' });
|
|
61
|
+
});
|
|
62
|
+
syncer.append(messages);
|
|
63
|
+
expect(doc.content).toEqual(['<prompt>Hello</prompt>', 'Hi there!', 'How can I help?', ''].join('\n'));
|
|
64
|
+
}),
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
it.effect(
|
|
68
|
+
'sync with partial updates',
|
|
69
|
+
Effect.fn(function* ({ expect }) {
|
|
70
|
+
const doc = new TestDocument();
|
|
71
|
+
const syncer = new MessageSyncer(doc, blockToMarkdown);
|
|
72
|
+
|
|
73
|
+
const messages = [
|
|
74
|
+
createMessage('user', [{ _tag: 'text', text: 'Hello' }]),
|
|
75
|
+
createMessage('assistant', [{ _tag: 'text', text: 'Hi there!', pending: true }]),
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
syncer.append(messages);
|
|
79
|
+
expect(doc.content).toEqual(['<prompt>Hello</prompt>', 'Hi there!'].join('\n'));
|
|
80
|
+
|
|
81
|
+
Obj.change(messages[1], (m) => {
|
|
82
|
+
const block = m.blocks[0] as Mutable<ContentBlock.Text>;
|
|
83
|
+
block.text = 'Hi there! How are you?';
|
|
84
|
+
block.pending = false;
|
|
85
|
+
});
|
|
86
|
+
syncer.append(messages);
|
|
87
|
+
|
|
88
|
+
Obj.change(messages[1], (m) => {
|
|
89
|
+
m.blocks.push({ _tag: 'text', text: 'How can I help?' });
|
|
90
|
+
});
|
|
91
|
+
syncer.append(messages);
|
|
92
|
+
expect(doc.content).toEqual(
|
|
93
|
+
['<prompt>Hello</prompt>', 'Hi there! How are you?', 'How can I help?', ''].join('\n'),
|
|
94
|
+
);
|
|
95
|
+
}),
|
|
96
|
+
);
|
|
97
|
+
});
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type DXN } from '@dxos/echo';
|
|
6
|
+
import { log } from '@dxos/log';
|
|
7
|
+
import { type MarkdownStreamController } from '@dxos/react-ui-components';
|
|
8
|
+
import { type ContentBlock, type Message } from '@dxos/types';
|
|
9
|
+
import { type StateDispatch, type XmlWidgetStateManager } from '@dxos/ui-editor';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Update document.
|
|
13
|
+
*/
|
|
14
|
+
export type TextModel = Pick<MarkdownStreamController, 'view' | 'reset' | 'append' | 'updateWidget'>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Thread context passed to renderer.
|
|
18
|
+
*/
|
|
19
|
+
export class MessageThreadContext implements Pick<MarkdownStreamController, 'updateWidget'> {
|
|
20
|
+
constructor(private readonly _widgetState?: XmlWidgetStateManager) {}
|
|
21
|
+
|
|
22
|
+
updateWidget<T>(id: string, value: StateDispatch<T>) {
|
|
23
|
+
this._widgetState?.updateWidget(id, value);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// TODO(burdon): Resolve from hypergraph.
|
|
27
|
+
getObjectLabel(_id: DXN) {
|
|
28
|
+
return 'Object';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Renders a block to markdown.
|
|
34
|
+
*/
|
|
35
|
+
export type BlockRenderer = (
|
|
36
|
+
context: MessageThreadContext,
|
|
37
|
+
message: Message.Message,
|
|
38
|
+
block: ContentBlock.Any,
|
|
39
|
+
) => string | undefined;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Syncs messages with the editor.
|
|
43
|
+
*/
|
|
44
|
+
export class MessageSyncer {
|
|
45
|
+
private _initialMessageId?: string;
|
|
46
|
+
private _currentMessageIndex = 0;
|
|
47
|
+
private _currentBlockIndex = 0;
|
|
48
|
+
private _currentBlockContent?: string;
|
|
49
|
+
|
|
50
|
+
private readonly _context: MessageThreadContext;
|
|
51
|
+
|
|
52
|
+
constructor(
|
|
53
|
+
private readonly _model: TextModel,
|
|
54
|
+
private readonly _blockRenderer: BlockRenderer,
|
|
55
|
+
) {
|
|
56
|
+
this._context = new MessageThreadContext(this._model);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
get context() {
|
|
60
|
+
return this._context;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
reset() {
|
|
64
|
+
log('reset');
|
|
65
|
+
this._initialMessageId = undefined;
|
|
66
|
+
this._currentMessageIndex = 0;
|
|
67
|
+
this._currentBlockIndex = 0;
|
|
68
|
+
this._currentBlockContent = undefined;
|
|
69
|
+
void this._model.reset('');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Syncs messages with the editor.
|
|
74
|
+
*/
|
|
75
|
+
append(messages: Message.Message[], flush = false): boolean {
|
|
76
|
+
// Check if new set of messages.
|
|
77
|
+
if (this._initialMessageId !== messages[0]?.id) {
|
|
78
|
+
this.reset();
|
|
79
|
+
this._initialMessageId = messages[0]?.id;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (flush && this._model.view?.state.doc.length === 0) {
|
|
83
|
+
const buffer: string[] = [];
|
|
84
|
+
this.process(messages, (content) => {
|
|
85
|
+
buffer.push(content);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const content = buffer.join('');
|
|
89
|
+
this._model.view?.dispatch({
|
|
90
|
+
changes: [
|
|
91
|
+
{
|
|
92
|
+
from: 0,
|
|
93
|
+
to: this._model.view?.state.doc.length ?? 0,
|
|
94
|
+
insert: content,
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
selection: { anchor: content.length },
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
return true;
|
|
101
|
+
} else {
|
|
102
|
+
this.process(messages, (content) => {
|
|
103
|
+
void this._model.append(content);
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private process(messages: Message.Message[], append: (content: string) => void) {
|
|
111
|
+
log('sync', {
|
|
112
|
+
doc: this._model.view?.state.doc.length,
|
|
113
|
+
messages: messages.map((message) => message.blocks.length),
|
|
114
|
+
currentMessageIndex: this._currentMessageIndex,
|
|
115
|
+
currentBlockIndex: this._currentBlockIndex,
|
|
116
|
+
currentBlockContent: this._currentBlockContent,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
let i = this._currentMessageIndex;
|
|
120
|
+
for (const message of messages.slice(this._currentMessageIndex)) {
|
|
121
|
+
if (i > this._currentMessageIndex) {
|
|
122
|
+
this._currentBlockIndex = 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
this._currentMessageIndex = i;
|
|
126
|
+
let j = this._currentBlockIndex;
|
|
127
|
+
for (const block of message.blocks.slice(this._currentBlockIndex)) {
|
|
128
|
+
this._currentBlockIndex = j;
|
|
129
|
+
const currentBlockContent = this._blockRenderer(this._context, message, block);
|
|
130
|
+
if (currentBlockContent) {
|
|
131
|
+
let content: string = '';
|
|
132
|
+
if (this._currentBlockContent && currentBlockContent.startsWith(this._currentBlockContent)) {
|
|
133
|
+
content = currentBlockContent.slice(this._currentBlockContent.length);
|
|
134
|
+
} else {
|
|
135
|
+
content = currentBlockContent;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
log('append', { message: i, block: j, content });
|
|
139
|
+
this._currentBlockContent = currentBlockContent;
|
|
140
|
+
append(content);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (block.pending) {
|
|
144
|
+
return;
|
|
145
|
+
} else {
|
|
146
|
+
this._currentBlockContent = undefined;
|
|
147
|
+
this._currentBlockIndex++;
|
|
148
|
+
}
|
|
149
|
+
j++;
|
|
150
|
+
}
|
|
151
|
+
i++;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<prompt>hi</prompt>
|
|
2
|
+
Hi! I'm Kai, your AI assistant powered by DXOS. I see you have a document in your context. Let me take a look at it to see how I can help you.
|
|
3
|
+
<toolCall id="toolu_012MB5XWrQhsyjUBoBCr7jXB" />
|
|
4
|
+
|
|
5
|
+
<summary>OK (1 tool uses · 2.62k tokens · 4.8s)</summary>
|
|
6
|
+
I can see you have a comprehensive welcome document for Composer by DXOS. This document explains what Composer is - an extensible collaborative application with features like documents, diagrams, tables, and sheets.
|
|
7
|
+
|
|
8
|
+
Here are some suggestions based on what's available:
|
|
9
|
+
<suggestion>Create a new document</suggestion>
|
|
10
|
+
<suggestion>Edit the welcome document</suggestion>
|
|
11
|
+
<suggestion>Create a table to organize information</suggestion>
|
|
12
|
+
<suggestion>Create a sketch for diagrams</suggestion>
|
|
13
|
+
<suggestion>Learn about collaboration features</suggestion>
|
|
14
|
+
|
|
15
|
+
Is there something specific you'd like to do with this document or would you like to explore other features of Composer?
|
|
16
|
+
|
|
17
|
+
<summary>OK (3.91k tokens · 7.0s)</summary>
|
|
18
|
+
<prompt>Create a table to organize information</prompt>
|
|
19
|
+
I'll help you create a table to organize information. Let me check what table creation tools are available.
|
|
20
|
+
<toolCall id="toolu_01Gk8ZNGYQEczAjGkbDZ9n1D" />
|
|
21
|
+
<summary>OK (1 tool uses · 3.99k tokens · 3.4s)</summary>
|
|
22
|
+
I need to check what artifact definitions are available for creating tables. Based on the blueprint instructions, I should first query for available artifact definitions to see what table-related tools I can use.
|
|
23
|
+
|
|
24
|
+
However, I notice that the function definitions provided don't include the artifact-related tools mentioned in the blueprint (like `require_artifact_definitions` or table creation tools). The available functions are focused on document operations (open, diff, add-to-context, open-item) and analysis mode.
|
|
25
|
+
|
|
26
|
+
Let me work with what's available. Since I can't directly create a table artifact with the current tools, I can help you create a table structure within a markdown document instead.
|
|
27
|
+
|
|
28
|
+
Would you like me to:
|
|
29
|
+
|
|
30
|
+
1. Create a simple markdown table structure in a new document that you can use to organize your information?
|
|
31
|
+
2. Or would you prefer to use Composer's built-in Tables plugin (as mentioned in the welcome document) by creating one through the Composer interface?
|
|
32
|
+
|
|
33
|
+
What kind of information are you looking to organize? This will help me suggest the best table structure for your needs.
|
|
34
|
+
<toolCall id="toolu_01CQXUsyLw2uoV3k1mPLqFee" />
|
|
35
|
+
|
|
36
|
+
<summary>OK (1 tool uses · 4.28k tokens · 11.1s)</summary>
|
|
37
|
+
<summary>OK (4.30k tokens · 1.6s)</summary>
|