@@ -5,6 +5,7 @@ llmToolFunctions.newSheet = function (name, cells) {
5
5
this . globals ?. addSheet ( name , cells . length , cols , ( i , j ) =>
6
6
cells [ i ] ?. [ j ] ?. toString ( ) ,
7
7
) ;
8
+ this . globals . currentSheetIndex = this . globals . sheets . length - 1 ;
8
9
} ;
9
10
llmToolFunctions . newSheet . description =
10
11
"takes a 2D array of strings containing formulas" ;
@@ -20,7 +21,7 @@ llmToolFunctions.getCellValue = function (sheetIndex, row, col) {
20
21
} ;
21
22
22
23
llmToolFunctions . getCellFormula = function ( sheetIndex , row , col ) {
23
- return this . globals . sheets [ sheetIndex ] ?. cells [ row ] ?. [ col ] ?. formula ;
24
+ return this . globals . sheets [ sheetIndex ] ?. cells [ row ] ?. [ col ] ?. formula ?? "" ;
24
25
} ;
25
26
26
27
llmToolFunctions . setCellFormula = function ( sheetIndex , row , col , formula ) {
@@ -31,7 +32,7 @@ llmToolFunctions.setCellFormula = function (sheetIndex, row, col, formula) {
31
32
export const llmModels = $state ( { } ) ;
32
33
33
34
llmModels . Gemini = {
34
- model : "gemini-2.5-pro-exp-03-25 " ,
35
+ model : "gemini-2.5-flash-preview-04-17 " ,
35
36
async request ( prompt , systemPrompt ) {
36
37
const response = await fetch (
37
38
`https://generativelanguage.googleapis.com/v1beta/models/${ this . model } :generateContent?key=${ this . apiKey } ` ,
0 commit comments