mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-07 02:58:15 +00:00
Add telemetry for todos (#5746)
This commit is contained in:
parent
ab1756961c
commit
d0452d0d5c
2 changed files with 22 additions and 0 deletions
|
|
@ -89,6 +89,14 @@ export const taskPropertiesSchema = z.object({
|
|||
modelId: z.string().optional(),
|
||||
diffStrategy: z.string().optional(),
|
||||
isSubtask: z.boolean().optional(),
|
||||
todos: z
|
||||
.object({
|
||||
total: z.number(),
|
||||
completed: z.number(),
|
||||
inProgress: z.number(),
|
||||
pending: z.number(),
|
||||
})
|
||||
.optional(),
|
||||
})
|
||||
|
||||
export const gitPropertiesSchema = z.object({
|
||||
|
|
|
|||
|
|
@ -1853,6 +1853,19 @@ export class ClineProvider
|
|||
// Get git repository information
|
||||
const gitInfo = await getWorkspaceGitInfo()
|
||||
|
||||
// Calculate todo list statistics
|
||||
const todoList = task?.todoList
|
||||
let todos: { total: number; completed: number; inProgress: number; pending: number } | undefined
|
||||
|
||||
if (todoList && todoList.length > 0) {
|
||||
todos = {
|
||||
total: todoList.length,
|
||||
completed: todoList.filter((todo) => todo.status === "completed").length,
|
||||
inProgress: todoList.filter((todo) => todo.status === "in_progress").length,
|
||||
pending: todoList.filter((todo) => todo.status === "pending").length,
|
||||
}
|
||||
}
|
||||
|
||||
// Return all properties including git info - clients will filter as needed
|
||||
return {
|
||||
appName: packageJSON?.name ?? Package.name,
|
||||
|
|
@ -1867,6 +1880,7 @@ export class ClineProvider
|
|||
diffStrategy: task?.diffStrategy?.getName(),
|
||||
isSubtask: task ? !!task.parentTask : undefined,
|
||||
cloudIsAuthenticated,
|
||||
...(todos && { todos }),
|
||||
...gitInfo,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue