@dxos/plugin-transcription 0.8.2-main.f081794 → 0.8.2-main.fbd8ed0
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/{TranscriptContainer-4D4BHE7G.mjs → TranscriptContainer-CXA4ZBHW.mjs} +3 -3
- package/dist/lib/browser/app-graph-builder-REQZ5SC5.mjs +351 -0
- package/dist/lib/browser/app-graph-builder-REQZ5SC5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DR3NBV6Q.mjs → chunk-3TKXI6TQ.mjs} +105 -78
- package/dist/lib/browser/chunk-3TKXI6TQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-JHWEZRWC.mjs +63 -0
- package/dist/lib/browser/chunk-JHWEZRWC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RHHJZQPM.mjs → chunk-K2LS2QOM.mjs} +135 -117
- package/dist/lib/browser/chunk-K2LS2QOM.mjs.map +7 -0
- package/dist/lib/browser/chunk-LCTMCTYY.mjs +27 -0
- package/dist/lib/browser/chunk-LCTMCTYY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5BE6RTNC.mjs → chunk-LTIQFX4W.mjs} +1 -1
- package/dist/lib/browser/{chunk-5BE6RTNC.mjs.map → chunk-LTIQFX4W.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +30 -18
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-ZQQEH27F.mjs → intent-resolver-DZ62CJPC.mjs} +4 -4
- package/dist/lib/browser/intent-resolver-DZ62CJPC.mjs.map +7 -0
- package/dist/lib/browser/{meeting-transcription-state-5D52VTHU.mjs → meeting-transcription-state-MNA2XROE.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-HETJ5XY6.mjs → react-surface-PUXZNAZL.mjs} +18 -7
- package/dist/lib/browser/react-surface-PUXZNAZL.mjs.map +7 -0
- package/dist/lib/browser/settings-JWDS4J3F.mjs +24 -0
- package/dist/lib/browser/settings-JWDS4J3F.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-SMRLU2KY.mjs → transcriber-YWWIV6KP.mjs} +4 -4
- package/dist/lib/browser/types/index.mjs +3 -3
- package/dist/lib/node/{TranscriptContainer-ZWP6UKY6.cjs → TranscriptContainer-SSJVLRM6.cjs} +8 -8
- package/dist/lib/node/{TranscriptContainer-ZWP6UKY6.cjs.map → TranscriptContainer-SSJVLRM6.cjs.map} +2 -2
- package/dist/lib/node/app-graph-builder-OAPU4GDH.cjs +352 -0
- package/dist/lib/node/app-graph-builder-OAPU4GDH.cjs.map +7 -0
- package/dist/lib/node/{chunk-3QEJ5EBO.cjs → chunk-EJWB53WK.cjs} +22 -32
- package/dist/lib/node/chunk-EJWB53WK.cjs.map +7 -0
- package/dist/lib/node/{chunk-KO6MKCED.cjs → chunk-EVE3H46F.cjs} +138 -119
- package/dist/lib/node/chunk-EVE3H46F.cjs.map +7 -0
- package/dist/lib/node/{chunk-HYGDHS6X.cjs → chunk-JUGOXWES.cjs} +4 -4
- package/dist/lib/node/{chunk-HYGDHS6X.cjs.map → chunk-JUGOXWES.cjs.map} +1 -1
- package/dist/lib/node/{chunk-WXG4Z2EZ.cjs → chunk-L27AK6FQ.cjs} +23 -8
- package/dist/lib/node/chunk-L27AK6FQ.cjs.map +7 -0
- package/dist/lib/node/{chunk-LA73IHCB.cjs → chunk-WKZLGVEJ.cjs} +108 -80
- package/dist/lib/node/chunk-WKZLGVEJ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +47 -35
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-VY3XWYAA.cjs → intent-resolver-TRBKI24D.cjs} +9 -9
- package/dist/lib/node/intent-resolver-TRBKI24D.cjs.map +7 -0
- package/dist/lib/node/{meeting-transcription-state-OYWCY5XE.cjs → meeting-transcription-state-5XLTMWPA.cjs} +6 -6
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-M2JQIIDY.cjs → react-surface-SZAMHCX7.cjs} +20 -11
- package/dist/lib/node/react-surface-SZAMHCX7.cjs.map +7 -0
- package/dist/lib/node/settings-AWWMOSCV.cjs +38 -0
- package/dist/lib/node/settings-AWWMOSCV.cjs.map +7 -0
- package/dist/lib/node/{transcriber-E6AAB4SU.cjs → transcriber-AFUXFHCR.cjs} +10 -10
- package/dist/lib/node/types/index.cjs +8 -8
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{TranscriptContainer-3HJ752CP.mjs → TranscriptContainer-M53LI2TX.mjs} +3 -3
- package/dist/lib/node-esm/app-graph-builder-UBP6EOBR.mjs +352 -0
- package/dist/lib/node-esm/app-graph-builder-UBP6EOBR.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SDMGJZLN.mjs → chunk-4KC3E5T4.mjs} +135 -117
- package/dist/lib/node-esm/chunk-4KC3E5T4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YXZOLOFT.mjs → chunk-5E2MR5XK.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-YXZOLOFT.mjs.map → chunk-5E2MR5XK.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-MHQP2PAF.mjs +28 -0
- package/dist/lib/node-esm/chunk-MHQP2PAF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-54HDN33F.mjs → chunk-QYG2FOXA.mjs} +22 -32
- package/dist/lib/node-esm/chunk-QYG2FOXA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-K3R3YK3S.mjs → chunk-V5IWBPYO.mjs} +105 -78
- package/dist/lib/node-esm/chunk-V5IWBPYO.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +30 -18
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-FCTNJPWY.mjs → intent-resolver-HFVAL274.mjs} +4 -4
- package/dist/lib/node-esm/intent-resolver-HFVAL274.mjs.map +7 -0
- package/dist/lib/node-esm/{meeting-transcription-state-XMZJ45P4.mjs → meeting-transcription-state-3WOZ52BQ.mjs} +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-PXFSIM6V.mjs → react-surface-UEJELL7I.mjs} +18 -7
- package/dist/lib/node-esm/react-surface-UEJELL7I.mjs.map +7 -0
- package/dist/lib/node-esm/settings-QFNFGFJ5.mjs +25 -0
- package/dist/lib/node-esm/settings-QFNFGFJ5.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-REAGRCPY.mjs → transcriber-7RJEFPDI.mjs} +4 -4
- package/dist/lib/node-esm/types/index.mjs +3 -3
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -178
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.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 +4 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/Transcript.d.ts +6 -4
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +8 -4
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +27 -0
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +4 -4
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts +6 -0
- package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts.map +1 -0
- package/dist/types/src/components/TranscriptionSettings/index.d.ts +2 -0
- package/dist/types/src/components/TranscriptionSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/transcription.stories.d.ts +6 -3
- package/dist/types/src/components/transcription.stories.d.ts.map +1 -1
- package/dist/types/src/entity-extraction/entity-extraction.d.ts +33 -7
- package/dist/types/src/entity-extraction/entity-extraction.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +2 -2
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
- package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
- package/dist/types/src/model/model.d.ts +23 -23
- package/dist/types/src/model/model.d.ts.map +1 -1
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/testing.d.ts +40 -0
- package/dist/types/src/testing/testing.d.ts.map +1 -0
- package/dist/types/src/transcriber/transcriber.d.ts +2 -2
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +17 -15
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -18
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +26 -40
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +18 -7
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util/array.d.ts.map +1 -1
- package/dist/types/src/util/get-time-str.d.ts.map +1 -1
- package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +55 -46
- package/src/TranscriptionPlugin.tsx +30 -13
- package/src/capabilities/app-graph-builder.ts +190 -98
- package/src/capabilities/capabilities.ts +1 -1
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +5 -4
- package/src/capabilities/react-surface.tsx +12 -4
- package/src/capabilities/settings.ts +20 -0
- package/src/components/Transcript/Transcript.stories.tsx +72 -36
- package/src/components/Transcript/Transcript.tsx +37 -30
- package/src/components/Transcript/deprecated/{Transcript.tsx → OldTranscript.tsx} +30 -1
- package/src/components/Transcript/transcript-extension.ts +20 -17
- package/src/components/TranscriptContainer.tsx +6 -4
- package/src/components/TranscriptionSettings/TranscriptionSettings.tsx +26 -0
- package/src/components/TranscriptionSettings/index.ts +5 -0
- package/src/components/index.ts +1 -0
- package/src/components/transcription.stories.tsx +85 -35
- package/src/entity-extraction/entity-extraction.test.ts +75 -10
- package/src/entity-extraction/entity-extraction.ts +110 -55
- package/src/entity-extraction/system-prompt.tpl +38 -9
- package/src/hooks/useQueueModelAdapter.ts +44 -11
- package/src/model/model.test.ts +90 -44
- package/src/model/model.ts +59 -59
- package/src/testing/index.ts +5 -0
- package/src/testing/testing.ts +216 -0
- package/src/transcriber/transcriber.browser.test.ts +3 -3
- package/src/transcriber/transcriber.ts +19 -10
- package/src/transcriber/transcription-manager.ts +66 -57
- package/src/translations.ts +2 -0
- package/src/types/schema.ts +10 -31
- package/src/types/types.ts +18 -8
- package/dist/lib/browser/app-graph-builder-I4SSIQMW.mjs +0 -168
- package/dist/lib/browser/app-graph-builder-I4SSIQMW.mjs.map +0 -7
- package/dist/lib/browser/chunk-5Q3R53U3.mjs +0 -73
- package/dist/lib/browser/chunk-5Q3R53U3.mjs.map +0 -7
- package/dist/lib/browser/chunk-DR3NBV6Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-GI5LZ4SV.mjs +0 -8
- package/dist/lib/browser/chunk-GI5LZ4SV.mjs.map +0 -7
- package/dist/lib/browser/chunk-RHHJZQPM.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-ZQQEH27F.mjs.map +0 -7
- package/dist/lib/browser/react-surface-HETJ5XY6.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-WWC4WNTG.cjs +0 -177
- package/dist/lib/node/app-graph-builder-WWC4WNTG.cjs.map +0 -7
- package/dist/lib/node/chunk-3QEJ5EBO.cjs.map +0 -7
- package/dist/lib/node/chunk-KO6MKCED.cjs.map +0 -7
- package/dist/lib/node/chunk-LA73IHCB.cjs.map +0 -7
- package/dist/lib/node/chunk-WXG4Z2EZ.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-VY3XWYAA.cjs.map +0 -7
- package/dist/lib/node/react-surface-M2JQIIDY.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-PPJQAFSI.mjs +0 -169
- package/dist/lib/node-esm/app-graph-builder-PPJQAFSI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-54HDN33F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K3R3YK3S.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SDMGJZLN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XY22OP6H.mjs +0 -10
- package/dist/lib/node-esm/chunk-XY22OP6H.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-FCTNJPWY.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-PXFSIM6V.mjs.map +0 -7
- package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts +0 -13
- package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/testings.d.ts +0 -51
- package/dist/types/src/components/Transcript/testings.d.ts.map +0 -1
- package/dist/types/src/testing/test-data.d.ts +0 -73
- package/dist/types/src/testing/test-data.d.ts.map +0 -1
- package/src/components/Transcript/testings.ts +0 -182
- package/src/testing/test-data.ts +0 -314
- /package/dist/lib/browser/{TranscriptContainer-4D4BHE7G.mjs.map → TranscriptContainer-CXA4ZBHW.mjs.map} +0 -0
- /package/dist/lib/browser/{meeting-transcription-state-5D52VTHU.mjs.map → meeting-transcription-state-MNA2XROE.mjs.map} +0 -0
- /package/dist/lib/browser/{transcriber-SMRLU2KY.mjs.map → transcriber-YWWIV6KP.mjs.map} +0 -0
- /package/dist/lib/node/{meeting-transcription-state-OYWCY5XE.cjs.map → meeting-transcription-state-5XLTMWPA.cjs.map} +0 -0
- /package/dist/lib/node/{transcriber-E6AAB4SU.cjs.map → transcriber-AFUXFHCR.cjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-3HJ752CP.mjs.map → TranscriptContainer-M53LI2TX.mjs.map} +0 -0
- /package/dist/lib/node-esm/{meeting-transcription-state-XMZJ45P4.mjs.map → meeting-transcription-state-3WOZ52BQ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{transcriber-REAGRCPY.mjs.map → transcriber-7RJEFPDI.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transcription",
|
|
3
|
-
"version": "0.8.2-main.
|
|
3
|
+
"version": "0.8.2-main.fbd8ed0",
|
|
4
4
|
"description": "Voice transcription.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
"@codemirror/view": "^6.34.1",
|
|
37
37
|
"@preact/signals-core": "^1.6.0",
|
|
38
38
|
"date-fns": "^3.3.1",
|
|
39
|
-
"effect": "3.13.3",
|
|
40
39
|
"extendable-media-recorder": "^9.2.19",
|
|
41
40
|
"extendable-media-recorder-wav-encoder": "^7.0.123",
|
|
42
41
|
"main-thread-scheduling": "^14.1.1",
|
|
@@ -44,60 +43,70 @@
|
|
|
44
43
|
"react-router-dom": "^6.4.0",
|
|
45
44
|
"react-use": "^17.5.1",
|
|
46
45
|
"wavefile": "^11.0.0",
|
|
47
|
-
"@dxos/app-framework": "0.8.2-main.
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/async": "0.8.2-main.
|
|
51
|
-
"@dxos/client": "0.8.2-main.
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/debug": "0.8.2-main.
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/echo
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/plugin-graph": "0.8.2-main.
|
|
65
|
-
"@dxos/plugin-
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/plugin-
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/react-
|
|
71
|
-
"@dxos/react-
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/react-ui-
|
|
74
|
-
"@dxos/react-ui-
|
|
75
|
-
"@dxos/react-ui-
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
46
|
+
"@dxos/app-framework": "0.8.2-main.fbd8ed0",
|
|
47
|
+
"@dxos/artifact": "0.8.2-main.fbd8ed0",
|
|
48
|
+
"@dxos/assistant": "0.8.2-main.fbd8ed0",
|
|
49
|
+
"@dxos/async": "0.8.2-main.fbd8ed0",
|
|
50
|
+
"@dxos/client": "0.8.2-main.fbd8ed0",
|
|
51
|
+
"@dxos/codec-protobuf": "0.8.2-main.fbd8ed0",
|
|
52
|
+
"@dxos/context": "0.8.2-main.fbd8ed0",
|
|
53
|
+
"@dxos/debug": "0.8.2-main.fbd8ed0",
|
|
54
|
+
"@dxos/display-name": "0.8.2-main.fbd8ed0",
|
|
55
|
+
"@dxos/echo": "0.8.2-main.fbd8ed0",
|
|
56
|
+
"@dxos/echo-db": "0.8.2-main.fbd8ed0",
|
|
57
|
+
"@dxos/echo-schema": "0.8.2-main.fbd8ed0",
|
|
58
|
+
"@dxos/invariant": "0.8.2-main.fbd8ed0",
|
|
59
|
+
"@dxos/keys": "0.8.2-main.fbd8ed0",
|
|
60
|
+
"@dxos/local-storage": "0.8.2-main.fbd8ed0",
|
|
61
|
+
"@dxos/live-object": "0.8.2-main.fbd8ed0",
|
|
62
|
+
"@dxos/log": "0.8.2-main.fbd8ed0",
|
|
63
|
+
"@dxos/plugin-graph": "0.8.2-main.fbd8ed0",
|
|
64
|
+
"@dxos/plugin-markdown": "0.8.2-main.fbd8ed0",
|
|
65
|
+
"@dxos/plugin-deck": "0.8.2-main.fbd8ed0",
|
|
66
|
+
"@dxos/plugin-client": "0.8.2-main.fbd8ed0",
|
|
67
|
+
"@dxos/plugin-meeting": "0.8.2-main.fbd8ed0",
|
|
68
|
+
"@dxos/plugin-space": "0.8.2-main.fbd8ed0",
|
|
69
|
+
"@dxos/react-client": "0.8.2-main.fbd8ed0",
|
|
70
|
+
"@dxos/react-edge-client": "0.8.2-main.fbd8ed0",
|
|
71
|
+
"@dxos/protocols": "0.8.2-main.fbd8ed0",
|
|
72
|
+
"@dxos/react-ui-components": "0.8.2-main.fbd8ed0",
|
|
73
|
+
"@dxos/react-ui-attention": "0.8.2-main.fbd8ed0",
|
|
74
|
+
"@dxos/react-ui-editor": "0.8.2-main.fbd8ed0",
|
|
75
|
+
"@dxos/react-ui-grid": "0.8.2-main.fbd8ed0",
|
|
76
|
+
"@dxos/react-ui-stack": "0.8.2-main.fbd8ed0",
|
|
77
|
+
"@dxos/react-ui-sfx": "0.8.2-main.fbd8ed0",
|
|
78
|
+
"@dxos/react-ui-form": "0.8.2-main.fbd8ed0",
|
|
79
|
+
"@dxos/schema": "0.8.2-main.fbd8ed0",
|
|
80
|
+
"@dxos/util": "0.8.2-main.fbd8ed0",
|
|
81
|
+
"@dxos/tracing": "0.8.2-main.fbd8ed0"
|
|
79
82
|
},
|
|
80
83
|
"devDependencies": {
|
|
84
|
+
"@effect-rx/rx-react": "^0.34.1",
|
|
85
|
+
"@effect/platform": "0.80.12",
|
|
81
86
|
"@types/react": "~18.2.0",
|
|
87
|
+
"effect": "3.14.21",
|
|
82
88
|
"react": "~18.2.0",
|
|
83
89
|
"react-dom": "~18.2.0",
|
|
84
90
|
"tailwindcss": "~3.4.1",
|
|
85
|
-
"@dxos/plugin-preview": "0.8.2-main.
|
|
86
|
-
"@dxos/plugin-
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
90
|
-
"@dxos/react-ui-form": "0.8.2-main.
|
|
91
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.2-main.
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/test-utils": "0.8.2-main.
|
|
91
|
+
"@dxos/plugin-preview": "0.8.2-main.fbd8ed0",
|
|
92
|
+
"@dxos/plugin-storybook-layout": "0.8.2-main.fbd8ed0",
|
|
93
|
+
"@dxos/plugin-theme": "0.8.2-main.fbd8ed0",
|
|
94
|
+
"@dxos/random": "0.8.2-main.fbd8ed0",
|
|
95
|
+
"@dxos/react-ui": "0.8.2-main.fbd8ed0",
|
|
96
|
+
"@dxos/react-ui-form": "0.8.2-main.fbd8ed0",
|
|
97
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.2-main.fbd8ed0",
|
|
98
|
+
"@dxos/react-ui-theme": "0.8.2-main.fbd8ed0",
|
|
99
|
+
"@dxos/storybook-utils": "0.8.2-main.fbd8ed0",
|
|
100
|
+
"@dxos/test-utils": "0.8.2-main.fbd8ed0"
|
|
95
101
|
},
|
|
96
102
|
"optionalDependencies": {
|
|
103
|
+
"@effect-rx/rx-react": "^0.34.1",
|
|
104
|
+
"@effect/platform": "0.80.12",
|
|
105
|
+
"effect": "^3.13.3",
|
|
97
106
|
"react": "~18.2.0",
|
|
98
107
|
"react-dom": "~18.2.0",
|
|
99
|
-
"@dxos/react-ui": "0.8.2-main.
|
|
100
|
-
"@dxos/react-ui
|
|
108
|
+
"@dxos/react-ui-theme": "0.8.2-main.fbd8ed0",
|
|
109
|
+
"@dxos/react-ui": "0.8.2-main.fbd8ed0"
|
|
101
110
|
},
|
|
102
111
|
"publishConfig": {
|
|
103
112
|
"access": "public"
|
|
@@ -6,11 +6,21 @@ import { Capabilities, Events, contributes, defineModule, definePlugin } from '@
|
|
|
6
6
|
import { QueueImpl } from '@dxos/echo-db';
|
|
7
7
|
import { isInstanceOf } from '@dxos/echo-schema';
|
|
8
8
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
9
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
10
|
+
import { DataType } from '@dxos/schema';
|
|
9
11
|
|
|
10
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
AppGraphBuilder,
|
|
14
|
+
IntentResolver,
|
|
15
|
+
MeetingTranscriptionState,
|
|
16
|
+
ReactSurface,
|
|
17
|
+
Transcriber,
|
|
18
|
+
Settings,
|
|
19
|
+
} from './capabilities';
|
|
20
|
+
import { renderMarkdown } from './components';
|
|
11
21
|
import { meta } from './meta';
|
|
12
22
|
import translations from './translations';
|
|
13
|
-
import {
|
|
23
|
+
import { TranscriptType } from './types';
|
|
14
24
|
|
|
15
25
|
export const TranscriptionPlugin = () =>
|
|
16
26
|
definePlugin(meta, [
|
|
@@ -20,14 +30,9 @@ export const TranscriptionPlugin = () =>
|
|
|
20
30
|
activate: () => contributes(Capabilities.Translations, translations),
|
|
21
31
|
}),
|
|
22
32
|
defineModule({
|
|
23
|
-
id: `${meta.id}/module/
|
|
24
|
-
activatesOn: Events.
|
|
25
|
-
activate:
|
|
26
|
-
}),
|
|
27
|
-
defineModule({
|
|
28
|
-
id: `${meta.id}/module/meeting-transcription-state`,
|
|
29
|
-
activatesOn: Events.SetupAppGraph,
|
|
30
|
-
activate: MeetingTranscriptionState,
|
|
33
|
+
id: `${meta.id}/module/settings`,
|
|
34
|
+
activatesOn: Events.SetupSettings,
|
|
35
|
+
activate: Settings,
|
|
31
36
|
}),
|
|
32
37
|
defineModule({
|
|
33
38
|
id: `${meta.id}/module/metadata`,
|
|
@@ -39,12 +44,14 @@ export const TranscriptionPlugin = () =>
|
|
|
39
44
|
icon: 'ph--subtitles--regular',
|
|
40
45
|
// TODO(wittjosiah): Factor out. Artifact? Separate capability?
|
|
41
46
|
getTextContent: async (transcript: TranscriptType) => {
|
|
42
|
-
const client = context.
|
|
47
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
48
|
+
const space = getSpace(transcript);
|
|
49
|
+
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
43
50
|
const queue = new QueueImpl(client.edge, transcript.queue.dxn);
|
|
44
51
|
await queue.refresh();
|
|
45
52
|
const content = queue.items
|
|
46
|
-
.filter((
|
|
47
|
-
.
|
|
53
|
+
.filter((message) => isInstanceOf(DataType.Message, message))
|
|
54
|
+
.flatMap((message, index) => renderMarkdown(members)(message, index))
|
|
48
55
|
.join('\n\n');
|
|
49
56
|
return content;
|
|
50
57
|
},
|
|
@@ -71,4 +78,14 @@ export const TranscriptionPlugin = () =>
|
|
|
71
78
|
activatesOn: Events.SetupAppGraph,
|
|
72
79
|
activate: AppGraphBuilder,
|
|
73
80
|
}),
|
|
81
|
+
defineModule({
|
|
82
|
+
id: `${meta.id}/module/transcription`,
|
|
83
|
+
activatesOn: Events.SetupAppGraph,
|
|
84
|
+
activate: Transcriber,
|
|
85
|
+
}),
|
|
86
|
+
defineModule({
|
|
87
|
+
id: `${meta.id}/module/meeting-transcription-state`,
|
|
88
|
+
activatesOn: Events.SetupAppGraph,
|
|
89
|
+
activate: MeetingTranscriptionState,
|
|
90
|
+
}),
|
|
74
91
|
]);
|
|
@@ -2,34 +2,42 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import {
|
|
5
|
+
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
+
import { Option, pipe, type Schema } from 'effect';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, contributes, createIntent, type PluginContext } from '@dxos/app-framework';
|
|
9
|
+
import { AIServiceEdgeClient, type AIServiceClient } from '@dxos/assistant';
|
|
10
|
+
import { AI_SERVICE_ENDPOINT } from '@dxos/assistant/testing';
|
|
11
|
+
import { Filter, fullyQualifiedId, getSpace, makeRef, Query, type Space } from '@dxos/client/echo';
|
|
12
|
+
import { getSchemaTypename, isInstanceOf, type BaseEchoObject } from '@dxos/echo-schema';
|
|
9
13
|
import { invariant } from '@dxos/invariant';
|
|
14
|
+
import { DXN } from '@dxos/keys';
|
|
15
|
+
import { log } from '@dxos/log';
|
|
10
16
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
11
17
|
import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';
|
|
12
|
-
import { createExtension,
|
|
18
|
+
import { createExtension, rxFromSignal } from '@dxos/plugin-graph';
|
|
19
|
+
import { DocumentType } from '@dxos/plugin-markdown/types';
|
|
13
20
|
import { MeetingCapabilities, type CallState, type MediaState } from '@dxos/plugin-meeting';
|
|
14
|
-
import { MeetingType } from '@dxos/plugin-meeting/types';
|
|
21
|
+
import { MeetingType, type MeetingCallProperties } from '@dxos/plugin-meeting/types';
|
|
15
22
|
import { type buf } from '@dxos/protocols/buf';
|
|
16
23
|
import { type TranscriptionPayloadSchema } from '@dxos/protocols/buf/dxos/edge/calls_pb';
|
|
17
|
-
import {
|
|
24
|
+
import { DataType } from '@dxos/schema';
|
|
18
25
|
|
|
19
26
|
import { TranscriptionCapabilities } from './capabilities';
|
|
27
|
+
import { processTranscriptMessage } from '../entity-extraction';
|
|
20
28
|
import { TRANSCRIPTION_PLUGIN } from '../meta';
|
|
21
29
|
import { TranscriptionManager } from '../transcriber';
|
|
22
|
-
import { TranscriptionAction, TranscriptType } from '../types';
|
|
30
|
+
import { TranscriptionAction, type TranscriptionSettingsProps, TranscriptType } from '../types';
|
|
23
31
|
|
|
24
32
|
// TODO(wittjosiah): Factor out.
|
|
25
33
|
// TODO(wittjosiah): Can we stop using protobuf for this?
|
|
26
34
|
type TranscriptionPayload = buf.MessageInitShape<typeof TranscriptionPayloadSchema>;
|
|
27
35
|
|
|
28
36
|
const getMeetingTranscript = async (
|
|
29
|
-
context:
|
|
37
|
+
context: PluginContext,
|
|
30
38
|
meeting: MeetingType,
|
|
31
39
|
): Promise<TranscriptType | undefined> => {
|
|
32
|
-
const { dispatchPromise: dispatch } = context.
|
|
40
|
+
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
33
41
|
|
|
34
42
|
const typename = getSchemaTypename(TranscriptType)!;
|
|
35
43
|
const existing = await meeting.artifacts[typename]?.load();
|
|
@@ -45,97 +53,181 @@ const getMeetingTranscript = async (
|
|
|
45
53
|
};
|
|
46
54
|
|
|
47
55
|
// TODO(wittjosiah): Introduce a sound that plays when transcription is activated/deactivated.
|
|
48
|
-
export default (context:
|
|
56
|
+
export default (context: PluginContext) =>
|
|
49
57
|
contributes(Capabilities.AppGraphBuilder, [
|
|
50
58
|
createExtension({
|
|
51
59
|
id: `${TRANSCRIPTION_PLUGIN}/meeting-transcript`,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
actions: (node) =>
|
|
61
|
+
Rx.make((get) =>
|
|
62
|
+
pipe(
|
|
63
|
+
get(node),
|
|
64
|
+
Option.flatMap((node) => (isInstanceOf(MeetingType, node.data) ? Option.some(node.data) : Option.none())),
|
|
65
|
+
Option.map((meeting) => {
|
|
66
|
+
const state = context.getCapability(TranscriptionCapabilities.MeetingTranscriptionState);
|
|
67
|
+
const enabled = get(rxFromSignal(() => state.enabled));
|
|
68
|
+
return [
|
|
69
|
+
{
|
|
70
|
+
id: `${fullyQualifiedId(meeting)}/action/start-stop-transcription`,
|
|
71
|
+
data: async () => {
|
|
72
|
+
// NOTE: We are not saving the state of the transcription manager here.
|
|
73
|
+
// We expect the state to be updated through `onCallStateUpdated` once it is propagated through Swarm.
|
|
74
|
+
// This is done to avoid race conditions and to not handle optimistic updates.
|
|
75
|
+
const transcript = await getMeetingTranscript(context, meeting);
|
|
76
|
+
invariant(transcript, 'Failed to create transcript');
|
|
77
|
+
|
|
78
|
+
const callManager = context.getCapability(MeetingCapabilities.CallManager);
|
|
79
|
+
callManager.setActivity(getSchemaTypename(TranscriptType)!, {
|
|
80
|
+
queueDxn: transcript.queue.dxn.toString(),
|
|
81
|
+
enabled: !enabled,
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
properties: {
|
|
85
|
+
label: enabled
|
|
86
|
+
? ['stop transcription label', { ns: TRANSCRIPTION_PLUGIN }]
|
|
87
|
+
: ['start transcription label', { ns: TRANSCRIPTION_PLUGIN }],
|
|
88
|
+
icon: 'ph--subtitles--regular',
|
|
89
|
+
disposition: 'toolbar',
|
|
90
|
+
classNames: enabled ? 'bg-callAlert' : '',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
}),
|
|
95
|
+
Option.getOrElse(() => []),
|
|
96
|
+
),
|
|
97
|
+
),
|
|
98
|
+
connector: (node) =>
|
|
99
|
+
Rx.make((get) =>
|
|
100
|
+
pipe(
|
|
101
|
+
get(node),
|
|
102
|
+
Option.flatMap((node) => (isInstanceOf(MeetingType, node.data) ? Option.some(node.data) : Option.none())),
|
|
103
|
+
Option.map((meeting) => {
|
|
104
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
105
|
+
const state = context.getCapability(TranscriptionCapabilities.MeetingTranscriptionState);
|
|
106
|
+
const settingsStore = get(context.capabilities(Capabilities.SettingsStore))[0];
|
|
107
|
+
const settings = get(
|
|
108
|
+
rxFromSignal(() => settingsStore?.getStore<TranscriptionSettingsProps>(TRANSCRIPTION_PLUGIN)!.value),
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
// TODO(dmaretskyi): Request via capability.
|
|
112
|
+
const aiClient: AIServiceClient | undefined = new AIServiceEdgeClient({
|
|
113
|
+
// TODO(burdon): Get from config.
|
|
114
|
+
endpoint: AI_SERVICE_ENDPOINT.REMOTE,
|
|
72
115
|
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
116
|
+
|
|
117
|
+
return [
|
|
118
|
+
{
|
|
119
|
+
id: `${fullyQualifiedId(meeting)}${ATTENDABLE_PATH_SEPARATOR}${getSchemaTypename(TranscriptType)}`,
|
|
120
|
+
type: PLANK_COMPANION_TYPE,
|
|
121
|
+
data: get(rxFromSignal(() => meeting.artifacts[getSchemaTypename(TranscriptType)!]?.target)),
|
|
122
|
+
properties: {
|
|
123
|
+
label: ['transcript companion label', { ns: TRANSCRIPTION_PLUGIN }],
|
|
124
|
+
icon: 'ph--subtitles--regular',
|
|
125
|
+
position: 'hoist',
|
|
126
|
+
disposition: 'hidden',
|
|
127
|
+
schema: TranscriptType,
|
|
128
|
+
getIntent: ({ space }: { space: Space }) =>
|
|
129
|
+
createIntent(TranscriptionAction.Create, { spaceId: space.id }),
|
|
130
|
+
|
|
131
|
+
// TODO(burdon): Is this the right place to inisitalize the state? Change to a capability?
|
|
132
|
+
onJoin: async ({ meeting }: { meeting?: MeetingType }) => {
|
|
133
|
+
const identity = client.halo.identity.get();
|
|
134
|
+
invariant(identity);
|
|
135
|
+
const space = getSpace(meeting);
|
|
136
|
+
invariant(space);
|
|
137
|
+
|
|
138
|
+
let messageEnricher;
|
|
139
|
+
if (aiClient && settings.entityExtraction) {
|
|
140
|
+
messageEnricher = createEntityExtractionEnricher({
|
|
141
|
+
aiClient,
|
|
142
|
+
// TODO(dmaretskyi): Have those be discovered from the schema graph or contributed by capabilities?
|
|
143
|
+
// This forced me to add a dependency on markdown plugin.
|
|
144
|
+
// This will be replaced with a vector search index anyway, so its not a big deal.
|
|
145
|
+
contextTypes: [DocumentType, DataType.Person, DataType.Organization],
|
|
146
|
+
space,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// TODO(burdon): The TranscriptionManager singleton is part of the state and should just be updated here.
|
|
151
|
+
state.transcriptionManager = await new TranscriptionManager({
|
|
152
|
+
edgeClient: client.edge,
|
|
153
|
+
messageEnricher,
|
|
154
|
+
})
|
|
155
|
+
.setIdentityDid(identity.did)
|
|
156
|
+
.open();
|
|
157
|
+
},
|
|
158
|
+
onLeave: async () => {
|
|
159
|
+
await state.transcriptionManager?.close();
|
|
160
|
+
state.transcriptionManager = undefined;
|
|
161
|
+
state.enabled = false;
|
|
162
|
+
},
|
|
163
|
+
onCallStateUpdated: async (callState: CallState) => {
|
|
164
|
+
const typename = getSchemaTypename(TranscriptType);
|
|
165
|
+
const transcription = typename ? callState.activities?.[typename] : undefined;
|
|
166
|
+
if (!transcription?.payload) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const payload: TranscriptionPayload = transcription.payload;
|
|
171
|
+
state.enabled = !!payload.enabled;
|
|
172
|
+
if (payload.queueDxn) {
|
|
173
|
+
// NOTE: Must set queue before enabling transcription.
|
|
174
|
+
state.transcriptionManager?.setQueue(DXN.parse(payload.queueDxn));
|
|
175
|
+
}
|
|
176
|
+
await state.transcriptionManager?.setEnabled(payload.enabled);
|
|
177
|
+
},
|
|
178
|
+
onMediaStateUpdated: async ([mediaState, isSpeaking]: [MediaState, boolean]) => {
|
|
179
|
+
void state.transcriptionManager?.setAudioTrack(mediaState.audioTrack);
|
|
180
|
+
void state.transcriptionManager?.setRecording(isSpeaking);
|
|
181
|
+
},
|
|
182
|
+
} satisfies MeetingCallProperties,
|
|
183
|
+
},
|
|
184
|
+
];
|
|
185
|
+
}),
|
|
186
|
+
Option.getOrElse(() => []),
|
|
187
|
+
),
|
|
188
|
+
),
|
|
140
189
|
}),
|
|
141
190
|
]);
|
|
191
|
+
|
|
192
|
+
type EntityExtractionEnricherFactoryOptions = {
|
|
193
|
+
aiClient: AIServiceClient;
|
|
194
|
+
contextTypes: Schema.Schema.AnyNoContext[];
|
|
195
|
+
space: Space;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const createEntityExtractionEnricher = ({ aiClient, contextTypes, space }: EntityExtractionEnricherFactoryOptions) => {
|
|
199
|
+
return async (message: DataType.Message) => {
|
|
200
|
+
const { objects } = await space.db
|
|
201
|
+
.query(Query.select(Filter.or(...contextTypes.map((s) => Filter.type(s as Schema.Schema<BaseEchoObject>)))))
|
|
202
|
+
.run();
|
|
203
|
+
log.info('context', { objects });
|
|
204
|
+
|
|
205
|
+
const { message: enhancedMessage, timeElapsed } = await processTranscriptMessage({
|
|
206
|
+
aiService: aiClient,
|
|
207
|
+
message,
|
|
208
|
+
context: {
|
|
209
|
+
objects: await Promise.all(objects.map((o) => processContextObject(o))),
|
|
210
|
+
},
|
|
211
|
+
options: { timeout: ENTITY_EXTRACTOR_TIMEOUT, fallbackToRaw: true },
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
log.info('entity extraction time', { timeElapsed });
|
|
215
|
+
return enhancedMessage;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
// TODO(dmaretskyi): Use Type.Any
|
|
220
|
+
const processContextObject = async (object: BaseEchoObject): Promise<any> => {
|
|
221
|
+
// TODO(dmaretskyi): Documents need special processing is the content is behind a ref.
|
|
222
|
+
// TODO(dmaretskyi): Think about a way to handle this serialization with a decorator.
|
|
223
|
+
// if (isInstanceOf(DocumentType, object)) {
|
|
224
|
+
// return {
|
|
225
|
+
// ...object,
|
|
226
|
+
// content: await object.content.load(),
|
|
227
|
+
// };
|
|
228
|
+
// }
|
|
229
|
+
|
|
230
|
+
return object;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
const ENTITY_EXTRACTOR_TIMEOUT = 25_000;
|
|
@@ -18,8 +18,8 @@ export namespace TranscriptionCapabilities {
|
|
|
18
18
|
export const Transcriber = defineCapability<GetTranscriber>(`${TRANSCRIPTION_PLUGIN}/capability/transcriber`);
|
|
19
19
|
|
|
20
20
|
export type MeetingTranscriptionState = Live<{
|
|
21
|
-
enabled: boolean;
|
|
22
21
|
transcriptionManager?: TranscriptionManager;
|
|
22
|
+
enabled: boolean; // TODO(burdon): Move state into TranscriptionManager.
|
|
23
23
|
}>;
|
|
24
24
|
export const MeetingTranscriptionState = defineCapability<MeetingTranscriptionState>(
|
|
25
25
|
`${TRANSCRIPTION_PLUGIN}/capability/meeting-transcription-state`,
|
|
@@ -9,5 +9,6 @@ export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
|
9
9
|
export const MeetingTranscriptionState = lazy(() => import('./meeting-transcription-state'));
|
|
10
10
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
11
11
|
export const Transcriber = lazy(() => import('./transcriber'));
|
|
12
|
+
export const Settings = lazy(() => import('./settings'));
|
|
12
13
|
|
|
13
14
|
export * from './capabilities';
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes, createResolver, type
|
|
5
|
+
import { Capabilities, contributes, createResolver, type PluginContext } from '@dxos/app-framework';
|
|
6
|
+
import { createQueueDxn } from '@dxos/echo-schema';
|
|
7
|
+
import { type SpaceId } from '@dxos/keys';
|
|
6
8
|
import { live, refFromDXN } from '@dxos/live-object';
|
|
7
|
-
import { type SpaceId, randomQueueDxn } from '@dxos/react-client/echo';
|
|
8
9
|
|
|
9
10
|
import { TranscriptionAction, TranscriptType } from '../types';
|
|
10
11
|
import { getTimeStr } from '../util';
|
|
11
12
|
|
|
12
|
-
export default (context:
|
|
13
|
+
export default (context: PluginContext) =>
|
|
13
14
|
contributes(Capabilities.IntentResolver, [
|
|
14
15
|
createResolver({
|
|
15
16
|
intent: TranscriptionAction.Create,
|
|
16
17
|
resolve: ({ name, spaceId }) => {
|
|
17
18
|
const transcript = live(TranscriptType, {
|
|
18
|
-
queue: refFromDXN(
|
|
19
|
+
queue: refFromDXN(createQueueDxn(spaceId as SpaceId)),
|
|
19
20
|
name: name ?? `Transcript ${getTimeStr(Date.now())}`,
|
|
20
21
|
});
|
|
21
22
|
|
|
@@ -5,15 +5,23 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
+
import { SettingsStore } from '@dxos/local-storage';
|
|
8
9
|
|
|
9
|
-
import { TranscriptionContainer } from '../components';
|
|
10
|
-
import {
|
|
11
|
-
import { isTranscript, type TranscriptType } from '../types';
|
|
10
|
+
import { TranscriptionContainer, TranscriptionSettings } from '../components';
|
|
11
|
+
import { meta } from '../meta';
|
|
12
|
+
import { isTranscript, type TranscriptionSettingsProps, type TranscriptType } from '../types';
|
|
12
13
|
|
|
13
14
|
export default () =>
|
|
14
15
|
contributes(Capabilities.ReactSurface, [
|
|
15
16
|
createSurface({
|
|
16
|
-
id: `${
|
|
17
|
+
id: `${meta.id}/plugin-settings`,
|
|
18
|
+
role: 'article',
|
|
19
|
+
filter: (data): data is { subject: SettingsStore<TranscriptionSettingsProps> } =>
|
|
20
|
+
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
21
|
+
component: ({ data: { subject } }) => <TranscriptionSettings settings={subject.value} />,
|
|
22
|
+
}),
|
|
23
|
+
createSurface({
|
|
24
|
+
id: `${meta.id}/article/transcript`,
|
|
17
25
|
role: ['article', 'section'],
|
|
18
26
|
filter: (data): data is { subject: TranscriptType } => isTranscript(data.subject),
|
|
19
27
|
component: ({ data, role }) => <TranscriptionContainer transcript={data.subject} role={role} />,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
+
import { live } from '@dxos/live-object';
|
|
7
|
+
|
|
8
|
+
import { TRANSCRIPTION_PLUGIN } from '../meta';
|
|
9
|
+
import { TranscriptionSettingsSchema } from '../types';
|
|
10
|
+
|
|
11
|
+
export default () => {
|
|
12
|
+
// TODO(wittjosiah): `live` currently doesn't handle schema default values.
|
|
13
|
+
const settings = live(TranscriptionSettingsSchema, { entityExtraction: true });
|
|
14
|
+
|
|
15
|
+
return contributes(Capabilities.Settings, {
|
|
16
|
+
schema: TranscriptionSettingsSchema,
|
|
17
|
+
prefix: TRANSCRIPTION_PLUGIN,
|
|
18
|
+
value: settings,
|
|
19
|
+
});
|
|
20
|
+
};
|