(command: string)
| 260 | export type { PowerShellProgress } from '../../types/tools.js'; |
| 261 | const COMMON_BACKGROUND_COMMANDS = ['npm', 'yarn', 'pnpm', 'node', 'python', 'python3', 'go', 'cargo', 'make', 'docker', 'terraform', 'webpack', 'vite', 'jest', 'pytest', 'curl', 'Invoke-WebRequest', 'build', 'test', 'serve', 'watch', 'dev'] as const; |
| 262 | function getCommandTypeForLogging(command: string): AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS { |
| 263 | const trimmed = command.trim(); |
| 264 | const firstWord = trimmed.split(/\s+/)[0] || ''; |
| 265 | for (const cmd of COMMON_BACKGROUND_COMMANDS) { |
| 266 | if (firstWord.toLowerCase() === cmd.toLowerCase()) { |
| 267 | return cmd as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS; |
| 268 | } |
| 269 | } |
| 270 | return 'other' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS; |
| 271 | } |
| 272 | export const PowerShellTool = buildTool({ |
| 273 | name: POWERSHELL_TOOL_NAME, |
| 274 | searchHint: 'execute Windows PowerShell commands', |
no outgoing calls
no test coverage detected