@vincentbanana/banana-gui 1.0.11 → 1.0.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/package.json +2 -2
- package/ui/app.js +14 -1
- package/ui/index.html +5 -1
- package/ui/style.css +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincentbanana/banana-gui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Banana 鐨勫浘褰㈢晫闈細鏈湴鏈嶅姟 + 娴忚鍣ㄣ€傞粦鐧戒富棰橈紝鑷粯鍥炬爣锛屾棤绗笁鏂?UI 渚濊禆",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"electron-builder": "^25.0.0"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@vincentbanana/bananacli": "^0.8.
|
|
75
|
+
"@vincentbanana/bananacli": "^0.8.13"
|
|
76
76
|
},
|
|
77
77
|
"license": "MIT",
|
|
78
78
|
"publishConfig": {
|
package/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' ? '
|
|
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());
|
package/ui/index.html
CHANGED
|
@@ -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="
|
|
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/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; }
|