File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
packages/core/src/amazonqFeatureDev Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,10 @@ export class FeatureDevClient {
134
134
conversationId : string ,
135
135
uploadId : string ,
136
136
message : string ,
137
+ < < < << << HEAD
137
138
codeGenerationId : string ,
139
+ = === ===
140
+ >>> >>> > 4742 b3c59 ( refactor ( amazonqFeatureDev ) : include updated rts model )
138
141
currentCodeGenerationId ?: string
139
142
) {
140
143
try {
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ export class Session {
109
109
workspaceFolders : this . config . workspaceFolders ,
110
110
proxyClient : this . proxyClient ,
111
111
conversationId : this . conversationId ,
112
+ currentCodeGenerationId : this . currentCodeGenerationId as string ,
112
113
}
113
114
}
114
115
@@ -137,9 +138,13 @@ export class Session {
137
138
138
139
if ( resp . nextState ) {
139
140
// Cancel the request before moving to a new state
141
+ < < < << << HEAD
140
142
if ( ! this . state ?. tokenSource ?. token . isCancellationRequested ) {
141
143
this . state ?. tokenSource ?. cancel ( )
142
144
}
145
+ === = ===
146
+ this . state ?. tokenSource ?. cancel ( )
147
+ >>> > >>> 4742 b3c59 ( refactor ( amazonqFeatureDev ) : include updated rts model )
143
148
144
149
// Move to the next state
145
150
this . _state = resp . nextState
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ abstract class CodeGenBase {
147
147
public tabID : string
148
148
) {
149
149
this . tokenSource = new vscode . CancellationTokenSource ( )
150
+ this . isCancellationRequested = false
150
151
this . conversationId = config . conversationId
151
152
this . uploadId = config . uploadId
152
153
this . currentCodeGenerationId = config . currentCodeGenerationId || EmptyCodeGenID
@@ -304,6 +305,9 @@ export class CodeGenState extends CodeGenBase implements SessionState {
304
305
if ( action . tokenSource ) {
305
306
this . tokenSource = action . tokenSource
306
307
}
308
+ this . isCancellationRequested = true
309
+ action . tokenSource ?. dispose ( )
310
+ action . tokenSource = undefined
307
311
} )
308
312
309
313
action . telemetry . setGenerateCodeIteration ( this . currentIteration )
@@ -492,7 +496,6 @@ export class PrepareCodeGenState implements SessionState {
492
496
public references : CodeReference [ ] ,
493
497
public tabID : string ,
494
498
public currentIteration : number ,
495
-
496
499
public codeGenerationRemainingIterationCount ?: number ,
497
500
public codeGenerationTotalIterationCount ?: number ,
498
501
public currentCodeGenerationId ?: string ,
You can’t perform that action at this time.
0 commit comments