* 添加到历史记录
(history: ToolExecutionHistory)
| 379 | * 添加到历史记录 |
| 380 | */ |
| 381 | private addToHistory(history: ToolExecutionHistory): void { |
| 382 | this.executionHistory.push(history); |
| 383 | |
| 384 | // 限制历史记录大小 |
| 385 | if (this.executionHistory.length > this.config.maxHistorySize) { |
| 386 | this.executionHistory = this.executionHistory.slice(-this.config.maxHistorySize); |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | /** |
| 391 | * 日志记录 |