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

Method snapshotToolCall

pkg/agent/agent.go:1424–1446  ·  view source on GitHub ↗
(callID string)

Source from the content-addressed store, hash-verified

1422}
1423
1424func (a *Agent) snapshotToolCall(callID string) types.ToolCallSnapshot {
1425 a.mu.RLock()
1426 defer a.mu.RUnlock()
1427
1428 if rec, ok := a.toolRecords[callID]; ok && rec != nil {
1429 return types.ToolCallSnapshot{
1430 ID: rec.ID,
1431 Name: rec.Name,
1432 State: rec.State,
1433 Arguments: rec.Input,
1434 Result: rec.Result,
1435 Error: rec.Error,
1436 Progress: rec.Progress,
1437 Intermediate: rec.Intermediate,
1438 StartedAt: rec.StartTime,
1439 UpdatedAt: rec.UpdatedAt,
1440 Cancelable: a.runningTools[rec.ID] != nil,
1441 Pausable: a.runningTools[rec.ID] != nil,
1442 }
1443 }
1444
1445 return types.ToolCallSnapshot{ID: callID}
1446}
1447
1448// GetToolSnapshot 获取指定调用的实时快照
1449func (a *Agent) GetToolSnapshot(callID string) types.ToolCallSnapshot {

Callers 3

executeSingleToolMethod · 0.95
ControlToolMethod · 0.95
GetToolSnapshotMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected