ai-battery 0.2.0 → 0.2.1
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/README.md +30 -14
- package/bin/ai-battery-macos-status.applescript +5 -12
- package/bin/ai-battery-run +701 -31
- package/bin/ai-battery-tmux.js +17 -0
- package/bin/terminal-compositor.js +111 -0
- package/docs/REFERENCE.md +23 -3
- package/docs/RELEASING.md +24 -7
- package/docs/WINDOWS-TERMINAL-SHARED-BAR.md +74 -0
- package/docs/hud-preview.svg +43 -20
- package/docs/terminal-vertical-preview.svg +73 -0
- package/lib/cli.js +945 -219
- package/lib/core/atomic-rename.js +18 -0
- package/lib/core/cli-help.js +35 -7
- package/lib/core/cli-messages.js +45 -1
- package/lib/core/cli-output.js +277 -72
- package/lib/core/cli-wrappers.js +410 -0
- package/lib/core/config-editor.js +177 -29
- package/lib/core/display-config.js +45 -0
- package/lib/core/integration-files.js +32 -3
- package/lib/core/shared-bar.js +603 -0
- package/lib/core/statusline-git.js +179 -15
- package/lib/core/terminal.js +25 -7
- package/lib/core/tmux-status.js +172 -0
- package/lib/core/uninstall.js +20 -7
- package/lib/core/usage-store.js +85 -0
- package/lib/hud/launcher.js +29 -31
- package/lib/platforms/linux/hud.js +1 -1
- package/lib/platforms/linux/panel.js +1 -1
- package/lib/platforms/macos/hud.js +5 -5
- package/lib/platforms/process-scanner.js +77 -29
- package/lib/platforms/windows/autostart-cleanup.js +1 -1
- package/lib/platforms/windows/codex-runner.js +178 -21
- package/lib/platforms/windows/hud/controls.ps1 +44 -10
- package/lib/platforms/windows/hud/main.ps1 +350 -43
- package/lib/platforms/windows/hud/rendering.ps1 +1227 -1
- package/lib/platforms/windows/hud/snapshot.ps1 +26 -46
- package/lib/platforms/windows/hud-launcher.js +153 -79
- package/lib/platforms/windows/shared-bar-platform.js +972 -0
- package/lib/platforms/windows/terminal-compositor.js +210 -25
- package/lib/platforms/windows/wt-bar.js +729 -0
- package/lib/platforms/windows/wt-fragment.js +665 -0
- package/lib/platforms/windows/wt-keybinding.js +300 -0
- package/lib/providers/antigravity.js +155 -8
- package/package.json +5 -2
- package/vendor/PaneContext.cs +875 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { updateTmuxStatus } from "../lib/core/tmux-status.js";
|
|
4
|
+
import { commandMatchesProvider, renderTmuxUsage } from "../lib/cli.js";
|
|
5
|
+
import { readConfiguredBarPosition } from "../lib/platforms/windows/shared-bar-platform.js";
|
|
6
|
+
|
|
7
|
+
const value = name => process.argv[process.argv.indexOf(name) + 1];
|
|
8
|
+
try {
|
|
9
|
+
updateTmuxStatus({ action: process.argv[2], socket: value("--socket"), token: value("--token"),
|
|
10
|
+
config: process.argv.includes("--config") ? value("--config") : "",
|
|
11
|
+
position: readConfiguredBarPosition(process.env),
|
|
12
|
+
script: fileURLToPath(import.meta.url), matches: commandMatchesProvider, renderUsage: renderTmuxUsage });
|
|
13
|
+
} catch (error) {
|
|
14
|
+
// A timer can fire while the last session or the server is closing. Never
|
|
15
|
+
// send status job errors into the user's pane or start another server.
|
|
16
|
+
if (process.argv[2] === "start") { console.error("ai-battery tmux: " + error.message); process.exitCode = 1; }
|
|
17
|
+
}
|
|
@@ -1 +1,112 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { HeadlessTerminalCompositor } from "../lib/platforms/windows/terminal-compositor.js";
|
|
5
|
+
import { readConfiguredBarPosition } from "../lib/platforms/windows/shared-bar-platform.js";
|
|
6
|
+
|
|
1
7
|
export * from "../lib/platforms/windows/terminal-compositor.js";
|
|
8
|
+
|
|
9
|
+
function parseStdioArgs(argv) {
|
|
10
|
+
const opts = { position: "bottom", sidebarWidth: 5, cols: 80, rows: 24, statusVisible: true };
|
|
11
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
12
|
+
const arg = argv[i];
|
|
13
|
+
if (arg === "--position" && argv[i + 1]) opts.position = argv[++i];
|
|
14
|
+
else if (arg === "--sidebar-width" && argv[i + 1]) opts.sidebarWidth = Number(argv[++i]) || 5;
|
|
15
|
+
else if (arg === "--cols" && argv[i + 1]) opts.cols = Number(argv[++i]) || 80;
|
|
16
|
+
else if (arg === "--rows" && argv[i + 1]) opts.rows = Number(argv[++i]) || 24;
|
|
17
|
+
else if (arg === "--hidden") opts.statusVisible = false;
|
|
18
|
+
}
|
|
19
|
+
return opts;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function sendFrame(type, data) {
|
|
23
|
+
const payload = Buffer.isBuffer(data) ? data : Buffer.from(String(data ?? ""), "utf8");
|
|
24
|
+
const header = Buffer.allocUnsafe(5);
|
|
25
|
+
header[0] = type;
|
|
26
|
+
header.writeUInt32BE(payload.length, 1);
|
|
27
|
+
return process.stdout.write(Buffer.concat([header, payload]));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function runStdioCompositor(argv) {
|
|
31
|
+
const opts = parseStdioArgs(argv);
|
|
32
|
+
const compositor = new HeadlessTerminalCompositor({
|
|
33
|
+
columns: opts.cols,
|
|
34
|
+
rows: opts.rows,
|
|
35
|
+
statusVisible: opts.statusVisible,
|
|
36
|
+
statusPosition: opts.position,
|
|
37
|
+
sidebarWidth: opts.sidebarWidth,
|
|
38
|
+
windowsMode: false,
|
|
39
|
+
writeHost: (data) => sendFrame(1, data),
|
|
40
|
+
onReply: (data) => sendFrame(2, data),
|
|
41
|
+
onTitle: (title) => {
|
|
42
|
+
const safeTitle = String(title || "").replace(/[\x00-\x1f\x7f]/g, " ");
|
|
43
|
+
if (safeTitle) sendFrame(1, `\x1b]0;${safeTitle}\x07`);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
compositor.start();
|
|
47
|
+
|
|
48
|
+
let buffer = Buffer.alloc(0);
|
|
49
|
+
let closed = false;
|
|
50
|
+
const shutdown = async () => {
|
|
51
|
+
if (closed) return;
|
|
52
|
+
closed = true;
|
|
53
|
+
try { await compositor.dispose(); } catch {}
|
|
54
|
+
process.stdout.end(() => process.exit(0));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
process.stdin.on("data", (chunk) => {
|
|
58
|
+
buffer = buffer.length ? Buffer.concat([buffer, chunk]) : chunk;
|
|
59
|
+
while (buffer.length >= 5) {
|
|
60
|
+
const type = buffer[0];
|
|
61
|
+
const len = buffer.readUInt32BE(1);
|
|
62
|
+
if (buffer.length < 5 + len) break;
|
|
63
|
+
const payload = buffer.subarray(5, 5 + len);
|
|
64
|
+
buffer = buffer.subarray(5 + len);
|
|
65
|
+
if (type === 1) {
|
|
66
|
+
compositor.write(payload);
|
|
67
|
+
} else if (type === 2) {
|
|
68
|
+
compositor.setStatusText(payload.toString("utf8"));
|
|
69
|
+
} else if (type === 3 && payload.length >= 4) {
|
|
70
|
+
const cols = payload.readUInt16BE(0);
|
|
71
|
+
const rows = payload.readUInt16BE(2);
|
|
72
|
+
compositor.resize(cols, rows).catch(() => {});
|
|
73
|
+
} else if (type === 4 && payload.length >= 1) {
|
|
74
|
+
compositor.setStatusVisible(payload[0] !== 0).catch(() => {});
|
|
75
|
+
} else if (type === 5) {
|
|
76
|
+
compositor.input(payload);
|
|
77
|
+
} else if (type === 7 && payload.length >= 4) {
|
|
78
|
+
const offset = payload.readUInt16BE(0);
|
|
79
|
+
const total = payload.readUInt16BE(2);
|
|
80
|
+
compositor.setStatusSlice(total > 0 ? { offset, total } : null).catch(() => {});
|
|
81
|
+
} else if (type === 6) {
|
|
82
|
+
void shutdown();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
process.stdin.on("end", () => { void shutdown(); });
|
|
89
|
+
process.stdin.on("error", () => { void shutdown(); });
|
|
90
|
+
process.stdout.on("error", () => { void shutdown(); });
|
|
91
|
+
process.on("SIGTERM", () => { void shutdown(); });
|
|
92
|
+
process.on("SIGINT", () => { void shutdown(); });
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function sameScriptPath(left, right) {
|
|
96
|
+
let a;
|
|
97
|
+
let b;
|
|
98
|
+
try { a = fs.realpathSync(left); } catch { a = path.resolve(left); }
|
|
99
|
+
try { b = fs.realpathSync(right); } catch { b = path.resolve(right); }
|
|
100
|
+
return process.platform === "win32" ? a.toLowerCase() === b.toLowerCase() : a === b;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (
|
|
104
|
+
process.argv[1]
|
|
105
|
+
&& sameScriptPath(process.argv[1], fileURLToPath(import.meta.url))
|
|
106
|
+
) {
|
|
107
|
+
if (process.argv.includes("--bar-position")) {
|
|
108
|
+
process.stdout.write(`${readConfiguredBarPosition()}\n`);
|
|
109
|
+
} else if (process.argv.includes("--stdio")) {
|
|
110
|
+
runStdioCompositor(process.argv.slice(2));
|
|
111
|
+
}
|
|
112
|
+
}
|
package/docs/REFERENCE.md
CHANGED
|
@@ -20,7 +20,7 @@ status_line_use_colors = false
|
|
|
20
20
|
|
|
21
21
|
Claude 설정은 `~/.claude/settings.json`, agy 설정은 `~/.gemini/antigravity-cli/settings.json`의 `statusLine`에 저장합니다. 다른 도구의 명령을 교체하려면 `ai-battery setup claude --force` 또는 `ai-battery setup gemini --force`를 사용하세요. 기존 설정은 복구 기록에 먼저 저장합니다.
|
|
22
22
|
|
|
23
|
-
`--usage-row`는 배터리 행을
|
|
23
|
+
`--usage-row`는 배터리 행을 켜고, `--no-usage-row`는 헤더만 남깁니다. 두 옵션 없이 setup을 다시 실행하면 자동 표시 방식으로 돌아갑니다. Windows Terminal 자체의 분할에서는 각 pane에 독립적으로 표시합니다. `AI_BATTERY_TMUX=row`는 tmux에서도 pane별 배터리 행을 유지합니다.
|
|
24
24
|
|
|
25
25
|
## 표시 순서 설정
|
|
26
26
|
|
|
@@ -42,6 +42,14 @@ Claude 설정은 `~/.claude/settings.json`, agy 설정은 `~/.gemini/antigravity
|
|
|
42
42
|
|
|
43
43
|
`ai-battery --watch --show-paths`는 데이터 출처와 관측 시각을 보여줍니다. 계정 이메일과 transcript 내용은 Gemini 캐시에 저장하지 않습니다.
|
|
44
44
|
|
|
45
|
+
Windows·WSL은 Codex와 Gemini의 사용량 전용 스냅샷을 공유합니다. 최신 사용량 이벤트 시각을 비교하고, 오래된 프로세스의 쓰기가 최신 값을 되돌리지 않도록 기록을 직렬화합니다. Gemini의 동일한 quota가 반복 전달될 때는 관측 시각을 갱신하지 않습니다. 대화별 context·작업 폴더는 이 사용량 스냅샷에 포함하지 않습니다. 테스트·휴대용 환경에서는 `AI_BATTERY_SHARED_USAGE_STATE_DIR`로 공유 위치를 지정합니다.
|
|
46
|
+
|
|
47
|
+
HUD는 기본 2초 주기로 갱신하며 `--interval`로 지정한 간격을 따릅니다. agy의 statusline은 CLI 자체가 hook을 실행할 때 갱신됩니다. 새 공식 사용량이 아직 payload나 로그에 전달되지 않은 상태에서 서버의 현재 사용량을 추정하지 않습니다. 리셋 후 미수신 데이터와 오래 지속된 HUD 조회 실패는 이전 퍼센트를 새 값처럼 표시하지 않습니다.
|
|
48
|
+
|
|
49
|
+
tmux 3.2 이상에서는 기존 상태줄 아래에 사용량 행을 추가하고, 해당 세션의 pane 안에서 Codex·Claude·Gemini가 모두 종료되면 원래 높이로 복원합니다. 기존 여러 상태 행도 보존합니다. tmux의 최대 5행을 이미 사용하는 세션에는 행을 추가하지 않고 pane별 표시를 유지합니다. `status-right`, 시계, 상태줄 갱신 주기를 배터리 설정으로 덮어쓰지 않습니다.
|
|
50
|
+
|
|
51
|
+
Claude npm 설치 후 `claude native binary not installed`가 나오면 tmux 밖에서도 `claude --version`을 확인하세요. 설치 스크립트가 실행되지 않은 경우 설치된 패키지의 스크립트를 수동 실행할 수 있습니다: `node "$(npm root -g)/@anthropic-ai/claude-code/install.cjs"`. optional 패키지까지 누락됐다면 같은 Claude 버전을 optional 의존성과 함께 다시 설치해야 합니다.
|
|
52
|
+
|
|
45
53
|
## Windows·WSL
|
|
46
54
|
|
|
47
55
|
Windows Codex는 기본적으로 터미널 화면과 배터리 행을 합성합니다. 대체 레이아웃은 `AI_BATTERY_WIN_LAYOUT=fullscreen`, `hud`, `plain`, `tui` 등으로 선택할 수 있습니다. 의존성이 준비되지 않으면 native HUD로 전환합니다.
|
|
@@ -52,9 +60,11 @@ Windows HUD는 PowerShell/WinForms를 사용합니다. `-Mode floating`, `-Mode
|
|
|
52
60
|
|
|
53
61
|
Gemini(agy)는 [자체 statusline hook](https://antigravity.google/docs/cli/statusline)으로 입력창 아래에 첫 행과 사용량 행을 표시합니다. [Rendering Mode](https://antigravity.google/docs/settings?tab=cli)의 `altScreenMode: "default"`는 대화를 인라인으로, `"always"`는 전체 TUI를 대체 화면에 표시하며 두 모드에서 같은 hook을 사용합니다. setup은 이 설정을 변경하지 않습니다. Gemini에는 터미널 합성 wrapper나 연동 HUD를 추가하지 않습니다.
|
|
54
62
|
|
|
55
|
-
Windows
|
|
63
|
+
Windows Terminal은 기본 pane을 이용한 통합 바를 제공합니다. 설치와 사용법은 아래 **Windows Terminal 통합 바** 항목을 참조하세요. 기본 pane의 최소 높이는 두 셀이며 Windows 네이티브 AI pane의 중복 사용량만 접습니다. WSL의 공통 행은 tmux를 사용합니다.
|
|
64
|
+
|
|
65
|
+
Windows Gemini hook의 경로 오류는 `ai-battery setup gemini`로 다시 등록하면 해결됩니다. 공백·한글이 있는 설치 경로도 지원합니다. agy가 연속 오류로 hook을 비활성화했다면 재시작하거나 `/statusline enable`을 실행하세요.
|
|
56
66
|
|
|
57
|
-
WSL의 터미널 연동은 Python 3를 사용하고 HUD는 `powershell.exe`로 Windows 데스크톱에 표시합니다. Windows와 WSL의 Codex 세션과 `/resume` 저장소는 서로 독립적입니다. 계정 공통 사용량만 공유하므로
|
|
67
|
+
WSL의 터미널 연동은 Python 3를 사용하고 HUD는 `powershell.exe`로 Windows 데스크톱에 표시합니다. Windows와 WSL의 Codex 세션과 `/resume` 저장소는 서로 독립적입니다. 계정 공통 사용량만 공유하므로 `CODEX_HOME`을 변경할 필요가 없습니다.
|
|
58
68
|
|
|
59
69
|
## Linux·macOS
|
|
60
70
|
|
|
@@ -76,3 +86,13 @@ macOS는 시스템 메뉴바에 로고·배터리·퍼센트를 표시하고,
|
|
|
76
86
|
`ai-battery reset`은 관리형 연동을 복원하고 전용 생성 파일을 정리합니다. 사용자가 관리 항목을 수정했다면 파일과 복구 기록을 보존하며 종료 코드 1로 알립니다. 일부 대상만 지정하면 다른 연동과 공통 캐시는 유지합니다.
|
|
77
87
|
|
|
78
88
|
설치·연동 상태는 `ai-battery doctor`, 전체 경로와 복구 기록은 `ai-battery doctor --json`에서 확인하세요. 삭제 후 현재 Bash가 이전 wrapper 경로를 기억한다면 `hash -r`을 실행합니다. zsh에서는 `rehash`, 또는 새 터미널을 사용합니다.
|
|
89
|
+
|
|
90
|
+
## Windows Terminal 통합 바
|
|
91
|
+
|
|
92
|
+
`ai-battery setup` 후 같은 Windows Terminal 탭의 두 pane 이상에서 Codex·Claude·Gemini를 실행하면 통합 바가 자동으로 붙습니다. 한 pane만 AI를 실행하면 개별 두 행을 유지합니다. 각 네이티브 AI pane에는 첫 행이 남고 전체 너비 하단에 사용량을 함께 표시합니다. WSL pane의 행 통합은 tmux를 사용합니다.
|
|
93
|
+
|
|
94
|
+
분할을 닫아 작업 pane이 하나만 남거나, shell pane을 유지한 채 AI를 종료해 실행 중인 AI가 하나 이하로 줄면 바가 자동 종료됩니다. 남은 CLI는 다음 갱신에 개별 표시로 복귀합니다. CLI가 유휴 상태여도 실행 중이면 유지합니다. 바에서 q/Ctrl+C로 직접 닫은 경우 같은 AI 세션 구성에서는 자동으로 다시 띄우지 않습니다.
|
|
95
|
+
|
|
96
|
+
자동 트리거는 사용하지 않는 F24~F21 키 하나를 Terminal 설정에 연결하고, 포그라운드 창·현재 탭·분할 수·수정키 상태를 재확인한 뒤 호출합니다. setup은 JSONC 주석·다른 설정을 보존하고 복구 기록을 저장합니다. reset은 추가한 키만 제거하며 사용자가 편집한 항목은 보존합니다. 모든 후보 키가 사용 중이면 기존 키를 덮어쓰지 않고 자동 설정 미적용을 안내합니다.
|
|
97
|
+
|
|
98
|
+
수동 표시도 가능합니다: Ctrl+Shift+P → **AI Battery: Attach shared status bar**. `ai-battery split on|manual|off|status`로 자동/수동/해제 모드를 제어하며, `AI_BATTERY_WT_AUTO_ATTACH=0`은 자동 생성만 해제하고 `AI_BATTERY_WT_BAR=0`은 pane 통합을 해제합니다. `ai-battery reset split`로 등록을 복원합니다. Terminal 최소 pane 높이에 따라 사용량 한 행 아래에 빈 한 행이 남습니다.
|
package/docs/RELEASING.md
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
# npm release
|
|
2
2
|
|
|
3
|
-
The prepared version is **0.2.
|
|
3
|
+
The prepared version is **0.2.1**, following the published 0.2.0. Preparing or pushing this patch does not publish it to npm.
|
|
4
|
+
|
|
5
|
+
## Fixes in 0.2.1
|
|
6
|
+
|
|
7
|
+
- Support all four status bar positions (`bottom`, `top`, `left`, `right`) across single-pane and split-screen layouts on Windows PowerShell and WSL without external HUD overlays. Use Windows Terminal native root-split shared bars (`AiBattery.AttachBar`) along the full window edge whenever a split tab has at least one active AI session (`agy`, `codex`, or `claude`), with DPI-aware vertical sizing, axis-aligned vertical rails (`5h`/`7d`), tab-profile theme matching, immediate pre-UIA startup painting, and synchronized pending-attach folding.
|
|
8
|
+
- Automatically close the shared bar when all AI sessions in the tab exit (even if split shell panes remain open) or when the split ends back to a single pane, restoring keyboard focus to the active work pane via UIA. Fix semicolon SGR 58 escape codes that caused dim/blink rendering artifacts in Windows Terminal.
|
|
9
|
+
- Guard Windows `node-pty` ConPTY `inSocket`/`outSocket` against benign `EPIPE`/`ECONNRESET` shutdown errors so exiting Codex/Claude/Gemini never throws an unhandled socket error, and ensure `ai-battery reset` cleans Windows CLI wrapper PATH entries even when Codex wrapping was skipped.
|
|
10
|
+
- Prevent rolling unused 100% quota buckets from overwriting unexpired draining Gemini or Claude 5h quotas across Windows and WSL.
|
|
11
|
+
- Automatically attach the native Windows Terminal shared bar when at least two AI panes share a tab. Close it when the split or AI sessions end, preserve idle CLI sessions, and remember manual dismissal. Register one unused F24–F21 shortcut with foreground/tab/modifier guards; preserve JSONC comments and other settings, and restore only owned changes.
|
|
12
|
+
|
|
13
|
+
- Keep native tmux status contents and append a session-scoped usage row only while Codex, Claude or Gemini runs in its panes. Restore the original row count and format on exit or reset; detect tools behind shell/Python launchers too.
|
|
14
|
+
- Share Gemini quota snapshots across Windows and WSL, retain observation time for unchanged payloads and serialize account updates. Select Codex usage by event timestamp across sessions and remove the separate Claude cache path. Use the same canonical readings for all renderers.
|
|
15
|
+
- Default desktop HUD polling to two seconds; remove stale weekly/value backfills and rapid retries that cannot request new provider data. Expire failed HUD polls and reset Codex windows to unknown until another real observation arrives.
|
|
16
|
+
|
|
17
|
+
- Integrate the native Windows Terminal shared-bar worktree: a dedicated full-width bottom pane, hidden profile and command-palette actions. Preserve existing split trees; suppress per-pane usage only while the same tab has a live bar and restore it on closure. Existing splits use the root-container action because wt.exe cannot select a parent container. Keep WSL pane coordination in tmux. Preserve edited fragments and back up the earlier worktree fragment on migration.
|
|
18
|
+
- Default Windows Claude to its native two-row statusline without an attached HUD or extra terminal host, and recognize this configuration in diagnostics.
|
|
19
|
+
- Restore Gemini settings even when agy omits documented statusline defaults while saving. Preserve actual user changes and their recovery records.
|
|
20
|
+
- Keep safe cleanup for artifacts from the withdrawn pane coordinator. Make native Windows tests independent of the user's locale and home directory.
|
|
4
21
|
|
|
5
22
|
## Changes in 0.2.0
|
|
6
23
|
|
|
@@ -41,16 +58,16 @@ The active runner keeps its Python code until the next launch. Updating the CLI
|
|
|
41
58
|
```text
|
|
42
59
|
npm run check
|
|
43
60
|
npm run smoke:linux
|
|
44
|
-
mkdir -p .cache/releases/0.2.
|
|
61
|
+
mkdir -p .cache/releases/0.2.1
|
|
45
62
|
npm pack --dry-run --json
|
|
46
|
-
npm pack --pack-destination .cache/releases/0.2.
|
|
63
|
+
npm pack --pack-destination .cache/releases/0.2.1 --json
|
|
47
64
|
```
|
|
48
65
|
|
|
49
66
|
The regression suite includes real PTYs: an already-running wrapped Codex remains interactive during setup, the same Bash command cache launches it again, a fresh shell displays the usage row, and an attached tmux client displays the bar after live setup. An open wrapper reader retains its old bytes, compatibility command paths and recovery backups survive, and user Codex/shell/tmux settings are compared exactly.
|
|
50
67
|
|
|
51
68
|
POSIX screen regressions replay actual output into a terminal emulator and inspect the rendered rows, cursor and scrollback. They cover repeated Korean error rows, narrow widths, wide/combining characters, control sequences, shorter replacement text, resize and keyboard input through a live PTY.
|
|
52
69
|
|
|
53
|
-
Install the published 0.
|
|
70
|
+
Install the published 0.2.0 into an isolated npm prefix, open the PTY fixture, upgrade that prefix to the exact 0.2.1 tarball, and run default setup while the original terminal remains open. Codex's managed first-row fields should update while unrelated settings, the original recovery snapshot, shell integration and running sessions remain intact. The same fixture can cover legacy 0.1.24 and 0.1.27 upgrades. Save the lifecycle report, package manifest, SHA256 checksum, installed-package smoke report and publish dry-run under `.cache/releases/0.2.1/`.
|
|
54
71
|
|
|
55
72
|
The Linux GUI smoke test opens the actual popup in an isolated GNOME 50.1 Wayland session, verifies zero border width for the content and box pointer, and saves a screenshot. It also checks shared macOS SVG size, provider visibility, extension fallback/reconnect and shutdown. Native Windows/macOS runtime tests require their respective environments; platform-neutral regressions still run here.
|
|
56
73
|
|
|
@@ -62,16 +79,16 @@ Inspect the tarball for runtime modules, stable bin entrypoints and required pla
|
|
|
62
79
|
|
|
63
80
|
```text
|
|
64
81
|
npm whoami
|
|
65
|
-
npm publish .cache/releases/0.2.
|
|
82
|
+
npm publish .cache/releases/0.2.1/ai-battery-0.2.1.tgz --access public --tag latest
|
|
66
83
|
npm view ai-battery version dist-tags --json
|
|
67
84
|
```
|
|
68
85
|
|
|
69
|
-
Authenticate with `npm login` if required, and complete npm 2FA when requested. If 0.2.
|
|
86
|
+
Authenticate with `npm login` if required, and complete npm 2FA when requested. If 0.2.1 is already published, increment the version and repeat verification. Tag the tested commit `v0.2.1` after publication.
|
|
70
87
|
|
|
71
88
|
## Update and enable terminal display
|
|
72
89
|
|
|
73
90
|
```text
|
|
74
|
-
npm install -g ai-battery@0.2.
|
|
91
|
+
npm install -g ai-battery@0.2.1
|
|
75
92
|
ai-battery setup
|
|
76
93
|
ai-battery setup tmux
|
|
77
94
|
tmux
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Windows Terminal 통합 바 구현
|
|
2
|
+
|
|
3
|
+
통합 바는 외부 HUD 오버레이 없이 **Windows Terminal 네이티브 루트 분할(`wt-pane`, `AiBattery.AttachBar`)**을 기본으로 사용하여, `bottom`/`top`/`left`/`right` 모든 위치에서 개별 AI pane 바깥의 **창 전체 가장자리**에 통합 상태바를 표시합니다. (WT fragment/단축키가 없는 환경이나 `AI_BATTERY_SPLIT_BACKEND=in-terminal`에서는 터미널 내부 가장자리 슬라이싱으로 자동 대체됩니다.)
|
|
4
|
+
|
|
5
|
+
## 화면 구조
|
|
6
|
+
|
|
7
|
+
기본 방식은 별도 탭이나 pane, 외부 HUD 오버레이를 만들지 않습니다. 같은 탭의 두 pane 이상에서 AI를 실행하면(Windows·WSL·혼합 모두 지원) 설정된 가장자리(`left`→맨 왼쪽, `right`→맨 오른쪽, `top`→맨 위, `bottom`→맨 아래)의 **Leader pane 1곳만 터미널 내부에 통합 상태바를 표시**하고, 나머지 AI pane은 개별 사용량 바를 숨깁니다.
|
|
8
|
+
|
|
9
|
+
터미널 자체 버퍼 안에서 렌더링되므로 기존 배경색·투명도·글꼴과 100% 일치하며, 별도 pane을 만들지 않아 포커스를 가져가지 않고 `left`/`right`에서도 정확히 5칸 세로 레일 너비를 유지합니다. Leader pane이 종료되면 남은 AI pane이 자동으로 상태바를 이어받아 복구합니다.
|
|
10
|
+
|
|
11
|
+
`ai-battery split on|manual|off|status`로 모드를 제어할 수 있으며, 위치는 `ai-battery config --position bottom|top|left|right` 또는 `ai-battery split top|bottom|left|right`로 바꿉니다. AI를 실행하지 않은 일반 새 창/탭에는 영향을 주지 않습니다.
|
|
12
|
+
|
|
13
|
+
## 모듈
|
|
14
|
+
|
|
15
|
+
| 파일 | 역할 |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `lib/core/shared-bar.js` | window·tab 단위 세션 등록, Leader pane 선출, lease 관리 |
|
|
18
|
+
| `lib/platforms/windows/shared-bar-platform.js` | helper 준비, 콘솔·탭·pane 좌표 탐색과 Leader/숨김 판단 |
|
|
19
|
+
| `vendor/PaneContext.cs` | ConPTY 조상 탐색, STA UI Automation 탭·pane 좌표·수, CONOUT$ 폭 조회 |
|
|
20
|
+
| `lib/platforms/windows/wt-fragment.js` | 선택적 WT 네이티브 pane 프로필·팔레트 동작 설치/복원 |
|
|
21
|
+
| `lib/platforms/windows/wt-bar.js` | 선택적 WT 네이티브 pane 렌더러 및 수직 5칸 레일 포매터 |
|
|
22
|
+
| `lib/platforms/windows/terminal-compositor.js` | Codex·Claude·Gemini의 터미널 내부 상/하/좌/우 상태바 합성 및 숨김/복구 |
|
|
23
|
+
|
|
24
|
+
## 기본 터미널 내부 Leader-Pane 동작과 복구
|
|
25
|
+
|
|
26
|
+
세션에는 provider, 터미널 프로필 ID, pane 상대 좌표(`paneLeft`, `paneTop`), Windows 또는 WSL 소유 PID와 시작 식별자를 저장합니다. 같은 탭의 서로 다른 console이 둘 이상 활성 상태면 `selectSharedBarLeader()`가 모든 pane에서 동일한 Leader 1곳을 결정적으로 선출합니다. Leader pane은 `showUsage: true`로 터미널 내부 통합 바를 유지하고, 나머지 AI pane은 `showUsage: false`로 개별 바를 접습니다.
|
|
27
|
+
|
|
28
|
+
WSL은 shell/Windows 호스트 생존만으로 AI가 실행 중이라고 판단하지 않고 실제 Linux 소유 PID와 시작 시각을 확인합니다. AI가 종료되거나 `split off`로 전환하면 남은 pane이 즉시 개별 상태바를 복구합니다. Windows와 WSL의 `setup split` 모두 `PaneContext` helper를 준비하며 상태 hook에서는 컴파일하지 않습니다.
|
|
29
|
+
|
|
30
|
+
## 기존 전용 pane 방식: 전체 너비로 붙이기
|
|
31
|
+
|
|
32
|
+
팔레트 동작은 `moveFocus(parent)`를 반복해 루트 컨테이너를 선택합니다. `splitPane(down, size: 0.248)`으로 기존 트리 전체를 상단 자식으로 감싸고, `resizePane(down)` 네 번으로 하단 pane을 줄인 뒤 원래 작업 pane으로 돌아갑니다.
|
|
33
|
+
|
|
34
|
+
작은 비율로 바로 분할하면 Terminal의 최소 크기 검사에 거부될 수 있습니다. `wt.exe`의 CLI에는 `move-focus parent`가 없으므로 기존 분할에 leaf split을 실행하는 대체 처리를 하지 않습니다. 새 탭의 CLI 실행은 분할 전이므로 안전하게 전체 너비로 만듭니다.
|
|
35
|
+
|
|
36
|
+
프로필은 `%LOCALAPPDATA%\Microsoft\Windows Terminal\Fragments\ai-battery\bar.json`에 등록합니다. 자동 트리거용으로 사용하지 않는 F24~F21 키 하나를 `settings.json`에 추가합니다. JSONC 주석·다른 단축키·기본 프로필을 유지하며 원본을 백업합니다. 기본 프로필과 `profiles.defaults`의 외형을 읽어 글꼴·색상·투명도를 따릅니다. 키바인딩이 바뀌지 않은 상태에서 fragment만 갱신할 때는 설정 파일의 수정 시각으로 Terminal 다시 읽기를 유도합니다.
|
|
37
|
+
|
|
38
|
+
## 기존 전용 pane 방식: 표시와 복구
|
|
39
|
+
|
|
40
|
+
`shared-bars/<window>/tab-<tab hash>/bar.json`에는 PID, 시작 식별자, window, tab, heartbeat 시각만 기록합니다. 전용 바가 같은 탭에서 살아 있고 마지막 heartbeat가 15초 이내일 때만 AI pane의 사용량 행을 접습니다. 실제 pane 폭도 helper로 전달해, JSON hook이 파이프로 호출돼도 80칸으로 잘못 가정하지 않습니다.
|
|
41
|
+
|
|
42
|
+
바는 2초마다 최신 공통 사용량 경로를 읽습니다. 변경 없는 프레임은 다시 그리지 않고, 변경 시 동기화 출력 안에서 사용량 행과 빈 두 번째 행을 갱신합니다. 닫기·q·Ctrl+C·heartbeat 중단 시 개별 pane은 다음 갱신에 사용량 행을 복구합니다. 1초 주기 생명주기 검사에서 작업 pane 하나만 남거나 활성 AI 세션이 하나 이하로 줄면 바도 종료합니다. 다른 탭을 선택한 동안에는 해당 탭의 pane 수로 종료하지 않습니다.
|
|
43
|
+
|
|
44
|
+
Codex는 현재 compositor의 `setStatusVisible()`로 하단 행을 반납·복구하며, 새 화면 관리자나 PTY 분할 구현을 추가하지 않습니다. Claude·Gemini는 기존 statusline hook을 유지합니다.
|
|
45
|
+
|
|
46
|
+
## 참조 구현에서 보완한 점
|
|
47
|
+
|
|
48
|
+
- 탭 식별 실패 시 다른 탭의 유일한 lease를 추측하지 않고 개별 표시를 유지합니다.
|
|
49
|
+
- 동시에 바를 열어도 lease claim을 잠금으로 직렬화합니다.
|
|
50
|
+
- helper는 로컬 NTFS에서 setup 시 미리 컴파일합니다. hook에서는 컴파일을 기다리지 않습니다.
|
|
51
|
+
- 기존 작업본의 fragment는 백업 후 이관하고, 이후 편집된 fragment는 setup/reset이 보존합니다.
|
|
52
|
+
- 부모 선택이 없는 CLI leaf split을 피하고 자동 트리거와 수동 팔레트가 같은 루트 동작을 실행하도록 합니다.
|
|
53
|
+
- 단순 resize 비율 추측보다 같은 탭의 실제 pane 수를 우선합니다.
|
|
54
|
+
- 사용량은 tmux·TUI·HUD와 같은 최신 관측값을 읽습니다. Windows·WSL은 Codex·Gemini 사용량 전용 스냅샷을 공유합니다.
|
|
55
|
+
|
|
56
|
+
## 제약과 검증
|
|
57
|
+
|
|
58
|
+
기본 오버레이는 pane 최소 너비·높이의 영향을 받지 않습니다. 기존 전용 pane 방식에서는 Terminal의 최소 크기와 분리선이 유지됩니다. Windows·WSL의 Codex·Claude·Gemini가 동일한 세션 등록과 lease를 사용하며, tmux 안에서는 tmux 공통 행을 사용합니다.
|
|
59
|
+
|
|
60
|
+
회귀 테스트는 `test/wt-shared-bar.test.js`, `test/compositor-refresh.test.js`, `test/tmux-status.test.js`, `test/usage-sync.test.js`에 있습니다. 실제 Windows Terminal 검증에서는 전용 테스트 창을 사용하며, 모델 프롬프트를 보내지 않습니다. 참조 작업본의 PNG는 패키지에 포함하지 않습니다.
|
|
61
|
+
|
|
62
|
+
공식 참고: [Terminal actions](https://learn.microsoft.com/en-us/windows/terminal/customize-settings/actions), [JSON fragment extensions](https://learn.microsoft.com/en-us/windows/terminal/json-fragment-extensions). Fragment의 action 로딩은 [공식 설정 파서](https://github.com/microsoft/terminal/blob/main/src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp)의 `LayerActionsFrom(..., OriginTag::Fragment, false)`도 확인했습니다.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## 기존 전용 pane 방식: 자동 부착 구현
|
|
66
|
+
|
|
67
|
+
각 AI는 `sessions/console-<ConPTY HWND>.json`에 장기 CLI 소유 PID와 시작 식별자를 등록합니다. 같은 탭의 서로 다른 console이 두 개 이상 활성 상태면 `trigger.lock`과 4초 쿨다운으로 동시 호출을 막습니다. helper는 대상 창·선택 탭·분할 수·수정키를 확인하고, 수정키 해제 대기 후에도 다시 확인해 등록된 bare F24~F21 키를 호출합니다. 화면 입력이나 포커스를 강제로 다른 앱으로 옮기지 않습니다.
|
|
68
|
+
|
|
69
|
+
`wt-keybinding.js`는 JSONC의 위치 정보를 이용해 키 한 항목만 수정합니다. 다른 설정을 편집하지 않았다면 reset에서 원본 바이트를 복원하고, 이후 사용자가 다른 설정을 편집했다면 소유한 항목만 제거합니다. 기존 사용자 단축키나 편집한 소유 항목은 덮어쓰지 않습니다.
|
|
70
|
+
|
|
71
|
+
`q`/Ctrl+C 종료는 `dismissed.json`에 현재 AI 세션 구성을 기록합니다. 새 AI가 추가되기 전까지 같은 구성에서 자동 재부착하지 않습니다. 분할 종료 때는 해당 탭의 세션 기록을 정리해 재부착 경합을 방지합니다. `AI_BATTERY_WT_AUTO_ATTACH=0`으로 자동 생성만 해제할 수 있습니다.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
hook의 사용량 수집 도중 바가 준비될 수 있으므로 출력 직전에 표시 여부를 다시 확인합니다. 동시 hook의 Windows 파일 교체 오류는 원자성을 유지하면서 최대 115ms 동안 짧게 재시도합니다. 실제 검증에서는 agy 두 개의 인라인·전체 화면 조합으로 자동 부착, AI만 종료하고 shell 유지 시 해제, 상하 분할 종료 시 복귀, 유휴 상태 유지를 확인했습니다.
|
package/docs/hud-preview.svg
CHANGED
|
@@ -118,27 +118,50 @@
|
|
|
118
118
|
<text x="430" y="281" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" fill="#c8c8ce">Quit</text>
|
|
119
119
|
<rect x="532" y="48" width="488" height="254" rx="10" fill="#252d3d"/>
|
|
120
120
|
<path d="M532 216L1020 112V302H532Z" fill="#333e53"/>
|
|
121
|
-
<text x="551" y="
|
|
122
|
-
|
|
121
|
+
<text x="551" y="72" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" fill="#c7d0e2">Icon HUD (default) · transparent · drag to move</text>
|
|
122
|
+
<!-- Default Windows/WSL Icon HUD pill -->
|
|
123
|
+
<rect x="551" y="84" width="234" height="44" rx="10" fill="#131722" fill-opacity="0.88" stroke="#ffffff" stroke-opacity="0.16"/>
|
|
124
|
+
<g transform="translate(564 93) scale(0.059375)"><path d="m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51z" fill="#e5e7eb"/></g>
|
|
125
|
+
<rect x="590" y="95" width="28" height="6" rx="3" fill="none" stroke="#ffffff" stroke-opacity="0.28" stroke-width="1.1"/>
|
|
126
|
+
<rect x="592" y="96.8" width="18" height="2.4" rx="1.2" fill="#30D158"/>
|
|
127
|
+
<text x="604" y="117" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10.5" font-weight="700" fill="#e5e7eb">71%</text>
|
|
128
|
+
<circle cx="644" cy="105" r="9" fill="#d97706" fill-opacity="0.22"/><text x="644" y="109" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" font-weight="700" fill="#f97316">✳</text>
|
|
129
|
+
<rect x="659" y="95" width="28" height="6" rx="3" fill="none" stroke="#ffffff" stroke-opacity="0.36" stroke-width="1.1"/>
|
|
130
|
+
<rect x="661" y="96.8" width="10" height="2.4" rx="1.2" fill="#FF9F0A"/>
|
|
131
|
+
<text x="673" y="117" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10.5" font-weight="700" fill="#ffffff">36%</text>
|
|
132
|
+
<circle cx="713" cy="105" r="9" fill="#3186ff" fill-opacity="0.22"/><text x="713" y="109" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" font-weight="700" fill="#60a5fa">A</text>
|
|
133
|
+
<rect x="728" y="95" width="28" height="6" rx="3" fill="none" stroke="#ffffff" stroke-opacity="0.36" stroke-width="1.1"/>
|
|
134
|
+
<rect x="730" y="96.8" width="24" height="2.4" rx="1.2" fill="#30D158"/>
|
|
135
|
+
<text x="742" y="117" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10.5" font-weight="700" fill="#ffffff">98%</text>
|
|
136
|
+
<!-- Compact stack HUD preview -->
|
|
137
|
+
<text x="551" y="152" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#aab5c8">Stack / Rail modes (optional)</text>
|
|
138
|
+
<text x="555" y="178" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="13" fill="#9ba5b5">Codex</text>
|
|
139
|
+
<rect x="615" y="167" width="36" height="14" fill="#2e2e2e" stroke="#a0a0a0"/>
|
|
140
|
+
<rect x="618" y="170" width="22" height="8" fill="#50dc78"/>
|
|
141
|
+
<text x="660" y="178" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12.5" fill="#9ba5b5">71% │ 5h 18:34 │ 7d 82%</text>
|
|
142
|
+
<text x="555" y="206" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="13" fill="#edf0f5">Claude</text>
|
|
143
|
+
<rect x="615" y="195" width="36" height="14" fill="#2e2e2e" stroke="#a0a0a0"/>
|
|
144
|
+
<rect x="618" y="198" width="12" height="8" fill="#ff9e43"/>
|
|
145
|
+
<text x="660" y="206" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12.5" fill="#edf0f5">36% │ 5h 18:34 │ 7d 59%</text>
|
|
146
|
+
<text x="555" y="234" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="13" fill="#edf0f5">Gemini</text>
|
|
147
|
+
<rect x="615" y="223" width="36" height="14" fill="#2e2e2e" stroke="#a0a0a0"/>
|
|
148
|
+
<rect x="618" y="226" width="30" height="8" fill="#50dc78"/>
|
|
149
|
+
<text x="660" y="234" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12.5" fill="#edf0f5">98% │ 5h 18:34 │ 7d 67%</text>
|
|
150
|
+
<!-- Vertical rail HUD mini preview on far right -->
|
|
151
|
+
<rect x="938" y="84" width="64" height="176" rx="8" fill="#131722" fill-opacity="0.88" stroke="#ffffff" stroke-opacity="0.16"/>
|
|
152
|
+
<text x="970" y="102" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" font-weight="700" fill="#60a5fa">AGY</text>
|
|
153
|
+
<rect x="967" y="107" width="6" height="16" rx="1" fill="#30D158"/>
|
|
154
|
+
<text x="970" y="134" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="9.5" fill="#30D158">98%</text>
|
|
155
|
+
<line x1="950" y1="142" x2="990" y2="142" stroke="#4b5563"/>
|
|
156
|
+
<text x="970" y="156" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" font-weight="700" fill="#edf0f5">CDX</text>
|
|
157
|
+
<rect x="967" y="161" width="6" height="16" rx="1" fill="#30D158"/>
|
|
158
|
+
<text x="970" y="188" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="9.5" fill="#9ba5b5">71%</text>
|
|
159
|
+
<line x1="950" y1="196" x2="990" y2="196" stroke="#4b5563"/>
|
|
160
|
+
<text x="970" y="210" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" font-weight="700" fill="#f97316">CLD</text>
|
|
161
|
+
<rect x="967" y="215" width="6" height="16" rx="1" fill="#FF9F0A"/>
|
|
162
|
+
<text x="970" y="242" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="9.5" fill="#FF9F0A">36%</text>
|
|
123
163
|
<rect x="532" y="276" width="488" height="26" rx="6" fill="#172030"/>
|
|
124
164
|
<rect x="730" y="283" width="12" height="12" rx="2" fill="#8d9bb2"/>
|
|
125
165
|
<rect x="755" y="283" width="12" height="12" rx="2" fill="#8d9bb2"/>
|
|
126
166
|
<rect x="780" y="283" width="12" height="12" rx="2" fill="#8d9bb2"/>
|
|
127
|
-
|
|
128
|
-
<rect x="636" y="137" width="41" height="16" fill="#2e2e2e" stroke="#a0a0a0"/>
|
|
129
|
-
<rect x="639" y="140" width="25" height="10" fill="#50dc78"/>
|
|
130
|
-
<rect x="678" y="142" width="3" height="6" fill="#a0a0a0"/>
|
|
131
|
-
<text x="645" y="150" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="13" fill="#9ba5b5">71</text>
|
|
132
|
-
<text x="696" y="150" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="15" fill="#9ba5b5">│ 5h 18:34 │ 7d 82%</text>
|
|
133
|
-
<text x="561" y="183" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="15" fill="#edf0f5">Claude</text>
|
|
134
|
-
<rect x="636" y="170" width="41" height="16" fill="#2e2e2e" stroke="#a0a0a0"/>
|
|
135
|
-
<rect x="639" y="173" width="13" height="10" fill="#ff9e43"/>
|
|
136
|
-
<rect x="678" y="175" width="3" height="6" fill="#a0a0a0"/>
|
|
137
|
-
<text x="645" y="183" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="13" fill="#edf0f5">36</text>
|
|
138
|
-
<text x="696" y="183" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="15" fill="#edf0f5">│ 5h 18:34 │ 7d 59%</text>
|
|
139
|
-
<text x="561" y="216" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="15" fill="#edf0f5">Gemini</text>
|
|
140
|
-
<rect x="636" y="203" width="41" height="16" fill="#2e2e2e" stroke="#a0a0a0"/>
|
|
141
|
-
<rect x="639" y="206" width="34" height="10" fill="#50dc78"/>
|
|
142
|
-
<rect x="678" y="208" width="3" height="6" fill="#a0a0a0"/>
|
|
143
|
-
<text x="645" y="216" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="13" fill="#edf0f5">98</text>
|
|
144
|
-
<text x="696" y="216" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="15" fill="#edf0f5">│ 5h 18:34 │ 7d 67%</text></svg>
|
|
167
|
+
</svg>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1120" height="310" viewBox="0 0 1120 310" role="img">
|
|
2
|
+
<title>Vertical TUI sidebar (left/right) and full-window split unified bar in Windows Terminal</title>
|
|
3
|
+
<rect width="1120" height="310" rx="12" fill="#111318"/>
|
|
4
|
+
<!-- Left card: Split panes + Right vertical rail -->
|
|
5
|
+
<text x="24" y="28" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" fill="#9ba5b5">VERTICAL TUI BAR (left / right) · split unified rail</text>
|
|
6
|
+
<rect x="24" y="40" width="524" height="250" rx="8" fill="#0c0c0c" stroke="#2e3440"/>
|
|
7
|
+
<rect x="24" y="40" width="524" height="24" rx="8" fill="#1f232b"/>
|
|
8
|
+
<rect x="24" y="54" width="524" height="10" fill="#1f232b"/>
|
|
9
|
+
<circle cx="40" cy="52" r="4" fill="#4b5563"/>
|
|
10
|
+
<text x="54" y="56" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#cbd5e1">Windows Terminal · Split + Right Rail</text>
|
|
11
|
+
<!-- Pane 1 (left) -->
|
|
12
|
+
<text x="38" y="88" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" font-weight="700" fill="#60a5fa">Antigravity CLI</text>
|
|
13
|
+
<text x="38" y="106" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#9ba5b5">Gemini Pro high · ~/project</text>
|
|
14
|
+
<text x="38" y="256" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#6b7280">> Ask Gemini...</text>
|
|
15
|
+
<text x="38" y="276" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#9ba5b5">Gemini Pro high · 83% context left</text>
|
|
16
|
+
<!-- Split divider between Pane 1 & Pane 2 -->
|
|
17
|
+
<line x1="258" y1="64" x2="258" y2="290" stroke="#2e3440"/>
|
|
18
|
+
<!-- Pane 2 (middle) -->
|
|
19
|
+
<text x="272" y="88" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" font-weight="700" fill="#edf0f5">>_ OpenAI Codex</text>
|
|
20
|
+
<text x="272" y="106" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#9ba5b5">~/project</text>
|
|
21
|
+
<text x="272" y="256" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#6b7280">> Ask Codex to do anything</text>
|
|
22
|
+
<text x="272" y="276" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#9ba5b5">GPT high · main · 100% context left</text>
|
|
23
|
+
<!-- Unified right vertical bar pane -->
|
|
24
|
+
<line x1="486" y1="64" x2="486" y2="290" stroke="#3b82f6" stroke-width="1.2"/>
|
|
25
|
+
<text x="517" y="80" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" font-weight="700" fill="#60a5fa">AGY</text>
|
|
26
|
+
<rect x="513" y="86" width="8" height="24" rx="1" fill="#22c55e"/>
|
|
27
|
+
<text x="517" y="124" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" font-weight="700" fill="#22c55e">84%</text>
|
|
28
|
+
<text x="517" y="137" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#6b7280">5h</text>
|
|
29
|
+
<text x="517" y="150" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#e5e7eb">18:43</text>
|
|
30
|
+
<text x="517" y="163" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#6b7280">7d</text>
|
|
31
|
+
<text x="517" y="176" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#e5e7eb">25%</text>
|
|
32
|
+
<line x1="498" y1="184" x2="536" y2="184" stroke="#4b5563"/>
|
|
33
|
+
<text x="517" y="198" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" font-weight="700" fill="#edf0f5">CDX</text>
|
|
34
|
+
<rect x="513" y="204" width="8" height="24" rx="1" fill="#22c55e"/>
|
|
35
|
+
<text x="517" y="242" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" font-weight="700" fill="#22c55e">100%</text>
|
|
36
|
+
<text x="517" y="255" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#6b7280">5h</text>
|
|
37
|
+
<text x="517" y="268" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#e5e7eb">--:--</text>
|
|
38
|
+
<text x="517" y="281" text-anchor="middle" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#9ba5b5">7d 39%</text>
|
|
39
|
+
|
|
40
|
+
<!-- Right card: 2x2 Split panes + Full-window bottom/top unified bar -->
|
|
41
|
+
<text x="572" y="28" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" fill="#9ba5b5">FULL-WINDOW SPLIT BAR (bottom / top) · auto attach & restore</text>
|
|
42
|
+
<rect x="572" y="40" width="524" height="250" rx="8" fill="#0c0c0c" stroke="#2e3440"/>
|
|
43
|
+
<rect x="572" y="40" width="524" height="24" rx="8" fill="#1f232b"/>
|
|
44
|
+
<rect x="572" y="54" width="524" height="10" fill="#1f232b"/>
|
|
45
|
+
<circle cx="588" cy="52" r="4" fill="#4b5563"/>
|
|
46
|
+
<text x="602" y="56" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#cbd5e1">Windows Terminal · 2×2 Grid + Unified Bottom Bar</text>
|
|
47
|
+
<!-- 2x2 grid lines -->
|
|
48
|
+
<line x1="834" y1="64" x2="834" y2="258" stroke="#2e3440"/>
|
|
49
|
+
<line x1="572" y1="161" x2="1096" y2="161" stroke="#2e3440"/>
|
|
50
|
+
<!-- Top-left pane: Gemini -->
|
|
51
|
+
<text x="588" y="88" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" font-weight="700" fill="#60a5fa">Antigravity CLI</text>
|
|
52
|
+
<text x="588" y="146" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#9ba5b5">Gemini Pro high · 100% context left</text>
|
|
53
|
+
<!-- Top-right pane: Claude -->
|
|
54
|
+
<text x="850" y="88" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" font-weight="700" fill="#f97316">Claude Code</text>
|
|
55
|
+
<text x="850" y="146" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#9ba5b5">Opus high · 92% context left</text>
|
|
56
|
+
<!-- Bottom-left pane: WSL Codex -->
|
|
57
|
+
<text x="588" y="185" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" font-weight="700" fill="#edf0f5">WSL · OpenAI Codex</text>
|
|
58
|
+
<text x="588" y="243" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="10" fill="#9ba5b5">GPT high · ~/project</text>
|
|
59
|
+
<!-- Bottom-right pane: Shell -->
|
|
60
|
+
<text x="850" y="185" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="12" fill="#9ba5b5">PS C:\Users\dev\project></text>
|
|
61
|
+
<text x="850" y="205" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#6b7280">npm test</text>
|
|
62
|
+
<!-- Unified full-window bottom bar -->
|
|
63
|
+
<line x1="572" y1="258" x2="1096" y2="258" stroke="#3b82f6" stroke-width="1.2"/>
|
|
64
|
+
<text x="586" y="278" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#edf0f5">Gemini</text>
|
|
65
|
+
<rect x="634" y="268" width="3" height="11" fill="#22c55e"/><rect x="639" y="268" width="3" height="11" fill="#22c55e"/><rect x="644" y="268" width="3" height="11" fill="#22c55e"/><rect x="649" y="268" width="3" height="11" fill="#22c55e"/><rect x="654" y="268" width="3" height="11" fill="#526052"/>
|
|
66
|
+
<text x="663" y="278" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#edf0f5">84% │ 5h 18:43 │ 7d 25%</text>
|
|
67
|
+
<text x="828" y="278" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#6b7280">┃</text>
|
|
68
|
+
<text x="842" y="278" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#edf0f5">Codex</text>
|
|
69
|
+
<rect x="884" y="268" width="3" height="11" fill="#22c55e"/><rect x="889" y="268" width="3" height="11" fill="#22c55e"/><rect x="894" y="268" width="3" height="11" fill="#22c55e"/><rect x="899" y="268" width="3" height="11" fill="#22c55e"/><rect x="904" y="268" width="3" height="11" fill="#22c55e"/>
|
|
70
|
+
<text x="913" y="278" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#edf0f5">100% │ 7d 39%</text>
|
|
71
|
+
<text x="1010" y="278" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#6b7280">┃</text>
|
|
72
|
+
<text x="1024" y="278" font-family="ui-monospace, 'DejaVu Sans Mono', Consolas, monospace" font-size="11" fill="#f97316">Claude 36%</text>
|
|
73
|
+
</svg>
|