(args: ToolArgs)
| 56 | } |
| 57 | |
| 58 | function workspaceFileTitle(args: ToolArgs): string { |
| 59 | const title = stringArg(args, 'title') |
| 60 | if (!title) return '' |
| 61 | const verbByOperation: Record<string, string> = { |
| 62 | create: 'Creating', |
| 63 | append: 'Adding', |
| 64 | patch: 'Editing', |
| 65 | update: 'Writing', |
| 66 | rename: 'Renaming', |
| 67 | delete: 'Deleting', |
| 68 | } |
| 69 | const verb = verbByOperation[stringArg(args, 'operation')] ?? 'Writing' |
| 70 | return `${verb} ${title}` |
| 71 | } |
| 72 | |
| 73 | /** Static fallback titles for tools without an argument-aware title. */ |
| 74 | const TOOL_TITLES: Record<string, string> = { |
no test coverage detected