Skip to content

Commit 4403cb1

Browse files
committed
Minor LLM quality of life improvements
1 parent a82cab7 commit 4403cb1

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/Llm.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Available spreadsheets:
136136
<h1>Edit Spreadsheets with Large Language Models ("AI")</h1>
137137
138138
<Details open>
139-
{#snippet summary()}Configure Model{/snippet}
139+
{#snippet summary()}Configure Provider{/snippet}
140140
141141
<Select bind:value={modelName}>
142142
{#each Object.keys(llmModels) as model}

src/global.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ input[type="checkbox"] {
6363
appearance: auto;
6464
}
6565

66-
textarea {
66+
textarea,
67+
pre {
6768
overscroll-behavior: auto;
6869
}

src/llm.svelte.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ llmToolFunctions.newSheet = function (name, cells) {
55
this.globals?.addSheet(name, cells.length, cols, (i, j) =>
66
cells[i]?.[j]?.toString(),
77
);
8+
this.globals.currentSheetIndex = this.globals.sheets.length - 1;
89
};
910
llmToolFunctions.newSheet.description =
1011
"takes a 2D array of strings containing formulas";
@@ -20,7 +21,7 @@ llmToolFunctions.getCellValue = function (sheetIndex, row, col) {
2021
};
2122

2223
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 ?? "";
2425
};
2526

2627
llmToolFunctions.setCellFormula = function (sheetIndex, row, col, formula) {
@@ -31,7 +32,7 @@ llmToolFunctions.setCellFormula = function (sheetIndex, row, col, formula) {
3132
export const llmModels = $state({});
3233

3334
llmModels.Gemini = {
34-
model: "gemini-2.5-pro-exp-03-25",
35+
model: "gemini-2.5-flash-preview-04-17",
3536
async request(prompt, systemPrompt) {
3637
const response = await fetch(
3738
`https://generativelanguage.googleapis.com/v1beta/models/${this.model}:generateContent?key=${this.apiKey}`,

0 commit comments

Comments
 (0)