MCPcopy Create free account
hub / github.com/MiniMax-AI/OpenRoom / loadChatHistory

Function loadChatHistory

apps/webuiapps/src/lib/chatHistoryStorage.ts:36–49  ·  view source on GitHub ↗
(sessionPath: string)

Source from the content-addressed store, hash-verified

34}
35
36export async function loadChatHistory(sessionPath: string): Promise<ChatHistoryData | null> {
37 try {
38 const res = await fetch(apiUrl(sessionPath, 'chat.json'));
39 if (res.ok) {
40 const data: ChatHistoryData = await res.json();
41 if (data && data.version === 1) {
42 return data;
43 }
44 }
45 } catch {
46 // API not available
47 }
48 return null;
49}
50
51/** @deprecated kept for backward compat, always returns null now */
52export function loadChatHistorySync(_sessionPath: string): ChatHistoryData | null {

Callers 2

ChatPanelFunction · 0.90

Calls 1

apiUrlFunction · 0.70

Tested by

no test coverage detected