Trevhud/telemetry optimization (#3263)
* add collection method * collect messages * changeset * remove commented out parts * remove check to send events anytime a new task is created while on an existing task * Update src/core/controller/task/clearTask.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Update src/services/telemetry/TelemetryService.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Lower border radius --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Ara <arafat.da.khan@gmail.com>
This commit is contained in:
7 files changed
+378
-197
No files matched your search
@@ -1792,6 +1792,9 @@ Here is the project's README to help you get started:\n\n${mcpDetails.readmeCont
|
||||
}
|
||||
|
||||
async clearTask() {
|
||||
if (this.task) {
|
||||
await telemetryService.sendCollectedEvents(this.task.taskId)
|
||||
}
|
||||
this.task?.abortTask()
|
||||
this.task = undefined // removes reference to it, so once promises end it will be garbage collected
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { Empty, EmptyRequest } from "../../../shared/proto/common"
|
||||
* @returns Empty response
|
||||
*/
|
||||
export async function clearTask(controller: Controller, _request: EmptyRequest): Promise<Empty> {
|
||||
// clearTask is called here when the user closes the task
|
||||
await controller.clearTask()
|
||||
await controller.postStateToWebview()
|
||||
return Empty.create()
|
||||
|
||||
Reference in new issue
Block a user