@dxos/plugin-transcription 0.8.4-main.ae835ea → 0.8.4-main.bcb3aa67d6
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/blueprints/index.mjs +31 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-HOOPZ7EM.mjs +35 -0
- package/dist/lib/browser/chunk-HOOPZ7EM.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-RIUSFL62.mjs +112 -0
- package/dist/lib/browser/chunk-RIUSFL62.mjs.map +7 -0
- package/dist/lib/browser/chunk-YXU2ZO6W.mjs +17 -0
- package/dist/lib/browser/chunk-YXU2ZO6W.mjs.map +7 -0
- package/dist/lib/browser/create-IZPB7VZW.mjs +19 -0
- package/dist/lib/browser/create-IZPB7VZW.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1178 -97
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/open-SN5O5I6X.mjs +29 -0
- package/dist/lib/browser/open-SN5O5I6X.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/summarize-5MZENAU5.mjs +71 -0
- package/dist/lib/browser/summarize-5MZENAU5.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -6
- package/dist/lib/node-esm/blueprints/index.mjs +32 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3GSFEN4L.mjs +113 -0
- package/dist/lib/node-esm/chunk-3GSFEN4L.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-BR2R6PCT.mjs +19 -0
- package/dist/lib/node-esm/chunk-BR2R6PCT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-NVM2QUMX.mjs +37 -0
- package/dist/lib/node-esm/chunk-NVM2QUMX.mjs.map +7 -0
- package/dist/lib/node-esm/create-TQDGXQBL.mjs +20 -0
- package/dist/lib/node-esm/create-TQDGXQBL.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1178 -97
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/open-4GAAWWKJ.mjs +30 -0
- package/dist/lib/node-esm/open-4GAAWWKJ.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/summarize-RVOSRHEC.mjs +72 -0
- package/dist/lib/node-esm/summarize-RVOSRHEC.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +4 -6
- package/dist/types/src/TranscriptionPlugin.d.ts +2 -1
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/transcription-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -4
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts +4 -3
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
- package/dist/types/src/components/Transcription/Transcription.d.ts +22 -0
- package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts +40 -0
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/index.d.ts +2 -0
- package/dist/types/src/components/Transcription/index.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/transcription-extension.d.ts +15 -0
- package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts +3 -3
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +2 -2
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +5 -5
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +2 -2
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +6 -0
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +1 -0
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts +3 -0
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create.d.ts +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +905 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/summarize.d.ts +8 -0
- package/dist/types/src/operations/summarize.d.ts.map +1 -0
- package/dist/types/src/segments-normalization/message-normalizer.d.ts +5 -5
- package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/normalization.d.ts +360 -474
- 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 +9 -9
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +2 -2
- package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts +4 -4
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +9 -6
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +7 -7
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +18 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/render-byline.d.ts +4 -0
- package/dist/types/src/util/render-byline.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +105 -70
- package/src/TranscriptionPlugin.tsx +40 -60
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/transcription-blueprint.ts +30 -0
- package/src/capabilities/blueprint-definition.ts +10 -24
- package/src/capabilities/index.ts +9 -7
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +21 -13
- package/src/capabilities/transcriber.ts +51 -43
- package/src/components/{Transcript/Transcript.stories.tsx → Transcription/Transcription.stories.tsx} +49 -45
- package/src/components/Transcription/Transcription.tsx +65 -0
- package/src/components/{Transcript → Transcription}/index.ts +1 -1
- package/src/components/{Transcript/transcript-extension.ts → Transcription/transcription-extension.ts} +13 -9
- package/src/components/index.ts +1 -6
- package/src/components/stories/FileTranscription.stories.tsx +30 -36
- package/src/components/stories/KeyWordRecognition.stories.tsx +6 -6
- package/src/components/stories/MicrophoneTranscription.stories.tsx +53 -74
- package/src/components/stories/TranscriptionStory.tsx +7 -9
- package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +32 -0
- package/src/containers/TranscriptionContainer/index.ts +7 -0
- package/src/containers/index.ts +7 -0
- package/src/hooks/useQueueModelAdapter.ts +1 -1
- package/src/hooks/useTranscriber.ts +8 -3
- package/src/hooks/useVoiceInput.ts +2 -2
- package/src/index.ts +1 -1
- package/src/meta.ts +3 -3
- package/src/model/model.test.ts +20 -14
- package/src/operations/create.ts +22 -0
- package/src/operations/definitions.ts +102 -0
- package/src/operations/index.ts +13 -0
- package/src/operations/open.ts +31 -0
- package/src/{functions → operations}/summarize.ts +41 -47
- package/src/segments-normalization/message-normalizer.ts +18 -13
- package/src/segments-normalization/normalization.test.ts +6 -11
- package/src/segments-normalization/normalization.ts +34 -72
- package/src/segments-normalization/utils.ts +2 -2
- package/src/testing/testing.ts +28 -28
- package/src/transcriber/media-stream-recorder.ts +3 -3
- package/src/transcriber/transcriber.browser.test.ts +4 -4
- package/src/transcriber/transcriber.ts +7 -7
- package/src/transcriber/transcription-manager.ts +21 -15
- package/src/translations.ts +7 -7
- package/src/{capabilities → types}/capabilities.ts +10 -10
- package/src/types/index.ts +1 -2
- package/src/util/index.ts +1 -0
- package/src/util/render-byline.ts +33 -0
- package/dist/lib/browser/TranscriptContainer-2GSL2XB5.mjs +0 -11
- package/dist/lib/browser/blueprint-definition-UAAJYVLZ.mjs +0 -150
- package/dist/lib/browser/blueprint-definition-UAAJYVLZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-3MKZ2MNQ.mjs +0 -16
- package/dist/lib/browser/chunk-3MKZ2MNQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-535OJKFO.mjs +0 -8
- package/dist/lib/browser/chunk-535OJKFO.mjs.map +0 -7
- package/dist/lib/browser/chunk-7DR6HZEF.mjs +0 -732
- package/dist/lib/browser/chunk-7DR6HZEF.mjs.map +0 -7
- package/dist/lib/browser/chunk-VBUIO677.mjs +0 -29
- package/dist/lib/browser/chunk-VBUIO677.mjs.map +0 -7
- package/dist/lib/browser/chunk-W7WKZTM4.mjs +0 -63
- package/dist/lib/browser/chunk-W7WKZTM4.mjs.map +0 -7
- package/dist/lib/browser/chunk-WH36ENNE.mjs +0 -466
- package/dist/lib/browser/chunk-WH36ENNE.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-ZTKTEAQX.mjs +0 -25
- package/dist/lib/browser/intent-resolver-ZTKTEAQX.mjs.map +0 -7
- package/dist/lib/browser/react-surface-KA32A72I.mjs +0 -34
- package/dist/lib/browser/react-surface-KA32A72I.mjs.map +0 -7
- package/dist/lib/browser/transcriber-LWOLYQHC.mjs +0 -56
- package/dist/lib/browser/transcriber-LWOLYQHC.mjs.map +0 -7
- package/dist/lib/node-esm/TranscriptContainer-GRLDCESB.mjs +0 -12
- package/dist/lib/node-esm/blueprint-definition-Z3LTZ3ID.mjs +0 -151
- package/dist/lib/node-esm/blueprint-definition-Z3LTZ3ID.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K4AZOB5Y.mjs +0 -733
- package/dist/lib/node-esm/chunk-K4AZOB5Y.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OLMSTF3M.mjs +0 -64
- package/dist/lib/node-esm/chunk-OLMSTF3M.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Q6WD7L2J.mjs +0 -10
- package/dist/lib/node-esm/chunk-Q6WD7L2J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SWUVPFKR.mjs +0 -17
- package/dist/lib/node-esm/chunk-SWUVPFKR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YFN4FJFK.mjs +0 -467
- package/dist/lib/node-esm/chunk-YFN4FJFK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YVNQN2J6.mjs +0 -30
- package/dist/lib/node-esm/chunk-YVNQN2J6.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-55WH2GY6.mjs +0 -26
- package/dist/lib/node-esm/intent-resolver-55WH2GY6.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-GU7LW2JO.mjs +0 -35
- package/dist/lib/node-esm/react-surface-GU7LW2JO.mjs.map +0 -7
- package/dist/lib/node-esm/transcriber-UGB7ECX6.mjs +0 -57
- package/dist/lib/node-esm/transcriber-UGB7ECX6.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -17
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/Transcript.d.ts +0 -20
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +0 -39
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +0 -28
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/index.d.ts +0 -2
- package/dist/types/src/components/Transcript/index.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +0 -15
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +0 -1
- package/dist/types/src/components/TranscriptContainer.d.ts +0 -9
- package/dist/types/src/components/TranscriptContainer.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -3
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/open.d.ts +0 -7
- package/dist/types/src/functions/open.d.ts.map +0 -1
- package/dist/types/src/functions/summarize.d.ts +0 -11
- package/dist/types/src/functions/summarize.d.ts.map +0 -1
- package/dist/types/src/types/Transcript.d.ts +0 -30
- package/dist/types/src/types/Transcript.d.ts.map +0 -1
- package/dist/types/src/types/TranscriptAction.d.ts +0 -23
- package/dist/types/src/types/TranscriptAction.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -18
- package/src/components/Transcript/Transcript.tsx +0 -93
- package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
- package/src/components/TranscriptContainer.tsx +0 -36
- package/src/functions/index.ts +0 -6
- package/src/functions/open.ts +0 -39
- package/src/types/Transcript.ts +0 -44
- package/src/types/TranscriptAction.ts +0 -24
- /package/dist/lib/browser/{TranscriptContainer-2GSL2XB5.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-GRLDCESB.mjs.map → chunk-HSLMI22Q.mjs.map} +0 -0
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
MediaStreamRecorder,
|
|
4
|
-
Transcriber,
|
|
5
|
-
TranscriptionManager
|
|
6
|
-
} from "./chunk-YFN4FJFK.mjs";
|
|
7
|
-
import {
|
|
8
|
-
TranscriptionCapabilities
|
|
9
|
-
} from "./chunk-SWUVPFKR.mjs";
|
|
10
|
-
import "./chunk-OLMSTF3M.mjs";
|
|
11
|
-
import "./chunk-YVNQN2J6.mjs";
|
|
12
|
-
|
|
13
|
-
// src/capabilities/transcriber.ts
|
|
14
|
-
import { contributes } from "@dxos/app-framework";
|
|
15
|
-
import { ClientCapabilities } from "@dxos/plugin-client";
|
|
16
|
-
var RECORD_INTERVAL = 200;
|
|
17
|
-
var PREFIXED_CHUNKS_AMOUNT = 10;
|
|
18
|
-
var TRANSCRIBE_AFTER_CHUNKS_AMOUNT = 50;
|
|
19
|
-
var transcriber_default = ((context) => {
|
|
20
|
-
const getTranscriber = ({ audioStreamTrack, onSegments, transcriberConfig, recorderConfig }) => {
|
|
21
|
-
return new Transcriber({
|
|
22
|
-
config: {
|
|
23
|
-
transcribeAfterChunksAmount: TRANSCRIBE_AFTER_CHUNKS_AMOUNT,
|
|
24
|
-
prefixBufferChunksAmount: PREFIXED_CHUNKS_AMOUNT,
|
|
25
|
-
...transcriberConfig
|
|
26
|
-
},
|
|
27
|
-
recorder: new MediaStreamRecorder({
|
|
28
|
-
mediaStreamTrack: audioStreamTrack,
|
|
29
|
-
config: {
|
|
30
|
-
interval: RECORD_INTERVAL,
|
|
31
|
-
...recorderConfig
|
|
32
|
-
}
|
|
33
|
-
}),
|
|
34
|
-
onSegments
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
const getTranscriptionManager = ({ messageEnricher }) => {
|
|
38
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
39
|
-
const transcriptionManager = new TranscriptionManager({
|
|
40
|
-
edgeClient: client.edge,
|
|
41
|
-
messageEnricher
|
|
42
|
-
});
|
|
43
|
-
const identity = client.halo.identity.get();
|
|
44
|
-
if (identity) {
|
|
45
|
-
transcriptionManager.setIdentityDid(identity.did);
|
|
46
|
-
}
|
|
47
|
-
return transcriptionManager;
|
|
48
|
-
};
|
|
49
|
-
return [
|
|
50
|
-
contributes(TranscriptionCapabilities.Transcriber, getTranscriber),
|
|
51
|
-
contributes(TranscriptionCapabilities.TranscriptionManager, getTranscriptionManager)
|
|
52
|
-
];
|
|
53
|
-
});
|
|
54
|
-
export {
|
|
55
|
-
transcriber_default as default
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=transcriber-UGB7ECX6.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/transcriber.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type PluginContext, contributes } from '@dxos/app-framework';\nimport { ClientCapabilities } from '@dxos/plugin-client';\n\nimport { MediaStreamRecorder, Transcriber, TranscriptionManager } from '../transcriber';\n\nimport { TranscriptionCapabilities } from './capabilities';\n\n// TODO(burdon): Move to config?\n\n/**\n * Length of the chunk in ms.\n */\nconst RECORD_INTERVAL = 200;\n\n/**\n * Number of chunks to save before the user starts speaking.\n */\nconst PREFIXED_CHUNKS_AMOUNT = 10;\n\n/**\n * Number of chunks to transcribe automatically after.\n * Combined should be mess than 25MB or whisper would fail.\n */\nconst TRANSCRIBE_AFTER_CHUNKS_AMOUNT = 50;\n\n/**\n * Records audio while user is speaking and transcribes it after user is done speaking.\n */\nexport default (context: PluginContext) => {\n const getTranscriber: TranscriptionCapabilities.GetTranscriber = ({\n audioStreamTrack,\n onSegments,\n transcriberConfig,\n recorderConfig,\n }) => {\n // Initialize audio transcription.\n return new Transcriber({\n config: {\n transcribeAfterChunksAmount: TRANSCRIBE_AFTER_CHUNKS_AMOUNT,\n prefixBufferChunksAmount: PREFIXED_CHUNKS_AMOUNT,\n ...transcriberConfig,\n },\n recorder: new MediaStreamRecorder({\n mediaStreamTrack: audioStreamTrack,\n config: {\n interval: RECORD_INTERVAL,\n ...recorderConfig,\n },\n }),\n onSegments,\n });\n };\n\n const getTranscriptionManager: TranscriptionCapabilities.GetTranscriptionManager = ({ messageEnricher }) => {\n const client = context.getCapability(ClientCapabilities.Client);\n const transcriptionManager = new TranscriptionManager({\n edgeClient: client.edge,\n messageEnricher,\n });\n\n const identity = client.halo.identity.get();\n if (identity) {\n transcriptionManager.setIdentityDid(identity.did);\n }\n\n return transcriptionManager;\n };\n\n return [\n contributes(TranscriptionCapabilities.Transcriber, getTranscriber),\n contributes(TranscriptionCapabilities.TranscriptionManager, getTranscriptionManager),\n ];\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAIA,SAA6BA,mBAAmB;AAChD,SAASC,0BAA0B;AAWnC,IAAMC,kBAAkB;AAKxB,IAAMC,yBAAyB;AAM/B,IAAMC,iCAAiC;AAKvC,IAAA,uBAAe,CAACC,YAAAA;AACd,QAAMC,iBAA2D,CAAC,EAChEC,kBACAC,YACAC,mBACAC,eAAc,MACf;AAEC,WAAO,IAAIC,YAAY;MACrBC,QAAQ;QACNC,6BAA6BT;QAC7BU,0BAA0BX;QAC1B,GAAGM;MACL;MACAM,UAAU,IAAIC,oBAAoB;QAChCC,kBAAkBV;QAClBK,QAAQ;UACNM,UAAUhB;UACV,GAAGQ;QACL;MACF,CAAA;MACAF;IACF,CAAA;EACF;AAEA,QAAMW,0BAA6E,CAAC,EAAEC,gBAAe,MAAE;AACrG,UAAMC,SAAShB,QAAQiB,cAAcC,mBAAmBC,MAAM;AAC9D,UAAMC,uBAAuB,IAAIC,qBAAqB;MACpDC,YAAYN,OAAOO;MACnBR;IACF,CAAA;AAEA,UAAMS,WAAWR,OAAOS,KAAKD,SAASE,IAAG;AACzC,QAAIF,UAAU;AACZJ,2BAAqBO,eAAeH,SAASI,GAAG;IAClD;AAEA,WAAOR;EACT;AAEA,SAAO;IACLS,YAAYC,0BAA0BxB,aAAaL,cAAAA;IACnD4B,YAAYC,0BAA0BT,sBAAsBP,uBAAAA;;AAEhE;",
|
|
6
|
-
"names": ["contributes", "ClientCapabilities", "RECORD_INTERVAL", "PREFIXED_CHUNKS_AMOUNT", "TRANSCRIBE_AFTER_CHUNKS_AMOUNT", "context", "getTranscriber", "audioStreamTrack", "onSegments", "transcriberConfig", "recorderConfig", "Transcriber", "config", "transcribeAfterChunksAmount", "prefixBufferChunksAmount", "recorder", "MediaStreamRecorder", "mediaStreamTrack", "interval", "getTranscriptionManager", "messageEnricher", "client", "getCapability", "ClientCapabilities", "Client", "transcriptionManager", "TranscriptionManager", "edgeClient", "edge", "identity", "halo", "get", "setIdentityDid", "did", "contributes", "TranscriptionCapabilities"]
|
|
7
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type MediaStreamRecorderParams, type Transcriber, type TranscriberParams, type TranscriptMessageEnricher, type TranscriptionManager } from '../transcriber';
|
|
2
|
-
export declare namespace TranscriptionCapabilities {
|
|
3
|
-
type GetTranscriberProps = {
|
|
4
|
-
audioStreamTrack: MediaStreamTrack;
|
|
5
|
-
recorderConfig?: Partial<MediaStreamRecorderParams['config']>;
|
|
6
|
-
transcriberConfig?: Partial<TranscriberParams['config']>;
|
|
7
|
-
onSegments: TranscriberParams['onSegments'];
|
|
8
|
-
};
|
|
9
|
-
type GetTranscriber = (props: GetTranscriberProps) => Transcriber;
|
|
10
|
-
const Transcriber: import("@dxos/app-framework").InterfaceDef<GetTranscriber>;
|
|
11
|
-
type GetTranscriptionManagerProps = {
|
|
12
|
-
messageEnricher?: TranscriptMessageEnricher;
|
|
13
|
-
};
|
|
14
|
-
type GetTranscriptionManager = (props: GetTranscriptionManagerProps) => TranscriptionManager;
|
|
15
|
-
const TranscriptionManager: import("@dxos/app-framework").InterfaceDef<GetTranscriptionManager>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/capabilities.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAC1B,MAAM,gBAAgB,CAAC;AAExB,yBAAiB,yBAAyB,CAAC;IACzC,KAAY,mBAAmB,GAAG;QAChC,gBAAgB,EAAE,gBAAgB,CAAC;QACnC,cAAc,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;QACzD,UAAU,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;KAC7C,CAAC;IACF,KAAY,cAAc,GAAG,CAAC,KAAK,EAAE,mBAAmB,KAAK,WAAW,CAAC;IAClE,MAAM,WAAW,4DAAwE,CAAC;IAEjG,KAAY,4BAA4B,GAAG;QACzC,eAAe,CAAC,EAAE,yBAAyB,CAAC;KAC7C,CAAC;IACF,KAAY,uBAAuB,GAAG,CAAC,KAAK,EAAE,4BAA4B,KAAK,oBAAoB,CAAC;IAC7F,MAAM,oBAAoB,qEAEhC,CAAC;CACH"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Capabilities, type PluginContext } from '@dxos/app-framework';
|
|
2
|
-
declare const _default: (context: PluginContext) => import("@dxos/app-framework").Capability<import("@dxos/app-framework").InterfaceDef<Capabilities.IntentResolver>>;
|
|
3
|
-
export default _default;
|
|
4
|
-
//# sourceMappingURL=intent-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"intent-resolver.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/intent-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAA+B,MAAM,qBAAqB,CAAC;yBAIpF,SAAS,aAAa;AAAtC,wBASK"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
3
|
-
import { type Identity } from '@dxos/react-client/halo';
|
|
4
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
5
|
-
import { type DataType } from '@dxos/schema';
|
|
6
|
-
import { type SerializationModel } from '../../model';
|
|
7
|
-
import { type Transcript } from '../../types';
|
|
8
|
-
export declare const renderByline: (identities: Identity[]) => (message: DataType.Message, index: number, debug?: boolean) => string[];
|
|
9
|
-
export type TranscriptViewProps = ThemedClassName<{
|
|
10
|
-
space?: Space;
|
|
11
|
-
transcript?: Transcript.Transcript;
|
|
12
|
-
model: SerializationModel<DataType.Message>;
|
|
13
|
-
attendableId?: string;
|
|
14
|
-
ignoreAttention?: boolean;
|
|
15
|
-
}>;
|
|
16
|
-
/**
|
|
17
|
-
* Transcript component implemented using the editor.
|
|
18
|
-
*/
|
|
19
|
-
export declare const TranscriptView: ({ classNames, space, transcript: object, model }: TranscriptViewProps) => React.JSX.Element;
|
|
20
|
-
//# sourceMappingURL=Transcript.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Transcript.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcript/Transcript.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,gBAAgB,CAAC;AAWvE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,eAAO,MAAM,YAAY,GACtB,YAAY,QAAQ,EAAE,MACtB,SAAS,QAAQ,CAAC,OAAO,EAAE,OAAO,MAAM,EAAE,eAAa,KAAG,MAAM,EAsBhE,CAAC;AAEJ,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;IAChD,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC;IACnC,KAAK,EAAE,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,kDAAkD,mBAAmB,sBA0BnG,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { DataType } from '@dxos/schema';
|
|
4
|
-
import { type TranscriptViewProps } from './Transcript';
|
|
5
|
-
type StoryProps = {
|
|
6
|
-
messages?: DataType.Message[];
|
|
7
|
-
} & Pick<TranscriptViewProps, 'ignoreAttention' | 'attendableId'>;
|
|
8
|
-
/**
|
|
9
|
-
* Basic story mutates array of messages.
|
|
10
|
-
*/
|
|
11
|
-
declare const BasicStory: ({ messages: initialMessages, ...props }: StoryProps) => React.JSX.Element;
|
|
12
|
-
/**
|
|
13
|
-
* Wrapper remounts on refresh to reload queue.
|
|
14
|
-
*/
|
|
15
|
-
declare const QueueStoryWrapper: () => React.JSX.Element;
|
|
16
|
-
declare const meta: {
|
|
17
|
-
title: string;
|
|
18
|
-
decorators: import("@storybook/react").Decorator[];
|
|
19
|
-
parameters: {
|
|
20
|
-
layout: string;
|
|
21
|
-
translations: [{
|
|
22
|
-
readonly 'en-US': {
|
|
23
|
-
readonly [meta.id]: {
|
|
24
|
-
readonly 'plugin name': "Transcription";
|
|
25
|
-
readonly 'transcript companion label': "Transcript";
|
|
26
|
-
readonly 'delete button': "Delete";
|
|
27
|
-
readonly 'bookmark button': "Bookmark";
|
|
28
|
-
readonly 'scroll to end label': "Scroll to latest";
|
|
29
|
-
readonly 'settings entity extraction label': "Entity extraction";
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
}];
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export default meta;
|
|
36
|
-
export declare const Default: StoryObj<typeof BasicStory>;
|
|
37
|
-
export declare const Empty: StoryObj<typeof BasicStory>;
|
|
38
|
-
export declare const WithQueue: StoryObj<typeof QueueStoryWrapper>;
|
|
39
|
-
//# sourceMappingURL=Transcript.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Transcript.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcript/Transcript.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAgD,MAAM,OAAO,CAAC;AAgBrE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAaxC,OAAO,EAAkB,KAAK,mBAAmB,EAAgB,MAAM,cAAc,CAAC;AAoCtF,KAAK,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,CAAA;CAAE,GAAG,IAAI,CAAC,mBAAmB,EAAE,iBAAiB,GAAG,cAAc,CAAC,CAAC;AAEpH;;GAEG;AACH,QAAA,MAAM,UAAU,GAAI,yCAA8C,UAAU,sBAmD3E,CAAC;AAwCF;;GAEG;AACH,QAAA,MAAM,iBAAiB,yBAQtB,CAAC;AAEF,QAAA,MAAM,IAAI;;;;;;;yBA9KqD,CAE/D,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;CAuMQ,CAAC;AAEjB,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,OAAO,UAAU,CAO/C,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,OAAO,UAAU,CAM7C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,OAAO,iBAAiB,CAMxD,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { type FC } from 'react';
|
|
3
|
-
import { Type } from '@dxos/echo';
|
|
4
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
5
|
-
/**
|
|
6
|
-
* Transcription block (from single speaker).
|
|
7
|
-
*/
|
|
8
|
-
declare const TranscriptBlock: Type.obj<Schema.Struct<{
|
|
9
|
-
id: typeof Schema.String;
|
|
10
|
-
authorName: Schema.optional<typeof Schema.String>;
|
|
11
|
-
authorHue: Schema.optional<typeof Schema.String>;
|
|
12
|
-
segments: Schema.Array$<Schema.Struct<{
|
|
13
|
-
started: typeof Schema.String;
|
|
14
|
-
text: typeof Schema.String;
|
|
15
|
-
}>>;
|
|
16
|
-
}>>;
|
|
17
|
-
type TranscriptBlock = Schema.Schema.Type<typeof TranscriptBlock>;
|
|
18
|
-
export type TranscriptViewProps = ThemedClassName<{
|
|
19
|
-
blocks?: TranscriptBlock[];
|
|
20
|
-
attendableId?: string;
|
|
21
|
-
ignoreAttention?: boolean;
|
|
22
|
-
}>;
|
|
23
|
-
/**
|
|
24
|
-
* @@deprecated
|
|
25
|
-
*/
|
|
26
|
-
export declare const Transcript: FC<TranscriptViewProps>;
|
|
27
|
-
export {};
|
|
28
|
-
//# sourceMappingURL=OldTranscript.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OldTranscript.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Transcript/deprecated/OldTranscript.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAc,EAAE,KAAK,EAAE,EAAsE,MAAM,OAAO,CAAC;AAG3G,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAc,KAAK,eAAe,EAAkB,MAAM,gBAAgB,CAAC;AAyBlF;;GAEG;AACH,QAAA,MAAM,eAAe;;;;;;;;GAUpB,CAAC;AAEF,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CAAC;AAkElE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;IAChD,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,mBAAmB,CAqI9C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcript/index.ts"],"names":[],"mappings":"AAIA,cAAc,cAAc,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type Extension } from '@codemirror/state';
|
|
2
|
-
import { type DataType } from '@dxos/schema';
|
|
3
|
-
import { type SerializationModel } from '../../model';
|
|
4
|
-
/**
|
|
5
|
-
* Data structure that maps Chunks queue to lines with transcript state.
|
|
6
|
-
*/
|
|
7
|
-
export type TranscriptOptions = {
|
|
8
|
-
model: SerializationModel<DataType.Message>;
|
|
9
|
-
started?: Date;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Scrolling transcript with timestamps.
|
|
13
|
-
*/
|
|
14
|
-
export declare const transcript: ({ model, started }: TranscriptOptions) => Extension;
|
|
15
|
-
//# sourceMappingURL=transcript-extension.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transcript-extension.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcript/transcript-extension.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAMpE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,oBAAoB,iBAAiB,KAAG,SAuHlE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type Transcript } from '../types';
|
|
3
|
-
export type TranscriptionContainerProps = {
|
|
4
|
-
role: string;
|
|
5
|
-
transcript: Transcript.Transcript;
|
|
6
|
-
};
|
|
7
|
-
export declare const TranscriptionContainer: ({ transcript }: TranscriptionContainerProps) => React.JSX.Element;
|
|
8
|
-
export default TranscriptionContainer;
|
|
9
|
-
//# sourceMappingURL=TranscriptContainer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TranscriptContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/TranscriptContainer.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,gBAAgB,2BAA2B,sBAYjF,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/functions/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../../../../src/functions/open.ts"],"names":[],"mappings":";;;;;AAeA,wBAuBG"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Summarize a transcript of a meeting.
|
|
3
|
-
*/
|
|
4
|
-
declare const _default: import("@dxos/functions").FunctionDefinition<{
|
|
5
|
-
readonly transcript: string;
|
|
6
|
-
readonly notes?: string | undefined;
|
|
7
|
-
}, {
|
|
8
|
-
readonly summary: string;
|
|
9
|
-
}>;
|
|
10
|
-
export default _default;
|
|
11
|
-
//# sourceMappingURL=summarize.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"summarize.d.ts","sourceRoot":"","sources":["../../../../src/functions/summarize.ts"],"names":[],"mappings":"AAgBA;;GAEG;;;;;;;AACH,wBAkDG"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Queue } from '@dxos/client/echo';
|
|
3
|
-
import { type DXN, Obj, Type } from '@dxos/echo';
|
|
4
|
-
/**
|
|
5
|
-
* Root transcript object created when the user starts a transcription.
|
|
6
|
-
*/
|
|
7
|
-
export declare const Transcript: Type.obj<Schema.Struct<{
|
|
8
|
-
started: Schema.optional<typeof Schema.String>;
|
|
9
|
-
ended: Schema.optional<typeof Schema.String>;
|
|
10
|
-
/**
|
|
11
|
-
* Queue containing TranscriptBlock objects.
|
|
12
|
-
*/
|
|
13
|
-
queue: Type.ref<Schema.Schema<Queue<Obj.Any | import("@dxos/echo/Relation").Any>, Queue<Obj.Any | import("@dxos/echo/Relation").Any>, never>>;
|
|
14
|
-
}>>;
|
|
15
|
-
export type Transcript = Schema.Schema.Type<typeof Transcript>;
|
|
16
|
-
/**
|
|
17
|
-
* First message in queue.
|
|
18
|
-
* Contains metadata for the recording and transcript.
|
|
19
|
-
*/
|
|
20
|
-
declare const TranscriptHeader: Schema.Struct<{
|
|
21
|
-
started: Schema.optional<typeof Schema.String>;
|
|
22
|
-
}>;
|
|
23
|
-
export type TranscriptHeader = Schema.Schema.Type<typeof TranscriptHeader>;
|
|
24
|
-
export declare const makeTranscript: (queueDxn: DXN) => import("@dxos/live-object").Live<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
25
|
-
started?: string | undefined;
|
|
26
|
-
ended?: string | undefined;
|
|
27
|
-
queue: import("@dxos/echo/internal").Ref<Queue<Obj.Any | import("@dxos/echo/Relation").Any>>;
|
|
28
|
-
}>;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=Transcript.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Transcript.d.ts","sourceRoot":"","sources":["../../../../src/types/Transcript.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,GAAG,EAAE,GAAG,EAAO,IAAI,EAAE,MAAM,YAAY,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,UAAU;;;IAMrB;;OAEG;;GAOJ,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAI/D;;;GAGG;AACH,QAAA,MAAM,gBAAgB;;EAEpB,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3E,eAAO,MAAM,cAAc,GAAI,UAAU,GAAG;;;;EAA2D,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
declare const Create_base: Schema.TaggedClass<Create, `${string}/action/create`, {
|
|
3
|
-
readonly _tag: Schema.tag<`${string}/action/create`>;
|
|
4
|
-
} & {
|
|
5
|
-
input: Schema.Struct<{
|
|
6
|
-
name: Schema.optional<typeof Schema.String>;
|
|
7
|
-
space: Schema.Schema<import("@dxos/client-protocol").Space, import("@dxos/client-protocol").Space, never>;
|
|
8
|
-
}>;
|
|
9
|
-
output: Schema.Struct<{
|
|
10
|
-
object: import("@dxos/echo/Type").obj<Schema.Struct<{
|
|
11
|
-
started: Schema.optional<typeof Schema.String>;
|
|
12
|
-
ended: Schema.optional<typeof Schema.String>;
|
|
13
|
-
queue: import("@dxos/echo/Type").ref<Schema.Schema<import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<import("@dxos/echo/Obj").Any | import("@dxos/echo/Relation").Any>, never>>;
|
|
14
|
-
}>>;
|
|
15
|
-
}>;
|
|
16
|
-
}>;
|
|
17
|
-
/**
|
|
18
|
-
* Endpoint to the calls service.
|
|
19
|
-
*/
|
|
20
|
-
export declare class Create extends Create_base {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=TranscriptAction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TranscriptAction.d.ts","sourceRoot":"","sources":["../../../../src/types/TranscriptAction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;AAQxC;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAQ1B;CAAG"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, type PluginContext, contributes, createResolver } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
import { Transcript, TranscriptAction } from '../types';
|
|
8
|
-
|
|
9
|
-
export default (context: PluginContext) =>
|
|
10
|
-
contributes(Capabilities.IntentResolver, [
|
|
11
|
-
createResolver({
|
|
12
|
-
intent: TranscriptAction.Create,
|
|
13
|
-
resolve: ({ name, space }) => {
|
|
14
|
-
const transcript = Transcript.makeTranscript(space.queues.create().dxn);
|
|
15
|
-
return { data: { object: transcript } };
|
|
16
|
-
},
|
|
17
|
-
}),
|
|
18
|
-
]);
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
8
|
-
import { type Identity } from '@dxos/react-client/halo';
|
|
9
|
-
import { type ThemedClassName, useThemeContext } from '@dxos/react-ui';
|
|
10
|
-
import {
|
|
11
|
-
autoScroll,
|
|
12
|
-
createBasicExtensions,
|
|
13
|
-
createMarkdownExtensions,
|
|
14
|
-
createThemeExtensions,
|
|
15
|
-
decorateMarkdown,
|
|
16
|
-
preview,
|
|
17
|
-
useTextEditor,
|
|
18
|
-
} from '@dxos/react-ui-editor';
|
|
19
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
20
|
-
import { type DataType } from '@dxos/schema';
|
|
21
|
-
import { isTruthy } from '@dxos/util';
|
|
22
|
-
|
|
23
|
-
import { type SerializationModel } from '../../model';
|
|
24
|
-
import { type Transcript } from '../../types';
|
|
25
|
-
|
|
26
|
-
import { transcript } from './transcript-extension';
|
|
27
|
-
|
|
28
|
-
// TODO(thure): Move this?
|
|
29
|
-
export const renderByline =
|
|
30
|
-
(identities: Identity[]) =>
|
|
31
|
-
(message: DataType.Message, index: number, debug = false): string[] => {
|
|
32
|
-
if (message.sender.role === 'assistant') {
|
|
33
|
-
// Start/stop block.
|
|
34
|
-
return [message.blocks.find((block) => block._tag === 'transcript')?.text ?? '', ''];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// TODO(burdon): Use link/reference markup for users (with popover).
|
|
38
|
-
// TODO(burdon): Color and avatar.
|
|
39
|
-
const identity = identities.find((identity) => identity.did === message.sender.identityDid);
|
|
40
|
-
const name =
|
|
41
|
-
identity?.profile?.displayName ??
|
|
42
|
-
message.sender.contact?.target?.fullName ??
|
|
43
|
-
message.sender.name ??
|
|
44
|
-
message.sender.email ??
|
|
45
|
-
message.sender.identityDid;
|
|
46
|
-
const blocks = message.blocks.filter((block) => block._tag === 'transcript');
|
|
47
|
-
return [
|
|
48
|
-
// TODO(thure): Use an XML tag with the bits needed here.
|
|
49
|
-
`###### ${name}` + (debug ? ` [${index}]:${message.id}` : ''),
|
|
50
|
-
blocks.map((block) => block.text.trim()).join(' '),
|
|
51
|
-
'',
|
|
52
|
-
];
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export type TranscriptViewProps = ThemedClassName<{
|
|
56
|
-
space?: Space;
|
|
57
|
-
transcript?: Transcript.Transcript;
|
|
58
|
-
model: SerializationModel<DataType.Message>;
|
|
59
|
-
// TODO(burdon): Are these still in use?
|
|
60
|
-
attendableId?: string;
|
|
61
|
-
ignoreAttention?: boolean;
|
|
62
|
-
}>;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Transcript component implemented using the editor.
|
|
66
|
-
*/
|
|
67
|
-
export const TranscriptView = ({ classNames, space, transcript: object, model }: TranscriptViewProps) => {
|
|
68
|
-
const { themeMode } = useThemeContext();
|
|
69
|
-
const { parentRef } = useTextEditor(() => {
|
|
70
|
-
return {
|
|
71
|
-
extensions: [
|
|
72
|
-
createBasicExtensions({ readOnly: true, lineWrapping: true, search: true }),
|
|
73
|
-
createMarkdownExtensions(),
|
|
74
|
-
createThemeExtensions({ themeMode }),
|
|
75
|
-
decorateMarkdown(),
|
|
76
|
-
preview(),
|
|
77
|
-
transcript({
|
|
78
|
-
model,
|
|
79
|
-
started: object?.started ? new Date(object.started) : undefined,
|
|
80
|
-
}),
|
|
81
|
-
autoScroll(),
|
|
82
|
-
].filter(isTruthy),
|
|
83
|
-
};
|
|
84
|
-
}, [space, model]);
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<div
|
|
88
|
-
ref={parentRef}
|
|
89
|
-
className={mx('flex grow overflow-hidden container-max-width', classNames)}
|
|
90
|
-
data-popover-collision-boundary={true /* TODO(thure): Make this a constant and document it. */}
|
|
91
|
-
/>
|
|
92
|
-
);
|
|
93
|
-
};
|