mocode-ai 1.5.8 → 1.5.9

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.
@@ -12,6 +12,9 @@ export const readFileTool = {
12
12
  description: 'Read file content with line numbers. Read before editing.\n' +
13
13
  'For files >500 lines: grep first to locate regions, then call read_file multiple times ' +
14
14
  'with offset+limit (e.g. offset=350, limit=120). Do NOT read an entire large file in one call.\n' +
15
+ 'When you need several regions of the SAME file, issue those read_file calls together in one ' +
16
+ 'response (they run concurrently) instead of paging through it one page after another — ' +
17
+ 'avoid sequential offset+=limit walks of the same file.\n' +
15
18
  'For files ≤500 lines you may read the whole file in one call. Independent region reads ' +
16
19
  'may be issued in the same response — they run concurrently, saving a round-trip each.\n' +
17
20
  'For architecture or call-chain questions, prefer loading the `codegraph` skill (use_skill) over reading files one at a time.',
@@ -63,7 +63,17 @@ export const MAX_GRAPH_ENTITIES = 500;
63
63
  export const MAX_GRAPH_EDGES = 2000;
64
64
  // .codegraph:codegraph 索引目录(codegraph.db 是 SQLite 二进制 + daemon.log),
65
65
  // grep/glob 扫它无意义且会产出数 KB 的超长「行」,污染 TUI 展开渲染。
66
- export const IGNORE = ['**/node_modules/**', '**/.git/**', '**/.codegraph/**'];
66
+ // 构建产物目录同理:rust/(cargo target,数千个 .o/.rmeta 二进制)、dist/ 与 dist-tests/
67
+ // (tsc 产物,与 src 的 .ts 一一对应的 .js,扫它们只会重复命中并拖慢全库 grep——
68
+ // 实测无 glob 限定的 grep 扫全库耗时 205s,其中大半耗在这类目录)。
69
+ export const IGNORE = [
70
+ '**/node_modules/**',
71
+ '**/.git/**',
72
+ '**/.codegraph/**',
73
+ '**/rust/**',
74
+ '**/dist/**',
75
+ '**/dist-tests/**',
76
+ ];
67
77
  // ── legacy profile fallback(官方 TUI/stdio 已由 ToolPolicy 控制)────────────────
68
78
  // 保留导出名以兼容未传 ToolPolicy 的嵌入调用与旧测试。
69
79
  export const FRONTEND_TOOLS = new Set(TOOL_GROUPS.frontend);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocode-ai",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "终端编码 agent:LLM + tool-call 循环 + 流式输出(含思考)+ 25 个工具,接任意 OpenAI 兼容后端。",
5
5
  "type": "module",
6
6
  "bin": {