agy-powerline 1.5.0 → 1.7.0
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/CHANGELOG.md +27 -0
- package/README.es.md +263 -0
- package/README.fr.md +29 -14
- package/README.ja.md +19 -14
- package/README.ko.md +263 -0
- package/README.md +20 -15
- package/README.zh-CN.md +19 -14
- package/llms.txt +19 -5
- package/package.json +3 -1
- package/src/cli/configure.js +14 -0
- package/src/cli/doctor.js +35 -1
- package/src/cli/export.js +3 -2
- package/src/cli/init.js +28 -2
- package/src/index.js +68 -3
- package/src/lib/catalog.js +7 -0
- package/src/lib/config-check.js +1 -0
- package/src/lib/config.js +90 -3
- package/src/lib/exec.js +3 -7
- package/src/lib/fit.js +1 -0
- package/src/lib/formatters.js +25 -12
- package/src/lib/i18n.js +140 -0
- package/src/lib/layouts/lines.js +23 -11
- package/src/lib/layouts/pills.js +38 -18
- package/src/lib/mock-data.js +5 -1
- package/src/lib/paths.js +19 -1
- package/src/lib/session.js +149 -21
- package/src/lib/shared.js +4 -0
- package/src/lib/themes.js +70 -2
- package/src/lib/usage.js +1 -0
- package/src/lib/widget-style.js +43 -37
- package/src/runtime/statusline.js +43 -2
package/README.ko.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# agy-powerline
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md) | **한국어**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/agy-powerline)
|
|
6
|
+
[](https://www.npmjs.com/package/agy-powerline)
|
|
7
|
+
[](https://github.com/wassim-azi/agy-powerline/stargazers)
|
|
8
|
+
[](https://github.com/wassim-azi/agy-powerline/actions/workflows/ci.yml)
|
|
9
|
+
[](https://github.com/wassim-azi/agy-powerline/actions/workflows/codeql.yml)
|
|
10
|
+
[](https://scorecard.dev/viewer/?uri=github.com/wassim-azi/agy-powerline)
|
|
11
|
+
[](https://www.bestpractices.dev/projects/15655)
|
|
12
|
+
[](#개인정보-및-보안)
|
|
13
|
+
[](docs/install.md)
|
|
14
|
+
[](https://opensource.org/licenses/MIT)
|
|
15
|
+
[](https://codespaces.new/wassim-azi/agy-powerline?quickstart=1)
|
|
16
|
+
[](https://agy-powerline.com/configure/)
|
|
17
|
+
[](https://github.com/Piebald-AI/awesome-gemini-cli)
|
|
18
|
+
|
|
19
|
+
**Google Antigravity CLI를 위한 빠르고 자유롭게 설정 가능한 agy 스테이터스라인.**
|
|
20
|
+
|
|
21
|
+
> 이 문서는 영어 원본 [README](README.md)의 번역이며, 원본보다 오래된 내용일 수 있습니다. 내용이 다를 경우 영어 원본이 우선합니다. 상세 문서([`docs/`](docs/))는 영어로만 제공됩니다.
|
|
22
|
+
|
|
23
|
+
사용 중인 모델, Gemini 5시간/7일 할당량, Claude/GPT 및 Argon 할당량, 컨텍스트 창, git 브랜치 등을 한눈에 확인하세요. 인터랙티브 에디터에서 위젯, 테마, 레이아웃을 선택하세요. 명령 한 번으로 설치되며, 의존성은 없습니다.
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<img src="assets/demo.gif" alt="agy-powerline configure: argon을 입력해 Argon의 주간 할당량을 추가한 뒤, 프리셋·테마·레이아웃을 살펴보며 바의 실시간 미리보기를 확인하고, Powerline 탭을 여는 모습" width="850">
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
## 설치
|
|
30
|
+
|
|
31
|
+
[Node.js](https://nodejs.org/) 20 이상과 [Antigravity CLI](https://antigravity.google/docs/cli/overview)가 필요합니다. Windows, macOS, Linux, WSL에서 동작합니다([WSL 관련 참고](docs/install.md#wsl)).
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx agy-powerline init # 스테이터스라인을 agy에 설치
|
|
35
|
+
npx agy-powerline configure # 선택 사항: 위젯, 테마, 레이아웃 선택
|
|
36
|
+
agy # Antigravity 시작
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
처음 설치하면 `init`이 각각의 미리보기와 함께 프리셋, 레이아웃, 테마를 물어봅니다. 질문을 건너뛰려면 `--yes`를 붙이세요. 무언가를 교체하기 전에 확인을 받고, Antigravity의 `settings.json`을 먼저 백업합니다. `init` 후에 `agy`를 한 번 재시작하세요. 자세한 내용: [`init`이 하는 일](docs/install.md).
|
|
40
|
+
|
|
41
|
+
<details>
|
|
42
|
+
<summary>스크린샷: 실제 agy 세션의 바 (Windows Terminal)</summary>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<img src="assets/screenshots/windows.png" alt="Windows Terminal의 agy 입력창 아래에 표시되는 agy-powerline: 위쪽에 짧은 대화, 아래쪽에 3행 Pills 바" width="850">
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
### agy 안에서 설치하기
|
|
51
|
+
|
|
52
|
+
agy-powerline은 agy 플러그인이기도 합니다. 플러그인으로 추가한 뒤 `agy` 세션에서 설치 스킬을 실행하면, `init`과 `doctor`를 대신 실행해 줍니다:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
agy plugin install https://github.com/wassim-azi/agy-powerline
|
|
56
|
+
/agy-powerline-setup
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
이후 `agy`를 한 번 재시작하세요. 자세한 내용: [플러그인 설치 경로](docs/install.md#install-from-inside-agy-plugin).
|
|
60
|
+
|
|
61
|
+
또는 `agy` 세션에 이렇게 붙여넣으세요.
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
Install the agy-powerline statusline: run `npx agy-powerline init --yes`, then tell me to restart agy.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`--yes`는 agy가 답할 수 없는 프롬프트를 건너뛰고, `settings.json`을 백업한 뒤 기존 `statusLine`을 교체합니다.
|
|
68
|
+
|
|
69
|
+
Nerd Font가 없는 터미널에서는 ASCII 모드를 켜세요(`configure`에서 `i`).
|
|
70
|
+
|
|
71
|
+
## 커스터마이즈
|
|
72
|
+
|
|
73
|
+
`npx agy-powerline configure`를 실행하면 바의 실시간 미리보기가 있는 에디터가 열립니다. `←` `→`로 Widgets, Presets, Themes, Layout, Powerline 탭을 전환하고, `↑` `↓`로 이동, Enter로 선택, `q`로 저장하고 종료합니다. 각 화면의 키는 하단에 표시되며, 전체 목록은 [Configuration](docs/configuration.md#configurator-keys)에 있습니다.
|
|
74
|
+
|
|
75
|
+
브라우저를 선호하나요? [브라우저에서 바 만들기](https://agy-powerline.com/configure/)에서 실시간 미리보기로 구성한 뒤 다운로드하거나 가져올 수 있습니다.
|
|
76
|
+
|
|
77
|
+
변경 사항은 실행 중인 `agy`의 다음 갱신 시점에 적용됩니다.
|
|
78
|
+
|
|
79
|
+
### 프리셋
|
|
80
|
+
|
|
81
|
+
프리셋에서 시작한 뒤 조정하세요:
|
|
82
|
+
|
|
83
|
+
| 프리셋 | 표시 내용 |
|
|
84
|
+
| --------- | ---------------------------------------------------------------------------------------------------- |
|
|
85
|
+
| `default` | 모델, 컨텍스트, git; 두 번째 행에 리셋 시간이 있는 5시간/7일 할당량 |
|
|
86
|
+
| `compact` | 한 줄: 짧은 모델명, 가장 여유 있는 할당량, 컨텍스트 %, git |
|
|
87
|
+
| `agent` | 에이전트 상태, 서브에이전트, 제목, 모드, 샌드박스; 모델, 컨텍스트 %, 아티팩트, 가장 여유 있는 할당량 |
|
|
88
|
+
| `git` | 프로젝트, 브랜치, 워크트리, 스태시; 파일 수, 변경 줄 수, 커밋 |
|
|
89
|
+
| `tokens` | 컨텍스트 토큰, 세션 토큰 입/출력, 캐시 적중; 오늘 및 최근 7일간 토큰 |
|
|
90
|
+
| `quotas` | 요금제와 모델; 5시간/7일 할당량 나란히; 세 번째 행에 서드파티와 Argon |
|
|
91
|
+
| `full` | 전부: 세션, 프로젝트, git; 컨텍스트, 토큰, 캐시; 양쪽 할당량 |
|
|
92
|
+
|
|
93
|
+
### 테마
|
|
94
|
+
|
|
95
|
+
| 터미널 배경 | 테마 |
|
|
96
|
+
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
97
|
+
| 다크 | `dark-aurora` (기본값), `dark-ocean`, `dark-ember`, `dark-forest`, `dark-neon`, `dark-mono`, `dark-nocturne`, `dark-onyx`, `dark-metro`, `dark-macchiato`, `dark-nord`, `dark-rose-pine` |
|
|
98
|
+
| 라이트 | `light-paper`, `light-sky`, `light-sunset`, `light-cream`, `light-gruvbox`, `light-tokyo-night` |
|
|
99
|
+
| 색약 친화 | `colorblind-dark`, `colorblind-light` |
|
|
100
|
+
| 직접 지정 | `custom` ([방법](docs/configuration.md#custom-theme)) |
|
|
101
|
+
|
|
102
|
+
모든 테마는 [테마 갤러리](https://agy-powerline.com/themes/) 또는 `npx agy-powerline theme --gallery`에서 미리 볼 수 있습니다. 각 행에 걸쳐 색이 이어지는 그라데이션을 넣으려면 `npx agy-powerline gradient <이름>`을 사용하세요. `aurora`, `sunset`, `ocean`, `forest`, `neon`, `candy`, `rainbow`, `mono` 또는 직접 지정한 색을 쓸 수 있습니다([방법](docs/configuration.md#gradients)).
|
|
103
|
+
|
|
104
|
+
### 레이아웃
|
|
105
|
+
|
|
106
|
+
**Pills** (기본값): 파워라인 스타일 캡슐. 둥근(round), 각진(angled), 기울어진(slanted), 평평한(flat) 모양을 고를 수 있고, 행 사이에 빈 줄을 넣을 수도 있습니다.
|
|
107
|
+
|
|
108
|
+
<p align="center">
|
|
109
|
+
<img src="assets/screenshots/pills-dark.png" alt="dark-aurora 테마의 agy-powerline Pills 레이아웃: 모델, 컨텍스트, 프로젝트, git; 페이스 마커와 리셋 시간이 있는 Gemini 5시간/7일 할당량; Claude/GPT와 Argon 주간 할당량" width="850">
|
|
110
|
+
</p>
|
|
111
|
+
|
|
112
|
+
<details>
|
|
113
|
+
<summary>라이트 터미널에서</summary>
|
|
114
|
+
|
|
115
|
+
<p align="center">
|
|
116
|
+
<img src="assets/screenshots/pills-light.png" alt="라이트 터미널에서 light-paper 테마의 agy-powerline Pills 레이아웃" width="850">
|
|
117
|
+
</p>
|
|
118
|
+
|
|
119
|
+
</details>
|
|
120
|
+
|
|
121
|
+
**Lines**: 같은 정보를 단순한 색 텍스트로 표시합니다.
|
|
122
|
+
|
|
123
|
+
<p align="center">
|
|
124
|
+
<img src="assets/screenshots/lines-dark.png" alt="다크 터미널에서 dark-aurora 테마의 agy-powerline Lines 레이아웃" width="850">
|
|
125
|
+
</p>
|
|
126
|
+
|
|
127
|
+
<details>
|
|
128
|
+
<summary>라이트 터미널에서</summary>
|
|
129
|
+
|
|
130
|
+
<p align="center">
|
|
131
|
+
<img src="assets/screenshots/lines-light.png" alt="라이트 터미널에서 light-paper 테마의 agy-powerline Lines 레이아웃" width="850">
|
|
132
|
+
</p>
|
|
133
|
+
|
|
134
|
+
</details>
|
|
135
|
+
|
|
136
|
+
**Classic**: `|` 구분자와 `███░│░░░░░` 같은 블록 미터가 있는 단순 색 텍스트입니다.
|
|
137
|
+
|
|
138
|
+
<p align="center">
|
|
139
|
+
<img src="assets/screenshots/classic-dark.png" alt="다크 터미널에서 dark-aurora 테마의 agy-powerline Classic 레이아웃, 블록 미터 포함" width="850">
|
|
140
|
+
</p>
|
|
141
|
+
|
|
142
|
+
<details>
|
|
143
|
+
<summary>라이트 터미널에서</summary>
|
|
144
|
+
|
|
145
|
+
<p align="center">
|
|
146
|
+
<img src="assets/screenshots/classic-light.png" alt="라이트 터미널에서 light-paper 테마의 agy-powerline Classic 레이아웃" width="850">
|
|
147
|
+
</p>
|
|
148
|
+
|
|
149
|
+
</details>
|
|
150
|
+
|
|
151
|
+
## 위젯
|
|
152
|
+
|
|
153
|
+
| 위젯 | 표시 내용 |
|
|
154
|
+
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
155
|
+
| `model` | 사용 중인 모델 |
|
|
156
|
+
| `clock` | 현재 현지 시각(12/24시간 형식은 `clock`에서 설정) |
|
|
157
|
+
| `fiveHourBar`, `weeklyBar` | 남은 5시간/7일 할당량을 미터로 표시, [페이스 마커](docs/configuration.md#quota-pace-marker) 포함 |
|
|
158
|
+
| `fiveHourPct`, `weeklyPct` | 남은 5시간/7일 할당량을 백분율로 표시 |
|
|
159
|
+
| `fiveHourReset`, `weeklyReset` | 할당량이 리셋되기까지 남은 시간 또는 리셋 시각 |
|
|
160
|
+
| `quota` | 가장 먼저 소진될 가능성이 높은 할당량과 리셋 시각 |
|
|
161
|
+
| `thirdPartyFiveHour`, `thirdPartyWeekly` | 서드파티 모델 할당량 |
|
|
162
|
+
| `argonWeekly`, `argonReset` | Gemini 4 Argon 자체 주간 할당량(Google AI Pro)과 리셋 |
|
|
163
|
+
| `context`, `contextPct`, `contextTokens` | 사용 중인 컨텍스트 창: 미터, 백분율 또는 토큰 수 |
|
|
164
|
+
| `git` | 브랜치, 커밋되지 않은 변경, ahead/behind |
|
|
165
|
+
| `gitChanges`, `gitFiles`, `gitSha`, `gitStash`, `gitWorktree` | 추가/삭제된 줄, 스테이지/수정/추적 안 됨/충돌 파일 수, 커밋 ID, 스태시, 연결된 워크트리 |
|
|
166
|
+
| `project`, `cwd` | 프로젝트 폴더, 현재 폴더 |
|
|
167
|
+
| `agentState`, `plan`, `sandbox`, `artifacts`, `version` | 에이전트가 하는 일, 요금제, 샌드박스, 아티팩트, CLI 버전 |
|
|
168
|
+
| `tasks` | 실행 중인 서브에이전트와 백그라운드 작업 |
|
|
169
|
+
| `mode` | 승인 모드(예: accept-edits)와 Vim 모드 |
|
|
170
|
+
| `title` | 대화 제목 |
|
|
171
|
+
| `sessionTime` | 활성 대화가 시작된 이후 경과 시간 |
|
|
172
|
+
| `totalTokens`, `cacheHit`, `cacheRead`, `cacheCreate` | 세션 토큰과 프롬프트 캐시 사용량 |
|
|
173
|
+
| `tokensToday`, `tokensWeek` | 오늘 및 최근 7일간 사용한 토큰, 모든 대화 포함(Node 22.13+) |
|
|
174
|
+
| `ram` | 시스템 메모리 사용량 |
|
|
175
|
+
| `os` | agy가 동작하는 시스템: Windows, macOS, Linux 또는 WSL |
|
|
176
|
+
| `host` | OS의 현재 사용자와 짧은 호스트명(`alex@devbox`) |
|
|
177
|
+
| `customText`, `exec` | 직접 입력한 텍스트 또는 [셸 명령](docs/configuration.md#shell-command-widget-exec)의 출력 |
|
|
178
|
+
|
|
179
|
+
표시할 내용이 없는 위젯은 스스로 숨습니다. 위젯은 색, 이름, 아이콘을 바꾸고 라벨을 없애거나 자체 알림 임계값을 지정할 수 있습니다. [Configuration](docs/configuration.md)을 참고하세요.
|
|
180
|
+
|
|
181
|
+
## 명령
|
|
182
|
+
|
|
183
|
+
| 명령 | 하는 일 |
|
|
184
|
+
| -------------------------------------------------- | -------------------------------------------------- |
|
|
185
|
+
| `npx agy-powerline init [--yes]` | 스테이터스라인 설치 또는 업데이트 |
|
|
186
|
+
| `npx agy-powerline configure` | 에디터 열기(`config` 별칭) |
|
|
187
|
+
| `npx agy-powerline preset <이름>` | 프리셋 적용(`--list`로 목록 확인) |
|
|
188
|
+
| `npx agy-powerline theme <이름>` | 테마 전환(`--list`, `--gallery`) |
|
|
189
|
+
| `npx agy-powerline gradient <이름>` | 각 행을 그라데이션으로 색칠(`--list`, `off`) |
|
|
190
|
+
| `npx agy-powerline layout <pills\|lines\|classic>` | 레이아웃 전환 |
|
|
191
|
+
| `npx agy-powerline caps <스타일>` | 필 모양 전환: `round`, `angled`, `slanted`, `flat` |
|
|
192
|
+
| `npx agy-powerline export [파일]` | 구성을 파일로 저장, 백업하거나 공유할 때 사용 |
|
|
193
|
+
| `npx agy-powerline import <파일>` | 변경 내용을 보여준 뒤 구성 불러오기(`--merge`) |
|
|
194
|
+
| `npx agy-powerline doctor` | 설치 상태 확인과 문제 설명 |
|
|
195
|
+
| `npx agy-powerline report` | 개인정보를 포함하지 않는 버그 리포트 작성 |
|
|
196
|
+
| `npx agy-powerline uninstall [--delete]` | agy에서 제거(`--delete`는 파일도 삭제) |
|
|
197
|
+
| `npx agy-powerline render --demo` | 샘플 데이터로 바 출력 |
|
|
198
|
+
|
|
199
|
+
모든 명령은 `--help`로 옵션을 확인할 수 있습니다.
|
|
200
|
+
|
|
201
|
+
## 업데이트
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
npx agy-powerline init --yes # 새 버전의 스크립트 설치
|
|
205
|
+
npx agy-powerline doctor # 모든 것이 최신인지 확인
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
설정은 유지됩니다. 이후 `agy`를 재시작하세요.
|
|
209
|
+
|
|
210
|
+
## 문제 해결
|
|
211
|
+
|
|
212
|
+
먼저 `npx agy-powerline doctor`를 실행하세요. 설치를 점검하고 해결 방법을 알려줍니다. 일반적인 문제와 버그 신고 방법: [Troubleshooting](docs/troubleshooting.md).
|
|
213
|
+
|
|
214
|
+
## 개인정보 및 보안
|
|
215
|
+
|
|
216
|
+
- **네트워크 요청 없음, 텔레메트리 없음.** 모든 정보는 agy가 바에 넘겨주는 데이터, `.git`, OS에서 옵니다. 외부 링크는 `configure`의 `g` 하나뿐이며, 브라우저에서 GitHub 페이지를 엽니다.
|
|
217
|
+
- **설정은 안전합니다.** `init`과 `uninstall`은 `settings.json`을 백업하고, 해석할 수 없는 파일은 편집하지 않습니다.
|
|
218
|
+
- **직접 추가하지 않는 한 아무것도 실행되지 않습니다.** ahead/behind 개수와 git 위젯의 파일/줄 수를 세는 짧은 `git` 호출 외에, 바가 실행하는 명령은 직접 설정한 `exec` 위젯뿐입니다.
|
|
219
|
+
- **런타임 의존성 0**, CI에서 [npm provenance](https://docs.npmjs.com/generating-provenance-statements)와 함께 게시됩니다.
|
|
220
|
+
|
|
221
|
+
자세한 내용: [SECURITY.md](SECURITY.md).
|
|
222
|
+
|
|
223
|
+
## 기여
|
|
224
|
+
|
|
225
|
+
기여를 환영합니다. [CONTRIBUTING.md](CONTRIBUTING.md)(설정, 아키텍처, 위젯/테마 추가)와 [Code of Conduct](CODE_OF_CONDUCT.md)부터 읽어보세요. 풀 리퀘스트는 `develop` 브랜치로 보내주세요. 버그는 [GitHub issues](https://github.com/wassim-azi/agy-powerline/issues)에, 아이디어와 피드백은 [Discussions](https://github.com/wassim-azi/agy-powerline/discussions)에 남겨주세요.
|
|
226
|
+
|
|
227
|
+
기여해 주신 모든 분들께 감사드립니다:
|
|
228
|
+
|
|
229
|
+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
230
|
+
<!-- prettier-ignore-start -->
|
|
231
|
+
<!-- markdownlint-disable -->
|
|
232
|
+
<table>
|
|
233
|
+
<tbody>
|
|
234
|
+
<tr>
|
|
235
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/yatharth2soni"><img src="https://avatars.githubusercontent.com/u/238868599?v=4&s=128" width="64" height="64" alt="Yatharth Soni"/><br /><sub><b>Yatharth Soni</b></sub></a></td>
|
|
236
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/dannyward630"><img src="https://avatars.githubusercontent.com/u/71604164?v=4&s=128" width="64" height="64" alt="Danny Ward"/><br /><sub><b>Danny Ward</b></sub></a></td>
|
|
237
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/yoreva-01"><img src="https://avatars.githubusercontent.com/u/195282707?v=4&s=128" width="64" height="64" alt="Yusuf Orçan"/><br /><sub><b>Yusuf Orçan</b></sub></a></td>
|
|
238
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/yuefdev"><img src="https://avatars.githubusercontent.com/u/120668197?v=4&s=128" width="64" height="64" alt="Yusuf Efe"/><br /><sub><b>Yusuf Efe</b></sub></a></td>
|
|
239
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/hiyouwhatsapp"><img src="https://avatars.githubusercontent.com/u/89997383?v=4&s=128" width="64" height="64" alt="hiyouwhatsapp"/><br /><sub><b>hiyouwhatsapp</b></sub></a></td>
|
|
240
|
+
</tr>
|
|
241
|
+
<tr>
|
|
242
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/dharamdan01"><img src="https://avatars.githubusercontent.com/u/188893946?v=4&s=128" width="64" height="64" alt="dharamdan01"/><br /><sub><b>dharamdan01</b></sub></a></td>
|
|
243
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/Ashuge11"><img src="https://avatars.githubusercontent.com/u/210247942?v=4&s=128" width="64" height="64" alt="Ashvini Sundge"/><br /><sub><b>Ashvini Sundge</b></sub></a></td>
|
|
244
|
+
<td align="center" valign="top" width="20%"><a href="https://www.unkletayo.dev/"><img src="https://avatars.githubusercontent.com/u/48031746?v=4&s=128" width="64" height="64" alt="Adetayo Akinsanya"/><br /><sub><b>Adetayo Akinsanya</b></sub></a></td>
|
|
245
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/rahul05ranjan"><img src="https://avatars.githubusercontent.com/u/11793455?v=4&s=128" width="64" height="64" alt="Rahul"/><br /><sub><b>Rahul</b></sub></a></td>
|
|
246
|
+
</tr>
|
|
247
|
+
</tbody>
|
|
248
|
+
</table>
|
|
249
|
+
|
|
250
|
+
<!-- markdownlint-restore -->
|
|
251
|
+
<!-- prettier-ignore-end -->
|
|
252
|
+
|
|
253
|
+
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
254
|
+
|
|
255
|
+
agy-powerline이 유용했다면 ⭐를 눌러 주세요. 다른 agy 사용자가 찾는 데 도움이 됩니다.
|
|
256
|
+
|
|
257
|
+
## Star History
|
|
258
|
+
|
|
259
|
+
[](https://star-history.com/#wassim-azi/agy-powerline&Date)
|
|
260
|
+
|
|
261
|
+
## 라이선스
|
|
262
|
+
|
|
263
|
+
[MIT](LICENSE) © Wassim AZI
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# agy-powerline
|
|
2
2
|
|
|
3
|
-
**English** | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md)
|
|
3
|
+
**English** | [简体中文](README.zh-CN.md) | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md) | [한국어](README.ko.md)
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/agy-powerline)
|
|
6
6
|
[](https://www.npmjs.com/package/agy-powerline)
|
|
@@ -90,14 +90,14 @@ Start from a preset, then adjust:
|
|
|
90
90
|
|
|
91
91
|
### Themes
|
|
92
92
|
|
|
93
|
-
| Terminal background | Themes
|
|
94
|
-
| ------------------- |
|
|
95
|
-
| Dark | `dark-aurora` (default), `dark-ocean`, `dark-ember`, `dark-forest`, `dark-neon`, `dark-mono`, `dark-nocturne`, `dark-onyx`, `dark-metro`, `dark-macchiato` |
|
|
96
|
-
| Light | `light-paper`, `light-sky`, `light-sunset`, `light-cream`
|
|
97
|
-
| Color-blind safe | `colorblind-dark`, `colorblind-light`
|
|
98
|
-
| Your own colors | `custom` ([how](docs/configuration.md#custom-theme))
|
|
93
|
+
| Terminal background | Themes |
|
|
94
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| Dark | `dark-aurora` (default), `dark-ocean`, `dark-ember`, `dark-forest`, `dark-neon`, `dark-mono`, `dark-nocturne`, `dark-onyx`, `dark-metro`, `dark-macchiato`, `dark-nord`, `dark-rose-pine` |
|
|
96
|
+
| Light | `light-paper`, `light-sky`, `light-sunset`, `light-cream`, `light-gruvbox`, `light-tokyo-night` |
|
|
97
|
+
| Color-blind safe | `colorblind-dark`, `colorblind-light` |
|
|
98
|
+
| Your own colors | `custom` ([how](docs/configuration.md#custom-theme)) |
|
|
99
99
|
|
|
100
|
-
Preview them all in the [theme gallery](https://agy-powerline.com/) or with `npx agy-powerline theme --gallery`. For one color sweep across each row, add a gradient: `npx agy-powerline gradient <name>` with `aurora`, `sunset`, `ocean`, `forest`, `neon`, `candy`, `rainbow`, `mono` or your own colors ([how](docs/configuration.md#gradients)).
|
|
100
|
+
Preview them all in the [theme gallery](https://agy-powerline.com/themes/) or with `npx agy-powerline theme --gallery`. For one color sweep across each row, add a gradient: `npx agy-powerline gradient <name>` with `aurora`, `sunset`, `ocean`, `forest`, `neon`, `candy`, `rainbow`, `mono` or your own colors ([how](docs/configuration.md#gradients)).
|
|
101
101
|
|
|
102
102
|
### Layouts
|
|
103
103
|
|
|
@@ -166,6 +166,7 @@ Preview them all in the [theme gallery](https://agy-powerline.com/) or with `npx
|
|
|
166
166
|
| `tasks` | Running subagents and background tasks |
|
|
167
167
|
| `mode` | Approval mode (e.g. accept-edits) and Vim mode |
|
|
168
168
|
| `title` | The conversation's title |
|
|
169
|
+
| `sessionTime` | Time since the active conversation started |
|
|
169
170
|
| `totalTokens`, `cacheHit`, `cacheRead`, `cacheCreate` | Session tokens and prompt cache usage |
|
|
170
171
|
| `tokensToday`, `tokensWeek` | Tokens used today and over the last 7 days, all conversations (Node 22.13+) |
|
|
171
172
|
| `ram` | Memory used on your machine |
|
|
@@ -229,13 +230,17 @@ Thanks to everyone who has contributed:
|
|
|
229
230
|
<table>
|
|
230
231
|
<tbody>
|
|
231
232
|
<tr>
|
|
232
|
-
<td align="center" valign="top" width="
|
|
233
|
-
<td align="center" valign="top" width="
|
|
234
|
-
<td align="center" valign="top" width="
|
|
235
|
-
<td align="center" valign="top" width="
|
|
236
|
-
<td align="center" valign="top" width="
|
|
237
|
-
|
|
238
|
-
|
|
233
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/yatharth2soni"><img src="https://avatars.githubusercontent.com/u/238868599?v=4&s=128" width="64" height="64" alt="Yatharth Soni"/><br /><sub><b>Yatharth Soni</b></sub></a></td>
|
|
234
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/dannyward630"><img src="https://avatars.githubusercontent.com/u/71604164?v=4&s=128" width="64" height="64" alt="Danny Ward"/><br /><sub><b>Danny Ward</b></sub></a></td>
|
|
235
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/yoreva-01"><img src="https://avatars.githubusercontent.com/u/195282707?v=4&s=128" width="64" height="64" alt="Yusuf Orçan"/><br /><sub><b>Yusuf Orçan</b></sub></a></td>
|
|
236
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/yuefdev"><img src="https://avatars.githubusercontent.com/u/120668197?v=4&s=128" width="64" height="64" alt="Yusuf Efe"/><br /><sub><b>Yusuf Efe</b></sub></a></td>
|
|
237
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/hiyouwhatsapp"><img src="https://avatars.githubusercontent.com/u/89997383?v=4&s=128" width="64" height="64" alt="hiyouwhatsapp"/><br /><sub><b>hiyouwhatsapp</b></sub></a></td>
|
|
238
|
+
</tr>
|
|
239
|
+
<tr>
|
|
240
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/dharamdan01"><img src="https://avatars.githubusercontent.com/u/188893946?v=4&s=128" width="64" height="64" alt="dharamdan01"/><br /><sub><b>dharamdan01</b></sub></a></td>
|
|
241
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/Ashuge11"><img src="https://avatars.githubusercontent.com/u/210247942?v=4&s=128" width="64" height="64" alt="Ashvini Sundge"/><br /><sub><b>Ashvini Sundge</b></sub></a></td>
|
|
242
|
+
<td align="center" valign="top" width="20%"><a href="https://www.unkletayo.dev/"><img src="https://avatars.githubusercontent.com/u/48031746?v=4&s=128" width="64" height="64" alt="Adetayo Akinsanya"/><br /><sub><b>Adetayo Akinsanya</b></sub></a></td>
|
|
243
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/rahul05ranjan"><img src="https://avatars.githubusercontent.com/u/11793455?v=4&s=128" width="64" height="64" alt="Rahul"/><br /><sub><b>Rahul</b></sub></a></td>
|
|
239
244
|
</tr>
|
|
240
245
|
</tbody>
|
|
241
246
|
</table>
|
package/README.zh-CN.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# agy-powerline
|
|
2
2
|
|
|
3
|
-
[English](README.md) | **简体中文** | [日本語](README.ja.md) | [Français](README.fr.md)
|
|
3
|
+
[English](README.md) | **简体中文** | [日本語](README.ja.md) | [Français](README.fr.md) | [Español](README.es.md) | [한국어](README.ko.md)
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/agy-powerline)
|
|
6
6
|
[](https://www.npmjs.com/package/agy-powerline)
|
|
@@ -79,12 +79,12 @@ Install the agy-powerline statusline: run `npx agy-powerline init --yes`, then t
|
|
|
79
79
|
|
|
80
80
|
### 主题
|
|
81
81
|
|
|
82
|
-
| 终端背景 | 主题
|
|
83
|
-
| ---------- |
|
|
84
|
-
| 深色 | `dark-aurora`(默认)、`dark-ocean`、`dark-ember`、`dark-forest`、`dark-neon`、`dark-mono`、`dark-nocturne`、`dark-onyx`、`dark-metro`、`dark-macchiato` |
|
|
85
|
-
| 浅色 | `light-paper`、`light-sky`、`light-sunset`、`light-cream`
|
|
86
|
-
| 色盲友好 | `colorblind-dark`、`colorblind-light`
|
|
87
|
-
| 自定义颜色 | `custom`([方法](docs/configuration.md#custom-theme))
|
|
82
|
+
| 终端背景 | 主题 |
|
|
83
|
+
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
84
|
+
| 深色 | `dark-aurora`(默认)、`dark-ocean`、`dark-ember`、`dark-forest`、`dark-neon`、`dark-mono`、`dark-nocturne`、`dark-onyx`、`dark-metro`、`dark-macchiato`、`dark-nord`、`dark-rose-pine` |
|
|
85
|
+
| 浅色 | `light-paper`、`light-sky`、`light-sunset`、`light-cream`、`light-gruvbox`、`light-tokyo-night` |
|
|
86
|
+
| 色盲友好 | `colorblind-dark`、`colorblind-light` |
|
|
87
|
+
| 自定义颜色 | `custom`([方法](docs/configuration.md#custom-theme)) |
|
|
88
88
|
|
|
89
89
|
用 `npx agy-powerline theme --gallery` 预览所有主题。
|
|
90
90
|
|
|
@@ -155,6 +155,7 @@ Install the agy-powerline statusline: run `npx agy-powerline init --yes`, then t
|
|
|
155
155
|
| `tasks` | 正在运行的子代理和后台任务 |
|
|
156
156
|
| `mode` | 审批模式(如 accept-edits)和 Vim 模式 |
|
|
157
157
|
| `title` | 对话标题 |
|
|
158
|
+
| `sessionTime` | Time since the active conversation started |
|
|
158
159
|
| `totalTokens`、`cacheHit`、`cacheRead`、`cacheCreate` | 会话 token 数和提示缓存的使用情况 |
|
|
159
160
|
| `tokensToday`、`tokensWeek` | 今天和过去 7 天的 token 用量(所有对话,Node 22.13+) |
|
|
160
161
|
| `ram` | 本机已用内存 |
|
|
@@ -218,13 +219,17 @@ npx agy-powerline doctor # 检查一切是否为最新
|
|
|
218
219
|
<table>
|
|
219
220
|
<tbody>
|
|
220
221
|
<tr>
|
|
221
|
-
<td align="center" valign="top" width="
|
|
222
|
-
<td align="center" valign="top" width="
|
|
223
|
-
<td align="center" valign="top" width="
|
|
224
|
-
<td align="center" valign="top" width="
|
|
225
|
-
<td align="center" valign="top" width="
|
|
226
|
-
|
|
227
|
-
|
|
222
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/yatharth2soni"><img src="https://avatars.githubusercontent.com/u/238868599?v=4&s=128" width="64" height="64" alt="Yatharth Soni"/><br /><sub><b>Yatharth Soni</b></sub></a></td>
|
|
223
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/dannyward630"><img src="https://avatars.githubusercontent.com/u/71604164?v=4&s=128" width="64" height="64" alt="Danny Ward"/><br /><sub><b>Danny Ward</b></sub></a></td>
|
|
224
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/yoreva-01"><img src="https://avatars.githubusercontent.com/u/195282707?v=4&s=128" width="64" height="64" alt="Yusuf Orçan"/><br /><sub><b>Yusuf Orçan</b></sub></a></td>
|
|
225
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/yuefdev"><img src="https://avatars.githubusercontent.com/u/120668197?v=4&s=128" width="64" height="64" alt="Yusuf Efe"/><br /><sub><b>Yusuf Efe</b></sub></a></td>
|
|
226
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/hiyouwhatsapp"><img src="https://avatars.githubusercontent.com/u/89997383?v=4&s=128" width="64" height="64" alt="hiyouwhatsapp"/><br /><sub><b>hiyouwhatsapp</b></sub></a></td>
|
|
227
|
+
</tr>
|
|
228
|
+
<tr>
|
|
229
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/dharamdan01"><img src="https://avatars.githubusercontent.com/u/188893946?v=4&s=128" width="64" height="64" alt="dharamdan01"/><br /><sub><b>dharamdan01</b></sub></a></td>
|
|
230
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/Ashuge11"><img src="https://avatars.githubusercontent.com/u/210247942?v=4&s=128" width="64" height="64" alt="Ashvini Sundge"/><br /><sub><b>Ashvini Sundge</b></sub></a></td>
|
|
231
|
+
<td align="center" valign="top" width="20%"><a href="https://www.unkletayo.dev/"><img src="https://avatars.githubusercontent.com/u/48031746?v=4&s=128" width="64" height="64" alt="Adetayo Akinsanya"/><br /><sub><b>Adetayo Akinsanya</b></sub></a></td>
|
|
232
|
+
<td align="center" valign="top" width="20%"><a href="https://github.com/rahul05ranjan"><img src="https://avatars.githubusercontent.com/u/11793455?v=4&s=128" width="64" height="64" alt="Rahul"/><br /><sub><b>Rahul</b></sub></a></td>
|
|
228
233
|
</tr>
|
|
229
234
|
</tbody>
|
|
230
235
|
</table>
|
package/llms.txt
CHANGED
|
@@ -41,10 +41,14 @@
|
|
|
41
41
|
- `dark-onyx`
|
|
42
42
|
- `dark-metro`
|
|
43
43
|
- `dark-macchiato`
|
|
44
|
+
- `dark-nord`
|
|
45
|
+
- `dark-rose-pine`
|
|
44
46
|
- `light-paper`
|
|
45
47
|
- `light-sky`
|
|
46
48
|
- `light-sunset`
|
|
47
49
|
- `light-cream`
|
|
50
|
+
- `light-gruvbox`
|
|
51
|
+
- `light-tokyo-night`
|
|
48
52
|
- `colorblind-dark`
|
|
49
53
|
- `colorblind-light`
|
|
50
54
|
- `custom` — Your own colors.
|
|
@@ -85,6 +89,7 @@
|
|
|
85
89
|
- `tasks` — Running subagents and background tasks.
|
|
86
90
|
- `mode` — Approval mode and Vim mode.
|
|
87
91
|
- `title` — Current conversation title.
|
|
92
|
+
- `sessionTime` — Elapsed time since the active conversation started, from file metadata only.
|
|
88
93
|
- `ram` — Memory used on the machine.
|
|
89
94
|
- `os` — Operating system running agy (Windows, macOS, Linux or WSL).
|
|
90
95
|
- `host` — Current user and short hostname from the OS.
|
|
@@ -100,9 +105,10 @@
|
|
|
100
105
|
- `customText` — Your own text.
|
|
101
106
|
|
|
102
107
|
## Config
|
|
103
|
-
Default: `~/.agy-powerline/statusline.config.json`; with `AGY_POWERLINE_HOME`, use `$AGY_POWERLINE_HOME/statusline.config.json`. See [Configuration](https://
|
|
108
|
+
Default: `~/.agy-powerline/statusline.config.json`; with `AGY_POWERLINE_HOME`, use `$AGY_POWERLINE_HOME/statusline.config.json`. See [Configuration](https://agy-powerline.com/docs/configuration/).
|
|
104
109
|
```json
|
|
105
110
|
{
|
|
111
|
+
"$schema": "https://agy-powerline.com/schema/v1.json",
|
|
106
112
|
"theme": "dark-aurora",
|
|
107
113
|
"layout": "pills",
|
|
108
114
|
"ascii": false,
|
|
@@ -120,8 +126,16 @@ Default: `~/.agy-powerline/statusline.config.json`; with `AGY_POWERLINE_HOME`, u
|
|
|
120
126
|
- `import` asks before adding shell commands; never pass `--allow-exec` without approval of the exact commands.
|
|
121
127
|
|
|
122
128
|
## Docs
|
|
129
|
+
- [Website](https://agy-powerline.com/): what the bar shows, install, docs and the browser configurator
|
|
130
|
+
- [Themes](https://agy-powerline.com/themes/): every theme on dark and light terminals
|
|
123
131
|
- [README](https://github.com/wassim-azi/agy-powerline#readme)
|
|
124
|
-
- [
|
|
125
|
-
- [
|
|
126
|
-
- [
|
|
127
|
-
- [
|
|
132
|
+
- [Install](https://agy-powerline.com/install/)
|
|
133
|
+
- [Configuration](https://agy-powerline.com/docs/configuration/)
|
|
134
|
+
- [Widgets, with previews](https://agy-powerline.com/widgets/)
|
|
135
|
+
- [Payload reference](https://agy-powerline.com/docs/payload/): what agy sends to the status line
|
|
136
|
+
- [Troubleshooting](https://agy-powerline.com/troubleshooting/)
|
|
137
|
+
- [FAQ](https://agy-powerline.com/faq/)
|
|
138
|
+
- [Guides](https://agy-powerline.com/guides/)
|
|
139
|
+
- [Quota pace calculator](https://agy-powerline.com/quota-calculator/)
|
|
140
|
+
- [Config JSON Schema](https://agy-powerline.com/schema/v1.json)
|
|
141
|
+
- [Security](https://agy-powerline.com/security/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agy-powerline",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "agy statusline for Google Antigravity CLI: live Gemini, Claude/GPT and Argon quota pacing, git, themes and an interactive TUI configurator",
|
|
5
5
|
"bin": {
|
|
6
6
|
"agy-powerline": "src/index.js"
|
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
"gallery": "node scripts/gallery/build.js",
|
|
39
39
|
"screenshots": "node scripts/gallery/screenshots.js",
|
|
40
40
|
"configurator": "node scripts/configurator/build.js",
|
|
41
|
+
"site": "node scripts/site/build.js",
|
|
42
|
+
"site:images": "node scripts/site/images.js",
|
|
41
43
|
"lint": "eslint .",
|
|
42
44
|
"lint:fix": "eslint . --fix",
|
|
43
45
|
"format": "prettier --write .",
|
package/src/cli/configure.js
CHANGED
|
@@ -24,6 +24,7 @@ const {
|
|
|
24
24
|
} = require("../lib/shared");
|
|
25
25
|
const { resolveInstallDir } = require("../lib/paths");
|
|
26
26
|
const { WIDGET_TAGS } = require("../lib/widget-style");
|
|
27
|
+
const { SUPPORTED_LANGUAGES, resolveLanguage } = require("../lib/i18n");
|
|
27
28
|
const { editFields: getEditFields, stepNumberField } = require("../lib/widget-options");
|
|
28
29
|
const { loadEditableConfig } = require("./config-guard");
|
|
29
30
|
const {
|
|
@@ -427,6 +428,10 @@ function previewParts(width) {
|
|
|
427
428
|
if (preview.layout === "pills") {
|
|
428
429
|
chips.unshift(ui.chip("joins", preview.powerline.enabled, key("j")));
|
|
429
430
|
}
|
|
431
|
+
// Only worth a chip once there is a language to switch to.
|
|
432
|
+
if (SUPPORTED_LANGUAGES.length > 1) {
|
|
433
|
+
chips.push(ui.chip(`lang ${resolveLanguage(preview.language)}`, true, key("u")));
|
|
434
|
+
}
|
|
430
435
|
|
|
431
436
|
return { title, bar: String(rendered).split("\n"), chips: chips.join(" ") };
|
|
432
437
|
}
|
|
@@ -1629,6 +1634,15 @@ function onMain(key) {
|
|
|
1629
1634
|
if (persist()) {
|
|
1630
1635
|
flashMessage = `Pace marker: ${config.pacing ? "on" : "off"}`;
|
|
1631
1636
|
}
|
|
1637
|
+
return;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
if (key.name === "u" && SUPPORTED_LANGUAGES.length > 1) {
|
|
1641
|
+
const next = SUPPORTED_LANGUAGES.indexOf(resolveLanguage(config.language)) + 1;
|
|
1642
|
+
config.language = SUPPORTED_LANGUAGES[next % SUPPORTED_LANGUAGES.length];
|
|
1643
|
+
if (persist()) {
|
|
1644
|
+
flashMessage = `Bar language: ${config.language}`;
|
|
1645
|
+
}
|
|
1632
1646
|
}
|
|
1633
1647
|
}
|
|
1634
1648
|
|
package/src/cli/doctor.js
CHANGED
|
@@ -7,6 +7,7 @@ const {
|
|
|
7
7
|
resolveInstallDir,
|
|
8
8
|
AGY_SETTINGS,
|
|
9
9
|
statuslineCommand,
|
|
10
|
+
appendedRenderFlags,
|
|
10
11
|
readInstallMeta,
|
|
11
12
|
readAgySettings,
|
|
12
13
|
isWsl,
|
|
@@ -27,6 +28,7 @@ const { runStatuslineCommand } = require("../lib/run");
|
|
|
27
28
|
const { detectColorDepth } = require("../lib/colors");
|
|
28
29
|
const { readLog, getLogPath } = require("../lib/log");
|
|
29
30
|
const { USAGE_PERIODS, usageAvailable } = require("../lib/usage");
|
|
31
|
+
const { matchLanguage, SUPPORTED_LANGUAGES } = require("../lib/i18n");
|
|
30
32
|
const { version } = require("../../package.json");
|
|
31
33
|
|
|
32
34
|
const DIM = "\x1b[2m";
|
|
@@ -74,6 +76,20 @@ function stripAnsi(text) {
|
|
|
74
76
|
return String(text).replace(/\x1b\[[0-9;]*m/g, "");
|
|
75
77
|
}
|
|
76
78
|
|
|
79
|
+
function renderOverridesInCommand(command) {
|
|
80
|
+
const names = [];
|
|
81
|
+
const pattern =
|
|
82
|
+
/(?:^|\s)--(preset|layout|theme|caps|gradient|language)(?:(?:\s*=\s*|\s+)(?:"([^"]*)"|'([^']*)'|([^\s-][^\s]*)))?/g;
|
|
83
|
+
|
|
84
|
+
for (const match of String(command).matchAll(pattern)) {
|
|
85
|
+
const value = match[2] ?? match[3] ?? match[4] ?? "(missing)";
|
|
86
|
+
const safeValue = value.replace(/[^A-Za-z0-9_.#-]/g, "?").slice(0, 64);
|
|
87
|
+
names.push(`--${match[1]} ${safeValue}`);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return names.join(", ");
|
|
91
|
+
}
|
|
92
|
+
|
|
77
93
|
async function doctorCommand(options = {}) {
|
|
78
94
|
const installDir = resolveInstallDir();
|
|
79
95
|
const meta = readInstallMeta(installDir);
|
|
@@ -82,6 +98,7 @@ async function doctorCommand(options = {}) {
|
|
|
82
98
|
? statuslineCommand(installDir)
|
|
83
99
|
: "";
|
|
84
100
|
const configured = settings?.statusLine?.command || "";
|
|
101
|
+
const configuredOverrides = renderOverridesInCommand(configured);
|
|
85
102
|
const wsl = isWsl();
|
|
86
103
|
const windowsNode = isWindowsNodeOnWsl();
|
|
87
104
|
const colorDepth = detectColorDepth(process.env);
|
|
@@ -103,6 +120,9 @@ async function doctorCommand(options = {}) {
|
|
|
103
120
|
console.log(
|
|
104
121
|
`| **Statusline Command** | \`${configured ? tildify(configured) : "(missing)"}\` |`
|
|
105
122
|
);
|
|
123
|
+
if (configuredOverrides) {
|
|
124
|
+
console.log(`| **Render Overrides** | \`${configuredOverrides}\` |`);
|
|
125
|
+
}
|
|
106
126
|
console.log(
|
|
107
127
|
`| **Stack with Default** | \`${settings?.statusLine?.stack_with_default ? "true" : "false"}\` |`
|
|
108
128
|
);
|
|
@@ -129,6 +149,9 @@ async function doctorCommand(options = {}) {
|
|
|
129
149
|
line("config", path.join(installDir, "statusline.config.json"));
|
|
130
150
|
line("settings", AGY_SETTINGS);
|
|
131
151
|
line("command", configured || `${DIM}(missing)${RESET}`);
|
|
152
|
+
if (configuredOverrides) {
|
|
153
|
+
line("overrides", configuredOverrides);
|
|
154
|
+
}
|
|
132
155
|
const logEntries = readLog(getLogPath(installDir)).length;
|
|
133
156
|
line(
|
|
134
157
|
"problem log",
|
|
@@ -171,6 +194,17 @@ async function doctorCommand(options = {}) {
|
|
|
171
194
|
console.log(" tokensToday and tokensWeek stay hidden until Node is updated.");
|
|
172
195
|
}
|
|
173
196
|
|
|
197
|
+
// Not a failure either: the bar shows English.
|
|
198
|
+
const language = configState.raw?.language;
|
|
199
|
+
if (language !== undefined && !matchLanguage(language)) {
|
|
200
|
+
const shown = String(language)
|
|
201
|
+
.replace(/[^A-Za-z0-9_-]/g, "?")
|
|
202
|
+
.slice(0, 32);
|
|
203
|
+
console.log();
|
|
204
|
+
console.log(`${YELLOW} language "${shown}" isn't available${RESET}, so the bar shows English.`);
|
|
205
|
+
console.log(` Available: ${SUPPORTED_LANGUAGES.join(", ")}`);
|
|
206
|
+
}
|
|
207
|
+
|
|
174
208
|
const breaking = cmdBreakingChars(installDir);
|
|
175
209
|
if (breaking.length) {
|
|
176
210
|
failed += 1;
|
|
@@ -201,7 +235,7 @@ async function doctorCommand(options = {}) {
|
|
|
201
235
|
console.log();
|
|
202
236
|
console.log(`${RED} No statusline.js in the install dir.${RESET}`);
|
|
203
237
|
console.log(" Run: npx agy-powerline init --yes");
|
|
204
|
-
} else if (configured && expected && configured
|
|
238
|
+
} else if (configured && expected && appendedRenderFlags(configured, expected) === null) {
|
|
205
239
|
console.log();
|
|
206
240
|
console.log(`${YELLOW} settings.json command does not match this install.${RESET}`);
|
|
207
241
|
console.log(` expected ${expected}`);
|