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

Function userFacingName

src/tools/FileEditTool/UI.tsx:24–45  ·  view source on GitHub ↗
(input: Partial<{
  file_path: string;
  old_string: string;
  new_string: string;
  replace_all: boolean;
  edits: unknown[];
}> | undefined)

Source from the content-addressed store, hash-verified

22import type { FileEditOutput } from './types.js';
23import { findActualString, getPatchForEdit, preserveQuoteStyle } from './utils.js';
24export function userFacingName(input: Partial<{
25 file_path: string;
26 old_string: string;
27 new_string: string;
28 replace_all: boolean;
29 edits: unknown[];
30}> | undefined): string {
31 if (!input) {
32 return 'Update';
33 }
34 if (input.file_path?.startsWith(getPlansDirectory())) {
35 return 'Updated plan';
36 }
37 // Hashline edits always modify an existing file (line-ref based)
38 if (input.edits != null) {
39 return 'Update';
40 }
41 if (input.old_string === '') {
42 return 'Create';
43 }
44 return 'Update';
45}
46export function getToolUseSummary(input: Partial<{
47 file_path: string;
48 old_string: string;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected