MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / ListTasks

Method ListTasks

agent/task_runtime.go:239–255  ·  view source on GitHub ↗
(scopeID string)

Source from the content-addressed store, hash-verified

237}
238
239func (rt *AgentTaskRuntime) ListTasks(scopeID string) []AgentTaskRecord {
240 rt.mu.Lock()
241 defer rt.mu.Unlock()
242 var out []AgentTaskRecord
243 for _, record := range rt.records {
244 if record.ParentScopeID == scopeID {
245 out = append(out, *record)
246 }
247 }
248 sort.SliceStable(out, func(i, j int) bool {
249 if out[i].CreatedAt == out[j].CreatedAt {
250 return out[i].TaskID < out[j].TaskID
251 }
252 return out[i].CreatedAt < out[j].CreatedAt
253 })
254 return out
255}
256
257func (rt *AgentTaskRuntime) GetTask(taskID, scopeID string) *AgentTaskRecord {
258 rt.mu.Lock()

Calls

no outgoing calls