@myassis/gateway 1.0.53 → 1.0.56

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.
@@ -152,6 +152,9 @@ const editTool = {
152
152
  },
153
153
  handler: async (args) => {
154
154
  try {
155
+ if (typeof args === 'string') {
156
+ return { success: false, errorMessage: `参数过大 (${(args.length / 1024).toFixed(1)}KB),大文件请分批进行edit 操作` };
157
+ }
155
158
  const { path: filePath, edits } = args;
156
159
  // ---- 参数校验 ----
157
160
  if (!filePath)
@@ -62,7 +62,7 @@ const TEXT_COMMANDS = new Set([
62
62
  'echo', 'printf',
63
63
  'findstr',
64
64
  'grep', 'egrep', 'fgrep',
65
- 'sed', 'awk', 'gawk',
65
+ 'sed', 'awk', 'gawk', 'git', 'hg', 'svn',
66
66
  ]);
67
67
  // Shell 执行器:这些命令后面若跟 -c/-lc/-Command 等参数,
68
68
  // 紧随其后的字符串是「内嵌脚本」,需要递归解析
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myassis/gateway",
3
- "version": "1.0.53",
3
+ "version": "1.0.56",
4
4
  "description": "我的助手 Gateway Service - 本地 AI 网关服务,支持认证、WebSocket 实时通信和任务调度",
5
5
  "main": "dist/index.js",
6
6
  "bin": {