Skip to content

Commit 2480ebe

Browse files
authored
Batch Approval for AI Tool Calls, fix "AI is thinking" message, chunk JS (#2430)
We now show all Read File/Dir calls together and batch approve them (backend change to emit them all at once, and FE change to display them as a batch) JS chunking for monaco, mermaid, and shiki, etc. shiki is huge, almost 10M but can't be easily split out of Streamdown. Tried making it load async, but w/ Streamdown we can't do that easily. Trying to split the JS up because of a build error we were running into in build-helper.
1 parent df40046 commit 2480ebe

File tree

7 files changed

+291
-50
lines changed

7 files changed

+291
-50
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ make/
1717
artifacts/
1818
mikework/
1919
.env
20+
out
2021

2122
# Yarn Modern
2223
.pnp.*

electron.vite.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,21 @@ export default defineConfig({
130130
input: {
131131
index: "index.html",
132132
},
133+
output: {
134+
manualChunks(id) {
135+
const p = id.replace(/\\/g, "/");
136+
if (p.includes("node_modules/monaco") || p.includes("node_modules/@monaco")) return "monaco";
137+
if (p.includes("node_modules/mermaid") || p.includes("node_modules/@mermaid"))
138+
return "mermaid";
139+
if (p.includes("node_modules/katex") || p.includes("node_modules/@katex")) return "katex";
140+
if (p.includes("node_modules/shiki") || p.includes("node_modules/@shiki")) {
141+
return "shiki";
142+
}
143+
if (p.includes("node_modules/cytoscape") || p.includes("node_modules/@cytoscape"))
144+
return "cytoscape";
145+
return undefined;
146+
},
147+
},
133148
},
134149
},
135150
optimizeDeps: {

0 commit comments

Comments
 (0)