@dxos/plugin-thread 0.8.4-main.422d1c7879 → 0.8.4-main.4668b7de9b
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/LICENSE +102 -5
- package/PLUGIN.mdl +271 -0
- package/README.md +1 -1
- package/dist/lib/neutral/ChannelArticle-UJHPOUWA.mjs +28 -0
- package/dist/lib/neutral/ChannelArticle-UJHPOUWA.mjs.map +7 -0
- package/dist/lib/neutral/ChannelChat-LZEDFJVD.mjs +10 -0
- package/dist/lib/neutral/CommentsCompanion-FOUIGCEK.mjs +208 -0
- package/dist/lib/neutral/CommentsCompanion-FOUIGCEK.mjs.map +7 -0
- package/dist/lib/neutral/ThreadContainer-QWB6WRMI.mjs +61 -0
- package/dist/lib/neutral/ThreadContainer-QWB6WRMI.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.mjs +109 -0
- package/dist/lib/neutral/ThreadPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs +40 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs +24 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs +15 -0
- package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs.map +7 -0
- package/dist/lib/{browser/add-message-VPPFFLFL.mjs → neutral/add-message-RDIABSIX.mjs} +48 -23
- package/dist/lib/neutral/add-message-RDIABSIX.mjs.map +7 -0
- package/dist/lib/neutral/agent-runner-RB7N5HLD.mjs +244 -0
- package/dist/lib/neutral/agent-runner-RB7N5HLD.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-PDLRFYSI.mjs +120 -0
- package/dist/lib/neutral/app-graph-builder-PDLRFYSI.mjs.map +7 -0
- package/dist/lib/neutral/append-channel-message-TBBQUVMH.mjs +40 -0
- package/dist/lib/neutral/append-channel-message-TBBQUVMH.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-S3EBOH4R.mjs +15 -0
- package/dist/lib/neutral/blueprint-definition-S3EBOH4R.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +8 -0
- package/dist/lib/neutral/capabilities/index.mjs +27 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-35GUWXBB.mjs +48 -0
- package/dist/lib/neutral/chunk-35GUWXBB.mjs.map +7 -0
- package/dist/lib/{browser/blueprints/index.mjs → neutral/chunk-5T5LPLBN.mjs} +5 -6
- package/dist/lib/neutral/chunk-5T5LPLBN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BHEZLLXG.mjs +55 -0
- package/dist/lib/neutral/chunk-BHEZLLXG.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HQZWTDJC.mjs +164 -0
- package/dist/lib/neutral/chunk-HQZWTDJC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IQBZZAMX.mjs +335 -0
- package/dist/lib/neutral/chunk-IQBZZAMX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JJETHBAZ.mjs +8 -0
- package/dist/lib/neutral/chunk-JJETHBAZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JLY4NVTA.mjs +38 -0
- package/dist/lib/neutral/chunk-JLY4NVTA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QFDT33VT.mjs +69 -0
- package/dist/lib/neutral/chunk-QFDT33VT.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +541 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +15 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/{browser/create-UGT7V733.mjs → neutral/create-VXM6HJMN.mjs} +20 -14
- package/dist/lib/neutral/create-VXM6HJMN.mjs.map +7 -0
- package/dist/lib/neutral/create-channel-FSJOMRHF.mjs +19 -0
- package/dist/lib/neutral/create-channel-FSJOMRHF.mjs.map +7 -0
- package/dist/lib/neutral/create-object-D5XEG7MQ.mjs +28 -0
- package/dist/lib/neutral/create-object-D5XEG7MQ.mjs.map +7 -0
- package/dist/lib/{browser/create-proposals-CMK7S7VS.mjs → neutral/create-proposals-ILYIYJEN.mjs} +5 -6
- package/dist/lib/neutral/create-proposals-ILYIYJEN.mjs.map +7 -0
- package/dist/lib/{browser/delete-FSFVU6ZA.mjs → neutral/delete-6KZERY6K.mjs} +9 -11
- package/dist/lib/neutral/delete-6KZERY6K.mjs.map +7 -0
- package/dist/lib/{browser/delete-message-XL5M5J33.mjs → neutral/delete-message-PATSHW36.mjs} +9 -19
- package/dist/lib/neutral/delete-message-PATSHW36.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +10 -0
- package/dist/lib/neutral/index.mjs +32 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/markdown-5UHAAC5Z.mjs +83 -0
- package/dist/lib/neutral/markdown-5UHAAC5Z.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +10 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/on-create-space-6NLTBGGD.mjs +23 -0
- package/dist/lib/neutral/on-create-space-6NLTBGGD.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs +13 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-TUMXARMI.mjs +76 -0
- package/dist/lib/neutral/react-surface-TUMXARMI.mjs.map +7 -0
- package/dist/lib/neutral/respond-to-thread-ROQA3B6U.mjs +32 -0
- package/dist/lib/neutral/respond-to-thread-ROQA3B6U.mjs.map +7 -0
- package/dist/lib/{browser/restore-2ZGMKUSD.mjs → neutral/restore-SP4HADCE.mjs} +6 -7
- package/dist/lib/neutral/restore-SP4HADCE.mjs.map +7 -0
- package/dist/lib/{browser/restore-message-OYEGWPII.mjs → neutral/restore-message-TVIC66VL.mjs} +8 -17
- package/dist/lib/neutral/restore-message-TVIC66VL.mjs.map +7 -0
- package/dist/lib/{browser/select-VG2XLULE.mjs → neutral/select-DLHPEKEA.mjs} +7 -9
- package/dist/lib/neutral/select-DLHPEKEA.mjs.map +7 -0
- package/dist/lib/neutral/set-agent-config-7GEYCG7Y.mjs +20 -0
- package/dist/lib/neutral/set-agent-config-7GEYCG7Y.mjs.map +7 -0
- package/dist/lib/neutral/settings-HK4EB6TF.mjs +30 -0
- package/dist/lib/neutral/settings-HK4EB6TF.mjs.map +7 -0
- package/dist/lib/neutral/state-UU7VEAKV.mjs +22 -0
- package/dist/lib/neutral/state-UU7VEAKV.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +58 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/{browser/toggle-resolved-MM6YC5BU.mjs → neutral/toggle-resolved-GMAD3SZ2.mjs} +8 -17
- package/dist/lib/neutral/toggle-resolved-GMAD3SZ2.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +91 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +16 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs +54 -0
- package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs.map +7 -0
- package/dist/types/src/ThreadPlugin.d.ts +1 -0
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.node.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ThreadPlugin.test.d.ts +2 -0
- package/dist/types/src/ThreadPlugin.test.d.ts.map +1 -0
- package/dist/types/src/ThreadPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/agent-runner.d.ts +22 -0
- package/dist/types/src/capabilities/agent-runner.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +2 -2
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +51 -0
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +2 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts.map +1 -1
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts +70 -70
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts.map +1 -1
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts +70 -70
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +13 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts +162 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelArticle/index.d.ts +2 -0
- package/dist/types/src/containers/{CallDebugPanel → ChannelArticle}/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts +20 -0
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelChat/index.d.ts +4 -0
- package/dist/types/src/containers/ChannelChat/index.d.ts.map +1 -0
- package/dist/types/src/containers/CommentsCompanion/CommentsCompanion.d.ts +11 -0
- package/dist/types/src/containers/CommentsCompanion/CommentsCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/CommentsCompanion/CommentsCompanion.stories.d.ts +198 -0
- package/dist/types/src/containers/CommentsCompanion/CommentsCompanion.stories.d.ts.map +1 -0
- package/dist/types/src/containers/CommentsCompanion/index.d.ts +2 -0
- package/dist/types/src/containers/CommentsCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.d.ts +20 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.d.ts.map +1 -0
- package/dist/types/src/containers/{ChatContainer/ChatContainer.stories.d.ts → ThreadContainer/ThreadContainer.stories.d.ts} +71 -71
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadContainer/index.d.ts +4 -0
- package/dist/types/src/containers/ThreadContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -5
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +3 -3
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-message.d.ts +3 -3
- package/dist/types/src/operations/add-message.d.ts.map +1 -1
- package/dist/types/src/operations/append-channel-message.d.ts +5 -0
- package/dist/types/src/operations/append-channel-message.d.ts.map +1 -0
- package/dist/types/src/operations/create-channel.d.ts +3 -3
- package/dist/types/src/operations/create-channel.d.ts.map +1 -1
- package/dist/types/src/operations/create-proposals.d.ts +3 -3
- package/dist/types/src/operations/create-proposals.d.ts.map +1 -1
- package/dist/types/src/operations/create.d.ts +3 -3
- package/dist/types/src/operations/create.d.ts.map +1 -1
- package/dist/types/src/operations/delete-message.d.ts +3 -3
- package/dist/types/src/operations/delete-message.d.ts.map +1 -1
- package/dist/types/src/operations/delete.d.ts +3 -3
- package/dist/types/src/operations/delete.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/on-create-space.d.ts +3 -3
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -1
- package/dist/types/src/operations/respond-to-thread.d.ts +5 -0
- package/dist/types/src/operations/respond-to-thread.d.ts.map +1 -0
- package/dist/types/src/operations/restore-message.d.ts +3 -3
- package/dist/types/src/operations/restore-message.d.ts.map +1 -1
- package/dist/types/src/operations/restore.d.ts +3 -3
- package/dist/types/src/operations/restore.d.ts.map +1 -1
- package/dist/types/src/operations/select.d.ts +3 -3
- package/dist/types/src/operations/select.d.ts.map +1 -1
- package/dist/types/src/operations/set-agent-config.d.ts +5 -0
- package/dist/types/src/operations/set-agent-config.d.ts.map +1 -0
- package/dist/types/src/operations/toggle-resolved.d.ts +3 -3
- package/dist/types/src/operations/toggle-resolved.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/should-trigger-agent.d.ts +22 -0
- package/dist/types/src/should-trigger-agent.d.ts.map +1 -0
- package/dist/types/src/should-trigger-agent.test.d.ts +2 -0
- package/dist/types/src/should-trigger-agent.test.d.ts.map +1 -0
- package/dist/types/src/testing/data.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/translations.d.ts +70 -70
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/AgentIdentity.d.ts +27 -0
- package/dist/types/src/types/AgentIdentity.d.ts.map +1 -0
- package/dist/types/src/types/ThreadCapabilities.d.ts +34 -0
- package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -0
- package/dist/types/src/{operations/definitions.d.ts → types/ThreadOperation.d.ts} +1882 -1941
- package/dist/types/src/types/ThreadOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +6 -3
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +127 -90
- package/src/ThreadPlugin.node.ts +39 -0
- package/src/ThreadPlugin.test.ts +37 -0
- package/src/ThreadPlugin.tsx +35 -65
- package/src/ThreadPlugin.workerd.ts +20 -0
- package/src/blueprints/thread-blueprint.ts +3 -4
- package/src/capabilities/agent-runner.ts +291 -0
- package/src/capabilities/app-graph-builder.ts +24 -74
- package/src/capabilities/blueprint-definition.ts +2 -0
- package/src/capabilities/create-object.ts +30 -0
- package/src/capabilities/index.ts +4 -3
- package/src/capabilities/markdown.ts +6 -2
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +11 -27
- package/src/capabilities/settings.ts +1 -3
- package/src/capabilities/undo-mappings.ts +1 -1
- package/src/components/Chat/Chat.tsx +259 -0
- package/src/components/Chat/index.ts +5 -0
- package/src/components/CommentsPanel/CommentsPanel.stories.tsx +8 -7
- package/src/components/CommentsPanel/CommentsPanel.tsx +5 -5
- package/src/components/CommentsPanel/CommentsThread.tsx +16 -12
- package/src/components/MessagePanel/MessagePanel.tsx +8 -9
- package/src/components/ThreadSettings/ThreadSettings.stories.tsx +2 -1
- package/src/components/ThreadSettings/ThreadSettings.tsx +0 -1
- package/src/components/index.ts +1 -1
- package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +105 -0
- package/src/containers/ChannelArticle/ChannelArticle.tsx +42 -0
- package/src/containers/ChannelArticle/index.ts +5 -0
- package/src/containers/ChannelChat/ChannelChat.tsx +75 -0
- package/src/containers/ChannelChat/index.ts +8 -0
- package/src/containers/CommentsCompanion/CommentsCompanion.stories.tsx +355 -0
- package/src/containers/{ThreadCompanion/ThreadCompanion.tsx → CommentsCompanion/CommentsCompanion.tsx} +33 -34
- package/src/containers/CommentsCompanion/index.ts +5 -0
- package/src/containers/{ChatContainer/ChatContainer.stories.tsx → ThreadContainer/ThreadContainer.stories.tsx} +10 -11
- package/src/containers/ThreadContainer/ThreadContainer.tsx +75 -0
- package/src/containers/ThreadContainer/index.ts +8 -0
- package/src/containers/index.ts +4 -5
- package/src/extensions/command.ts +1 -1
- package/src/extensions/threads.ts +13 -13
- package/src/hooks/analytics.ts +1 -1
- package/src/hooks/index.ts +0 -5
- package/src/index.ts +4 -4
- package/src/meta.ts +34 -8
- package/src/operations/add-message.ts +22 -9
- package/src/operations/append-channel-message.ts +37 -0
- package/src/operations/create-channel.ts +4 -4
- package/src/operations/create-proposals.ts +3 -3
- package/src/operations/create.ts +21 -6
- package/src/operations/delete-message.ts +6 -6
- package/src/operations/delete.ts +5 -5
- package/src/operations/index.ts +4 -4
- package/src/operations/on-create-space.ts +4 -4
- package/src/operations/respond-to-thread.ts +32 -0
- package/src/operations/restore-message.ts +5 -5
- package/src/operations/restore.ts +4 -4
- package/src/operations/select.ts +3 -3
- package/src/operations/set-agent-config.ts +24 -0
- package/src/operations/toggle-resolved.ts +5 -5
- package/src/plugin.ts +11 -0
- package/src/should-trigger-agent.test.ts +72 -0
- package/src/should-trigger-agent.ts +50 -0
- package/src/testing/index.ts +1 -1
- package/src/translations.ts +2 -1
- package/src/types/AgentIdentity.ts +35 -0
- package/src/types/ThreadCapabilities.ts +46 -0
- package/src/types/ThreadOperation.ts +225 -0
- package/src/types/index.ts +5 -2
- package/src/types/types.ts +0 -2
- package/src/util.ts +36 -4
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/add-message-VPPFFLFL.mjs.map +0 -7
- package/dist/lib/browser/blueprints/index.mjs.map +0 -7
- package/dist/lib/browser/chunk-MESW3R4Q.mjs +0 -61
- package/dist/lib/browser/chunk-MESW3R4Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-VPM44Z35.mjs +0 -259
- package/dist/lib/browser/chunk-VPM44Z35.mjs.map +0 -7
- package/dist/lib/browser/create-UGT7V733.mjs.map +0 -7
- package/dist/lib/browser/create-channel-EF67LCS6.mjs +0 -21
- package/dist/lib/browser/create-channel-EF67LCS6.mjs.map +0 -7
- package/dist/lib/browser/create-channel-thread-CCZTSWQ6.mjs +0 -28
- package/dist/lib/browser/create-channel-thread-CCZTSWQ6.mjs.map +0 -7
- package/dist/lib/browser/create-proposals-CMK7S7VS.mjs.map +0 -7
- package/dist/lib/browser/delete-FSFVU6ZA.mjs.map +0 -7
- package/dist/lib/browser/delete-message-XL5M5J33.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -2334
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/on-create-space-VYS2JGVT.mjs +0 -25
- package/dist/lib/browser/on-create-space-VYS2JGVT.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -14
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/restore-2ZGMKUSD.mjs.map +0 -7
- package/dist/lib/browser/restore-message-OYEGWPII.mjs.map +0 -7
- package/dist/lib/browser/select-VG2XLULE.mjs.map +0 -7
- package/dist/lib/browser/toggle-resolved-MM6YC5BU.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -12
- package/dist/lib/node-esm/add-message-XWKHLNS6.mjs +0 -98
- package/dist/lib/node-esm/add-message-XWKHLNS6.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -38
- package/dist/lib/node-esm/blueprints/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-JTHXNWKJ.mjs +0 -260
- package/dist/lib/node-esm/chunk-JTHXNWKJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SDRAQNSQ.mjs +0 -62
- package/dist/lib/node-esm/chunk-SDRAQNSQ.mjs.map +0 -7
- package/dist/lib/node-esm/create-XAYNDVU2.mjs +0 -56
- package/dist/lib/node-esm/create-XAYNDVU2.mjs.map +0 -7
- package/dist/lib/node-esm/create-channel-UYWUNB3L.mjs +0 -22
- package/dist/lib/node-esm/create-channel-UYWUNB3L.mjs.map +0 -7
- package/dist/lib/node-esm/create-channel-thread-UQF2SBHS.mjs +0 -29
- package/dist/lib/node-esm/create-channel-thread-UQF2SBHS.mjs.map +0 -7
- package/dist/lib/node-esm/create-proposals-5FJNURKH.mjs +0 -58
- package/dist/lib/node-esm/create-proposals-5FJNURKH.mjs.map +0 -7
- package/dist/lib/node-esm/delete-WRODXR3E.mjs +0 -60
- package/dist/lib/node-esm/delete-WRODXR3E.mjs.map +0 -7
- package/dist/lib/node-esm/delete-message-TAHCYTW2.mjs +0 -65
- package/dist/lib/node-esm/delete-message-TAHCYTW2.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -2335
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/on-create-space-XDY2YXPV.mjs +0 -26
- package/dist/lib/node-esm/on-create-space-XDY2YXPV.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -15
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/restore-T3QA7TSL.mjs +0 -34
- package/dist/lib/node-esm/restore-T3QA7TSL.mjs.map +0 -7
- package/dist/lib/node-esm/restore-message-WFTEVBEV.mjs +0 -43
- package/dist/lib/node-esm/restore-message-WFTEVBEV.mjs.map +0 -7
- package/dist/lib/node-esm/select-Q4UDWJJF.mjs +0 -27
- package/dist/lib/node-esm/select-Q4UDWJJF.mjs.map +0 -7
- package/dist/lib/node-esm/toggle-resolved-33XTAK2H.mjs +0 -46
- package/dist/lib/node-esm/toggle-resolved-33XTAK2H.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -13
- package/dist/types/src/calls/call-manager.d.ts +0 -87
- package/dist/types/src/calls/call-manager.d.ts.map +0 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +0 -66
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +0 -1
- package/dist/types/src/calls/index.d.ts +0 -7
- package/dist/types/src/calls/index.d.ts.map +0 -1
- package/dist/types/src/calls/media-manager.d.ts +0 -60
- package/dist/types/src/calls/media-manager.d.ts.map +0 -1
- package/dist/types/src/calls/speaking-monitor.d.ts +0 -24
- package/dist/types/src/calls/speaking-monitor.d.ts.map +0 -1
- package/dist/types/src/calls/types.d.ts +0 -45
- package/dist/types/src/calls/types.d.ts.map +0 -1
- package/dist/types/src/calls/util/audio.d.ts +0 -6
- package/dist/types/src/calls/util/audio.d.ts.map +0 -1
- package/dist/types/src/calls/util/calls-service.d.ts +0 -77
- package/dist/types/src/calls/util/calls-service.d.ts.map +0 -1
- package/dist/types/src/calls/util/history-cache.d.ts +0 -11
- package/dist/types/src/calls/util/history-cache.d.ts.map +0 -1
- package/dist/types/src/calls/util/index.d.ts +0 -5
- package/dist/types/src/calls/util/index.d.ts.map +0 -1
- package/dist/types/src/calls/util/media.d.ts +0 -6
- package/dist/types/src/calls/util/media.d.ts.map +0 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts +0 -18
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +0 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +0 -17
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +0 -1
- package/dist/types/src/calls-service.stories.d.ts +0 -23
- package/dist/types/src/calls-service.stories.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager.d.ts +0 -6
- package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -9
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/components/Call/Call.d.ts +0 -17
- package/dist/types/src/components/Call/Call.d.ts.map +0 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +0 -16
- package/dist/types/src/components/Call/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Call/index.d.ts +0 -3
- package/dist/types/src/components/Call/index.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts +0 -15
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/index.d.ts +0 -2
- package/dist/types/src/components/Lobby/index.d.ts.map +0 -1
- package/dist/types/src/components/Media/AudioStream.d.ts +0 -6
- package/dist/types/src/components/Media/AudioStream.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +0 -15
- package/dist/types/src/components/Media/VideoObject.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +0 -22
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +0 -1
- package/dist/types/src/components/Media/index.d.ts +0 -3
- package/dist/types/src/components/Media/index.d.ts.map +0 -1
- package/dist/types/src/components/Participant/Participant.d.ts +0 -6
- package/dist/types/src/components/Participant/Participant.d.ts.map +0 -1
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts +0 -11
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +0 -1
- package/dist/types/src/components/Participant/index.d.ts +0 -3
- package/dist/types/src/components/Participant/index.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts +0 -32
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +0 -178
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts +0 -21
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.d.ts +0 -12
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts +0 -164
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/index.d.ts +0 -4
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +0 -1
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts +0 -15
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +0 -1
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +0 -2
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts +0 -3
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +0 -1
- package/dist/types/src/containers/CallSidebar/index.d.ts +0 -2
- package/dist/types/src/containers/CallSidebar/index.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts +0 -12
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts +0 -162
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/index.d.ts +0 -2
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +0 -16
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/index.d.ts +0 -4
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts +0 -8
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadCompanion/index.d.ts +0 -2
- package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +0 -2
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useDebugMode.d.ts +0 -2
- package/dist/types/src/hooks/useDebugMode.d.ts.map +0 -1
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts +0 -2
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +0 -3
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +0 -1
- package/dist/types/src/operations/create-channel-thread.d.ts +0 -5
- package/dist/types/src/operations/create-channel-thread.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/testing/stories.d.ts +0 -3
- package/dist/types/src/testing/stories.d.ts.map +0 -1
- package/dist/types/src/types/Channel.d.ts +0 -715
- package/dist/types/src/types/Channel.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -24
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/src/calls/call-manager.ts +0 -270
- package/src/calls/call-swarm-synchronizer.ts +0 -350
- package/src/calls/index.ts +0 -10
- package/src/calls/media-manager.ts +0 -378
- package/src/calls/speaking-monitor.ts +0 -85
- package/src/calls/types.ts +0 -74
- package/src/calls/util/audio.ts +0 -58
- package/src/calls/util/calls-service.ts +0 -580
- package/src/calls/util/history-cache.ts +0 -27
- package/src/calls/util/index.ts +0 -8
- package/src/calls/util/media.ts +0 -52
- package/src/calls/util/stub-media-streams.ts +0 -127
- package/src/calls/util/task-scheduling.ts +0 -92
- package/src/calls-service.stories.tsx +0 -230
- package/src/capabilities/call-manager.ts +0 -27
- package/src/capabilities/react-root.tsx +0 -20
- package/src/components/Call/Call.tsx +0 -93
- package/src/components/Call/Toolbar.tsx +0 -199
- package/src/components/Call/index.ts +0 -6
- package/src/components/Lobby/Lobby.tsx +0 -122
- package/src/components/Lobby/index.ts +0 -5
- package/src/components/Media/AudioStream.tsx +0 -67
- package/src/components/Media/VideoObject.stories.tsx +0 -59
- package/src/components/Media/VideoObject.tsx +0 -58
- package/src/components/Media/index.ts +0 -6
- package/src/components/Participant/Participant.tsx +0 -77
- package/src/components/Participant/ParticipantGrid.tsx +0 -88
- package/src/components/Participant/index.ts +0 -6
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +0 -157
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +0 -341
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +0 -134
- package/src/components/ResponsiveGrid/ResponsivePanel.stories.tsx +0 -53
- package/src/components/ResponsiveGrid/ResponsivePanel.tsx +0 -31
- package/src/components/ResponsiveGrid/index.ts +0 -7
- package/src/containers/CallDebugPanel/CallDebugPanel.tsx +0 -173
- package/src/containers/CallDebugPanel/index.ts +0 -5
- package/src/containers/CallSidebar/CallSidebar.tsx +0 -18
- package/src/containers/CallSidebar/index.ts +0 -5
- package/src/containers/ChannelContainer/ChannelContainer.stories.tsx +0 -61
- package/src/containers/ChannelContainer/ChannelContainer.tsx +0 -223
- package/src/containers/ChannelContainer/index.ts +0 -5
- package/src/containers/ChatContainer/ChatContainer.tsx +0 -131
- package/src/containers/ChatContainer/index.ts +0 -8
- package/src/containers/ThreadCompanion/index.ts +0 -5
- package/src/hooks/useBlackCanvasStreamTrack.tsx +0 -27
- package/src/hooks/useDebugMode.ts +0 -25
- package/src/hooks/useInaudibleAudioStreamTrack.tsx +0 -27
- package/src/hooks/useVideoStreamTrack.tsx +0 -36
- package/src/operations/create-channel-thread.ts +0 -26
- package/src/operations/definitions.ts +0 -177
- package/src/testing/stories.ts +0 -51
- package/src/types/Channel.ts +0 -37
- package/src/types/capabilities.ts +0 -36
- package/src/typings/peermetrics-webrtc-stats.d.ts +0 -46
- package/src/typings.d.ts +0 -8
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ChannelChat-LZEDFJVD.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/hooks}/index.mjs.map +0 -0
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2022 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
package/PLUGIN.mdl
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: org.dxos.plugin.thread
|
|
3
|
+
name: ThreadPlugin
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
ThreadPlugin renders comment threads anchored to ECHO objects (primarily Markdown documents). This spec covers the **comment-thread AI agent** feature: per-thread opt-in AI that responds to user comments either automatically or on @mention, with a model-selected response shape (reply message or document edit proposal).
|
|
8
|
+
|
|
9
|
+
## Extensions
|
|
10
|
+
|
|
11
|
+
The following extension dialects are used in this document.
|
|
12
|
+
|
|
13
|
+
| Term | URI |
|
|
14
|
+
|-------------|--------------------------------|
|
|
15
|
+
| `type` | `org.dxos.mdl.type@1.0` |
|
|
16
|
+
| `feat` | `org.dxos.mdl.feat@1.0` |
|
|
17
|
+
| `test` | `org.dxos.mdl.test@1.0` |
|
|
18
|
+
| `component` | `org.dxos.mdl.component@1.0` |
|
|
19
|
+
| `op` | `org.dxos.mdl.op@1.0` |
|
|
20
|
+
| `service` | `org.dxos.mdl.service@1.0` |
|
|
21
|
+
|
|
22
|
+
## Types
|
|
23
|
+
|
|
24
|
+
```mdl
|
|
25
|
+
type AgentMode
|
|
26
|
+
literals: auto | mention
|
|
27
|
+
desc: Per-thread agent firing policy.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```mdl
|
|
31
|
+
type AgentConfig
|
|
32
|
+
desc: Per-thread agent configuration. Stored on Thread.Thread as optional field.
|
|
33
|
+
fields:
|
|
34
|
+
enabled: Boolean
|
|
35
|
+
mode: AgentMode
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
```mdl
|
|
39
|
+
type Thread
|
|
40
|
+
desc: |
|
|
41
|
+
Extends the existing org.dxos.type.thread schema. Version bumps to 0.2.0.
|
|
42
|
+
The `agent` field is optional; absent or disabled means no AI involvement.
|
|
43
|
+
fields:
|
|
44
|
+
agent?: AgentConfig
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```mdl
|
|
48
|
+
type AgentIdentity
|
|
49
|
+
desc: |
|
|
50
|
+
Effect Context.Tag. Resolved at runtime, not stored on threads.
|
|
51
|
+
Default layer reads from the plugin Settings (`agentName`); tests/stories
|
|
52
|
+
provide static layers; the host may layer in a workspace-scoped producer.
|
|
53
|
+
fields:
|
|
54
|
+
name: String # display name + @mention token
|
|
55
|
+
identityDid?: String # optional ECHO identity DID stamped on assistant messages
|
|
56
|
+
avatar?: String # optional icon hint
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Services
|
|
60
|
+
|
|
61
|
+
```mdl
|
|
62
|
+
service AgentRunner
|
|
63
|
+
desc: |
|
|
64
|
+
Capability that executes one agent turn for a given thread + subject.
|
|
65
|
+
Default implementation performs one `LanguageModel.generateText` call
|
|
66
|
+
with edit tools (`editAnchoredRange`, `updateDocument`) registered per
|
|
67
|
+
turn. Stub implementations are used in storybook + tests.
|
|
68
|
+
methods:
|
|
69
|
+
run(thread: Thread, subject: Obj.Any) -> Effect<void>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Operations
|
|
73
|
+
|
|
74
|
+
```mdl
|
|
75
|
+
op RespondToThread
|
|
76
|
+
key: org.dxos.plugin.thread.operation.respond-to-thread
|
|
77
|
+
desc: Run one agent turn against a thread. Scheduled by AddMessage when the gate passes.
|
|
78
|
+
input:
|
|
79
|
+
thread: Ref<Thread>
|
|
80
|
+
subject: Ref<Obj.Any>
|
|
81
|
+
|
|
82
|
+
op SetAgentConfig
|
|
83
|
+
key: org.dxos.plugin.thread.operation.set-agent-config
|
|
84
|
+
desc: Mutate thread.agent. Undefined config means off.
|
|
85
|
+
input:
|
|
86
|
+
thread: Ref<Thread>
|
|
87
|
+
config?: AgentConfig
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Components
|
|
91
|
+
|
|
92
|
+
```mdl
|
|
93
|
+
component AgentToggle
|
|
94
|
+
desc: |
|
|
95
|
+
Per-thread radio popover hung off the thread header in CommentsPanel.
|
|
96
|
+
Three states: off / mention / auto. Shows the resolved AgentIdentity.name
|
|
97
|
+
as a read-only label.
|
|
98
|
+
props:
|
|
99
|
+
value?: AgentConfig
|
|
100
|
+
agentName: String
|
|
101
|
+
emits:
|
|
102
|
+
change: { config?: AgentConfig }
|
|
103
|
+
layout: |
|
|
104
|
+
┌──────────────────────────────┐
|
|
105
|
+
│ Agent: {agentName} │
|
|
106
|
+
│ │
|
|
107
|
+
│ ◯ Off │
|
|
108
|
+
│ ◉ Reply only on @mention │
|
|
109
|
+
│ ◯ Auto-respond │
|
|
110
|
+
└──────────────────────────────┘
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Features
|
|
114
|
+
|
|
115
|
+
```mdl
|
|
116
|
+
feat F-1: Per-thread agent configuration
|
|
117
|
+
|
|
118
|
+
req F-1.1: Thread schema MUST add an optional `agent: AgentConfig` field
|
|
119
|
+
without breaking existing threads (no migration required).
|
|
120
|
+
|
|
121
|
+
req F-1.2: The `AgentIdentity` Effect service MUST be the sole source of
|
|
122
|
+
the agent's display name. Thread schema MUST NOT store the name.
|
|
123
|
+
|
|
124
|
+
req F-1.3: ThreadPlugin MUST contribute a default `AgentIdentity` capability
|
|
125
|
+
at plugin activation (`{ name: 'Kai' }`). Hosts overriding the default
|
|
126
|
+
contribute their own `AgentIdentity` earlier in plugin order so
|
|
127
|
+
`Capability.get` returns it first.
|
|
128
|
+
|
|
129
|
+
feat F-2: Trigger gate
|
|
130
|
+
|
|
131
|
+
req F-2.1: ThreadOperation.AddMessage MUST evaluate the gate after appending
|
|
132
|
+
the message and MUST schedule (not invoke) RespondToThread when it passes.
|
|
133
|
+
|
|
134
|
+
req F-2.2: The gate MUST return true iff ALL hold:
|
|
135
|
+
- thread.agent?.enabled === true
|
|
136
|
+
- message.sender.role !== 'assistant' # user-authored messages carry no role
|
|
137
|
+
- thread.status !== 'resolved'
|
|
138
|
+
- mode === 'auto' OR text contains '@' + agentName (case-insensitive)
|
|
139
|
+
|
|
140
|
+
req F-2.3: The gate MUST NOT fire on assistant messages (self-loop guard).
|
|
141
|
+
|
|
142
|
+
req F-2.4: Flipping enabled on a thread MUST NOT retroactively respond to
|
|
143
|
+
prior messages; only future user messages.
|
|
144
|
+
|
|
145
|
+
feat F-3: Agent runner
|
|
146
|
+
|
|
147
|
+
req F-3.1: The runner MUST be a Capability so storybook and tests can swap
|
|
148
|
+
in a stub without changing call sites.
|
|
149
|
+
|
|
150
|
+
req F-3.2: The default runner MUST execute one LLM turn via
|
|
151
|
+
`LanguageModel.generateText`, providing the thread message history as
|
|
152
|
+
prompt and appending the response (or a synthesized post-tool ack) as
|
|
153
|
+
an assistant message on the same thread.
|
|
154
|
+
|
|
155
|
+
req F-3.3: The agent MUST be given edit tools for in-place markdown updates:
|
|
156
|
+
- `editAnchoredRange(replacement)` — splices the replacement into the
|
|
157
|
+
anchored span via Automerge-diff (`updateText`) and rewrites the
|
|
158
|
+
AnchoredTo cursor so the comment marker tracks the new text.
|
|
159
|
+
- `updateDocument(content)` — replaces the entire document content.
|
|
160
|
+
|
|
161
|
+
req F-3.4: When the subject is not a Markdown.Document (no editable text in
|
|
162
|
+
scope), the runner MUST omit the edit tools and only post a chat reply.
|
|
163
|
+
|
|
164
|
+
req F-3.5: Assistant messages emitted by the runner MUST carry
|
|
165
|
+
sender = { role: 'assistant', name: identity.name, identityDid: identity.identityDid }.
|
|
166
|
+
|
|
167
|
+
req F-3.6: Runner errors MUST be caught at the operation handler boundary,
|
|
168
|
+
logged via @dxos/log, and emit a `threads.agent.failed` observability event.
|
|
169
|
+
The user's message MUST remain in the thread.
|
|
170
|
+
|
|
171
|
+
feat F-4: Toggle UI
|
|
172
|
+
|
|
173
|
+
req F-4.1: CommentsPanel MUST render an AgentToggle icon button per thread,
|
|
174
|
+
next to existing controls (resolve, delete).
|
|
175
|
+
|
|
176
|
+
req F-4.2: Clicking the toggle MUST open a popover with three radio options
|
|
177
|
+
(off / mention / auto) and a non-editable label showing AgentIdentity.name.
|
|
178
|
+
|
|
179
|
+
req F-4.3: Changes MUST go through ThreadOperation.SetAgentConfig, not
|
|
180
|
+
direct schema writes from the popover.
|
|
181
|
+
|
|
182
|
+
req F-4.4: No UI is provided for changing the agent name in v1; the name
|
|
183
|
+
is read-only from the user's perspective.
|
|
184
|
+
|
|
185
|
+
feat F-5: Storybook coverage
|
|
186
|
+
|
|
187
|
+
req F-5.1: CommentsCompanion.stories.tsx MUST add three new variants:
|
|
188
|
+
- `WithMentionAgent`: thread auto-opted-in with mode='mention'; stub runner.
|
|
189
|
+
- `WithAutoAgent`: thread auto-opted-in with mode='auto'; stub runner.
|
|
190
|
+
- `WithLiveAgent`: thread auto-opted-in with mode='auto'; live runner
|
|
191
|
+
(Anthropic via DXOS edge).
|
|
192
|
+
|
|
193
|
+
req F-5.2: `WithMentionAgent` and `WithAutoAgent` MUST contribute a stub
|
|
194
|
+
`AgentRunner` that performs a canned `postReply` and never makes network
|
|
195
|
+
calls (so headless `test-storybook` runs are deterministic and offline).
|
|
196
|
+
|
|
197
|
+
req F-5.3: `WithLiveAgent` MUST contribute an `AppCapabilities.AiServiceLayer`
|
|
198
|
+
(Anthropic via DXOS edge) so ThreadPlugin's default LLM-backed `AgentRunner`
|
|
199
|
+
reaches a real model. Headless `test-storybook` renders but does not submit
|
|
200
|
+
a comment, so no network call occurs in CI.
|
|
201
|
+
|
|
202
|
+
req F-5.4: All three variants MUST contribute a static `AgentIdentity`
|
|
203
|
+
capability (e.g. `{ name: 'Kai' }`) so the runner stamps the assistant
|
|
204
|
+
message correctly even when no host layer is present.
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Acceptance
|
|
208
|
+
|
|
209
|
+
```mdl
|
|
210
|
+
test T-1: Auto mode responds to every user message
|
|
211
|
+
given: A thread with agent = { enabled: true, mode: 'auto' }
|
|
212
|
+
when: A user appends a text message via ThreadOperation.AddMessage
|
|
213
|
+
then:
|
|
214
|
+
- RespondToThread is scheduled exactly once
|
|
215
|
+
- The runner's `run` is invoked with the thread and subject
|
|
216
|
+
|
|
217
|
+
test T-2: Mention mode gates on @name
|
|
218
|
+
given: A thread with agent = { enabled: true, mode: 'mention' }, identity.name = 'claude'
|
|
219
|
+
when: A user posts "hello world" (no mention) then "hey @Claude check this"
|
|
220
|
+
then:
|
|
221
|
+
- The first message does not schedule RespondToThread
|
|
222
|
+
- The second message schedules RespondToThread
|
|
223
|
+
|
|
224
|
+
test T-3: Self-loop guard
|
|
225
|
+
given: A thread with agent = { enabled: true, mode: 'auto' }
|
|
226
|
+
when: A message with sender.role = 'assistant' is appended
|
|
227
|
+
then: RespondToThread is NOT scheduled
|
|
228
|
+
|
|
229
|
+
test T-4: Resolved threads do not trigger
|
|
230
|
+
given: A thread with agent.enabled = true and status = 'resolved'
|
|
231
|
+
when: A user appends a message
|
|
232
|
+
then: RespondToThread is NOT scheduled
|
|
233
|
+
|
|
234
|
+
test T-5: Disabled mid-conversation does not delete history
|
|
235
|
+
given: A thread with prior assistant messages
|
|
236
|
+
when: SetAgentConfig is invoked with config = undefined
|
|
237
|
+
then:
|
|
238
|
+
- thread.agent becomes undefined
|
|
239
|
+
- thread.messages is unchanged
|
|
240
|
+
|
|
241
|
+
test T-6: Story WithAutoAgent posts an assistant reply
|
|
242
|
+
given: The WithAutoAgent storybook variant is rendered
|
|
243
|
+
when: The user types "hello" and clicks send
|
|
244
|
+
then:
|
|
245
|
+
- The thread shows two messages
|
|
246
|
+
- The second message has sender.role = 'assistant' and sender.name = 'echo'
|
|
247
|
+
|
|
248
|
+
test T-7: Story WithMentionAgent gates correctly
|
|
249
|
+
given: The WithMentionAgent storybook variant is rendered
|
|
250
|
+
when: The user posts "hello" then "@echo hello"
|
|
251
|
+
then:
|
|
252
|
+
- After the first send, only the user message is visible
|
|
253
|
+
- After the second send, an assistant message is appended
|
|
254
|
+
|
|
255
|
+
test T-8: Runner errors do not lose the user message
|
|
256
|
+
given: A thread with agent enabled and a runner stubbed to fail
|
|
257
|
+
when: A user appends a message
|
|
258
|
+
then:
|
|
259
|
+
- The user message persists in the thread
|
|
260
|
+
- A `threads.agent.failed` observability event is emitted
|
|
261
|
+
- No assistant message is appended
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Out of Scope (v1)
|
|
265
|
+
|
|
266
|
+
- Per-document default agent config (was discussed during brainstorming; punted).
|
|
267
|
+
- UI to rename the agent within Composer (lives in plugin settings).
|
|
268
|
+
- "Thinking…" / streaming indicator on the message list.
|
|
269
|
+
- Cancellation of in-flight runner turns when the agent is disabled mid-turn.
|
|
270
|
+
- De-duplication of concurrent triggers from multiple users on the same thread.
|
|
271
|
+
- Token-budget caps on long threads or large documents.
|
package/README.md
CHANGED
|
@@ -12,4 +12,4 @@ Surface plugin for thread entities.
|
|
|
12
12
|
|
|
13
13
|
Your ideas, issues, and code are most welcome. Please take a look at our [community code of conduct](https://github.com/dxos/dxos/blob/main/CODE_OF_CONDUCT.md), the [issue guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-issues), and the [PR contribution guide](https://github.com/dxos/dxos/blob/main/CONTRIBUTING.md#submitting-prs).
|
|
14
14
|
|
|
15
|
-
License: [
|
|
15
|
+
License: [FSL-1.1-Apache-2.0](./LICENSE) Copyright 2023 © DXOS
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChannelChat
|
|
3
|
+
} from "./chunk-BHEZLLXG.mjs";
|
|
4
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
+
|
|
6
|
+
// src/containers/ChannelArticle/ChannelArticle.tsx
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { getSpace } from "@dxos/react-client/echo";
|
|
9
|
+
import { Panel } from "@dxos/react-ui";
|
|
10
|
+
var ChannelArticle = ({ subject: channel }) => {
|
|
11
|
+
const space = getSpace(channel);
|
|
12
|
+
if (channel && space) {
|
|
13
|
+
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
14
|
+
classNames: "dx-document"
|
|
15
|
+
}, /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
16
|
+
asChild: true
|
|
17
|
+
}, /* @__PURE__ */ React.createElement(ChannelChat, {
|
|
18
|
+
classNames: "border",
|
|
19
|
+
space,
|
|
20
|
+
channel
|
|
21
|
+
})));
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
ChannelArticle as default
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ChannelArticle-UJHPOUWA.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/ChannelArticle/ChannelArticle.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { Panel } from '@dxos/react-ui';\nimport { type Channel } from '@dxos/types';\n\nimport { ChannelChat } from '../ChannelChat';\n\nexport type ChannelArticleProps = AppSurface.ObjectArticleProps<\n Channel.Channel | undefined,\n {\n roomId?: string;\n fullscreen?: boolean;\n }\n>;\n\n/**\n * Renders the channel chat. The \"Start video call\" action and the in-call surface\n * are contributed by plugin-calls — this container is call-agnostic.\n */\n// TODO(burdon): Create Radix style layout.\n// TODO(burdon): Restore graph-driven toolbar so plugin-calls can contribute a \"Start video call\" action (F-1.1).\nexport const ChannelArticle = ({ subject: channel }: ChannelArticleProps) => {\n const space = getSpace(channel);\n\n if (channel && space) {\n return (\n <Panel.Root classNames='dx-document'>\n <Panel.Content asChild>\n <ChannelChat classNames='border' space={space} channel={channel} />\n </Panel.Content>\n </Panel.Root>\n );\n }\n\n return null;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,gBAAgB;AACzB,SAASC,aAAa;AAmBf,IAAMC,iBAAiB,CAAC,EAAEC,SAASC,QAAO,MAAuB;AACtE,QAAMC,QAAQC,SAASF,OAAAA;AAEvB,MAAIA,WAAWC,OAAO;AACpB,WACE,sBAAA,cAACE,MAAMC,MAAI;MAACC,YAAW;OACrB,sBAAA,cAACF,MAAMG,SAAO;MAACC,SAAAA;OACb,sBAAA,cAACC,aAAAA;MAAYH,YAAW;MAASJ;MAAcD;;EAIvD;AAEA,SAAO;AACT;",
|
|
6
|
+
"names": ["React", "getSpace", "Panel", "ChannelArticle", "subject", "channel", "space", "getSpace", "Panel", "Root", "classNames", "Content", "asChild", "ChannelChat"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/containers/CommentsCompanion/CommentsCompanion.tsx
|
|
4
|
+
import { useAtomValue } from "@effect-atom/atom-react";
|
|
5
|
+
import React, { useCallback, useMemo } from "react";
|
|
6
|
+
import { Capabilities } from "@dxos/app-framework";
|
|
7
|
+
import { useCapabilities, useCapability, useOperationInvoker } from "@dxos/app-framework/ui";
|
|
8
|
+
import { AppCapabilities, CollaborationOperation, LayoutOperation } from "@dxos/app-toolkit";
|
|
9
|
+
import { Filter, Obj, Query, Ref, Relation } from "@dxos/echo";
|
|
10
|
+
import { useQuery } from "@dxos/react-client/echo";
|
|
11
|
+
import { useIdentity } from "@dxos/react-client/halo";
|
|
12
|
+
import { Panel, ScrollArea, Toolbar, useTranslation } from "@dxos/react-ui";
|
|
13
|
+
import { getParentId, useAttention } from "@dxos/react-ui-attention";
|
|
14
|
+
import { Tabs } from "@dxos/react-ui-tabs";
|
|
15
|
+
import { AnchoredTo, Thread } from "@dxos/types";
|
|
16
|
+
import { CommentsPanel } from "#components";
|
|
17
|
+
import { meta } from "#meta";
|
|
18
|
+
import { ThreadOperation } from "#types";
|
|
19
|
+
import { ThreadCapabilities } from "#types";
|
|
20
|
+
var initialViewState = {
|
|
21
|
+
showResolvedThreads: false
|
|
22
|
+
};
|
|
23
|
+
var CommentsCompanion = ({ attendableId, subject }) => {
|
|
24
|
+
const { t } = useTranslation(meta.id);
|
|
25
|
+
const { invokePromise } = useOperationInvoker();
|
|
26
|
+
const identity = useIdentity();
|
|
27
|
+
const subjectId = Obj.getURI(subject);
|
|
28
|
+
const parentId = attendableId ? getParentId(attendableId) : void 0;
|
|
29
|
+
const registry = useCapability(Capabilities.AtomRegistry);
|
|
30
|
+
const stateAtom = useCapability(ThreadCapabilities.State);
|
|
31
|
+
const viewStoreAtom = useCapability(ThreadCapabilities.ViewState);
|
|
32
|
+
const state = useAtomValue(stateAtom);
|
|
33
|
+
const viewStore = useAtomValue(viewStoreAtom);
|
|
34
|
+
const drafts = state.drafts[subjectId];
|
|
35
|
+
const viewState = useMemo(() => {
|
|
36
|
+
if (!viewStore[subjectId]) {
|
|
37
|
+
registry.set(viewStoreAtom, {
|
|
38
|
+
...viewStore,
|
|
39
|
+
[subjectId]: {
|
|
40
|
+
...initialViewState
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return initialViewState;
|
|
44
|
+
}
|
|
45
|
+
return viewStore[subjectId];
|
|
46
|
+
}, [
|
|
47
|
+
viewStore,
|
|
48
|
+
subjectId,
|
|
49
|
+
registry,
|
|
50
|
+
viewStoreAtom
|
|
51
|
+
]);
|
|
52
|
+
const { showResolvedThreads } = viewState;
|
|
53
|
+
const commentConfigs = useCapabilities(AppCapabilities.CommentConfig);
|
|
54
|
+
const anchorSorts = useCapabilities(AppCapabilities.AnchorSort);
|
|
55
|
+
const sort = useMemo(() => anchorSorts.find(({ key }) => key === Obj.getTypename(subject))?.sort, [
|
|
56
|
+
anchorSorts,
|
|
57
|
+
subject
|
|
58
|
+
]);
|
|
59
|
+
const db = Obj.getDatabase(subject);
|
|
60
|
+
const objectsAnchoredTo = useQuery(db, Query.select(Filter.id(subject.id)).targetOf(AnchoredTo.AnchoredTo));
|
|
61
|
+
const anchors = objectsAnchoredTo.toSorted((a, b) => sort?.(a, b) ?? 0).filter((anchor) => Obj.instanceOf(Thread.Thread, Relation.getSource(anchor))).concat(drafts ?? []);
|
|
62
|
+
const handleChangeViewState = useCallback((nextValue) => {
|
|
63
|
+
registry.set(viewStoreAtom, {
|
|
64
|
+
...registry.get(viewStoreAtom),
|
|
65
|
+
[subjectId]: {
|
|
66
|
+
...registry.get(viewStoreAtom)[subjectId],
|
|
67
|
+
showResolvedThreads: nextValue === "all"
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}, [
|
|
71
|
+
registry,
|
|
72
|
+
viewStoreAtom,
|
|
73
|
+
subjectId
|
|
74
|
+
]);
|
|
75
|
+
const { hasAttention, isAncestor, isRelated } = useAttention(parentId);
|
|
76
|
+
const isAttended = hasAttention || isAncestor || isRelated;
|
|
77
|
+
const handleAttend = useCallback((anchor) => {
|
|
78
|
+
const thread = Relation.getSource(anchor);
|
|
79
|
+
const threadId = Obj.getURI(thread);
|
|
80
|
+
if (state.current !== threadId) {
|
|
81
|
+
registry.set(stateAtom, {
|
|
82
|
+
...registry.get(stateAtom),
|
|
83
|
+
current: threadId
|
|
84
|
+
});
|
|
85
|
+
void invokePromise(LayoutOperation.ScrollIntoView, {
|
|
86
|
+
subject: parentId
|
|
87
|
+
});
|
|
88
|
+
if (anchor.anchor && parentId) {
|
|
89
|
+
const typename = Obj.getTypename(subject);
|
|
90
|
+
const commentConfig = commentConfigs.find(({ id }) => id === typename);
|
|
91
|
+
if (commentConfig?.scrollToAnchor) {
|
|
92
|
+
void invokePromise(commentConfig.scrollToAnchor, {
|
|
93
|
+
subject: parentId,
|
|
94
|
+
cursor: anchor.anchor,
|
|
95
|
+
ref: threadId
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}, [
|
|
101
|
+
state.current,
|
|
102
|
+
invokePromise,
|
|
103
|
+
registry,
|
|
104
|
+
stateAtom,
|
|
105
|
+
parentId,
|
|
106
|
+
subject,
|
|
107
|
+
commentConfigs
|
|
108
|
+
]);
|
|
109
|
+
const handleComment = useCallback(async (anchor, text) => {
|
|
110
|
+
await invokePromise(ThreadOperation.AddMessage, {
|
|
111
|
+
anchor,
|
|
112
|
+
subject,
|
|
113
|
+
sender: {
|
|
114
|
+
identityDid: identity?.did
|
|
115
|
+
},
|
|
116
|
+
text
|
|
117
|
+
});
|
|
118
|
+
const thread = Relation.getSource(anchor);
|
|
119
|
+
registry.set(stateAtom, {
|
|
120
|
+
...registry.get(stateAtom),
|
|
121
|
+
current: Obj.getURI(thread)
|
|
122
|
+
});
|
|
123
|
+
}, [
|
|
124
|
+
invokePromise,
|
|
125
|
+
identity,
|
|
126
|
+
subject,
|
|
127
|
+
registry,
|
|
128
|
+
stateAtom
|
|
129
|
+
]);
|
|
130
|
+
const handleResolve = useCallback((anchor) => invokePromise(ThreadOperation.ToggleResolved, {
|
|
131
|
+
thread: Relation.getSource(anchor)
|
|
132
|
+
}), [
|
|
133
|
+
invokePromise
|
|
134
|
+
]);
|
|
135
|
+
const handleThreadDelete = useCallback((anchor) => invokePromise(ThreadOperation.Delete, {
|
|
136
|
+
anchor,
|
|
137
|
+
subject
|
|
138
|
+
}), [
|
|
139
|
+
invokePromise,
|
|
140
|
+
subject
|
|
141
|
+
]);
|
|
142
|
+
const handleMessageDelete = useCallback((anchor, messageId) => invokePromise(ThreadOperation.DeleteMessage, {
|
|
143
|
+
anchor,
|
|
144
|
+
subject,
|
|
145
|
+
messageId
|
|
146
|
+
}), [
|
|
147
|
+
invokePromise,
|
|
148
|
+
subject
|
|
149
|
+
]);
|
|
150
|
+
const handleAcceptProposal = useCallback(async (anchor, messageId) => {
|
|
151
|
+
const thread = Relation.getSource(anchor);
|
|
152
|
+
const messageIndex = thread.messages.findIndex(Ref.hasEntityId(messageId));
|
|
153
|
+
const message = thread.messages[messageIndex]?.target;
|
|
154
|
+
const proposal = message?.blocks.find((block) => block._tag === "proposal");
|
|
155
|
+
if (!proposal || !anchor.anchor) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
await invokePromise(CollaborationOperation.AcceptProposal, {
|
|
159
|
+
subject,
|
|
160
|
+
anchor: anchor.anchor,
|
|
161
|
+
proposal
|
|
162
|
+
});
|
|
163
|
+
await invokePromise(ThreadOperation.ToggleResolved, {
|
|
164
|
+
thread
|
|
165
|
+
});
|
|
166
|
+
}, [
|
|
167
|
+
invokePromise,
|
|
168
|
+
subject
|
|
169
|
+
]);
|
|
170
|
+
const comments = /* @__PURE__ */ React.createElement(CommentsPanel, {
|
|
171
|
+
anchors,
|
|
172
|
+
currentId: isAttended ? state.current : void 0,
|
|
173
|
+
showResolvedThreads,
|
|
174
|
+
onAttend: handleAttend,
|
|
175
|
+
onComment: handleComment,
|
|
176
|
+
onResolve: handleResolve,
|
|
177
|
+
onMessageDelete: handleMessageDelete,
|
|
178
|
+
onThreadDelete: handleThreadDelete,
|
|
179
|
+
onAcceptProposal: handleAcceptProposal
|
|
180
|
+
});
|
|
181
|
+
return /* @__PURE__ */ React.createElement(Tabs.Root, {
|
|
182
|
+
orientation: "horizontal",
|
|
183
|
+
value: showResolvedThreads ? "all" : "unresolved",
|
|
184
|
+
onValueChange: handleChangeViewState
|
|
185
|
+
}, /* @__PURE__ */ React.createElement(Panel.Root, null, /* @__PURE__ */ React.createElement(Panel.Toolbar, {
|
|
186
|
+
asChild: true
|
|
187
|
+
}, /* @__PURE__ */ React.createElement(Toolbar.Root, null, /* @__PURE__ */ React.createElement(Tabs.Tablist, {
|
|
188
|
+
classNames: "p-0"
|
|
189
|
+
}, /* @__PURE__ */ React.createElement(Tabs.Tab, {
|
|
190
|
+
classNames: "text-sm",
|
|
191
|
+
value: "unresolved"
|
|
192
|
+
}, t("show-unresolved.label")), /* @__PURE__ */ React.createElement(Tabs.Tab, {
|
|
193
|
+
classNames: "text-sm",
|
|
194
|
+
value: "all"
|
|
195
|
+
}, t("show-all.label"))))), /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
196
|
+
asChild: true
|
|
197
|
+
}, /* @__PURE__ */ React.createElement(ScrollArea.Root, {
|
|
198
|
+
thin: true
|
|
199
|
+
}, /* @__PURE__ */ React.createElement(ScrollArea.Viewport, null, /* @__PURE__ */ React.createElement(Tabs.Panel, {
|
|
200
|
+
value: "all"
|
|
201
|
+
}, showResolvedThreads && comments), /* @__PURE__ */ React.createElement(Tabs.Panel, {
|
|
202
|
+
value: "unresolved"
|
|
203
|
+
}, !showResolvedThreads && comments))))));
|
|
204
|
+
};
|
|
205
|
+
export {
|
|
206
|
+
CommentsCompanion as default
|
|
207
|
+
};
|
|
208
|
+
//# sourceMappingURL=CommentsCompanion-FOUIGCEK.mjs.map
|