MCPcopy Create free account
hub / github.com/Noumena-Network/code / TranscriptModeFooter

Function TranscriptModeFooter

src/screens/REPL.tsx:378–419  ·  view source on GitHub ↗

* Small component to display transcript mode footer with dynamic keybinding. * Must be rendered inside KeybindingSetup to access keybinding context.

(t0)

Source from the content-addressed store, hash-verified

376 * Must be rendered inside KeybindingSetup to access keybinding context.
377 */
378function TranscriptModeFooter(t0) {
379 const $ = _c(9);
380 const {
381 showAllInTranscript,
382 virtualScroll,
383 searchBadge,
384 suppressShowAll: t1,
385 status
386 } = t0;
387 const suppressShowAll = t1 === undefined ? false : t1;
388 const toggleShortcut = useShortcutDisplay("app:toggleTranscript", "Global", "ctrl+o");
389 const showAllShortcut = useShortcutDisplay("transcript:toggleShowAll", "Transcript", "ctrl+e");
390 const t2 = searchBadge ? " \xB7 n/N to navigate" : virtualScroll ? ` · ${figures.arrowUp}${figures.arrowDown} scroll · home/end top/bottom` : suppressShowAll ? "" : ` · ${showAllShortcut} to ${showAllInTranscript ? "collapse" : "show all"}`;
391 let t3;
392 if ($[0] !== t2 || $[1] !== toggleShortcut) {
393 t3 = <Text dimColor={true}>Showing detailed transcript · {toggleShortcut} to toggle{t2}</Text>;
394 $[0] = t2;
395 $[1] = toggleShortcut;
396 $[2] = t3;
397 } else {
398 t3 = $[2];
399 }
400 let t4;
401 if ($[3] !== searchBadge || $[4] !== status) {
402 t4 = status ? <><Box flexGrow={1} /><Text>{status} </Text></> : searchBadge ? <><Box flexGrow={1} /><Text dimColor={true}>{searchBadge.current}/{searchBadge.count}{" "}</Text></> : null;
403 $[3] = searchBadge;
404 $[4] = status;
405 $[5] = t4;
406 } else {
407 t4 = $[5];
408 }
409 let t5;
410 if ($[6] !== t3 || $[7] !== t4) {
411 t5 = <Box noSelect={true} alignItems="center" alignSelf="center" borderTopDimColor={true} borderBottom={false} borderLeft={false} borderRight={false} borderStyle="single" marginTop={1} paddingLeft={2} width="100%">{t3}{t4}</Box>;
412 $[6] = t3;
413 $[7] = t4;
414 $[8] = t5;
415 } else {
416 t5 = $[8];
417 }
418 return t5;
419}
420
421/** less-style / bar. 1-row, same border-top styling as TranscriptModeFooter
422 * so swapping them in the bottom slot doesn't shift ScrollBox height.

Callers

nothing calls this directly

Calls 1

useShortcutDisplayFunction · 0.85

Tested by

no test coverage detected