File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,14 @@ async function analyzeBuildError(
214214 request . model ,
215215 ) ) ;
216216
217+ // A hackish way to track state for the Chromium log tool without
218+ // relying on the model to do it since it constantly gets it wrong
219+ const chromiumLogToolState = {
220+ startVersion : previousChromiumVersion ,
221+ endVersion : newChromiumVersion ,
222+ page : 1 ,
223+ } ;
224+
217225 const accumulatedToolResults : Record < string , vscode . LanguageModelToolResult > =
218226 { } ;
219227 const toolCallRounds : ToolCallRound [ ] = [ ] ;
@@ -241,6 +249,13 @@ async function analyzeBuildError(
241249 responseStr += part . value ;
242250 } else if ( part instanceof vscode . LanguageModelToolCallPart ) {
243251 toolCalls . push ( part ) ;
252+ if ( part . name === lmToolNames . chromiumLog ) {
253+ // Inject the Chromium log tool state into the input
254+ Object . assign ( part . input , chromiumLogToolState ) ;
255+
256+ // Increment the page number for the next call
257+ chromiumLogToolState . page += 1 ;
258+ }
244259 }
245260 }
246261
You can’t perform that action at this time.
0 commit comments