(callID string)
| 1422 | } |
| 1423 | |
| 1424 | func (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 获取指定调用的实时快照 |
| 1449 | func (a *Agent) GetToolSnapshot(callID string) types.ToolCallSnapshot { |
no outgoing calls
no test coverage detected