Skip to content

Commit c3c79d2

Browse files
committed
v0.7.11
refactor(mcpToolsManager): Optimize import statements and parameter validation logic - Urgently add tool parameter self-fixing policy because Opus 4.7 is stupid
1 parent 1bfc3cc commit c3c79d2

4 files changed

Lines changed: 11 additions & 18 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,8 @@ jobs:
5656
5757
### What's New
5858
59-
- Added `/pixel` command to support drawing pixel art as the exit interface
60-
- Optimized the context usage of TODO, NoteBook tools
61-
- Optimized the display of DiffViewer
62-
- Added a named execution result cleaning Agent
63-
59+
- Urgently add tool parameter self-fixing policy because Opus 4.7 is stupid
60+
6461
### Installation
6562
```bash
6663
npm install -g snow-ai

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "snow-ai",
3-
"version": "0.7.10",
3+
"version": "0.7.11",
44
"description": "Agentic coding in your terminal",
55
"license": "MIT",
66
"bin": {

source/utils/execution/mcpToolsManager.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ import {
2626
getMCPTools as getSubAgentTools,
2727
subAgentService,
2828
} from '../../mcp/subagent.js';
29-
import {
30-
getTeamMCPTools as getTeamTools,
31-
teamService,
32-
} from '../../mcp/team.js';
29+
import {getTeamMCPTools as getTeamTools, teamService} from '../../mcp/team.js';
3330
import {
3431
getMCPTools as getSkillTools,
3532
executeSkillTool,
@@ -1332,7 +1329,9 @@ export async function executeMCPTool(
13321329
}
13331330
if (
13341331
typeof args.filePath === 'string' &&
1335-
(!args.operations || !Array.isArray(args.operations) || args.operations.length === 0)
1332+
(!args.operations ||
1333+
!Array.isArray(args.operations) ||
1334+
args.operations.length === 0)
13361335
) {
13371336
throw new Error(
13381337
`Missing required parameter 'operations' for filesystem-edit tool.\n` +
@@ -1384,12 +1383,9 @@ export async function executeMCPTool(
13841383
`Use the project root path or a specific directory path.`,
13851384
);
13861385
}
1386+
// enableAiSummary 有默认值 false,AI 若未提供或类型错误则兜底为 false,避免因傻瓜式调用直接报错中断
13871387
if (typeof args.enableAiSummary !== 'boolean') {
1388-
throw new Error(
1389-
`Missing required parameter 'enableAiSummary' for terminal-execute tool.\n` +
1390-
`Received args: ${JSON.stringify(args, null, 2)}\n` +
1391-
`AI Tip: You MUST provide a boolean 'enableAiSummary'. Use false by default, or true when output may need AI cleanup.`,
1392-
);
1388+
args.enableAiSummary = false;
13931389
}
13941390

13951391
// Set working directory from AI-provided parameter

0 commit comments

Comments
 (0)