foliko 1.1.90 → 1.1.91

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foliko",
3
- "version": "1.1.90",
3
+ "version": "1.1.91",
4
4
  "description": "简约的插件化 Agent 框架",
5
5
  "main": "src/index.js",
6
6
  "type": "commonjs",
@@ -475,7 +475,7 @@ class AgentChatHandler extends EventEmitter {
475
475
  if (!this._aiClient) {
476
476
  throw new Error('AI client not configured.');
477
477
  }
478
-
478
+ this._validateToolCalls(messages);
479
479
  const systemPrompt = framework.getSystemPrompt();
480
480
  //await fs.promises.writeFile(`.${sessionId}_systemPrompt.md`, systemPrompt); // 调试用:保存系统提示词
481
481
  const tools = this._getAITools(aiTool);
@@ -650,6 +650,7 @@ class AgentChatHandler extends EventEmitter {
650
650
  if (!this._aiClient) {
651
651
  throw new Error('AI client not configured.');
652
652
  }
653
+ this._validateToolCalls(messages);
653
654
  const systemPrompt = framework.getSystemPrompt();
654
655
  const tools = this._getAITools(aiTool);
655
656