Skip to content

Commit 5dd48bc

Browse files
committed
v0.2.0: Theme system, OAuth onboarding, native streaming agent
- Replace all hardcoded hex colors with CSS custom properties for full dark/light theme support - Add OAuth/subscription sign-in to onboarding (Anthropic PKCE, OpenAI device code flow) - Rewrite agent.ts with native Anthropic tool_use and OpenAI function calling APIs - Real streaming (chunk-by-chunk) for both providers, max_tokens=16384, 25 tool steps - Remove portable exe target, NSIS installer only - Bump version to 0.2.0
1 parent 3603c53 commit 5dd48bc

6 files changed

Lines changed: 628 additions & 361 deletions

File tree

package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sncode",
3-
"version": "0.1.0",
3+
"version": "0.2.0",
44
"private": true,
55
"author": {
66
"name": "Snowy7",
@@ -84,12 +84,6 @@
8484
"arch": [
8585
"x64"
8686
]
87-
},
88-
{
89-
"target": "portable",
90-
"arch": [
91-
"x64"
92-
]
9387
}
9488
],
9589
"artifactName": "${productName}-${version}-win-${arch}.${ext}"

src/main/main.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ function createWindow() {
5555
});
5656

5757
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
58+
// Allow DevTools windows to open
59+
if (url === "about:blank" || url.startsWith("devtools://")) {
60+
return { action: "allow" };
61+
}
5862
void shell.openExternal(url);
5963
return { action: "deny" };
6064
});
@@ -65,11 +69,16 @@ function createWindow() {
6569

6670
// DevTools shortcuts: F12, Ctrl+Shift+I, Cmd+Option+I
6771
mainWindow.webContents.on("before-input-event", (_event, input) => {
68-
if (input.key === "F12" && input.type === "keyDown") {
69-
mainWindow?.webContents.toggleDevTools();
70-
}
71-
if (input.key === "I" && input.type === "keyDown" && input.shift && (input.control || input.meta)) {
72-
mainWindow?.webContents.toggleDevTools();
72+
if (input.type !== "keyDown") return;
73+
const wantsDevTools =
74+
input.key === "F12" ||
75+
(input.key === "I" && input.shift && (input.control || input.meta));
76+
if (wantsDevTools) {
77+
if (mainWindow?.webContents.isDevToolsOpened()) {
78+
mainWindow.webContents.closeDevTools();
79+
} else {
80+
mainWindow?.webContents.openDevTools({ mode: "detach" });
81+
}
7382
}
7483
});
7584

@@ -250,7 +259,7 @@ function registerIpc() {
250259
});
251260

252261
ipcMain.handle("app:open-devtools", () => {
253-
mainWindow?.webContents.openDevTools();
262+
mainWindow?.webContents.openDevTools({ mode: "detach" });
254263
});
255264

256265
ipcMain.handle("git:branches", async (_event, projectPath: unknown) => {

0 commit comments

Comments
 (0)