@@ -37,7 +37,7 @@ import {
3737 QueuedMessage ,
3838} from "@roo-code/types"
3939import { TelemetryService } from "@roo-code/telemetry"
40- import { CloudService , BridgeOrchestrator } from "@roo-code/cloud"
40+ // import { CloudService, BridgeOrchestrator } from "@roo-code/cloud"
4141
4242// api
4343import { ApiHandler , ApiHandlerCreateMessageMetadata , buildApiHandler } from "../../api"
@@ -658,14 +658,14 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
658658 await provider ?. postMessageToWebview ( { type : "messageUpdated" , clineMessage : message } )
659659 this . emit ( RooCodeEventName . Message , { action : "updated" , message } )
660660
661- const shouldCaptureMessage = message . partial !== true && CloudService . isEnabled ( )
661+ // const shouldCaptureMessage = message.partial !== true && CloudService.isEnabled()
662662
663- if ( shouldCaptureMessage ) {
664- CloudService . instance . captureEvent ( {
665- event : TelemetryEventName . TASK_MESSAGE ,
666- properties : { taskId : this . taskId , message } ,
667- } )
668- }
663+ // if (shouldCaptureMessage) {
664+ // CloudService.instance.captureEvent({
665+ // event: TelemetryEventName.TASK_MESSAGE,
666+ // properties: { taskId: this.taskId, message },
667+ // })
668+ // }
669669 }
670670
671671 private async saveClineMessages ( ) {
@@ -1206,15 +1206,15 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
12061206 // Start / Resume / Abort / Dispose
12071207
12081208 private async startTask ( task ?: string , images ?: string [ ] ) : Promise < void > {
1209- if ( this . enableBridge ) {
1210- try {
1211- await BridgeOrchestrator . subscribeToTask ( this )
1212- } catch ( error ) {
1213- console . error (
1214- `[Task#startTask] BridgeOrchestrator.subscribeToTask() failed: ${ error instanceof Error ? error . message : String ( error ) } ` ,
1215- )
1216- }
1217- }
1209+ // if (this.enableBridge) {
1210+ // try {
1211+ // await BridgeOrchestrator.subscribeToTask(this)
1212+ // } catch (error) {
1213+ // console.error(
1214+ // `[Task#startTask] BridgeOrchestrator.subscribeToTask() failed: ${error instanceof Error ? error.message : String(error)}`,
1215+ // )
1216+ // }
1217+ // }
12181218
12191219 // `conversationHistory` (for API) and `clineMessages` (for webview)
12201220 // need to be in sync.
@@ -1247,15 +1247,15 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
12471247 }
12481248
12491249 private async resumeTaskFromHistory ( ) {
1250- if ( this . enableBridge ) {
1251- try {
1252- await BridgeOrchestrator . subscribeToTask ( this )
1253- } catch ( error ) {
1254- console . error (
1255- `[Task#resumeTaskFromHistory] BridgeOrchestrator.subscribeToTask() failed: ${ error instanceof Error ? error . message : String ( error ) } ` ,
1256- )
1257- }
1258- }
1250+ // if (this.enableBridge) {
1251+ // try {
1252+ // await BridgeOrchestrator.subscribeToTask(this)
1253+ // } catch (error) {
1254+ // console.error(
1255+ // `[Task#resumeTaskFromHistory] BridgeOrchestrator.subscribeToTask() failed: ${error instanceof Error ? error.message : String(error)}`,
1256+ // )
1257+ // }
1258+ // }
12591259
12601260 const modifiedClineMessages = await this . getSavedClineMessages ( )
12611261
@@ -1470,25 +1470,25 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
14701470
14711471 let newUserContent : Anthropic . Messages . ContentBlockParam [ ] = [ ...modifiedOldUserContent ]
14721472
1473- const agoText = ( ( ) : string => {
1474- const timestamp = lastClineMessage ?. ts ?? Date . now ( )
1475- const now = Date . now ( )
1476- const diff = now - timestamp
1477- const minutes = Math . floor ( diff / 60000 )
1478- const hours = Math . floor ( minutes / 60 )
1479- const days = Math . floor ( hours / 24 )
1480-
1481- if ( days > 0 ) {
1482- return `${ days } day${ days > 1 ? "s" : "" } ago`
1483- }
1484- if ( hours > 0 ) {
1485- return `${ hours } hour${ hours > 1 ? "s" : "" } ago`
1486- }
1487- if ( minutes > 0 ) {
1488- return `${ minutes } minute${ minutes > 1 ? "s" : "" } ago`
1489- }
1490- return "just now"
1491- } ) ( )
1473+ // const agoText = ((): string => {
1474+ // const timestamp = lastClineMessage?.ts ?? Date.now()
1475+ // const now = Date.now()
1476+ // const diff = now - timestamp
1477+ // const minutes = Math.floor(diff / 60000)
1478+ // const hours = Math.floor(minutes / 60)
1479+ // const days = Math.floor(hours / 24)
1480+
1481+ // if (days > 0) {
1482+ // return `${days} day${days > 1 ? "s" : ""} ago`
1483+ // }
1484+ // if (hours > 0) {
1485+ // return `${hours} hour${hours > 1 ? "s" : ""} ago`
1486+ // }
1487+ // if (minutes > 0) {
1488+ // return `${minutes} minute${minutes > 1 ? "s" : ""} ago`
1489+ // }
1490+ // return "just now"
1491+ // })()
14921492
14931493 if ( responseText ) {
14941494 newUserContent . push ( {
@@ -1570,15 +1570,15 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
15701570 this . pauseInterval = undefined
15711571 }
15721572
1573- if ( this . enableBridge ) {
1574- BridgeOrchestrator . getInstance ( )
1575- ?. unsubscribeFromTask ( this . taskId )
1576- . catch ( ( error ) =>
1577- console . error (
1578- `[Task#dispose] BridgeOrchestrator#unsubscribeFromTask() failed: ${ error instanceof Error ? error . message : String ( error ) } ` ,
1579- ) ,
1580- )
1581- }
1573+ // if (this.enableBridge) {
1574+ // BridgeOrchestrator.getInstance()
1575+ // ?.unsubscribeFromTask(this.taskId)
1576+ // .catch((error) =>
1577+ // console.error(
1578+ // `[Task#dispose] BridgeOrchestrator#unsubscribeFromTask() failed: ${error instanceof Error ? error.message : String(error)}`,
1579+ // ),
1580+ // )
1581+ // }
15821582
15831583 // Release any terminals associated with this task.
15841584 try {
@@ -1925,6 +1925,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
19251925 // Signals to provider that it can retrieve the saved messages
19261926 // from disk, as abortTask can not be awaited on in nature.
19271927 this . didFinishAbortingStream = true
1928+
19281929 this ?. api ?. cancelChat ?.( cancelReason )
19291930 }
19301931
@@ -2230,6 +2231,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
22302231
22312232 // Now abort (emits TaskAborted which provider listens to)
22322233 await this . abortTask ( )
2234+
22332235 this ?. api ?. cancelChat ?.( cancelReason )
22342236 // Do not rehydrate here; provider owns rehydration to avoid duplication races
22352237 }
0 commit comments