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

Method SetState

pkg/tools/executor.go:173–183  ·  view source on GitHub ↗

SetState 设置状态

(state types.ToolCallState, note string)

Source from the content-addressed store, hash-verified

171
172// SetState 设置状态
173func (b *ToolCallRecordBuilder) SetState(state types.ToolCallState, note string) *ToolCallRecordBuilder {
174 now := time.Now()
175 b.record.State = state
176 b.record.UpdatedAt = now
177 b.record.AuditTrail = append(b.record.AuditTrail, types.ToolCallAuditEntry{
178 State: state,
179 Timestamp: now,
180 Note: note,
181 })
182 return b
183}
184
185// SetApproval 设置审批信息
186func (b *ToolCallRecordBuilder) SetApproval(approval types.ToolCallApproval) *ToolCallRecordBuilder {

Callers 1

SetResultMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected