recappi 0.1.37 → 0.1.38
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/index.js +32 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1919,7 +1919,8 @@ function AppShell({
|
|
|
1919
1919
|
kind: "live",
|
|
1920
1920
|
session,
|
|
1921
1921
|
selection,
|
|
1922
|
-
telemetry: { ...current.telemetry, status: "recording" }
|
|
1922
|
+
telemetry: { ...current.telemetry, status: "recording" },
|
|
1923
|
+
captions: session.captionStreamEnabled ? initialLiveCaptionsState() : void 0
|
|
1923
1924
|
};
|
|
1924
1925
|
});
|
|
1925
1926
|
}).catch((error51) => {
|
|
@@ -1936,7 +1937,8 @@ function AppShell({
|
|
|
1936
1937
|
kind: "stopping",
|
|
1937
1938
|
session: current.session,
|
|
1938
1939
|
selection: current.selection,
|
|
1939
|
-
telemetry: stoppingTelemetry
|
|
1940
|
+
telemetry: stoppingTelemetry,
|
|
1941
|
+
captions: current.captions
|
|
1940
1942
|
});
|
|
1941
1943
|
try {
|
|
1942
1944
|
const data = await current.session.stop();
|
|
@@ -1970,11 +1972,18 @@ function AppShell({
|
|
|
1970
1972
|
if (!liveSession) return;
|
|
1971
1973
|
const session = liveSession;
|
|
1972
1974
|
const unsubscribe = session.source.onEvent((event) => {
|
|
1975
|
+
const captionEvent = session.captionStreamEnabled ? sidecarToLiveCaptionEvent(event) : null;
|
|
1973
1976
|
setLiveRecord((current) => {
|
|
1974
1977
|
if (current?.kind !== "live" || current.session !== session) return current;
|
|
1975
1978
|
return {
|
|
1976
1979
|
...current,
|
|
1977
|
-
telemetry: applyRecordingEventToTelemetry(current.telemetry, event)
|
|
1980
|
+
telemetry: applyRecordingEventToTelemetry(current.telemetry, event),
|
|
1981
|
+
...captionEvent ? {
|
|
1982
|
+
captions: liveCaptionReducer(
|
|
1983
|
+
current.captions ?? initialLiveCaptionsState(),
|
|
1984
|
+
captionEvent
|
|
1985
|
+
)
|
|
1986
|
+
} : {}
|
|
1978
1987
|
};
|
|
1979
1988
|
});
|
|
1980
1989
|
});
|
|
@@ -2338,6 +2347,7 @@ function AppShell({
|
|
|
2338
2347
|
RecordingHeroScreen,
|
|
2339
2348
|
{
|
|
2340
2349
|
telemetry: liveRecord.telemetry,
|
|
2350
|
+
captions: liveRecord.kind === "live" || liveRecord.kind === "stopping" ? liveRecord.captions : void 0,
|
|
2341
2351
|
artifact: liveRecord.kind === "stopped" ? liveRecord.artifact : void 0,
|
|
2342
2352
|
canTranscribe: Boolean(transcribeRecordingArtifact),
|
|
2343
2353
|
now
|
|
@@ -2452,6 +2462,7 @@ var init_AppShell = __esm({
|
|
|
2452
2462
|
init_PermissionPreflightView();
|
|
2453
2463
|
init_RecordSetupView();
|
|
2454
2464
|
init_RecordingHeroScreen();
|
|
2465
|
+
init_liveCaptions();
|
|
2455
2466
|
init_recordingCore();
|
|
2456
2467
|
init_format();
|
|
2457
2468
|
init_terminal();
|
|
@@ -20445,6 +20456,7 @@ function createFifo(path6) {
|
|
|
20445
20456
|
// src/record.tsx
|
|
20446
20457
|
init_LiveCaptionsScreen();
|
|
20447
20458
|
init_RecordingHeroScreen();
|
|
20459
|
+
init_liveCaptions();
|
|
20448
20460
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
20449
20461
|
var SIDECAR_COMMAND_ENV = "RECAPPI_MINI_SIDECAR";
|
|
20450
20462
|
var SIDECAR_HELPER_NAME = "RecappiMiniSidecar";
|
|
@@ -20466,6 +20478,7 @@ async function recordViaSidecar(opts) {
|
|
|
20466
20478
|
source: session.source,
|
|
20467
20479
|
sourceLabel: opts.includeSystemAudio === false ? "Microphone" : "System audio \xB7 all apps",
|
|
20468
20480
|
micEnabled: opts.includeMicrophone !== false,
|
|
20481
|
+
captionStreamEnabled: opts.live === true,
|
|
20469
20482
|
renderApp: opts.runtime?.renderApp,
|
|
20470
20483
|
now: opts.runtime?.now
|
|
20471
20484
|
});
|
|
@@ -20504,6 +20517,7 @@ async function startLiveRecordSession(opts, selection = {
|
|
|
20504
20517
|
});
|
|
20505
20518
|
return {
|
|
20506
20519
|
mode: "local",
|
|
20520
|
+
captionStreamEnabled: true,
|
|
20507
20521
|
source: session.source,
|
|
20508
20522
|
stop: session.stop
|
|
20509
20523
|
};
|
|
@@ -20939,6 +20953,7 @@ function createInkRecordingHeroRenderer(opts) {
|
|
|
20939
20953
|
source: opts.source,
|
|
20940
20954
|
sourceLabel: opts.sourceLabel,
|
|
20941
20955
|
micEnabled: opts.micEnabled,
|
|
20956
|
+
captionStreamEnabled: opts.captionStreamEnabled,
|
|
20942
20957
|
onStop,
|
|
20943
20958
|
now: opts.now ?? Date.now
|
|
20944
20959
|
}
|
|
@@ -20957,6 +20972,7 @@ function RecordingHeroLive({
|
|
|
20957
20972
|
source,
|
|
20958
20973
|
sourceLabel,
|
|
20959
20974
|
micEnabled,
|
|
20975
|
+
captionStreamEnabled,
|
|
20960
20976
|
onStop,
|
|
20961
20977
|
now
|
|
20962
20978
|
}) {
|
|
@@ -20966,15 +20982,26 @@ function RecordingHeroLive({
|
|
|
20966
20982
|
sourceLabel,
|
|
20967
20983
|
micEnabled
|
|
20968
20984
|
}));
|
|
20985
|
+
const [captions, setCaptions] = React4.useState(initialLiveCaptionsState);
|
|
20969
20986
|
React4.useEffect(() => {
|
|
20970
20987
|
return source.onEvent((event) => {
|
|
20971
20988
|
setTelemetry((prev) => applyRecordingEventToTelemetry(prev, event));
|
|
20989
|
+
if (!captionStreamEnabled) return;
|
|
20990
|
+
const mapped = sidecarToLiveCaptionEvent(event);
|
|
20991
|
+
if (mapped) setCaptions((prev) => liveCaptionReducer(prev, mapped));
|
|
20972
20992
|
});
|
|
20973
|
-
}, [source]);
|
|
20993
|
+
}, [captionStreamEnabled, source]);
|
|
20974
20994
|
useInput2((input, key) => {
|
|
20975
20995
|
if (input === "q" || key.escape) onStop();
|
|
20976
20996
|
});
|
|
20977
|
-
return /* @__PURE__ */ jsx4(
|
|
20997
|
+
return /* @__PURE__ */ jsx4(
|
|
20998
|
+
RecordingHeroScreen,
|
|
20999
|
+
{
|
|
21000
|
+
telemetry,
|
|
21001
|
+
captions: captionStreamEnabled ? captions : void 0,
|
|
21002
|
+
now
|
|
21003
|
+
}
|
|
21004
|
+
);
|
|
20978
21005
|
}
|
|
20979
21006
|
|
|
20980
21007
|
// src/cli.ts
|