refactor: 移除多余依赖,统一 MUI 为唯一 UI 库
- 移除 radix-ui、clsx、tailwind-merge、class-variance-authority、react-router-dom - 前后端全面适配 MUI 组件,清理残留 Tailwind 工具类引用 - 优化 Agent Loop 引擎、IPC 处理器、Provider Adapter 等后端模块 - 新增 Agent 网络工具通用设计文档 v2
This commit is contained in:
@@ -41,13 +41,19 @@ export class MemoryTriggerHook implements PostToolHook {
|
||||
async afterExecute(toolCall: MetonaToolCall, result: MetonaToolResult, sessionId: string): Promise<void> {
|
||||
if (this.memorableTools.includes(toolCall.name) && result.success) {
|
||||
const content = typeof result.result === 'string' ? result.result : JSON.stringify(result.result);
|
||||
this.memoryManager.store({
|
||||
type: 'episodic',
|
||||
content: `Tool ${toolCall.name} returned: ${content.slice(0, 500)}`,
|
||||
source: 'tool_result',
|
||||
sessionId,
|
||||
importance: 0.6,
|
||||
});
|
||||
try {
|
||||
this.memoryManager.store({
|
||||
type: 'episodic',
|
||||
content: `Tool ${toolCall.name} returned: ${content.slice(0, 500)}`,
|
||||
source: 'tool_result',
|
||||
sessionId,
|
||||
importance: 0.6,
|
||||
});
|
||||
} catch (error) {
|
||||
// 记忆存储失败不应影响工具执行结果
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('[MemoryTriggerHook] Failed to store episodic memory:', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user