MCPcopy Create free account
hub / github.com/echoVic/blade-code / loadConversation

Method loadConversation

src/context/storage/PersistentStore.ts:78–86  ·  view source on GitHub ↗

* 加载对话上下文

(sessionId: string)

Source from the content-addressed store, hash-verified

76 * 加载对话上下文
77 */
78 async loadConversation(sessionId: string): Promise<ConversationContext | null> {
79 try {
80 const conversationPath = path.join(this.storagePath, 'conversations', `${sessionId}.json`);
81 const data = await fs.readFile(conversationPath, 'utf-8');
82 return JSON.parse(data) as ConversationContext;
83 } catch (error) {
84 return null;
85 }
86 }
87
88 /**
89 * 保存完整上下文数据

Callers 2

getSessionSummaryMethod · 0.95
loadSessionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected