MCPcopy Create free account
hub / github.com/RioArisk/claudecode_api_RemoteControl / shortenPath

Function shortenPath

app/src/modules/utils.js:52–57  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

50}
51
52export function shortenPath(p) {
53 if (!p) return '';
54 const parts = p.replace(/\\/g, '/').replace(/\/$/, '').split('/');
55 if (parts.length <= 2) return parts.join('/');
56 return parts.slice(-2).join('/');
57}
58
59export function formatModel(m) {
60 if (!m) return '';

Callers 5

buildDirItemFunction · 0.90
updateSettingsCwdFunction · 0.90
confirmChangeCwdFunction · 0.90
renderDiffOpsFunction · 0.90
updateHeaderInfoFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected