@vincentbanana/bananacli 0.8.11 → 0.8.13

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.en.md CHANGED
@@ -36,7 +36,7 @@ A multi-provider AI agent for the terminal, with a local GUI. It can read and wr
36
36
  | |_) | (_| | | | | (_| | |_) | (_| | | | |
37
37
  |____/ \__,_|_| |_|\__,_|_.__/ \__,_|_| |_|
38
38
 
39
- BananaCLI v0.8.10 · terminal + GUI
39
+ BananaCLI v0.8.13 · terminal + GUI
40
40
  ```
41
41
 
42
42
  - **No frontend framework**: the CLI uses Node built-ins only; runtime dependencies are `ws` and `@lydell/node-pty` (prebuilt native module).
package/README.md CHANGED
@@ -34,7 +34,7 @@
34
34
  | |_) | (_| | | | | (_| | |_) | (_| | | | |
35
35
  |____/ \__,_|_| |_|\__,_|_.__/ \__,_|_| |_|
36
36
 
37
- BananaCLI v0.8.10 · 终端 + 图形界面
37
+ BananaCLI v0.8.13 · 终端 + 图形界面
38
38
  ```
39
39
 
40
40
  - **无前端框架依赖**:CLI 只用 Node 内置模块;运行时依赖 `ws`(GUI/终端 WebSocket)和 `@lydell/node-pty`(预编译原生模块)。
package/dist/ui/app.js CHANGED
@@ -157,6 +157,7 @@ const STRINGS = {
157
157
  'time.days': '天前',
158
158
  'time.today': '今天',
159
159
  'time.yesterday': '昨天',
160
+ 'msg.you': '你',
160
161
  },
161
162
  en: {
162
163
  'sidebar.toggle': 'Conversations (Ctrl+B)',
@@ -234,6 +235,7 @@ const STRINGS = {
234
235
  'time.days': 'd ago',
235
236
  'time.today': 'Today',
236
237
  'time.yesterday': 'Yesterday',
238
+ 'msg.you': 'You',
237
239
  },
238
240
  };
239
241
 
@@ -1189,7 +1191,7 @@ function renderMessage(message) {
1189
1191
  node.className = `msg ${message.role}`;
1190
1192
  const role = document.createElement('div');
1191
1193
  role.className = 'msg-role';
1192
- role.textContent = message.role === 'user' ? '你' : 'Banana';
1194
+ role.textContent = message.role === 'user' ? t('msg.you') : 'Banana';
1193
1195
  const body = document.createElement('div');
1194
1196
  body.className = 'msg-body';
1195
1197
  if (message.role === 'user') {
@@ -1787,6 +1789,13 @@ function renderTodos() {
1787
1789
  $('todoSummary').setAttribute('aria-expanded', String(state.todoOpen));
1788
1790
  $('todoCount').textContent = `${done}/${todos.length}`;
1789
1791
  $('todoBarFill').style.width = todos.length ? `${Math.round((done / todos.length) * 100)}%` : '0%';
1792
+ const chip = $('taskBtn');
1793
+ if (chip) {
1794
+ chip.hidden = todos.length === 0;
1795
+ chip.title = `${t('todo.title')} ${done}/${todos.length}`;
1796
+ $('taskChipText').textContent = `${t('todo.title')} ${done}/${todos.length}`;
1797
+ $('taskChipFill').style.width = todos.length ? `${Math.round((done / todos.length) * 100)}%` : '0%';
1798
+ }
1790
1799
  const list = $('todoList');
1791
1800
  list.innerHTML = '';
1792
1801
  todos.forEach((item) => {
@@ -5268,6 +5277,10 @@ function bind() {
5268
5277
  if (state.review.mode === 'changes') void loadChanges(true);
5269
5278
  }
5270
5279
  });
5280
+ $('taskBtn').addEventListener('click', () => {
5281
+ if (state.review.open && state.review.mode === 'tasks') closeReview();
5282
+ else openReview('tasks');
5283
+ });
5271
5284
  $('searchBtn').addEventListener('click', openCommandCenter);
5272
5285
  $('openSettingsFoot').addEventListener('click', () => openSettings());
5273
5286
  $('newTab').addEventListener('click', () => $('newChat').click());
@@ -74,7 +74,11 @@
74
74
  <div class="chat-actions">
75
75
  <span class="mode-badge" id="modeBadge" hidden>Plan</span>
76
76
  <button class="icon-btn" id="filesBtn" title="工作区文件" aria-label="工作区文件"></button>
77
- <button class="icon-btn" id="reviewBtn" title="查看改动 / 文件 / 任务(Review)" aria-label="查看 Review"></button>
77
+ <button class="chip-btn task-chip" id="taskBtn" hidden title="任务" aria-label="任务">
78
+ <span id="taskChipText"></span>
79
+ <span class="task-chip-bar"><i id="taskChipFill"></i></span>
80
+ </button>
81
+ <button class="icon-btn" id="reviewBtn" title="查看改动 / 文件 / 任务(Review)" aria-label="查看 Review"></button>
78
82
  </div>
79
83
  </header>
80
84
 
package/dist/ui/style.css CHANGED
@@ -4219,10 +4219,17 @@ input:focus-visible, textarea:focus-visible { outline: none; }
4219
4219
  .msg-body h2,
4220
4220
  .msg-body h3 { font-size: 14.5px; margin: 18px 0 8px; font-weight: 600; }
4221
4221
  .msg-role {
4222
+ display: flex;
4223
+ align-items: center;
4224
+ gap: 6px;
4222
4225
  font-size: 10.5px;
4223
4226
  letter-spacing: 0.09em;
4224
4227
  margin-bottom: 6px;
4225
4228
  }
4229
+ .msg.user .msg-role { justify-content: flex-end; }
4230
+ .msg.user .msg-role::before { display: none; }
4231
+ .msg.assistant .msg-role::before { background: var(--accent-ink); opacity: 0.45; }
4232
+ .msg.assistant .msg-role { color: var(--text-3); }
4226
4233
  .msg.user .msg-body {
4227
4234
  background: var(--panel);
4228
4235
  border-color: var(--line-strong);
@@ -4294,6 +4301,31 @@ input:focus-visible, textarea:focus-visible { outline: none; }
4294
4301
  .sb-search { border-radius: 8px; }
4295
4302
  .sidebar-foot { padding: 10px; gap: 8px; }
4296
4303
 
4304
+ /* 任务入口:顶部一枚进度胶囊,点击打开右侧任务面板 */
4305
+ .todo-dock { display: none; }
4306
+ .task-chip {
4307
+ height: 26px;
4308
+ padding: 0 9px;
4309
+ gap: 7px;
4310
+ font-size: 11.5px;
4311
+ font-variant-numeric: tabular-nums;
4312
+ }
4313
+ .task-chip[hidden] { display: none; }
4314
+ .task-chip-bar {
4315
+ width: 40px;
4316
+ height: 3px;
4317
+ border-radius: 99px;
4318
+ background: var(--line);
4319
+ overflow: hidden;
4320
+ }
4321
+ .task-chip-bar i {
4322
+ display: block;
4323
+ width: 0;
4324
+ height: 100%;
4325
+ background: var(--accent-ink);
4326
+ transition: width 200ms var(--ease);
4327
+ }
4328
+
4297
4329
  /* 顶栏和聊天头部:少一点装饰,多一点边界 */
4298
4330
  .topbar { height: 50px; }
4299
4331
  .chat-head { height: 46px; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincentbanana/bananacli",
3
- "version": "0.8.11",
3
+ "version": "0.8.13",
4
4
  "description": "A multi-provider AI agent for your terminal: file tools, shell, web search, persistent sessions, diff preview and undo",
5
5
  "type": "module",
6
6
  "engines": {