Function
getApprovalKind
(toolName: string, args: Record<string, unknown>)
Source from the content-addressed store, hash-verified
| 17 | |
| 18 | /** Tools that modify the user's system and need approval before running. */ |
| 19 | export function getApprovalKind(toolName: string, args: Record<string, unknown>): ApprovalKind { |
| 20 | switch (toolName) { |
| 21 | case "file_edit": |
| 22 | case "multi_file_edit": |
| 23 | case "file_write": |
| 24 | return "edit" |
| 25 | case "execute_command": |
| 26 | return "command" |
| 27 | default: |
| 28 | return "none" |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | /** One-line human summary of a tool call, shown in the UI. */ |
| 33 | export function describeToolCall(toolName: string, args: Record<string, unknown>): string { |
Tested by
no test coverage detected