Function
buildDisabledMessage
(
toolName: string,
flag: string,
categoryLabel?: string,
)
Source from the content-addressed store, hash-verified
| 59 | class ToolCallTimeoutError extends Error {} |
| 60 | |
| 61 | function buildDisabledMessage( |
| 62 | toolName: string, |
| 63 | flag: string, |
| 64 | categoryLabel?: string, |
| 65 | ): string { |
| 66 | const reason = categoryLabel |
| 67 | ? `is in category ${categoryLabel} which` |
| 68 | : `requires ${flag.startsWith('--experimental') ? 'experimental feature' : 'flag'} ${flag} and`; |
| 69 | |
| 70 | return `Tool ${toolName} ${reason} is currently disabled. Enable it by running chrome-devtools start ${flag}=true. For more information check the README.`; |
| 71 | } |
| 72 | |
| 73 | function getDisabledReason( |
| 74 | tool: AnyToolDefinition, |
Tested by
no test coverage detected