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

Method getHubTaskForLocal

packages/memos-core/src/viewer/server.ts:1939–1949  ·  view source on GitHub ↗
(taskId: string)

Source from the content-addressed store, hash-verified

1937 }
1938
1939 private getHubTaskForLocal(taskId: string): any {
1940 if (this.sharingRole === "hub") {
1941 const db = (this.store as any).db;
1942 return db.prepare("SELECT * FROM hub_tasks WHERE source_task_id = ? LIMIT 1").get(taskId);
1943 }
1944 const shared = this.store.getLocalSharedTask(taskId);
1945 if (shared && shared.hubTaskId && this.isCurrentClientHubInstance(shared.hubInstanceId)) {
1946 return { source_task_id: taskId, visibility: shared.visibility, group_id: shared.groupId };
1947 }
1948 return undefined;
1949 }
1950
1951 private getHubSkillForLocal(skillId: string): any {
1952 if (this.sharingRole === "hub") {

Callers 4

serveTasksMethod · 0.95
serveTaskSearchMethod · 0.95
serveTaskDetailMethod · 0.95
handleTaskScopeMethod · 0.95

Calls 4

prepareMethod · 0.80
getMethod · 0.65
getLocalSharedTaskMethod · 0.45

Tested by

no test coverage detected