@vincentbanana/bananacli 0.8.8 → 0.8.10

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.7 · terminal + GUI
39
+ BananaCLI v0.8.9 · 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.7 · 终端 + 图形界面
37
+ BananaCLI v0.8.9 · 终端 + 图形界面
38
38
  ```
39
39
 
40
40
  - **无前端框架依赖**:CLI 只用 Node 内置模块;运行时依赖 `ws`(GUI/终端 WebSocket)和 `@lydell/node-pty`(预编译原生模块)。
@@ -131,6 +131,7 @@ export function defaultSystemPrompt(workspace) {
131
131
  '',
132
132
  '## 执行与安全',
133
133
  '先读相关代码再改,最小改动;破坏性操作先确认;工具报错自己修一次,仍不行再说明卡点。',
134
+ '能并行的工具一次调用;同一个文件不要反复整读,先用 grep 定位。',
134
135
  '',
135
136
  '## 验收',
136
137
  '改了代码才跑测试 / 构建;没验证就别说“完成”;交付只说:改了什么 / 验证结果 / 未验证项。',
@@ -142,7 +143,7 @@ export function defaultSystemPrompt(workspace) {
142
143
  '三步以上才用 todo,简单问题不建清单;项目根目录的 AGENT.md 优先遵守。',
143
144
  '',
144
145
  '## 沟通',
145
- '先给结论,再补必要解释,不复述每一步;',
146
+ '用用户提问的语言回答;先给结论,再补必要解释,不复述每一步;',
146
147
  `做 UI 先读 ${designRoot}/principles.md 与 tokens.md,交付前调用 ui_audit。`,
147
148
  ...(process.env['BANANA_PROMPT_SUFFIX']?.trim()
148
149
  ? [`\n## 实验提示词\n${process.env['BANANA_PROMPT_SUFFIX'].trim()}`]
@@ -178,7 +179,7 @@ function defaultConfig(workspace) {
178
179
  workspace,
179
180
  systemPrompt: defaultSystemPrompt(workspace),
180
181
  maxSteps: 500,
181
- maxContextChars: 160_000,
182
+ maxContextChars: 80_000,
182
183
  allowOutsideWorkspace: false,
183
184
  showReasoning: true,
184
185
  disabledPlugins: [],
@@ -57,7 +57,7 @@ export class SessionStore {
57
57
  facts: [],
58
58
  unknowns: [],
59
59
  mode: 'build',
60
- reasoning: 'standard',
60
+ reasoning: 'fast',
61
61
  titleSource: 'auto',
62
62
  };
63
63
  }
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: '读取文件内容,返回带行号的文本。默认读整个文件;可用 offset/limit 分段读大文件。相对路径基于工作区根目录。',
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), 60_000);
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
- {
1
+ {
2
2
  "name": "@vincentbanana/bananacli",
3
- "version": "0.8.8",
3
+ "version": "0.8.10",
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": {