(command: string)
| 264 | export type BashToolInput = z.infer<ReturnType<typeof fullInputSchema>>; |
| 265 | const COMMON_BACKGROUND_COMMANDS = ['npm', 'yarn', 'pnpm', 'node', 'python', 'python3', 'go', 'cargo', 'make', 'docker', 'terraform', 'webpack', 'vite', 'jest', 'pytest', 'curl', 'wget', 'build', 'test', 'serve', 'watch', 'dev'] as const; |
| 266 | function getCommandTypeForLogging(command: string): AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS { |
| 267 | const parts = splitCommand_DEPRECATED(command); |
| 268 | if (parts.length === 0) return 'other' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS; |
| 269 | |
| 270 | // Check each part of the command to see if any match common background commands |
| 271 | for (const part of parts) { |
| 272 | const baseCommand = part.split(' ')[0] || ''; |
| 273 | if (COMMON_BACKGROUND_COMMANDS.includes(baseCommand as (typeof COMMON_BACKGROUND_COMMANDS)[number])) { |
| 274 | return baseCommand as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS; |
| 275 | } |
| 276 | } |
| 277 | return 'other' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS; |
| 278 | } |
| 279 | const outputSchema = lazySchema(() => z.object({ |
| 280 | stdout: z.string().describe('The standard output of the command'), |
| 281 | stderr: z.string().describe('The standard error output of the command'), |
no test coverage detected