MCPcopy Create free account
hub / github.com/MemTensor/MemOS / getLocalSharedTask

Method getLocalSharedTask

packages/memos-core/src/storage/sqlite.ts:2077–2081  ·  view source on GitHub ↗
(taskId: string)

Source from the content-addressed store, hash-verified

2075 }
2076
2077 getLocalSharedTask(taskId: string): { taskId: string; hubTaskId: string; visibility: string; groupId: string | null; syncedChunks: number; sharedAt: number; hubInstanceId: string } | null {
2078 const row = this.db.prepare('SELECT * FROM local_shared_tasks WHERE task_id = ?').get(taskId) as any;
2079 if (!row) return null;
2080 return { taskId: row.task_id, hubTaskId: row.hub_task_id, visibility: row.visibility, groupId: row.group_id, syncedChunks: row.synced_chunks, sharedAt: row.shared_at, hubInstanceId: row.hub_instance_id || "" };
2081 }
2082
2083 listLocalSharedTasks(): Array<{ taskId: string; hubTaskId: string; visibility: string; groupId: string | null; syncedChunks: number; hubInstanceId: string }> {
2084 const rows = this.db.prepare('SELECT task_id, hub_task_id, visibility, group_id, synced_chunks, hub_instance_id FROM local_shared_tasks').all() as any[];

Callers 2

getHubTaskForLocalMethod · 0.45

Calls 2

prepareMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected