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

Method getHubMemoryForChunk

packages/memos-core/src/viewer/server.ts:1927–1937  ·  view source on GitHub ↗
(chunkId: string)

Source from the content-addressed store, hash-verified

1925 }
1926
1927 private getHubMemoryForChunk(chunkId: string): any {
1928 if (this.sharingRole === "hub") {
1929 const db = (this.store as any).db;
1930 return db.prepare("SELECT * FROM hub_memories WHERE source_chunk_id = ? LIMIT 1").get(chunkId);
1931 }
1932 const ts = this.store.getTeamSharedChunk(chunkId);
1933 if (ts && this.isCurrentClientHubInstance(ts.hubInstanceId)) {
1934 return { source_chunk_id: chunkId, visibility: ts.visibility, group_id: ts.groupId };
1935 }
1936 return undefined;
1937 }
1938
1939 private getHubTaskForLocal(taskId: string): any {
1940 if (this.sharingRole === "hub") {

Callers 1

handleMemoryScopeMethod · 0.95

Calls 4

prepareMethod · 0.80
getMethod · 0.65
getTeamSharedChunkMethod · 0.45

Tested by

no test coverage detected