feat: Round 5 - Memory Service, Tool Engine, Call Records, Thinking Logs

- Fix: Session history flash (race condition + WS guard)
- Fix: Chat background overlay + sidebar transparency
- Fix: IoT device control (Chinese action names, status field)
- Feat: Independent memory-service (port 8091, 13 endpoints)
- Feat: Independent tool-engine service (port 8092, 13 tools)
- Feat: Tool call logs with paginated DevTools panel
- Feat: Thinking log records with DevTools panel
- Feat: Future development roadmap document
- Chore: Updated .gitignore, go.work, DevTools config
- Chore: 5-service health check, project review docs
This commit is contained in:
2026-05-18 20:05:14 +08:00
parent b6ec36886c
commit 78e3f450c2
54 changed files with 7846 additions and 106 deletions
@@ -0,0 +1,37 @@
package model
// ToolDefinition 工具定义(用于 LLM function calling
type ToolDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Parameters map[string]interface{} `json:"parameters"`
}
// ToolCall 工具调用请求
type ToolCall struct {
ID string `json:"id"`
Name string `json:"name"`
Arguments map[string]interface{} `json:"arguments"`
}
// ToolResult 工具执行结果
type ToolResult struct {
ID string `json:"id"`
Output string `json:"output"`
Error string `json:"error,omitempty"`
}
// ExecuteRequest 单个工具执行请求
type ExecuteRequest struct {
Arguments map[string]interface{} `json:"arguments"`
}
// BatchExecuteRequest 批量执行请求
type BatchExecuteRequest struct {
Calls []ToolCall `json:"calls"`
}
// BatchExecuteResponse 批量执行响应
type BatchExecuteResponse struct {
Results []ToolResult `json:"results"`
}