MCPcopy
hub / github.com/codeaashu/claude-code / renderToolUseMessage

Function renderToolUseMessage

src/tools/NotebookEditTool/UI.tsx:22–47  ·  view source on GitHub ↗
({
  notebook_path,
  cell_id,
  new_source,
  cell_type,
  edit_mode
}: Partial<z.infer<ReturnType<typeof inputSchema>>>, {
  verbose
}: {
  verbose: boolean;
})

Source from the content-addressed store, hash-verified

20 return getDisplayPath(input.notebook_path);
21}
22export function renderToolUseMessage({
23 notebook_path,
24 cell_id,
25 new_source,
26 cell_type,
27 edit_mode
28}: Partial<z.infer<ReturnType<typeof inputSchema>>>, {
29 verbose
30}: {
31 verbose: boolean;
32}): React.ReactNode {
33 if (!notebook_path || !new_source || !cell_type) {
34 return null;
35 }
36 const displayPath = verbose ? notebook_path : getDisplayPath(notebook_path);
37 if (verbose) {
38 return <>
39 <FilePathLink filePath={notebook_path}>{displayPath}</FilePathLink>
40 {`@${cell_id}, content: ${new_source.slice(0, 30)}…, cell_type: ${cell_type}, edit_mode: ${edit_mode ?? 'replace'}`}
41 </>;
42 }
43 return <>
44 <FilePathLink filePath={notebook_path}>{displayPath}</FilePathLink>
45 {`@${cell_id}`}
46 </>;
47}
48export function renderToolUseRejectedMessage(input: z.infer<ReturnType<typeof inputSchema>>, {
49 verbose
50}: {

Callers

nothing calls this directly

Calls 1

getDisplayPathFunction · 0.85

Tested by

no test coverage detected