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

Method LoadTodos

pkg/store/json.go:306–317  ·  view source on GitHub ↗

LoadTodos 加载Todo列表

(ctx context.Context, agentID string)

Source from the content-addressed store, hash-verified

304
305// LoadTodos 加载Todo列表
306func (js *JSONStore) LoadTodos(ctx context.Context, agentID string) (any, error) {
307 js.mu.RLock()
308 defer js.mu.RUnlock()
309
310 var todos any
311 path := filepath.Join(js.agentDir(agentID), "todos.json")
312 if err := js.loadJSON(path, &todos); err != nil {
313 return nil, err
314 }
315
316 return todos, nil
317}
318
319// DeleteAgent 删除Agent所有数据
320func (js *JSONStore) DeleteAgent(ctx context.Context, agentID string) error {

Callers

nothing calls this directly

Calls 3

agentDirMethod · 0.95
loadJSONMethod · 0.95
JoinMethod · 0.45

Tested by

no test coverage detected