({
notebook_path,
cell_id,
new_source,
cell_type,
edit_mode
}: Partial<z.infer<ReturnType<typeof inputSchema>>>, {
verbose
}: {
verbose: boolean;
})
| 20 | return getDisplayPath(input.notebook_path); |
| 21 | } |
| 22 | export 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 | } |
| 48 | export function renderToolUseRejectedMessage(input: z.infer<ReturnType<typeof inputSchema>>, { |
| 49 | verbose |
| 50 | }: { |
nothing calls this directly
no test coverage detected