feat: 知识图谱工具支持 + 智能体事件处理

- dialogService: 添加智能体 SSE 事件处理
- toolExecutor: 添加 knowledge_save/knowledge_load 工具
- messageArea: 添加智能体消息渲染支持
- 添加 CLAUDE.md 项目配置
This commit is contained in:
XiaoFeng
2025-12-30 09:40:04 +08:00
parent d4c726ea9c
commit 44bbcde5cf
14 changed files with 423 additions and 16 deletions

View File

@ -117,6 +117,13 @@ async function executeFileRead(args: FileReadArgs): Promise<string> {
*/
async function executeFileWrite(args: FileWriteArgs): Promise<string> {
await createOrOverwriteFile(args.path, args.content);
// Verilog 文件添加知识图谱提示
const isVerilogFile = args.path.endsWith('.v') || args.path.endsWith('.sv');
if (isVerilogFile) {
return `文件已写入: ${args.path}\n\n[提示] 如有新信号或规则,请更新知识图谱`;
}
return `文件已写入: ${args.path}`;
}
@ -154,6 +161,12 @@ async function executeFileDelete(args: FileDeleteArgs): Promise<string> {
// 删除文件
fs.unlinkSync(absolutePath);
// Verilog 文件添加知识图谱提示
const isVerilogFile = filePath.endsWith('.v') || filePath.endsWith('.sv');
if (isVerilogFile) {
return `文件已删除: ${filePath}\n\n[提示] 请删除知识图谱中相关节点`;
}
return `文件已删除: ${filePath}`;
}