MCPcopy Create free account
hub / github.com/astercloud/aster / SaveToolCallRecords

Method SaveToolCallRecords

pkg/store/json.go:170–180  ·  view source on GitHub ↗

SaveToolCallRecords 保存工具调用记录

(ctx context.Context, agentID string, records []types.ToolCallRecord)

Source from the content-addressed store, hash-verified

168
169// SaveToolCallRecords 保存工具调用记录
170func (js *JSONStore) SaveToolCallRecords(ctx context.Context, agentID string, records []types.ToolCallRecord) error {
171 js.mu.Lock()
172 defer js.mu.Unlock()
173
174 if err := js.ensureAgentDir(agentID); err != nil {
175 return err
176 }
177
178 path := filepath.Join(js.agentDir(agentID), "tool_records.json")
179 return js.saveJSON(path, records)
180}
181
182// LoadToolCallRecords 加载工具调用记录
183func (js *JSONStore) LoadToolCallRecords(ctx context.Context, agentID string) ([]types.ToolCallRecord, error) {

Callers

nothing calls this directly

Calls 4

ensureAgentDirMethod · 0.95
agentDirMethod · 0.95
saveJSONMethod · 0.95
JoinMethod · 0.45

Tested by

no test coverage detected