@vincentbanana/bananacli 0.8.9 → 0.8.11
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 +1 -1
- package/README.md +1 -1
- package/dist/config/config.js +2 -1
- package/dist/session/store.js +1 -1
- package/dist/tools/fs.js +2 -2
- package/dist/ui/style.css +99 -0
- package/package.json +1 -1
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.
|
|
39
|
+
BananaCLI v0.8.10 · 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.
|
|
37
|
+
BananaCLI v0.8.10 · 终端 + 图形界面
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
- **无前端框架依赖**:CLI 只用 Node 内置模块;运行时依赖 `ws`(GUI/终端 WebSocket)和 `@lydell/node-pty`(预编译原生模块)。
|
package/dist/config/config.js
CHANGED
|
@@ -131,6 +131,7 @@ export function defaultSystemPrompt(workspace) {
|
|
|
131
131
|
'',
|
|
132
132
|
'## 执行与安全',
|
|
133
133
|
'先读相关代码再改,最小改动;破坏性操作先确认;工具报错自己修一次,仍不行再说明卡点。',
|
|
134
|
+
'能并行的工具一次调用;同一个文件不要反复整读,先用 grep 定位。',
|
|
134
135
|
'',
|
|
135
136
|
'## 验收',
|
|
136
137
|
'改了代码才跑测试 / 构建;没验证就别说“完成”;交付只说:改了什么 / 验证结果 / 未验证项。',
|
|
@@ -178,7 +179,7 @@ function defaultConfig(workspace) {
|
|
|
178
179
|
workspace,
|
|
179
180
|
systemPrompt: defaultSystemPrompt(workspace),
|
|
180
181
|
maxSteps: 500,
|
|
181
|
-
maxContextChars:
|
|
182
|
+
maxContextChars: 80_000,
|
|
182
183
|
allowOutsideWorkspace: false,
|
|
183
184
|
showReasoning: true,
|
|
184
185
|
disabledPlugins: [],
|
package/dist/session/store.js
CHANGED
package/dist/tools/fs.js
CHANGED
|
@@ -209,7 +209,7 @@ function lineNumbered(text, startLine) {
|
|
|
209
209
|
}
|
|
210
210
|
export const readFileTool = {
|
|
211
211
|
name: 'read_file',
|
|
212
|
-
description: '
|
|
212
|
+
description: '读取文件内容,返回带行号的文本。单次最多返回约 2.4 万字符;大文件先用 grep 定位,再用 offset/limit 分段读。相对路径基于工作区根目录。',
|
|
213
213
|
parameters: {
|
|
214
214
|
type: 'object',
|
|
215
215
|
properties: {
|
|
@@ -242,7 +242,7 @@ export const readFileTool = {
|
|
|
242
242
|
const limit = Number(input.limit) || lines.length;
|
|
243
243
|
const slice = lines.slice(offset - 1, offset - 1 + limit);
|
|
244
244
|
const header = `${toDisplay(ctx, target)} | 共 ${lines.length} 行, ${info.size} 字节 | 从第 ${offset} 行起显示 ${slice.length} 行`;
|
|
245
|
-
const body = truncateMiddle(lineNumbered(slice.join('\n'), offset),
|
|
245
|
+
const body = truncateMiddle(lineNumbered(slice.join('\n'), offset), 24_000);
|
|
246
246
|
return ok(`${header}\n\n${body}`, `读取 ${toDisplay(ctx, target)}(${slice.length} 行${lines.length > slice.length ? ` / 共 ${lines.length} 行` : ''})`);
|
|
247
247
|
}
|
|
248
248
|
catch (error) {
|
package/dist/ui/style.css
CHANGED
|
@@ -4201,3 +4201,102 @@ input:focus-visible, textarea:focus-visible { outline: none; }
|
|
|
4201
4201
|
.think-peek { display: none; }
|
|
4202
4202
|
.think-len { margin-left: auto; }
|
|
4203
4203
|
}
|
|
4204
|
+
|
|
4205
|
+
/* ---------- 细节统一:更宽的内容区、更清楚的结构 ---------- */
|
|
4206
|
+
|
|
4207
|
+
/* 内容宽度:主对话、输入区、计划卡、任务栏统一到同一列 */
|
|
4208
|
+
.msg { max-width: 900px; content-visibility: visible; }
|
|
4209
|
+
.composer,
|
|
4210
|
+
.composer-hint,
|
|
4211
|
+
.attachments { max-width: 900px; }
|
|
4212
|
+
.plan-card { max-width: 880px; }
|
|
4213
|
+
.todo-dock { max-width: 900px; }
|
|
4214
|
+
|
|
4215
|
+
/* 正文节奏 */
|
|
4216
|
+
.msg-body { font-size: 14.5px; line-height: 1.7; }
|
|
4217
|
+
.msg-body p { margin-bottom: 12px; }
|
|
4218
|
+
.msg-body h1,
|
|
4219
|
+
.msg-body h2,
|
|
4220
|
+
.msg-body h3 { font-size: 14.5px; margin: 18px 0 8px; font-weight: 600; }
|
|
4221
|
+
.msg-role {
|
|
4222
|
+
font-size: 10.5px;
|
|
4223
|
+
letter-spacing: 0.09em;
|
|
4224
|
+
margin-bottom: 6px;
|
|
4225
|
+
}
|
|
4226
|
+
.msg.user .msg-body {
|
|
4227
|
+
background: var(--panel);
|
|
4228
|
+
border-color: var(--line-strong);
|
|
4229
|
+
padding: 10px 14px;
|
|
4230
|
+
}
|
|
4231
|
+
|
|
4232
|
+
/* 工具与思考:同一套卡片结构,标题行更像分组头 */
|
|
4233
|
+
.work-group,
|
|
4234
|
+
.think {
|
|
4235
|
+
background: var(--panel);
|
|
4236
|
+
border-color: var(--line);
|
|
4237
|
+
}
|
|
4238
|
+
.work-group > summary,
|
|
4239
|
+
.think > summary {
|
|
4240
|
+
min-height: 32px;
|
|
4241
|
+
padding: 0 12px;
|
|
4242
|
+
font-size: 12px;
|
|
4243
|
+
}
|
|
4244
|
+
.work-group > .tool-group-body { padding: 4px 6px 6px; }
|
|
4245
|
+
.work-group .tool-row { padding: 5px 8px; }
|
|
4246
|
+
.think-body { padding: 8px 12px 10px; font-size: 12.5px; }
|
|
4247
|
+
|
|
4248
|
+
/* 计划卡:头部与正文分开,按钮区更清楚 */
|
|
4249
|
+
.plan-card {
|
|
4250
|
+
padding: 12px 14px;
|
|
4251
|
+
border-color: color-mix(in srgb, var(--accent-ink) 30%, var(--line));
|
|
4252
|
+
}
|
|
4253
|
+
.plan-head {
|
|
4254
|
+
padding-bottom: 8px;
|
|
4255
|
+
border-bottom: 1px solid color-mix(in srgb, var(--accent-ink) 16%, var(--line));
|
|
4256
|
+
font-size: 12.5px;
|
|
4257
|
+
}
|
|
4258
|
+
.plan-list { margin-top: 8px; }
|
|
4259
|
+
.plan-item { font-size: 13px; line-height: 20px; }
|
|
4260
|
+
.plan-actions { margin-top: 10px; padding-top: 10px; }
|
|
4261
|
+
|
|
4262
|
+
/* 任务栏:和输入框同一列,信息更紧凑 */
|
|
4263
|
+
.todo-dock {
|
|
4264
|
+
background: var(--panel);
|
|
4265
|
+
border-color: var(--line);
|
|
4266
|
+
}
|
|
4267
|
+
.todo-summary { height: 34px; padding: 0 12px; }
|
|
4268
|
+
.todo-title { font-size: 12px; }
|
|
4269
|
+
.todo-bar { height: 4px; }
|
|
4270
|
+
.todo-item { font-size: 12px; line-height: 19px; }
|
|
4271
|
+
|
|
4272
|
+
/* 输入区:与聊天区同宽,工具栏与输入框分层 */
|
|
4273
|
+
.composer {
|
|
4274
|
+
background: var(--panel);
|
|
4275
|
+
border-color: var(--line-strong);
|
|
4276
|
+
padding: 8px 10px 8px 14px;
|
|
4277
|
+
}
|
|
4278
|
+
.composer textarea { font-size: 14.5px; line-height: 1.6; }
|
|
4279
|
+
.composer-hint { text-align: left; padding-left: 2px; }
|
|
4280
|
+
.send-btn { width: 30px; height: 30px; }
|
|
4281
|
+
|
|
4282
|
+
/* 侧栏:会话项有明确边界,当前项更醒目 */
|
|
4283
|
+
.session-list { padding: 6px 10px 12px; gap: 2px; }
|
|
4284
|
+
.session-item {
|
|
4285
|
+
border: 1px solid transparent;
|
|
4286
|
+
padding: 8px 11px;
|
|
4287
|
+
}
|
|
4288
|
+
.session-item:hover { border-color: var(--line); }
|
|
4289
|
+
.session-item.is-active {
|
|
4290
|
+
background: var(--panel);
|
|
4291
|
+
border-color: var(--line-strong);
|
|
4292
|
+
box-shadow: inset 2px 0 0 var(--accent-ink);
|
|
4293
|
+
}
|
|
4294
|
+
.sb-search { border-radius: 8px; }
|
|
4295
|
+
.sidebar-foot { padding: 10px; gap: 8px; }
|
|
4296
|
+
|
|
4297
|
+
/* 顶栏和聊天头部:少一点装饰,多一点边界 */
|
|
4298
|
+
.topbar { height: 50px; }
|
|
4299
|
+
.chat-head { height: 46px; }
|
|
4300
|
+
.chat-title { font-size: 13.5px; }
|
|
4301
|
+
.chat-card { box-shadow: var(--shadow-sm); }
|
|
4302
|
+
|
package/package.json
CHANGED