MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / pathInBox

Function pathInBox

apps/kimi-code/scripts/postinstall/ui.mjs:136–146  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

134}
135
136function pathInBox(path) {
137 // 7-space lead = box pad (2) + prose indent (3) + nesting under
138 // label (2). We intentionally do NOT truncate overflowing content:
139 // for command lines (`sudo rm <path>`, `mv <a> <b>`), left-truncation
140 // would swallow the command verb and leave the user with
141 // un-copy-pasteable instructions. Long lines just overflow the box
142 // border, which is visually less pretty but keeps the content
143 // intact.
144 const lead = ' '.repeat(BOX_PAD_LEFT + 5);
145 return lead + color(C_CYAN, path);
146}
147
148function successHeading(text) {
149 return pad(color(C_BOLD_GREEN, '✓ ' + text));

Callers 4

logMigrationDoneFunction · 0.85
logMigrationBlockedFunction · 0.85
logForeignKimiInTheWayFunction · 0.85
logNewCliNotOnPathFunction · 0.85

Calls 1

colorFunction · 0.85

Tested by

no test coverage detected