Skip to content

Commit 5778239

Browse files
authored
🤖 feat: update ghostty-web to @next (0.3.0-next.13) (#896)
1 parent 751dadd commit 5778239

File tree

3 files changed

+10
-26
lines changed

3 files changed

+10
-26
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"electron-updater": "^6.6.2",
4040
"electron-window-state": "^5.0.3",
4141
"express": "^5.1.0",
42-
"ghostty-web": "0.2.1",
42+
"ghostty-web": "^0.3.0-next.13.g3dd4aef",
4343
"jsdom": "^27.2.0",
4444
"jsonc-parser": "^3.3.1",
4545
"lru-cache": "^11.2.2",
@@ -2203,7 +2203,7 @@
22032203

22042204
"get-tsconfig": ["get-tsconfig@4.13.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ=="],
22052205

2206-
"ghostty-web": ["ghostty-web@0.2.1", "", {}, "sha512-wrovbPlHcl+nIkp7S7fY7vOTsmBjwMFihZEe2PJe/M6G4/EwuyJnwaWTTzNfuY7RcM/lVlN+PvGWqJIhKSB5hw=="],
2206+
"ghostty-web": ["ghostty-web@0.3.0-next.13.g3dd4aef", "", {}, "sha512-TeomyiuaVwv7lzHXhB/L0tvg/6XX4/ByyaCCRUvqTXfpoacgtcd0yWXV8EkXoFqoeguN3K+WR5QSn+XDNypcEg=="],
22072207

22082208
"glob": ["glob@10.5.0", "", { "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" } }, "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg=="],
22092209

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"electron-updater": "^6.6.2",
8080
"electron-window-state": "^5.0.3",
8181
"express": "^5.1.0",
82-
"ghostty-web": "0.2.1",
82+
"ghostty-web": "^0.3.0-next.13.g3dd4aef",
8383
"jsdom": "^27.2.0",
8484
"jsonc-parser": "^3.3.1",
8585
"lru-cache": "^11.2.2",

src/browser/components/TerminalView.tsx

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useRef, useEffect, useState } from "react";
2-
import { Terminal, FitAddon } from "ghostty-web";
2+
import { init, Terminal, FitAddon } from "ghostty-web";
33
import { useTerminalSession } from "@/browser/hooks/useTerminalSession";
44
import { useAPI } from "@/browser/contexts/API";
55

@@ -78,39 +78,23 @@ export function TerminalView({ workspaceId, sessionId, visible }: TerminalViewPr
7878

7979
const initTerminal = async () => {
8080
try {
81+
// Initialize ghostty-web WASM module (idempotent, safe to call multiple times)
82+
await init();
83+
8184
terminal = new Terminal({
82-
fontSize: 13,
83-
fontFamily: "Monaco, Menlo, 'Courier New', monospace",
85+
fontSize: 14,
86+
fontFamily: "JetBrains Mono, Menlo, Monaco, monospace",
8487
cursorBlink: true,
8588
theme: {
8689
background: "#1e1e1e",
8790
foreground: "#d4d4d4",
88-
cursor: "#d4d4d4",
89-
cursorAccent: "#1e1e1e",
90-
selectionBackground: "#264f78",
91-
black: "#000000",
92-
red: "#cd3131",
93-
green: "#0dbc79",
94-
yellow: "#e5e510",
95-
blue: "#2472c8",
96-
magenta: "#bc3fbc",
97-
cyan: "#11a8cd",
98-
white: "#e5e5e5",
99-
brightBlack: "#666666",
100-
brightRed: "#f14c4c",
101-
brightGreen: "#23d18b",
102-
brightYellow: "#f5f543",
103-
brightBlue: "#3b8eea",
104-
brightMagenta: "#d670d6",
105-
brightCyan: "#29b8db",
106-
brightWhite: "#ffffff",
10791
},
10892
});
10993

11094
const fitAddon = new FitAddon();
11195
terminal.loadAddon(fitAddon);
11296

113-
await terminal.open(containerRef.current!);
97+
terminal.open(containerRef.current!);
11498
fitAddon.fit();
11599

116100
const { cols, rows } = terminal;

0 commit comments

Comments
 (0)