ai-or-die 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/specs/client-app.md
CHANGED
|
@@ -11,6 +11,7 @@ The frontend is a single-page application served from `src/public/`. It runs ent
|
|
|
11
11
|
| xterm.js | 5.3.0 | unpkg CDN | Terminal emulator component |
|
|
12
12
|
| xterm-addon-fit | 0.8.0 | unpkg CDN | Auto-fit terminal to container |
|
|
13
13
|
| xterm-addon-web-links | 0.9.0 | unpkg CDN | Clickable URLs in terminal output |
|
|
14
|
+
| xterm-addon-unicode11 | 0.6.0 | unpkg CDN | Unicode 11 character width support for Nerd Font / powerline glyphs |
|
|
14
15
|
| JetBrains Mono | -- | Google Fonts | Monospace font for terminal (fallback) |
|
|
15
16
|
| MesloLGS Nerd Font | -- | jsDelivr CDN | Primary terminal font with Nerd Font glyphs |
|
|
16
17
|
| Inter | -- | Google Fonts | UI font for headers, tabs, controls |
|
|
@@ -91,13 +92,14 @@ The main application controller. Instantiated once on page load.
|
|
|
91
92
|
|
|
92
93
|
1. Call `window.authManager.initialize()`. If it returns `false`, the login prompt is displayed and initialization halts.
|
|
93
94
|
2. Fetch `/api/config` to get folder mode, aliases, and base folder.
|
|
94
|
-
3. Set up the terminal (xterm.js with fit
|
|
95
|
-
4.
|
|
96
|
-
5.
|
|
97
|
-
6.
|
|
98
|
-
7. Initialize `
|
|
99
|
-
8.
|
|
100
|
-
9.
|
|
95
|
+
3. Set up the terminal (xterm.js with fit, web links, and unicode11 addons).
|
|
96
|
+
4. Apply saved settings (font, theme, cursor) immediately via `applySettings(loadSettings())`.
|
|
97
|
+
5. Establish WebSocket connection.
|
|
98
|
+
6. Set up UI event handlers (folder browser, session controls, resize observer).
|
|
99
|
+
7. Initialize `SessionTabManager`.
|
|
100
|
+
8. Initialize `PlanDetector`.
|
|
101
|
+
9. Load existing sessions from the server.
|
|
102
|
+
10. Start usage polling interval.
|
|
101
103
|
|
|
102
104
|
### WebSocket Management
|
|
103
105
|
|
|
@@ -117,7 +119,7 @@ The main application controller. Instantiated once on page load.
|
|
|
117
119
|
cursor: '#f0f6fc',
|
|
118
120
|
// Full 16-color ANSI palette configured
|
|
119
121
|
},
|
|
120
|
-
fontFamily: "
|
|
122
|
+
fontFamily: "reads from CSS --font-mono token; defaults to 'MesloLGS Nerd Font', 'JetBrains Mono', monospace",
|
|
121
123
|
fontSize: 14, // 13 on mobile
|
|
122
124
|
lineHeight: 1.2,
|
|
123
125
|
scrollback: 10000,
|
package/e2e/playwright.config.js
CHANGED
package/package.json
CHANGED
package/src/public/app.js
CHANGED
|
@@ -75,7 +75,7 @@ class ClaudeCodeWebInterface {
|
|
|
75
75
|
this.setupTerminal();
|
|
76
76
|
this.setupUI();
|
|
77
77
|
this.setupPlanDetector();
|
|
78
|
-
this.loadSettings();
|
|
78
|
+
this.applySettings(this.loadSettings());
|
|
79
79
|
this.applyAliasesToUI();
|
|
80
80
|
this.disablePullToRefresh();
|
|
81
81
|
|
|
@@ -307,7 +307,8 @@ class ClaudeCodeWebInterface {
|
|
|
307
307
|
|
|
308
308
|
this.terminal = new Terminal({
|
|
309
309
|
fontSize: fontSize,
|
|
310
|
-
fontFamily: '
|
|
310
|
+
fontFamily: getComputedStyle(document.documentElement).getPropertyValue('--font-mono').trim()
|
|
311
|
+
|| "'MesloLGS Nerd Font', 'Meslo Nerd Font', 'JetBrains Mono', monospace",
|
|
311
312
|
theme: {
|
|
312
313
|
background: 'transparent',
|
|
313
314
|
foreground: '#f0f6fc',
|
|
@@ -353,9 +354,27 @@ class ClaudeCodeWebInterface {
|
|
|
353
354
|
this.terminal.loadAddon(this.searchAddon);
|
|
354
355
|
}
|
|
355
356
|
|
|
357
|
+
// Load Unicode11 addon for correct Nerd Font / powerline glyph widths
|
|
358
|
+
if (typeof Unicode11Addon !== 'undefined') {
|
|
359
|
+
this.unicode11Addon = new Unicode11Addon.Unicode11Addon();
|
|
360
|
+
this.terminal.loadAddon(this.unicode11Addon);
|
|
361
|
+
this.terminal.unicode.activeVersion = '11';
|
|
362
|
+
}
|
|
363
|
+
|
|
356
364
|
this.terminal.open(document.getElementById('terminal'));
|
|
357
365
|
this.fitTerminal();
|
|
358
366
|
|
|
367
|
+
// Re-render terminal when Nerd Font finishes loading (lazy-loaded via media="print")
|
|
368
|
+
if (document.fonts && document.fonts.load) {
|
|
369
|
+
document.fonts.load('14px MesloLGS Nerd Font').then(() => {
|
|
370
|
+
this.terminal.refresh(0, this.terminal.rows - 1);
|
|
371
|
+
this.fitTerminal();
|
|
372
|
+
}).catch(() => {
|
|
373
|
+
// Font not available — still refresh in case fallback font loaded late
|
|
374
|
+
this.terminal.refresh(0, this.terminal.rows - 1);
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
|
|
359
378
|
// Attach keyboard copy/paste shortcuts (Ctrl+C/V, Ctrl+Shift+C/V)
|
|
360
379
|
attachClipboardHandler(this.terminal, (data) => {
|
|
361
380
|
if (this.socket && this.socket.readyState === WebSocket.OPEN) {
|
package/src/public/index.html
CHANGED
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
<script src="https://unpkg.com/xterm-addon-fit@0.8.0/lib/xterm-addon-fit.js"></script>
|
|
60
60
|
<script src="https://unpkg.com/xterm-addon-web-links@0.9.0/lib/xterm-addon-web-links.js"></script>
|
|
61
61
|
<script src="https://unpkg.com/xterm-addon-search@0.13.0/lib/xterm-addon-search.js"></script>
|
|
62
|
+
<script src="https://unpkg.com/xterm-addon-unicode11@0.6.0/lib/xterm-addon-unicode11.js"></script>
|
|
62
63
|
<link rel="stylesheet" href="https://unpkg.com/xterm@5.3.0/css/xterm.css" />
|
|
63
64
|
</head>
|
|
64
65
|
<body>
|
|
@@ -163,12 +164,12 @@
|
|
|
163
164
|
<span>Paste as Plain Text</span>
|
|
164
165
|
</div>
|
|
165
166
|
<div class="ctx-item" data-action="pasteImage" role="menuitem" tabindex="-1">
|
|
166
|
-
<span class="ctx-icon"></span>
|
|
167
|
+
<span class="ctx-icon"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="M21 15l-5-5L5 21"/></svg></span>
|
|
167
168
|
<span>Paste Image</span>
|
|
168
169
|
</div>
|
|
169
170
|
<div class="ctx-sep" role="separator"></div>
|
|
170
171
|
<div class="ctx-item" data-action="attachImage" role="menuitem" tabindex="-1">
|
|
171
|
-
<span class="ctx-icon"></span>
|
|
172
|
+
<span class="ctx-icon"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg></span>
|
|
172
173
|
<span>Attach Image...</span>
|
|
173
174
|
</div>
|
|
174
175
|
<div class="ctx-sep" role="separator"></div>
|
package/src/public/splits.js
CHANGED
|
@@ -50,6 +50,14 @@ class Split {
|
|
|
50
50
|
|
|
51
51
|
this.terminal.loadAddon(this.fitAddon);
|
|
52
52
|
this.terminal.loadAddon(this.webLinksAddon);
|
|
53
|
+
|
|
54
|
+
// Load Unicode11 addon for correct Nerd Font / powerline glyph widths
|
|
55
|
+
if (typeof Unicode11Addon !== 'undefined') {
|
|
56
|
+
const unicode11 = new Unicode11Addon.Unicode11Addon();
|
|
57
|
+
this.terminal.loadAddon(unicode11);
|
|
58
|
+
this.terminal.unicode.activeVersion = '11';
|
|
59
|
+
}
|
|
60
|
+
|
|
53
61
|
this.terminal.open(terminalDiv);
|
|
54
62
|
|
|
55
63
|
// Attach keyboard copy/paste shortcuts (Ctrl+C/V, Ctrl+Shift+C/V)
|