@vincentbanana/bananacli 0.8.0 → 0.8.2

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.
@@ -93,7 +93,7 @@
93
93
  <div class="attachments" id="attachments" hidden></div>
94
94
  <form class="composer" id="composer">
95
95
  <div class="command-palette" id="commandPalette" hidden></div>
96
- <textarea id="input" rows="1" placeholder="说点什么,Banana 来动手;输入 / 调命令,@ 引文件"></textarea>
96
+ <textarea id="input" rows="1" aria-label="给 Banana 发消息" placeholder="说点什么,Banana 来动手;输入 / 调命令,@ 引文件"></textarea>
97
97
  <div class="composer-toolbar">
98
98
  <div class="ct-left">
99
99
  <button class="icon-btn attach-btn" id="attachBtn" type="button" title="添加附件" aria-label="添加附件"></button>
@@ -125,7 +125,7 @@
125
125
  <div class="review-resizer" id="reviewResizer" title="拖动调整宽度"></div>
126
126
  <header class="review-head">
127
127
  <div class="review-tabs">
128
- <button class="review-tab is-on" data-mode="changes" id="reviewTabChanges">Review</button>
128
+ <button class="review-tab is-on" data-mode="changes" id="reviewTabChanges">改动</button>
129
129
  <button class="review-tab" data-mode="files" id="reviewTabFiles">文件</button>
130
130
  <button class="review-tab" data-mode="tasks" id="reviewTabTasks">任务</button>
131
131
  </div>
@@ -199,7 +199,7 @@
199
199
  </div>
200
200
 
201
201
  <div class="settings" id="settingsSheet" hidden>
202
- <div class="settings-panel" role="dialog" aria-modal="true" aria-label="设置">
202
+ <div class="settings-panel" role="dialog" aria-modal="true" aria-label="设置" tabindex="-1">
203
203
  <header class="settings-head">
204
204
  <div>
205
205
  <h2>设置</h2>
@@ -255,7 +255,7 @@
255
255
  </div>
256
256
 
257
257
  <div class="modal" id="approvalModal" hidden>
258
- <div class="modal-card">
258
+ <div class="modal-card" role="dialog" aria-modal="true" aria-label="需要确认">
259
259
  <div class="modal-head">
260
260
  <span class="modal-ico" data-icon="shield"></span>
261
261
  <span id="approvalKind">需要确认</span>
@@ -270,7 +270,7 @@
270
270
  </div>
271
271
 
272
272
  <div class="selection-tools" id="selectionTools" hidden></div>
273
- <div class="toast" id="toast" hidden></div>
273
+ <div class="toast" id="toast" role="status" aria-live="polite" hidden></div>
274
274
  <script src="vendor/xterm.js"></script>
275
275
  <script src="vendor/addon-fit.js"></script>
276
276
  <script src="vendor/highlight.min.js"></script>
package/dist/ui/style.css CHANGED
@@ -6,7 +6,7 @@
6
6
  --line-strong: #d6d6d1;
7
7
  --text: #16161a;
8
8
  --text-2: #5f5f66;
9
- --text-3: #8c8c93;
9
+ --text-3: #6b6b73;
10
10
  --inverse: #16161a;
11
11
  --shadow-sm: 0 1px 2px rgba(16, 16, 20, 0.05);
12
12
  --shadow-lg: 0 18px 44px rgba(16, 16, 20, 0.16);
@@ -31,7 +31,7 @@
31
31
  --line-strong: #33333a;
32
32
  --text: #f2f2f0;
33
33
  --text-2: #a1a1a8;
34
- --text-3: #74747c;
34
+ --text-3: #94949d;
35
35
  --inverse: #f2f2f0;
36
36
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
37
37
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
@@ -46,7 +46,7 @@
46
46
  --line-strong: #33333a;
47
47
  --text: #f2f2f0;
48
48
  --text-2: #a1a1a8;
49
- --text-3: #74747c;
49
+ --text-3: #94949d;
50
50
  --inverse: #f2f2f0;
51
51
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
52
52
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
@@ -2554,7 +2554,7 @@ html[data-reduce-motion='1'] *::after {
2554
2554
  --line-strong: rgba(0, 0, 0, 0.16);
2555
2555
  --text: #161616;
2556
2556
  --text-2: #5c5c5c;
2557
- --text-3: #808080;
2557
+ --text-3: #6b6b73;
2558
2558
  --inverse: #161616;
2559
2559
  --accent: #dcde8d;
2560
2560
  --accent-ink: #8a6d12;
@@ -2591,7 +2591,7 @@ html[data-reduce-motion='1'] *::after {
2591
2591
  --line-strong: rgba(255, 255, 255, 0.16);
2592
2592
  --text: #f2f2f2;
2593
2593
  --text-2: #b7b1b1;
2594
- --text-3: #808080;
2594
+ --text-3: #94949d;
2595
2595
  --inverse: #f2f2f2;
2596
2596
  --accent: #dcde8d;
2597
2597
  --accent-ink: #e6e8a4;
@@ -2615,7 +2615,7 @@ html[data-reduce-motion='1'] *::after {
2615
2615
  --line-strong: rgba(255, 255, 255, 0.16);
2616
2616
  --text: #f2f2f2;
2617
2617
  --text-2: #b7b1b1;
2618
- --text-3: #808080;
2618
+ --text-3: #94949d;
2619
2619
  --inverse: #f2f2f2;
2620
2620
  --accent: #dcde8d;
2621
2621
  --accent-ink: #e6e8a4;
@@ -3996,3 +3996,202 @@ input:focus-visible, textarea:focus-visible { outline: none; }
3996
3996
  .plan-actions { flex-wrap: wrap; }
3997
3997
  }
3998
3998
  .msg.user .msg-attachments { align-self: flex-end; justify-content: flex-end; max-width: 100%; margin: 7px 0 0; }
3999
+
4000
+ /* ---------- v1.1:阅读优先的对话排版 / 平滑追底 ---------- */
4001
+ .thread {
4002
+ scroll-behavior: auto !important;
4003
+ overflow-anchor: none;
4004
+ padding: 18px 0 26px;
4005
+ scrollbar-gutter: stable;
4006
+ }
4007
+
4008
+ .msg {
4009
+ max-width: 780px;
4010
+ padding: 0 32px;
4011
+ content-visibility: visible;
4012
+ contain-intrinsic-size: none;
4013
+ }
4014
+ .msg + .msg { margin-top: 30px; }
4015
+ .msg-body {
4016
+ font-size: 15px;
4017
+ line-height: 1.72;
4018
+ letter-spacing: 0.002em;
4019
+ }
4020
+ .msg.user .msg-body {
4021
+ max-width: min(82%, 68ch);
4022
+ padding: 10px 14px;
4023
+ border-radius: 12px;
4024
+ font-size: 14.5px;
4025
+ line-height: 1.62;
4026
+ }
4027
+ .msg.assistant .msg-body { width: 100%; }
4028
+ .msg-body p { margin: 0 0 14px; }
4029
+ .msg-body p:last-child { margin-bottom: 0; }
4030
+ .msg-body ul, .msg-body ol { margin: 10px 0 14px; padding-left: 28px; }
4031
+ .msg-body li { margin-bottom: 6px; }
4032
+ .msg-body h1 { font-size: 18px; line-height: 1.45; margin: 28px 0 12px; }
4033
+ .msg-body h2 { font-size: 16px; line-height: 1.45; margin: 24px 0 10px; }
4034
+ .msg-body h3 { font-size: 14px; line-height: 1.5; margin: 20px 0 8px; }
4035
+ .msg-body pre.code {
4036
+ margin: 12px 0 16px;
4037
+ padding: 12px 14px;
4038
+ border-radius: 8px;
4039
+ line-height: 1.62;
4040
+ font-size: 12.5px;
4041
+ }
4042
+ .msg-body code { font-size: 12.5px; }
4043
+
4044
+ .stream-stable, .stream-tail { display: contents; }
4045
+
4046
+ .thinking-row, .working-row {
4047
+ max-width: 780px;
4048
+ padding: 0 32px;
4049
+ margin: 2px auto 0;
4050
+ font-size: 12.5px;
4051
+ font-weight: 450;
4052
+ line-height: 1.5;
4053
+ color: var(--text-3);
4054
+ }
4055
+ .msg .working-row { margin-bottom: 10px; }
4056
+
4057
+ .work-group, .think {
4058
+ margin: 10px 0 14px;
4059
+ border: 0;
4060
+ border-radius: 8px;
4061
+ background: transparent;
4062
+ }
4063
+ .work-group > summary, .think > summary {
4064
+ min-height: 32px;
4065
+ padding: 0 7px;
4066
+ border-radius: 7px;
4067
+ font-size: 12.5px;
4068
+ font-weight: 450;
4069
+ color: var(--text-3);
4070
+ }
4071
+ .work-group > summary:hover, .think > summary:hover { background: var(--panel); }
4072
+ .work-group .tool-group-body { padding: 2px 0 6px; }
4073
+ .tool-row {
4074
+ min-height: 32px;
4075
+ padding: 2px 7px;
4076
+ border-radius: 7px;
4077
+ font-size: 12.5px;
4078
+ }
4079
+ .msg .tool-row:hover { transform: none; }
4080
+ .tool-row .t-name { font-weight: 520; }
4081
+ .tool-row .t-detail { font-size: 11.5px; }
4082
+ .tool-row .t-state { font-size: 10.5px; }
4083
+ .tool-output {
4084
+ max-height: 300px;
4085
+ margin: 3px 0 8px;
4086
+ padding: 10px 12px;
4087
+ border-radius: 8px;
4088
+ font-size: 12px;
4089
+ line-height: 1.62;
4090
+ }
4091
+ .think-body {
4092
+ max-height: 300px;
4093
+ padding: 8px 12px 12px;
4094
+ border-top: 1px solid var(--line);
4095
+ white-space: normal;
4096
+ font-size: 12.5px;
4097
+ line-height: 1.72;
4098
+ }
4099
+ .think-body p { margin: 0 0 10px; }
4100
+ .think-body p:last-child { margin-bottom: 0; }
4101
+ .turn-meta {
4102
+ margin-top: 12px;
4103
+ font-size: 11px;
4104
+ color: var(--text-3);
4105
+ opacity: 0.78;
4106
+ }
4107
+ .msg.user .turn-meta { opacity: 0.65; }
4108
+ .plan-card { max-width: 780px; margin-top: 8px; }
4109
+
4110
+ @media (max-width: 720px) {
4111
+ .thread { padding-top: 12px; }
4112
+ .msg { padding: 0 20px; }
4113
+ .thinking-row, .working-row { padding: 0 20px; }
4114
+ .msg-body { font-size: 14.5px; line-height: 1.68; }
4115
+ .msg + .msg { margin-top: 24px; }
4116
+ }
4117
+
4118
+ /* ---------- v1.2:折叠思考摘要、对话框、阅读细节 ---------- */
4119
+ .think > summary .think-title { flex: none; }
4120
+ .think-peek {
4121
+ min-width: 0;
4122
+ flex: 1;
4123
+ overflow: hidden;
4124
+ text-overflow: ellipsis;
4125
+ white-space: nowrap;
4126
+ color: var(--text-3);
4127
+ font-weight: 400;
4128
+ }
4129
+ .think-len { flex: none; margin-left: auto; }
4130
+ .think .think-peek:empty { display: none; }
4131
+ .table-wrap {
4132
+ margin: 12px 0 16px;
4133
+ max-width: 100%;
4134
+ overflow-x: auto;
4135
+ border: 1px solid var(--line);
4136
+ border-radius: 8px;
4137
+ }
4138
+ .table-wrap table {
4139
+ width: 100%;
4140
+ border-collapse: collapse;
4141
+ font-size: 13px;
4142
+ line-height: 1.55;
4143
+ }
4144
+ .table-wrap th,
4145
+ .table-wrap td {
4146
+ padding: 7px 10px;
4147
+ border-bottom: 1px solid var(--line);
4148
+ text-align: left;
4149
+ vertical-align: top;
4150
+ }
4151
+ .table-wrap th {
4152
+ background: var(--panel);
4153
+ color: var(--text-2);
4154
+ font-weight: 560;
4155
+ }
4156
+ .table-wrap tr:last-child td { border-bottom: 0; }
4157
+ .msg-body p {
4158
+ /* 中文长段落避免最后一行只剩一两个词 */
4159
+ text-wrap: pretty;
4160
+ }
4161
+ .turn-meta { opacity: 0.92; }
4162
+ .composer { max-width: 780px; }
4163
+ .dialog-card {
4164
+ width: min(420px, calc(100vw - 32px));
4165
+ max-width: 420px;
4166
+ padding: 18px;
4167
+ }
4168
+ .dialog-text {
4169
+ margin: 10px 0 0;
4170
+ color: var(--text-2);
4171
+ font-size: 12.5px;
4172
+ line-height: 1.65;
4173
+ }
4174
+ .dialog-text[hidden] { display: none; }
4175
+ .dialog-input {
4176
+ width: 100%;
4177
+ height: 34px;
4178
+ margin-top: 12px;
4179
+ padding: 0 10px;
4180
+ border: 1px solid var(--line-strong);
4181
+ border-radius: 7px;
4182
+ background: var(--bg);
4183
+ color: var(--text);
4184
+ font-size: 13px;
4185
+ }
4186
+ .dialog-input:focus { border-color: var(--accent-ink); outline: none; }
4187
+ .dialog-input[hidden] { display: none; }
4188
+ .btn.danger {
4189
+ border-color: #b4453a;
4190
+ background: #b4453a;
4191
+ color: #fff;
4192
+ }
4193
+ .btn.danger:hover { filter: brightness(0.96); }
4194
+ @media (max-width: 720px) {
4195
+ .think-peek { display: none; }
4196
+ .think-len { margin-left: auto; }
4197
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincentbanana/bananacli",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
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": {