MCPcopy Create free account
hub / github.com/anus-dev/ANUS / Footer

Function Footer

packages/cli/src/ui/components/Footer.tsx:39–158  ·  view source on GitHub ↗
({
  model,
  targetDir,
  branchName,
  debugMode,
  debugMessage,
  corgiMode,
  errorCount,
  showErrorDetails,
  showMemoryUsage,
  promptTokenCount,
  nightly,
  vimMode,
  isTrustedFolder,
})

Source from the content-addressed store, hash-verified

37}
38
39export const Footer: React.FC<FooterProps> = ({
40 model,
41 targetDir,
42 branchName,
43 debugMode,
44 debugMessage,
45 corgiMode,
46 errorCount,
47 showErrorDetails,
48 showMemoryUsage,
49 promptTokenCount,
50 nightly,
51 vimMode,
52 isTrustedFolder,
53}) => {
54 const { columns: terminalWidth } = useTerminalSize();
55
56 const isNarrow = isNarrowWidth(terminalWidth);
57
58 // Adjust path length based on terminal width
59 const pathLength = Math.max(20, Math.floor(terminalWidth * 0.4));
60 const displayPath = isNarrow
61 ? path.basename(tildeifyPath(targetDir))
62 : shortenPath(tildeifyPath(targetDir), pathLength);
63
64 return (
65 <Box
66 justifyContent="space-between"
67 width="100%"
68 flexDirection={isNarrow ? 'column' : 'row'}
69 alignItems={isNarrow ? 'flex-start' : 'center'}
70 >
71 <Box>
72 {debugMode && <DebugProfiler />}
73 {vimMode && <Text color={theme.text.secondary}>[{vimMode}] </Text>}
74 {nightly ? (
75 <Gradient colors={theme.ui.gradient}>
76 <Text>
77 {displayPath}
78 {branchName && (
79 <Text color={theme.text.secondary}> ({branchName})</Text>
80 )}
81 </Text>
82 </Gradient>
83 ) : (
84 <Text color={theme.text.primary}>
85 {displayPath}
86 {branchName && (
87 <Text color={theme.text.secondary}> ({branchName})</Text>
88 )}
89 </Text>
90 )}
91 {debugMode && (
92 <Text color={theme.status.error}>
93 {' ' + (debugMessage || '--debug')}
94 </Text>
95 )}
96 </Box>

Callers

nothing calls this directly

Calls 4

useTerminalSizeFunction · 0.85
isNarrowWidthFunction · 0.85
tildeifyPathFunction · 0.85
shortenPathFunction · 0.85

Tested by

no test coverage detected