MCPcopy Create free account
hub / github.com/codeaashu/claude-code / userFacingName

Function userFacingName

src/tools/BashTool/BashTool.tsx:484–503  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

482 return outputSchema();
483 },
484 userFacingName(input) {
485 if (!input) {
486 return 'Bash';
487 }
488 // Render sed in-place edits as file edits
489 if (input.command) {
490 const sedInfo = parseSedEditCommand(input.command);
491 if (sedInfo) {
492 return fileEditUserFacingName({
493 file_path: sedInfo.filePath,
494 old_string: 'x'
495 });
496 }
497 }
498 // Env var FIRST: shouldUseSandbox → splitCommand_DEPRECATED → shell-quote's
499 // `new RegExp` per call. userFacingName runs per-render for every bash
500 // message in history; with ~50 msgs + one slow-to-tokenize command, this
501 // exceeds the shimmer tick → transition abort → infinite retry (#21605).
502 return isEnvTruthy(process.env.CLAUDE_CODE_BASH_SANDBOX_SHOW_INDICATOR) && shouldUseSandbox(input) ? 'SandboxedBash' : 'Bash';
503 },
504 getToolUseSummary(input) {
505 if (!input?.command) {
506 return null;

Callers

nothing calls this directly

Calls 3

parseSedEditCommandFunction · 0.85
isEnvTruthyFunction · 0.85
shouldUseSandboxFunction · 0.85

Tested by

no test coverage detected