You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// awaiting first chunk to see if it will throw an error
1232
+
// Awaiting first chunk to see if it will throw an error.
1230
1233
this.isWaitingForFirstChunk=true
1231
1234
constfirstChunk=awaititerator.next()
1232
1235
yieldfirstChunk.value
@@ -3392,6 +3395,7 @@ export class Cline extends EventEmitter<ClineEvents> {
3392
3395
? `This may indicate a failure in his thought process or inability to use a tool properly, which can be mitigated with some user guidance (e.g. "Try breaking down the task into smaller steps").`
3393
3396
: "Roo Code uses complex prompts and iterative task execution that may be challenging for less capable models. For best results, it's recommended to use Claude 3.7 Sonnet for its advanced agentic coding capabilities.",
3394
3397
)
3398
+
3395
3399
if(response==="messageResponse"){
3396
3400
userContent.push(
3397
3401
...[
@@ -3455,9 +3459,11 @@ export class Cline extends EventEmitter<ClineEvents> {
3455
3459
3456
3460
// since we sent off a placeholder api_req_started message to update the webview while waiting to actually start the API request (to load potential details for example), we need to update the text of that message
conststream=this.attemptApiRequest(previousApiReqIndex)// yields only if the first chunk is successful, otherwise will allow the user to retry the request (most likely due to rate limit error, which gets thrown on the first chunk)
3554
+
// Yields only if the first chunk is successful, otherwise will
3555
+
// allow the user to retry the request (most likely due to rate
3556
+
// limit error, which gets thrown on the first chunk).
// Sometimes chunk is undefined, no idea that can cause it, but this workaround seems to fix it
3565
+
// Sometimes chunk is undefined, no idea that can cause it, but this workaround seems to fix it.
3556
3566
continue
3557
3567
}
3568
+
3558
3569
switch(chunk.type){
3559
3570
case"reasoning":
3560
3571
reasoningMessage+=chunk.text
@@ -3610,11 +3621,14 @@ export class Cline extends EventEmitter<ClineEvents> {
3610
3621
// abandoned happens when extension is no longer waiting for the cline instance to finish aborting (error is thrown here when any function in the for loop throws due to this.abort)
3611
3622
if(!this.abandoned){
3612
3623
this.abortTask()// if the stream failed, there's various states the task could be in (i.e. could have streamed some tools the user may have executed), so we just resort to replicating a cancel task
0 commit comments