recappi 0.1.21 → 0.1.23
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 +37 -16
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -15,16 +15,6 @@ function recordingCaptureMappingFromSelection(selection = DEFAULT_RECORDING_SELE
|
|
|
15
15
|
if (!source) {
|
|
16
16
|
throw new Error("No recording sources are available.");
|
|
17
17
|
}
|
|
18
|
-
if (source.kind === "microphone") {
|
|
19
|
-
return {
|
|
20
|
-
source,
|
|
21
|
-
includeSystemAudio: false,
|
|
22
|
-
includeMicrophone: true,
|
|
23
|
-
...selection.microphoneDeviceId ? { microphoneDeviceId: selection.microphoneDeviceId } : {},
|
|
24
|
-
sourceLabel: source.label,
|
|
25
|
-
micEnabled: true
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
18
|
const microphoneDeviceId = selection.includeMicrophone && selection.microphoneDeviceId ? selection.microphoneDeviceId : void 0;
|
|
29
19
|
return {
|
|
30
20
|
source,
|
|
@@ -1503,7 +1493,7 @@ function RecordSetupView({
|
|
|
1503
1493
|
s.label
|
|
1504
1494
|
] }, s.id);
|
|
1505
1495
|
}),
|
|
1506
|
-
!hasAppSource ? /* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "
|
|
1496
|
+
!hasAppSource ? /* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "No app-specific sources available right now" }) : null
|
|
1507
1497
|
] });
|
|
1508
1498
|
const capturePlan = /* @__PURE__ */ jsxs13(Box14, { flexDirection: "column", children: [
|
|
1509
1499
|
/* @__PURE__ */ jsx16(Text14, { dimColor: true, children: "CAPTURE PLAN" }),
|
|
@@ -1686,8 +1676,8 @@ function recordErrorCopy(code, message) {
|
|
|
1686
1676
|
};
|
|
1687
1677
|
case "record.capture_unavailable":
|
|
1688
1678
|
return {
|
|
1689
|
-
title: "
|
|
1690
|
-
detail: "
|
|
1679
|
+
title: "This local recorder can't capture audio.",
|
|
1680
|
+
detail: "Update recappi so the local recorder matches this CLI.",
|
|
1691
1681
|
tone: "yellow"
|
|
1692
1682
|
};
|
|
1693
1683
|
case "record.permission_required":
|
|
@@ -1719,6 +1709,37 @@ function recordErrorState(error51, selection) {
|
|
|
1719
1709
|
}
|
|
1720
1710
|
return { kind: "error", message: String(error51), ...selection ? { selection } : {} };
|
|
1721
1711
|
}
|
|
1712
|
+
function transcribeHandoffErrorCopy(error51) {
|
|
1713
|
+
const descriptor = error51 instanceof Error && isRecord7(error51) && isRecord7(error51.descriptor) ? error51.descriptor : void 0;
|
|
1714
|
+
const code = typeof descriptor?.code === "string" ? descriptor.code : isRecord7(error51) && typeof error51.code === "string" ? error51.code : void 0;
|
|
1715
|
+
switch (code) {
|
|
1716
|
+
case "auth.not_logged_in":
|
|
1717
|
+
return "Sign in to Recappi before transcribing this recording.";
|
|
1718
|
+
case "auth.unauthorized":
|
|
1719
|
+
return "Your Recappi session needs attention. Sign in and retry.";
|
|
1720
|
+
case "input.not_found":
|
|
1721
|
+
return "The local recording file is no longer available.";
|
|
1722
|
+
case "input.not_file":
|
|
1723
|
+
return "The saved recording is not a readable audio file.";
|
|
1724
|
+
case "input.unsupported_audio":
|
|
1725
|
+
return "This recording format is not supported yet.";
|
|
1726
|
+
case "input.duration_unavailable":
|
|
1727
|
+
return "This recording could not be checked yet.";
|
|
1728
|
+
case "cloud.conflict.upload_in_progress":
|
|
1729
|
+
return "This recording is already being uploaded.";
|
|
1730
|
+
case "cloud.recording_not_ready":
|
|
1731
|
+
return "The recording is still being prepared. Try again shortly.";
|
|
1732
|
+
case "cloud.job_failed":
|
|
1733
|
+
return "Transcription failed on Recappi Cloud. Please try again.";
|
|
1734
|
+
case "cloud.job_timed_out":
|
|
1735
|
+
return "Transcription took too long. Please try again.";
|
|
1736
|
+
case "cloud.http_error":
|
|
1737
|
+
case "cloud.invalid_response":
|
|
1738
|
+
return "Recappi Cloud could not start transcription. Please try again.";
|
|
1739
|
+
default:
|
|
1740
|
+
return "Could not start transcription. Please try again.";
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1722
1743
|
function permissionItemsFromRecordError(data) {
|
|
1723
1744
|
const sidecarError = isRecord7(data) ? data : void 0;
|
|
1724
1745
|
const sidecarData = isRecord7(sidecarError?.data) ? sidecarError.data : void 0;
|
|
@@ -1986,7 +2007,7 @@ function AppShell({
|
|
|
1986
2007
|
...artifact,
|
|
1987
2008
|
uploadStatus: "failed",
|
|
1988
2009
|
transcriptionStatus: "failed",
|
|
1989
|
-
error:
|
|
2010
|
+
error: transcribeHandoffErrorCopy(error51)
|
|
1990
2011
|
}
|
|
1991
2012
|
});
|
|
1992
2013
|
setNotice("Transcription failed. Press enter to retry.");
|
|
@@ -20484,10 +20505,10 @@ function assertSidecarCapabilities(handshake, opts) {
|
|
|
20484
20505
|
missing.push("live_captions.stream");
|
|
20485
20506
|
}
|
|
20486
20507
|
if (missing.length === 0) return;
|
|
20487
|
-
throw cliError("record.capture_unavailable", "Recappi recording helper
|
|
20508
|
+
throw cliError("record.capture_unavailable", "Recappi recording helper does not support capture.", {
|
|
20488
20509
|
hint: `Found ${handshake.sidecar.name} ${handshake.sidecar.version}, but it did not advertise ${missing.join(
|
|
20489
20510
|
", "
|
|
20490
|
-
)}. Upgrade recappi
|
|
20511
|
+
)}. Upgrade recappi, or set ${SIDECAR_COMMAND_ENV} to a compatible helper.`
|
|
20491
20512
|
});
|
|
20492
20513
|
}
|
|
20493
20514
|
function resolveSidecarCommand(opts) {
|