tabminal 2.0.14 → 2.0.15
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/ACP_PLANING.md +184 -0
- package/README.md +238 -105
- package/package.json +3 -1
- package/public/app.js +8481 -553
- package/public/index.html +150 -2
- package/public/styles.css +1977 -84
- package/shell/tabminal-hooks.bash +10 -0
- package/src/acp-manager.mjs +3469 -0
- package/src/acp-test-agent.mjs +691 -0
- package/src/persistence.mjs +153 -0
- package/src/server.mjs +298 -10
- package/src/terminal-manager.mjs +140 -64
- package/src/terminal-session.mjs +131 -8
package/public/index.html
CHANGED
|
@@ -13,6 +13,18 @@
|
|
|
13
13
|
<link rel="manifest" href="./manifest.json">
|
|
14
14
|
<link rel="preconnect" href="https://cdn.jsdelivr.net">
|
|
15
15
|
<script>
|
|
16
|
+
const COMPACT_WORKSPACE_MAX_WIDTH = 767;
|
|
17
|
+
const COMPACT_WORKSPACE_MAX_SHORT_HEIGHT = 500;
|
|
18
|
+
const COMPACT_WORKSPACE_MAX_LANDSCAPE_WIDTH = 950;
|
|
19
|
+
|
|
20
|
+
function shouldUseCompactWorkspaceMode(width, height) {
|
|
21
|
+
return width <= COMPACT_WORKSPACE_MAX_WIDTH
|
|
22
|
+
|| (
|
|
23
|
+
width <= COMPACT_WORKSPACE_MAX_LANDSCAPE_WIDTH
|
|
24
|
+
&& height <= COMPACT_WORKSPACE_MAX_SHORT_HEIGHT
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
16
28
|
// Mobile Layout Manager
|
|
17
29
|
function updateLayout() {
|
|
18
30
|
const vv = window.visualViewport;
|
|
@@ -34,9 +46,21 @@
|
|
|
34
46
|
document.documentElement.style.setProperty('--app-top', `${offsetTop}px`);
|
|
35
47
|
document.documentElement.style.setProperty('--app-left', `${offsetLeft}px`);
|
|
36
48
|
|
|
49
|
+
const compactWorkspaceMode = shouldUseCompactWorkspaceMode(
|
|
50
|
+
width,
|
|
51
|
+
height
|
|
52
|
+
);
|
|
53
|
+
const previousCompactWorkspaceMode =
|
|
54
|
+
window.__tabminalCompactWorkspaceMode;
|
|
55
|
+
window.__tabminalCompactWorkspaceMode = compactWorkspaceMode;
|
|
56
|
+
|
|
37
57
|
if (document.body) {
|
|
38
58
|
window.scrollTo(0, 0);
|
|
39
59
|
document.body.scrollTop = 0;
|
|
60
|
+
document.body.classList.toggle(
|
|
61
|
+
'compact-workspace-mode',
|
|
62
|
+
compactWorkspaceMode
|
|
63
|
+
);
|
|
40
64
|
}
|
|
41
65
|
document.documentElement.scrollTop = 0;
|
|
42
66
|
|
|
@@ -44,12 +68,30 @@
|
|
|
44
68
|
const editorPane = document.getElementById('editor-pane');
|
|
45
69
|
const terminalWrapper = document.getElementById('terminal-wrapper');
|
|
46
70
|
if (editorPane && terminalWrapper) {
|
|
47
|
-
|
|
71
|
+
const workspaceTerminalActive = terminalWrapper.classList.contains(
|
|
72
|
+
'workspace-tab-active'
|
|
73
|
+
);
|
|
74
|
+
if (
|
|
75
|
+
editorPane.style.display !== 'none'
|
|
76
|
+
&& !compactWorkspaceMode
|
|
77
|
+
&& !workspaceTerminalActive
|
|
78
|
+
) {
|
|
48
79
|
terminalWrapper.classList.remove('maximized');
|
|
49
80
|
} else {
|
|
50
81
|
terminalWrapper.classList.add('maximized');
|
|
51
82
|
}
|
|
52
83
|
}
|
|
84
|
+
|
|
85
|
+
if (
|
|
86
|
+
previousCompactWorkspaceMode !== undefined
|
|
87
|
+
&& previousCompactWorkspaceMode !== compactWorkspaceMode
|
|
88
|
+
) {
|
|
89
|
+
window.dispatchEvent(
|
|
90
|
+
new CustomEvent('tabminal:layout-modechange', {
|
|
91
|
+
detail: { compactWorkspaceMode }
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
}
|
|
53
95
|
}
|
|
54
96
|
|
|
55
97
|
if (window.visualViewport) {
|
|
@@ -86,6 +128,8 @@
|
|
|
86
128
|
target.classList.contains('file-tree') ||
|
|
87
129
|
target.classList.contains('tab-file-tree') ||
|
|
88
130
|
target.classList.contains('editor-content') ||
|
|
131
|
+
target.classList.contains('agent-panel-transcript') ||
|
|
132
|
+
target.classList.contains('agent-panel-input') ||
|
|
89
133
|
target.classList.contains('xterm-viewport') ||
|
|
90
134
|
target.classList.contains('image-preview-container') ||
|
|
91
135
|
target.classList.contains('system-status-bar') ||
|
|
@@ -255,6 +299,106 @@
|
|
|
255
299
|
<p id="add-server-error" class="error-message"></p>
|
|
256
300
|
</div>
|
|
257
301
|
</div>
|
|
302
|
+
<div id="agent-setup-modal" class="modal" style="display: none;">
|
|
303
|
+
<div class="modal-content agent-setup-content">
|
|
304
|
+
<h2 id="agent-setup-title">Agent setup</h2>
|
|
305
|
+
<p id="agent-setup-description"></p>
|
|
306
|
+
<form id="agent-setup-form" class="agent-setup-form">
|
|
307
|
+
<div id="agent-setup-gemini" class="agent-setup-section" hidden>
|
|
308
|
+
<label for="agent-setup-gemini-key">GEMINI_API_KEY</label>
|
|
309
|
+
<input
|
|
310
|
+
id="agent-setup-gemini-key"
|
|
311
|
+
type="password"
|
|
312
|
+
autocomplete="off"
|
|
313
|
+
spellcheck="false"
|
|
314
|
+
>
|
|
315
|
+
<label for="agent-setup-google-key">GOOGLE_API_KEY</label>
|
|
316
|
+
<input
|
|
317
|
+
id="agent-setup-google-key"
|
|
318
|
+
type="password"
|
|
319
|
+
autocomplete="off"
|
|
320
|
+
spellcheck="false"
|
|
321
|
+
>
|
|
322
|
+
<p id="agent-setup-gemini-note" class="agent-setup-note"></p>
|
|
323
|
+
</div>
|
|
324
|
+
<div id="agent-setup-claude" class="agent-setup-section" hidden>
|
|
325
|
+
<label for="agent-setup-claude-key">ANTHROPIC_API_KEY</label>
|
|
326
|
+
<input
|
|
327
|
+
id="agent-setup-claude-key"
|
|
328
|
+
type="password"
|
|
329
|
+
autocomplete="off"
|
|
330
|
+
spellcheck="false"
|
|
331
|
+
>
|
|
332
|
+
<label class="agent-setup-checkbox">
|
|
333
|
+
<input
|
|
334
|
+
id="agent-setup-claude-use-vertex"
|
|
335
|
+
type="checkbox"
|
|
336
|
+
>
|
|
337
|
+
<span>Use Vertex auth</span>
|
|
338
|
+
</label>
|
|
339
|
+
<label for="agent-setup-claude-project">
|
|
340
|
+
ANTHROPIC_VERTEX_PROJECT_ID
|
|
341
|
+
</label>
|
|
342
|
+
<input
|
|
343
|
+
id="agent-setup-claude-project"
|
|
344
|
+
type="text"
|
|
345
|
+
autocomplete="off"
|
|
346
|
+
spellcheck="false"
|
|
347
|
+
>
|
|
348
|
+
<label for="agent-setup-claude-region">
|
|
349
|
+
CLOUD_ML_REGION
|
|
350
|
+
</label>
|
|
351
|
+
<input
|
|
352
|
+
id="agent-setup-claude-region"
|
|
353
|
+
type="text"
|
|
354
|
+
autocomplete="off"
|
|
355
|
+
spellcheck="false"
|
|
356
|
+
placeholder="global"
|
|
357
|
+
>
|
|
358
|
+
<label for="agent-setup-claude-credentials">
|
|
359
|
+
Google credentials file
|
|
360
|
+
</label>
|
|
361
|
+
<input
|
|
362
|
+
id="agent-setup-claude-credentials"
|
|
363
|
+
type="text"
|
|
364
|
+
autocomplete="off"
|
|
365
|
+
spellcheck="false"
|
|
366
|
+
>
|
|
367
|
+
<p id="agent-setup-claude-note" class="agent-setup-note"></p>
|
|
368
|
+
</div>
|
|
369
|
+
<div id="agent-setup-copilot" class="agent-setup-section" hidden>
|
|
370
|
+
<label for="agent-setup-copilot-token">
|
|
371
|
+
COPILOT_GITHUB_TOKEN
|
|
372
|
+
</label>
|
|
373
|
+
<input
|
|
374
|
+
id="agent-setup-copilot-token"
|
|
375
|
+
type="password"
|
|
376
|
+
autocomplete="off"
|
|
377
|
+
spellcheck="false"
|
|
378
|
+
>
|
|
379
|
+
<p id="agent-setup-copilot-note" class="agent-setup-note"></p>
|
|
380
|
+
</div>
|
|
381
|
+
<p id="agent-setup-feedback" class="agent-setup-feedback" hidden></p>
|
|
382
|
+
<div class="agent-setup-actions">
|
|
383
|
+
<button
|
|
384
|
+
id="agent-setup-reset"
|
|
385
|
+
type="button"
|
|
386
|
+
class="secondary-button"
|
|
387
|
+
>
|
|
388
|
+
Reset saved setup
|
|
389
|
+
</button>
|
|
390
|
+
<button
|
|
391
|
+
id="agent-setup-cancel"
|
|
392
|
+
type="button"
|
|
393
|
+
class="secondary-button"
|
|
394
|
+
>
|
|
395
|
+
Close
|
|
396
|
+
</button>
|
|
397
|
+
<button id="agent-setup-save" type="submit">Save</button>
|
|
398
|
+
</div>
|
|
399
|
+
</form>
|
|
400
|
+
</div>
|
|
401
|
+
</div>
|
|
258
402
|
<div id="shortcuts-modal" class="modal" style="display: none;">
|
|
259
403
|
<div class="modal-content shortcuts-content">
|
|
260
404
|
<h2>Keyboard Shortcuts</h2>
|
|
@@ -271,6 +415,10 @@
|
|
|
271
415
|
<div><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>E</kbd></div>
|
|
272
416
|
<span>Toggle Editor</span>
|
|
273
417
|
</li>
|
|
418
|
+
<li>
|
|
419
|
+
<div><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>A</kbd></div>
|
|
420
|
+
<span>Open Agent Menu</span>
|
|
421
|
+
</li>
|
|
274
422
|
<li>
|
|
275
423
|
<div><kbd>Ctrl</kbd> + <kbd>↑</kbd> / <kbd>↓</kbd></div>
|
|
276
424
|
<span>Focus Editor / Terminal</span>
|
|
@@ -281,7 +429,7 @@
|
|
|
281
429
|
</li>
|
|
282
430
|
<li>
|
|
283
431
|
<div><kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>[</kbd> / <kbd>]</kbd></div>
|
|
284
|
-
<span>Switch File</span>
|
|
432
|
+
<span>Switch File / Agent</span>
|
|
285
433
|
</li>
|
|
286
434
|
<li>
|
|
287
435
|
<div><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>?</kbd></div>
|