recappi 0.1.79 → 0.1.80

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 CHANGED
@@ -1288,7 +1288,8 @@ function RecordingDetailView({
1288
1288
  item,
1289
1289
  nowMs,
1290
1290
  transcript,
1291
- audio
1291
+ audio,
1292
+ localDir
1292
1293
  }) {
1293
1294
  const size = useTerminalSize();
1294
1295
  const [tab, setTab] = useState4("summary");
@@ -1355,6 +1356,10 @@ function RecordingDetailView({
1355
1356
  ] }),
1356
1357
  meta3 ? /* @__PURE__ */ jsx14(Text12, { dimColor: true, children: meta3 }) : null,
1357
1358
  /* @__PURE__ */ jsx14(AudioActionRow, { item, audio }),
1359
+ localDir ? /* @__PURE__ */ jsxs11(Text12, { children: [
1360
+ /* @__PURE__ */ jsx14(Text12, { dimColor: true, children: "\u2302 Local \xB7 " }),
1361
+ /* @__PURE__ */ jsx14(Text12, { dimColor: true, wrap: "truncate-middle", children: localDir })
1362
+ ] }) : null,
1358
1363
  !item.activeTranscriptId ? /* @__PURE__ */ jsx14(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text12, { dimColor: true, children: "Transcript not available yet" }) }) : transcript === "loading" || transcript === void 0 ? /* @__PURE__ */ jsx14(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text12, { dimColor: true, children: "Loading\u2026" }) }) : transcript === "error" ? /* @__PURE__ */ jsx14(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text12, { dimColor: true, children: "(transcript unavailable)" }) }) : /* @__PURE__ */ jsxs11(Fragment5, { children: [
1359
1364
  /* @__PURE__ */ jsx14(TabBar, { active: tab }),
1360
1365
  /* @__PURE__ */ jsx14(Box12, { marginTop: 1, flexDirection: "column", children: tab === "summary" ? /* @__PURE__ */ jsx14(SummaryPane, { summary, budget: paneBudget }) : tab === "chapters" ? /* @__PURE__ */ jsx14(ChaptersPane, { chapters, win: chapWin, selectedIndex: chapterSel }) : /* @__PURE__ */ jsx14(TranscriptPane, { segments, win: segWin }) })
@@ -1365,6 +1370,7 @@ function RecordingDetailView({
1365
1370
  scrollable ? " \xB7 \u2191\u2193 scroll" : "",
1366
1371
  ready ? " \xB7 " : "",
1367
1372
  `o open \xB7 d download \xB7 f finder`,
1373
+ localDir ? " \xB7 l folder" : "",
1368
1374
  " \xB7 T re-transcribe \xB7 s re-summarize \xB7 a ask \xB7 e export",
1369
1375
  item.activeTranscriptId ? " \xB7 t full" : "",
1370
1376
  links.webUrl ? " \xB7 w web" : "",
@@ -2769,6 +2775,13 @@ function AppShell({
2769
2775
  },
2770
2776
  [onResummarize, refresh, recordings, now, refetchTranscript]
2771
2777
  );
2778
+ const [sessionDirByRecording, setSessionDirByRecording] = useState9(
2779
+ () => /* @__PURE__ */ new Map()
2780
+ );
2781
+ const rememberSessionDir = useCallback2((recordingId, dir) => {
2782
+ if (!dir) return;
2783
+ setSessionDirByRecording((m) => m.get(recordingId) === dir ? m : new Map(m).set(recordingId, dir));
2784
+ }, []);
2772
2785
  const syncedTextRef = useRef4(/* @__PURE__ */ new Set());
2773
2786
  const syncRecordingText2 = useCallback2(
2774
2787
  async (recordingId, opts = {}) => {
@@ -2777,12 +2790,13 @@ function AppShell({
2777
2790
  try {
2778
2791
  const data = await onSyncRecordingText(recordingId);
2779
2792
  syncedTextRef.current.add(recordingId);
2793
+ rememberSessionDir(recordingId, data.sessionDir);
2780
2794
  if (opts.manual) setNotice(`Text synced \xB7 ${data.sessionDir}`);
2781
2795
  } catch (error51) {
2782
2796
  if (opts.manual) setNotice(transcribeHandoffErrorCopy(error51));
2783
2797
  }
2784
2798
  },
2785
- [onSyncRecordingText]
2799
+ [onSyncRecordingText, rememberSessionDir]
2786
2800
  );
2787
2801
  const syncRecordingAudio2 = useCallback2(
2788
2802
  async (recordingId) => {
@@ -2793,12 +2807,33 @@ function AppShell({
2793
2807
  setNotice("Downloading audio\u2026");
2794
2808
  try {
2795
2809
  const data = await onSyncRecordingAudio(recordingId);
2810
+ rememberSessionDir(recordingId, data.sessionDir);
2796
2811
  setNotice(`Audio saved \xB7 ${data.audioPath}`);
2797
2812
  } catch (error51) {
2798
2813
  setNotice(transcribeHandoffErrorCopy(error51));
2799
2814
  }
2800
2815
  },
2801
- [onSyncRecordingAudio]
2816
+ [onSyncRecordingAudio, rememberSessionDir]
2817
+ );
2818
+ const openLocalFolder = useCallback2(
2819
+ async (recordingId) => {
2820
+ const dir = sessionDirByRecording.get(recordingId);
2821
+ if (!dir) {
2822
+ setNotice("No local copy yet \u2014 it syncs when you open the recording.");
2823
+ return;
2824
+ }
2825
+ if (!recordingAudio) {
2826
+ setNotice("Opening the local folder isn't available in this CLI session.");
2827
+ return;
2828
+ }
2829
+ try {
2830
+ await recordingAudio.openPath(dir);
2831
+ setNotice(`Opened ${dir}`);
2832
+ } catch (error51) {
2833
+ setNotice(transcribeHandoffErrorCopy(error51));
2834
+ }
2835
+ },
2836
+ [sessionDirByRecording, recordingAudio]
2802
2837
  );
2803
2838
  const exportRecordingForAgent = useCallback2(
2804
2839
  async (recordingId) => {
@@ -3125,6 +3160,7 @@ function AppShell({
3125
3160
  if (onSyncRecordingAudio) void syncRecordingAudio2(rec.recordingId);
3126
3161
  else void runAudio(rec.recordingId, "download");
3127
3162
  } else if (input === "f" && rec) void runAudio(rec.recordingId, "finder");
3163
+ else if (input === "l" && rec) void openLocalFolder(rec.recordingId);
3128
3164
  else if (input === "w" && links.webUrl) openUrl2?.(links.webUrl);
3129
3165
  else if (input === "c" && links.webUrl) {
3130
3166
  copyText2?.(links.webUrl);
@@ -3166,7 +3202,8 @@ function AppShell({
3166
3202
  item: rec,
3167
3203
  nowMs: now(),
3168
3204
  transcript: detailTranscript,
3169
- audio: audioCache.get(rec.recordingId)
3205
+ audio: audioCache.get(rec.recordingId),
3206
+ localDir: sessionDirByRecording.get(rec.recordingId)
3170
3207
  }
3171
3208
  ) });
3172
3209
  }