@dxos/plugin-transcription 0.8.4-main.dedc0f3 → 0.8.4-main.e8ec1fe
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-OQFBAGSP.mjs +11 -0
- package/dist/lib/browser/{blueprint-definition-TJABB43G.mjs → blueprint-definition-GZ7NOODS.mjs} +23 -18
- package/dist/lib/browser/blueprint-definition-GZ7NOODS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TNEQFHIU.mjs → chunk-3MKZ2MNQ.mjs} +5 -5
- package/dist/lib/browser/chunk-3MKZ2MNQ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-BA64VLLR.mjs → chunk-7GNN7E3U.mjs} +46 -66
- package/dist/lib/browser/chunk-7GNN7E3U.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VVXRHJCH.mjs → chunk-C5YV3JZF.mjs} +114 -122
- package/dist/lib/browser/chunk-C5YV3JZF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-AGZYQGSP.mjs → chunk-O33THH53.mjs} +2 -2
- package/dist/lib/browser/chunk-QOSZIUE2.mjs +32 -0
- package/dist/lib/browser/chunk-QOSZIUE2.mjs.map +7 -0
- package/dist/lib/browser/{chunk-3X7HP44M.mjs → chunk-VBUIO677.mjs} +8 -5
- package/dist/lib/browser/chunk-VBUIO677.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +13 -16
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-T3EGLS3L.mjs → intent-resolver-5CGCLOXB.mjs} +8 -8
- package/dist/lib/browser/intent-resolver-5CGCLOXB.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-4Y3YISAD.mjs → react-surface-OK55WK7J.mjs} +9 -11
- package/dist/lib/browser/react-surface-OK55WK7J.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-JOOAQVYV.mjs → transcriber-6YDM5ZDT.mjs} +7 -7
- package/dist/lib/browser/{transcriber-JOOAQVYV.mjs.map → transcriber-6YDM5ZDT.mjs.map} +1 -1
- package/dist/lib/browser/types/index.mjs +3 -5
- package/dist/lib/node-esm/{TranscriptContainer-EGAAYVOP.mjs → TranscriptContainer-GM47P6WH.mjs} +4 -4
- package/dist/lib/node-esm/{blueprint-definition-R4UF7YJZ.mjs → blueprint-definition-GAHQBYTF.mjs} +23 -18
- package/dist/lib/node-esm/blueprint-definition-GAHQBYTF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-J5GQ3KGX.mjs → chunk-5JN2MHYA.mjs} +46 -66
- package/dist/lib/node-esm/chunk-5JN2MHYA.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-SFQNMFHX.mjs → chunk-IKGUNN3Z.mjs} +114 -122
- package/dist/lib/node-esm/chunk-IKGUNN3Z.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CF5Z6FAB.mjs → chunk-SSYFSLB7.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-3QAIZGMW.mjs → chunk-SWUVPFKR.mjs} +5 -5
- package/dist/lib/node-esm/chunk-SWUVPFKR.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-U4YPUD2F.mjs +33 -0
- package/dist/lib/node-esm/chunk-U4YPUD2F.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QARUDLHN.mjs → chunk-YVNQN2J6.mjs} +8 -5
- package/dist/lib/node-esm/chunk-YVNQN2J6.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +13 -16
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-VDHCUAIO.mjs → intent-resolver-4H4CXIAL.mjs} +8 -8
- package/dist/lib/node-esm/intent-resolver-4H4CXIAL.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-ZIXDGJAN.mjs → react-surface-EK6K2MMD.mjs} +9 -11
- package/dist/lib/node-esm/react-surface-EK6K2MMD.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-QPS55YP2.mjs → transcriber-CPD3FZ7M.mjs} +7 -7
- package/dist/lib/node-esm/{transcriber-QPS55YP2.mjs.map → transcriber-CPD3FZ7M.mjs.map} +1 -1
- package/dist/lib/node-esm/types/index.mjs +3 -5
- package/dist/types/src/TranscriptionPlugin.d.ts +1 -1
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.d.ts +3 -4
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +3 -3
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +1 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +2 -2
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptContainer.d.ts +1 -1
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts +0 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +0 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +0 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +3 -3
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -1
- package/dist/types/src/functions/open.d.ts +1 -1
- package/dist/types/src/functions/open.d.ts.map +1 -1
- package/dist/types/src/functions/summarize.d.ts +1 -1
- package/dist/types/src/functions/summarize.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/message-normalizer.d.ts +3 -3
- package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/normalization.d.ts +32 -17
- package/dist/types/src/segments-normalization/normalization.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/utils.d.ts +2 -2
- package/dist/types/src/segments-normalization/utils.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +6 -6
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- 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 +3 -3
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/types/TranscriptAction.d.ts +1 -1
- package/dist/types/src/types/TranscriptAction.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +63 -62
- package/src/TranscriptionPlugin.tsx +56 -57
- package/src/capabilities/capabilities.ts +3 -3
- package/src/capabilities/intent-resolver.ts +2 -1
- package/src/capabilities/react-surface.tsx +1 -1
- package/src/components/Transcript/Transcript.stories.tsx +15 -14
- package/src/components/Transcript/Transcript.tsx +7 -7
- package/src/components/Transcript/deprecated/OldTranscript.tsx +5 -5
- package/src/components/Transcript/transcript-extension.ts +10 -6
- package/src/components/TranscriptContainer.tsx +5 -5
- package/src/components/stories/FileTranscription.stories.tsx +18 -17
- package/src/components/stories/KeyWordRecognition.stories.tsx +4 -6
- package/src/components/stories/MicrophoneTranscription.stories.tsx +19 -18
- package/src/components/stories/TranscriptionStory.tsx +7 -8
- package/src/functions/open.ts +6 -5
- package/src/functions/summarize.ts +10 -4
- package/src/hooks/useAudioFile.ts +50 -45
- package/src/hooks/useTranscriber.ts +7 -2
- package/src/meta.ts +7 -4
- package/src/model/model.test.ts +11 -11
- package/src/segments-normalization/message-normalizer.ts +6 -6
- package/src/segments-normalization/normalization.test.ts +6 -6
- package/src/segments-normalization/normalization.ts +7 -7
- package/src/segments-normalization/utils.ts +2 -2
- package/src/testing/testing.ts +23 -18
- package/src/transcriber/transcriber.browser.test.ts +3 -3
- package/src/transcriber/transcriber.ts +3 -3
- package/src/transcriber/transcription-manager.ts +6 -6
- package/src/types/TranscriptAction.ts +3 -4
- package/src/types/index.ts +0 -1
- package/dist/lib/browser/TranscriptContainer-4RBK74JP.mjs +0 -11
- package/dist/lib/browser/blueprint-definition-TJABB43G.mjs.map +0 -7
- package/dist/lib/browser/chunk-3X7HP44M.mjs.map +0 -7
- package/dist/lib/browser/chunk-BA64VLLR.mjs.map +0 -7
- package/dist/lib/browser/chunk-HXVGV7T6.mjs +0 -63
- package/dist/lib/browser/chunk-HXVGV7T6.mjs.map +0 -7
- package/dist/lib/browser/chunk-TNEQFHIU.mjs.map +0 -7
- package/dist/lib/browser/chunk-VVXRHJCH.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-T3EGLS3L.mjs.map +0 -7
- package/dist/lib/browser/react-surface-4Y3YISAD.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-R4UF7YJZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3QAIZGMW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-J5GQ3KGX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QARUDLHN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SFQNMFHX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-W72HVQMD.mjs +0 -64
- package/dist/lib/node-esm/chunk-W72HVQMD.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-VDHCUAIO.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-ZIXDGJAN.mjs.map +0 -7
- package/dist/types/src/types/Transcript.d.ts +0 -30
- package/dist/types/src/types/Transcript.d.ts.map +0 -1
- package/src/types/Transcript.ts +0 -44
- /package/dist/lib/browser/{TranscriptContainer-4RBK74JP.mjs.map → TranscriptContainer-OQFBAGSP.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-AGZYQGSP.mjs.map → chunk-O33THH53.mjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-EGAAYVOP.mjs.map → TranscriptContainer-GM47P6WH.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-CF5Z6FAB.mjs.map → chunk-SSYFSLB7.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transcription",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.e8ec1fe",
|
|
4
4
|
"description": "Voice transcription.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@codemirror/state": "^6.5.2",
|
|
38
|
-
"@codemirror/view": "^6.38.
|
|
38
|
+
"@codemirror/view": "^6.38.4",
|
|
39
39
|
"@preact-signals/safe-react": "^0.9.0",
|
|
40
|
-
"@preact/signals-core": "^1.
|
|
40
|
+
"@preact/signals-core": "^1.12.1",
|
|
41
41
|
"date-fns": "^3.3.1",
|
|
42
42
|
"extendable-media-recorder": "^9.2.19",
|
|
43
43
|
"extendable-media-recorder-wav-encoder": "^7.0.123",
|
|
@@ -46,73 +46,74 @@
|
|
|
46
46
|
"react-router-dom": "^6.4.0",
|
|
47
47
|
"react-use": "^17.5.1",
|
|
48
48
|
"wavefile": "^11.0.0",
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/echo": "0.8.4-main.
|
|
59
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/keys": "0.8.4-main.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
69
|
-
"@dxos/plugin-
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/react-client": "0.8.4-main.
|
|
76
|
-
"@dxos/react-
|
|
77
|
-
"@dxos/react-ui-editor": "0.8.4-main.
|
|
78
|
-
"@dxos/react-ui-
|
|
79
|
-
"@dxos/react-ui-
|
|
80
|
-
"@dxos/react-ui-
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/react-ui-
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
49
|
+
"@dxos/app-framework": "0.8.4-main.e8ec1fe",
|
|
50
|
+
"@dxos/assistant": "0.8.4-main.e8ec1fe",
|
|
51
|
+
"@dxos/async": "0.8.4-main.e8ec1fe",
|
|
52
|
+
"@dxos/client": "0.8.4-main.e8ec1fe",
|
|
53
|
+
"@dxos/ai": "0.8.4-main.e8ec1fe",
|
|
54
|
+
"@dxos/blueprints": "0.8.4-main.e8ec1fe",
|
|
55
|
+
"@dxos/context": "0.8.4-main.e8ec1fe",
|
|
56
|
+
"@dxos/debug": "0.8.4-main.e8ec1fe",
|
|
57
|
+
"@dxos/display-name": "0.8.4-main.e8ec1fe",
|
|
58
|
+
"@dxos/echo": "0.8.4-main.e8ec1fe",
|
|
59
|
+
"@dxos/echo-db": "0.8.4-main.e8ec1fe",
|
|
60
|
+
"@dxos/functions": "0.8.4-main.e8ec1fe",
|
|
61
|
+
"@dxos/functions-runtime": "0.8.4-main.e8ec1fe",
|
|
62
|
+
"@dxos/codec-protobuf": "0.8.4-main.e8ec1fe",
|
|
63
|
+
"@dxos/keys": "0.8.4-main.e8ec1fe",
|
|
64
|
+
"@dxos/live-object": "0.8.4-main.e8ec1fe",
|
|
65
|
+
"@dxos/log": "0.8.4-main.e8ec1fe",
|
|
66
|
+
"@dxos/local-storage": "0.8.4-main.e8ec1fe",
|
|
67
|
+
"@dxos/invariant": "0.8.4-main.e8ec1fe",
|
|
68
|
+
"@dxos/plugin-graph": "0.8.4-main.e8ec1fe",
|
|
69
|
+
"@dxos/plugin-client": "0.8.4-main.e8ec1fe",
|
|
70
|
+
"@dxos/plugin-thread": "0.8.4-main.e8ec1fe",
|
|
71
|
+
"@dxos/plugin-space": "0.8.4-main.e8ec1fe",
|
|
72
|
+
"@dxos/protocols": "0.8.4-main.e8ec1fe",
|
|
73
|
+
"@dxos/react-edge-client": "0.8.4-main.e8ec1fe",
|
|
74
|
+
"@dxos/react-ui-attention": "0.8.4-main.e8ec1fe",
|
|
75
|
+
"@dxos/react-client": "0.8.4-main.e8ec1fe",
|
|
76
|
+
"@dxos/react-ui-components": "0.8.4-main.e8ec1fe",
|
|
77
|
+
"@dxos/react-ui-editor": "0.8.4-main.e8ec1fe",
|
|
78
|
+
"@dxos/react-ui-sfx": "0.8.4-main.e8ec1fe",
|
|
79
|
+
"@dxos/react-ui-form": "0.8.4-main.e8ec1fe",
|
|
80
|
+
"@dxos/react-ui-stack": "0.8.4-main.e8ec1fe",
|
|
81
|
+
"@dxos/schema": "0.8.4-main.e8ec1fe",
|
|
82
|
+
"@dxos/react-ui-grid": "0.8.4-main.e8ec1fe",
|
|
83
|
+
"@dxos/tracing": "0.8.4-main.e8ec1fe",
|
|
84
|
+
"@dxos/plugin-deck": "0.8.4-main.e8ec1fe",
|
|
85
|
+
"@dxos/util": "0.8.4-main.e8ec1fe",
|
|
86
|
+
"@dxos/types": "0.8.4-main.e8ec1fe",
|
|
87
|
+
"@dxos/plugin-markdown": "0.8.4-main.e8ec1fe"
|
|
87
88
|
},
|
|
88
89
|
"devDependencies": {
|
|
89
|
-
"@effect-
|
|
90
|
-
"@effect/platform": "0.
|
|
90
|
+
"@effect-atom/atom-react": "^0.3.4",
|
|
91
|
+
"@effect/platform": "0.92.1",
|
|
91
92
|
"@types/dom-speech-recognition": "^0.0.6",
|
|
92
|
-
"@types/react": "~
|
|
93
|
-
"effect": "3.
|
|
94
|
-
"react": "~
|
|
95
|
-
"react-dom": "~
|
|
93
|
+
"@types/react": "~19.2.2",
|
|
94
|
+
"effect": "3.18.3",
|
|
95
|
+
"react": "~19.2.0",
|
|
96
|
+
"react-dom": "~19.2.0",
|
|
96
97
|
"tailwindcss": "~3.4.1",
|
|
97
|
-
"@dxos/plugin-preview": "0.8.4-main.
|
|
98
|
-
"@dxos/plugin-storybook-layout": "0.8.4-main.
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/
|
|
103
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.
|
|
104
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/
|
|
98
|
+
"@dxos/plugin-preview": "0.8.4-main.e8ec1fe",
|
|
99
|
+
"@dxos/plugin-storybook-layout": "0.8.4-main.e8ec1fe",
|
|
100
|
+
"@dxos/random": "0.8.4-main.e8ec1fe",
|
|
101
|
+
"@dxos/react-ui-form": "0.8.4-main.e8ec1fe",
|
|
102
|
+
"@dxos/plugin-theme": "0.8.4-main.e8ec1fe",
|
|
103
|
+
"@dxos/react-ui": "0.8.4-main.e8ec1fe",
|
|
104
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.e8ec1fe",
|
|
105
|
+
"@dxos/react-ui-theme": "0.8.4-main.e8ec1fe",
|
|
106
|
+
"@dxos/test-utils": "0.8.4-main.e8ec1fe",
|
|
107
|
+
"@dxos/storybook-utils": "0.8.4-main.e8ec1fe"
|
|
107
108
|
},
|
|
108
109
|
"peerDependencies": {
|
|
109
|
-
"@effect-
|
|
110
|
+
"@effect-atom/atom-react": "^0.3.4",
|
|
110
111
|
"@effect/platform": "^0.80.12",
|
|
111
112
|
"effect": "^3.13.3",
|
|
112
|
-
"react": "
|
|
113
|
-
"react-dom": "
|
|
114
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
115
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
113
|
+
"react": "^19.0.0",
|
|
114
|
+
"react-dom": "^19.0.0",
|
|
115
|
+
"@dxos/react-ui": "0.8.4-main.e8ec1fe",
|
|
116
|
+
"@dxos/react-ui-theme": "0.8.4-main.e8ec1fe"
|
|
116
117
|
},
|
|
117
118
|
"publishConfig": {
|
|
118
119
|
"access": "public"
|
|
@@ -6,67 +6,66 @@ import { Capabilities, Events, contributes, defineModule, definePlugin } from '@
|
|
|
6
6
|
import { Obj } from '@dxos/echo';
|
|
7
7
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
8
8
|
import { getSpace } from '@dxos/react-client/echo';
|
|
9
|
-
import {
|
|
9
|
+
import { Message, Transcript } from '@dxos/types';
|
|
10
10
|
|
|
11
11
|
import { BlueprintDefinition, IntentResolver, ReactSurface, Transcriber } from './capabilities';
|
|
12
12
|
import { renderByline } from './components';
|
|
13
13
|
import { meta } from './meta';
|
|
14
14
|
import { translations } from './translations';
|
|
15
|
-
import { Transcript } from './types';
|
|
16
15
|
|
|
17
|
-
export const TranscriptionPlugin = () =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
16
|
+
export const TranscriptionPlugin = definePlugin(meta, () => [
|
|
17
|
+
defineModule({
|
|
18
|
+
id: `${meta.id}/module/translations`,
|
|
19
|
+
activatesOn: Events.SetupTranslations,
|
|
20
|
+
activate: () => contributes(Capabilities.Translations, translations),
|
|
21
|
+
}),
|
|
22
|
+
defineModule({
|
|
23
|
+
id: `${meta.id}/module/metadata`,
|
|
24
|
+
activatesOn: Events.SetupMetadata,
|
|
25
|
+
activate: () =>
|
|
26
|
+
contributes(Capabilities.Metadata, {
|
|
27
|
+
id: Transcript.Transcript.typename,
|
|
28
|
+
metadata: {
|
|
29
|
+
icon: 'ph--subtitles--regular',
|
|
30
|
+
iconHue: 'sky',
|
|
31
|
+
// TODO(wittjosiah): Factor out. Artifact? Separate capability?
|
|
32
|
+
getTextContent: async (transcript: Transcript.Transcript) => {
|
|
33
|
+
const space = getSpace(transcript);
|
|
34
|
+
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
35
|
+
const queue = space?.queues.get<Message.Message>(transcript.queue.dxn);
|
|
36
|
+
await queue?.refresh();
|
|
37
|
+
const content = queue?.objects
|
|
38
|
+
.filter((message) => Obj.instanceOf(Message.Message, message))
|
|
39
|
+
.flatMap((message, index) => renderByline(members)(message, index))
|
|
40
|
+
.join('\n\n');
|
|
41
|
+
return content;
|
|
44
42
|
},
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
}),
|
|
46
|
+
defineModule({
|
|
47
|
+
id: `${meta.id}/module/schema`,
|
|
48
|
+
activatesOn: ClientEvents.SetupSchema,
|
|
49
|
+
activate: () => [contributes(ClientCapabilities.Schema, [Transcript.Transcript])],
|
|
50
|
+
}),
|
|
51
|
+
defineModule({
|
|
52
|
+
id: `${meta.id}/module/react-surface`,
|
|
53
|
+
activatesOn: Events.SetupReactSurface,
|
|
54
|
+
activate: ReactSurface,
|
|
55
|
+
}),
|
|
56
|
+
defineModule({
|
|
57
|
+
id: `${meta.id}/module/intent-resolver`,
|
|
58
|
+
activatesOn: Events.SetupIntentResolver,
|
|
59
|
+
activate: IntentResolver,
|
|
60
|
+
}),
|
|
61
|
+
defineModule({
|
|
62
|
+
id: `${meta.id}/module/transcription`,
|
|
63
|
+
activatesOn: Events.SetupAppGraph,
|
|
64
|
+
activate: Transcriber,
|
|
65
|
+
}),
|
|
66
|
+
defineModule({
|
|
67
|
+
id: `${meta.id}/module/blueprint`,
|
|
68
|
+
activatesOn: Events.SetupArtifactDefinition,
|
|
69
|
+
activate: BlueprintDefinition,
|
|
70
|
+
}),
|
|
71
|
+
]);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { defineCapability } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { meta } from '../meta';
|
|
8
8
|
import {
|
|
9
9
|
type MediaStreamRecorderParams,
|
|
10
10
|
type Transcriber,
|
|
@@ -21,13 +21,13 @@ export namespace TranscriptionCapabilities {
|
|
|
21
21
|
onSegments: TranscriberParams['onSegments'];
|
|
22
22
|
};
|
|
23
23
|
export type GetTranscriber = (props: GetTranscriberProps) => Transcriber;
|
|
24
|
-
export const Transcriber = defineCapability<GetTranscriber>(`${
|
|
24
|
+
export const Transcriber = defineCapability<GetTranscriber>(`${meta.id}/capability/transcriber`);
|
|
25
25
|
|
|
26
26
|
export type GetTranscriptionManagerProps = {
|
|
27
27
|
messageEnricher?: TranscriptMessageEnricher;
|
|
28
28
|
};
|
|
29
29
|
export type GetTranscriptionManager = (props: GetTranscriptionManagerProps) => TranscriptionManager;
|
|
30
30
|
export const TranscriptionManager = defineCapability<GetTranscriptionManager>(
|
|
31
|
-
`${
|
|
31
|
+
`${meta.id}/capability/transcription-manager`,
|
|
32
32
|
);
|
|
33
33
|
}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capabilities, type PluginContext, contributes, createResolver } from '@dxos/app-framework';
|
|
6
|
+
import { Transcript } from '@dxos/types';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import { TranscriptAction } from '../types';
|
|
8
9
|
|
|
9
10
|
export default (context: PluginContext) =>
|
|
10
11
|
contributes(Capabilities.IntentResolver, [
|
|
@@ -6,10 +6,10 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
8
|
import { Obj } from '@dxos/echo';
|
|
9
|
+
import { Transcript } from '@dxos/types';
|
|
9
10
|
|
|
10
11
|
import { TranscriptionContainer } from '../components';
|
|
11
12
|
import { meta } from '../meta';
|
|
12
|
-
import { Transcript } from '../types';
|
|
13
13
|
|
|
14
14
|
export default () =>
|
|
15
15
|
contributes(Capabilities.ReactSurface, [
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { type FC, useEffect, useMemo, useState } from 'react';
|
|
9
7
|
|
|
@@ -18,11 +16,11 @@ import { ThemePlugin } from '@dxos/plugin-theme';
|
|
|
18
16
|
import { faker } from '@dxos/random';
|
|
19
17
|
import { useMembers, useSpace } from '@dxos/react-client/echo';
|
|
20
18
|
import { IconButton, Toolbar } from '@dxos/react-ui';
|
|
19
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
21
20
|
import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
22
21
|
import { defaultTx } from '@dxos/react-ui-theme';
|
|
23
|
-
import { DataType } from '@dxos/schema';
|
|
24
22
|
import { Testing } from '@dxos/schema/testing';
|
|
25
|
-
import {
|
|
23
|
+
import { type Message, Organization, Person } from '@dxos/types';
|
|
26
24
|
|
|
27
25
|
import { useQueueModelAdapter } from '../../hooks';
|
|
28
26
|
import { SerializationModel } from '../../model';
|
|
@@ -70,7 +68,7 @@ const TranscriptContainer: FC<
|
|
|
70
68
|
);
|
|
71
69
|
};
|
|
72
70
|
|
|
73
|
-
type StoryProps = { messages?:
|
|
71
|
+
type StoryProps = { messages?: Message.Message[] } & Pick<TranscriptViewProps, 'ignoreAttention' | 'attendableId'>;
|
|
74
72
|
|
|
75
73
|
/**
|
|
76
74
|
* Basic story mutates array of messages.
|
|
@@ -79,11 +77,11 @@ const BasicStory = ({ messages: initialMessages = [], ...props }: StoryProps) =>
|
|
|
79
77
|
const [reset, setReset] = useState({});
|
|
80
78
|
const builder = useMemo(() => new MessageBuilder(), []);
|
|
81
79
|
const model = useMemo(
|
|
82
|
-
() => new SerializationModel<
|
|
80
|
+
() => new SerializationModel<Message.Message>(renderByline([]), initialMessages),
|
|
83
81
|
[initialMessages, reset],
|
|
84
82
|
);
|
|
85
83
|
const [running, setRunning] = useState(true);
|
|
86
|
-
const [currentMessage, setCurrentMessage] = useState<
|
|
84
|
+
const [currentMessage, setCurrentMessage] = useState<Message.Message | null>(null);
|
|
87
85
|
useEffect(() => {
|
|
88
86
|
if (!running) {
|
|
89
87
|
return;
|
|
@@ -182,25 +180,28 @@ const QueueStoryWrapper = () => {
|
|
|
182
180
|
const meta = {
|
|
183
181
|
title: 'plugins/plugin-transcription/Transcript',
|
|
184
182
|
decorators: [
|
|
183
|
+
withTheme,
|
|
185
184
|
withPluginManager({
|
|
186
185
|
plugins: [
|
|
187
|
-
ThemePlugin({ tx: defaultTx }),
|
|
188
|
-
StorybookLayoutPlugin(),
|
|
189
186
|
ClientPlugin({
|
|
190
|
-
types: [TestItem, Testing.DocumentType,
|
|
187
|
+
types: [TestItem, Testing.DocumentType, Person.Person, Organization.Organization],
|
|
191
188
|
onClientInitialized: async ({ client }) => {
|
|
192
189
|
await client.halo.createIdentity();
|
|
193
190
|
},
|
|
194
191
|
}),
|
|
195
|
-
|
|
196
|
-
SpacePlugin(),
|
|
197
|
-
SettingsPlugin(),
|
|
192
|
+
SpacePlugin({}),
|
|
198
193
|
IntentPlugin(),
|
|
194
|
+
SettingsPlugin(),
|
|
195
|
+
|
|
196
|
+
// UI
|
|
197
|
+
PreviewPlugin(),
|
|
198
|
+
ThemePlugin({ tx: defaultTx }),
|
|
199
|
+
StorybookLayoutPlugin({}),
|
|
199
200
|
],
|
|
200
201
|
}),
|
|
201
|
-
withLayout({ fullscreen: true }),
|
|
202
202
|
],
|
|
203
203
|
parameters: {
|
|
204
|
+
layout: 'fullscreen',
|
|
204
205
|
translations,
|
|
205
206
|
},
|
|
206
207
|
} satisfies Meta;
|
|
@@ -13,22 +13,22 @@ import {
|
|
|
13
13
|
createMarkdownExtensions,
|
|
14
14
|
createThemeExtensions,
|
|
15
15
|
decorateMarkdown,
|
|
16
|
+
editorSlots,
|
|
16
17
|
preview,
|
|
17
18
|
useTextEditor,
|
|
18
19
|
} from '@dxos/react-ui-editor';
|
|
19
20
|
import { mx } from '@dxos/react-ui-theme';
|
|
20
|
-
import { type
|
|
21
|
-
import {
|
|
21
|
+
import { type Message, type Transcript } from '@dxos/types';
|
|
22
|
+
import { isTruthy } from '@dxos/util';
|
|
22
23
|
|
|
23
24
|
import { type SerializationModel } from '../../model';
|
|
24
|
-
import { type Transcript } from '../../types';
|
|
25
25
|
|
|
26
26
|
import { transcript } from './transcript-extension';
|
|
27
27
|
|
|
28
28
|
// TODO(thure): Move this?
|
|
29
29
|
export const renderByline =
|
|
30
30
|
(identities: Identity[]) =>
|
|
31
|
-
(message:
|
|
31
|
+
(message: Message.Message, index: number, debug = false): string[] => {
|
|
32
32
|
if (message.sender.role === 'assistant') {
|
|
33
33
|
// Start/stop block.
|
|
34
34
|
return [message.blocks.find((block) => block._tag === 'transcript')?.text ?? '', ''];
|
|
@@ -55,7 +55,7 @@ export const renderByline =
|
|
|
55
55
|
export type TranscriptViewProps = ThemedClassName<{
|
|
56
56
|
space?: Space;
|
|
57
57
|
transcript?: Transcript.Transcript;
|
|
58
|
-
model: SerializationModel<
|
|
58
|
+
model: SerializationModel<Message.Message>;
|
|
59
59
|
// TODO(burdon): Are these still in use?
|
|
60
60
|
attendableId?: string;
|
|
61
61
|
ignoreAttention?: boolean;
|
|
@@ -71,7 +71,7 @@ export const TranscriptView = ({ classNames, space, transcript: object, model }:
|
|
|
71
71
|
extensions: [
|
|
72
72
|
createBasicExtensions({ readOnly: true, lineWrapping: true, search: true }),
|
|
73
73
|
createMarkdownExtensions(),
|
|
74
|
-
createThemeExtensions({ themeMode }),
|
|
74
|
+
createThemeExtensions({ themeMode, slots: editorSlots }),
|
|
75
75
|
decorateMarkdown(),
|
|
76
76
|
preview(),
|
|
77
77
|
transcript({
|
|
@@ -79,7 +79,7 @@ export const TranscriptView = ({ classNames, space, transcript: object, model }:
|
|
|
79
79
|
started: object?.started ? new Date(object.started) : undefined,
|
|
80
80
|
}),
|
|
81
81
|
autoScroll(),
|
|
82
|
-
].filter(
|
|
82
|
+
].filter(isTruthy),
|
|
83
83
|
};
|
|
84
84
|
}, [space, model]);
|
|
85
85
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { intervalToDuration } from 'date-fns/intervalToDuration';
|
|
6
|
-
import
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
7
7
|
import { yieldOrContinue } from 'main-thread-scheduling';
|
|
8
8
|
import React, { type FC, type WheelEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
import { type OnResizeCallback, useResizeDetector } from 'react-resize-detector';
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '@dxos/react-ui-grid';
|
|
22
22
|
import { mx } from '@dxos/react-ui-theme';
|
|
23
23
|
|
|
24
|
-
import {
|
|
24
|
+
import { meta } from '../../../meta';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Transcription fragment.
|
|
@@ -125,7 +125,7 @@ export type TranscriptViewProps = ThemedClassName<{
|
|
|
125
125
|
* @@deprecated
|
|
126
126
|
*/
|
|
127
127
|
export const Transcript: FC<TranscriptViewProps> = ({ classNames, blocks, attendableId, ignoreAttention }) => {
|
|
128
|
-
const { t } = useTranslation(
|
|
128
|
+
const { t } = useTranslation(meta.id);
|
|
129
129
|
const [dxGrid, setDxGrid] = useState<DxGridElement | null>(null);
|
|
130
130
|
const [rows, setRows] = useState<DxGridAxisMeta | undefined>(undefined);
|
|
131
131
|
const [columns, setColumns] = useState<DxGridAxisMeta | undefined>(undefined);
|
|
@@ -144,7 +144,7 @@ export const Transcript: FC<TranscriptViewProps> = ({ classNames, blocks, attend
|
|
|
144
144
|
[hasAttention, ignoreAttention],
|
|
145
145
|
);
|
|
146
146
|
|
|
147
|
-
const abortControllerRef = useRef<AbortController>();
|
|
147
|
+
const abortControllerRef = useRef<AbortController>(null);
|
|
148
148
|
|
|
149
149
|
const handleResize = useCallback(
|
|
150
150
|
async ({ entry }: { entry: { target: HTMLDivElement } | null }) => {
|
|
@@ -242,7 +242,7 @@ export const Transcript: FC<TranscriptViewProps> = ({ classNames, blocks, attend
|
|
|
242
242
|
ref={setDxGrid}
|
|
243
243
|
/>
|
|
244
244
|
</Grid.Root>
|
|
245
|
-
<div role='none' {...{ inert:
|
|
245
|
+
<div role='none' {...{ inert: true }} aria-hidden className={measureClasses} ref={measureRef} />
|
|
246
246
|
<IconButton
|
|
247
247
|
icon='ph--arrow-line-down--regular'
|
|
248
248
|
iconOnly
|
|
@@ -8,7 +8,7 @@ import { format } from 'date-fns/format';
|
|
|
8
8
|
import { intervalToDuration } from 'date-fns/intervalToDuration';
|
|
9
9
|
|
|
10
10
|
import { type CleanupFn, addEventListener, combine } from '@dxos/async';
|
|
11
|
-
import { type
|
|
11
|
+
import { type Message } from '@dxos/types';
|
|
12
12
|
|
|
13
13
|
import { DocumentAdapter, type SerializationModel } from '../../model';
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ import { DocumentAdapter, type SerializationModel } from '../../model';
|
|
|
16
16
|
* Data structure that maps Chunks queue to lines with transcript state.
|
|
17
17
|
*/
|
|
18
18
|
export type TranscriptOptions = {
|
|
19
|
-
model: SerializationModel<
|
|
19
|
+
model: SerializationModel<Message.Message>;
|
|
20
20
|
started?: Date;
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -131,8 +131,12 @@ export const transcript = ({ model, started }: TranscriptOptions): Extension =>
|
|
|
131
131
|
),
|
|
132
132
|
|
|
133
133
|
EditorView.theme({
|
|
134
|
+
'.cm-gutters': {
|
|
135
|
+
backgroundColor: 'var(--dx-baseSurface)',
|
|
136
|
+
},
|
|
134
137
|
'.cm-timestamp-gutter': {
|
|
135
138
|
width: '6rem',
|
|
139
|
+
paddingLeft: '0.5rem',
|
|
136
140
|
paddingRight: '1rem',
|
|
137
141
|
},
|
|
138
142
|
'.cm-timestamp-gutter > .cm-gutterElement > div': {
|
|
@@ -156,11 +160,11 @@ class TimestampMarker extends GutterMarker {
|
|
|
156
160
|
super();
|
|
157
161
|
}
|
|
158
162
|
|
|
159
|
-
override eq(other: this)
|
|
160
|
-
return
|
|
163
|
+
override eq(other: this) {
|
|
164
|
+
return this._timestamp === other._timestamp;
|
|
161
165
|
}
|
|
162
166
|
|
|
163
|
-
override toDOM(view: EditorView)
|
|
167
|
+
override toDOM(view: EditorView) {
|
|
164
168
|
const el = document.createElement('div');
|
|
165
169
|
el.className = 'text-sm text-subdued hover:bg-hoverSurface cursor-pointer';
|
|
166
170
|
el.textContent = formatTimestamp(this._timestamp, this._started);
|
|
@@ -176,7 +180,7 @@ class TimestampMarker extends GutterMarker {
|
|
|
176
180
|
}
|
|
177
181
|
}
|
|
178
182
|
|
|
179
|
-
const getStartTime = (started?: Date, message?:
|
|
183
|
+
const getStartTime = (started?: Date, message?: Message.Message): Date | undefined => {
|
|
180
184
|
if (started) {
|
|
181
185
|
return started;
|
|
182
186
|
}
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { getSpace } from '@dxos/client/echo';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
8
9
|
import { useMembers, useQueue } from '@dxos/react-client/echo';
|
|
9
10
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
10
|
-
import { type
|
|
11
|
+
import { type Message, type Transcript } from '@dxos/types';
|
|
11
12
|
|
|
12
13
|
import { useQueueModelAdapter } from '../hooks';
|
|
13
|
-
import { type Transcript } from '../types';
|
|
14
14
|
|
|
15
15
|
import { TranscriptView, renderByline } from './Transcript';
|
|
16
16
|
|
|
@@ -20,10 +20,10 @@ export type TranscriptionContainerProps = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const TranscriptionContainer = ({ transcript }: TranscriptionContainerProps) => {
|
|
23
|
-
const attendableId =
|
|
23
|
+
const attendableId = Obj.getDXN(transcript).toString();
|
|
24
24
|
const space = getSpace(transcript);
|
|
25
25
|
const members = useMembers(space?.key).map((member) => member.identity);
|
|
26
|
-
const queue = useQueue<
|
|
26
|
+
const queue = useQueue<Message.Message>(transcript.queue.dxn, { pollInterval: 1_000 });
|
|
27
27
|
const model = useQueueModelAdapter(renderByline(members), queue);
|
|
28
28
|
|
|
29
29
|
return (
|