mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: add taskCommandExecuted event to TaskEvents and RooCodeEvents types
- Added taskCommandExecuted event definition to TaskEvents in packages/types/src/task.ts - Added taskCommandExecuted event to rooCodeEventsSchema in packages/types/src/events.ts - This fixes the TypeScript errors where emit() was called with an event not defined in TaskEvents
This commit is contained in:
parent
de6db594b5
commit
f4c17174bd
2 changed files with 24 additions and 0 deletions
|
|
@ -77,6 +77,18 @@ export const rooCodeEventsSchema = z.object({
|
|||
|
||||
[RooCodeEventName.TaskToolFailed]: z.tuple([z.string(), toolNamesSchema, z.string()]),
|
||||
[RooCodeEventName.TaskTokenUsageUpdated]: z.tuple([z.string(), tokenUsageSchema]),
|
||||
|
||||
// Command Execution
|
||||
taskCommandExecuted: z.tuple([
|
||||
z.string(),
|
||||
z.object({
|
||||
command: z.string(),
|
||||
exitCode: z.number().optional(),
|
||||
output: z.string(),
|
||||
succeeded: z.boolean(),
|
||||
failureReason: z.string().optional(),
|
||||
}),
|
||||
]),
|
||||
})
|
||||
|
||||
export type RooCodeEvents = z.infer<typeof rooCodeEventsSchema>
|
||||
|
|
|
|||
|
|
@ -96,4 +96,16 @@ export type TaskEvents = {
|
|||
// Task Analytics
|
||||
[RooCodeEventName.TaskToolFailed]: [taskId: string, tool: ToolName, error: string]
|
||||
[RooCodeEventName.TaskTokenUsageUpdated]: [taskId: string, tokenUsage: TokenUsage]
|
||||
|
||||
// Command Execution
|
||||
taskCommandExecuted: [
|
||||
taskId: string,
|
||||
details: {
|
||||
command: string
|
||||
exitCode: number | undefined
|
||||
output: string
|
||||
succeeded: boolean
|
||||
failureReason?: string
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue