MCPcopy Create free account
hub / github.com/PromtEngineer/localGPT / getSession

Method getSession

src/lib/api.ts:170–181  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

168 }
169
170 async getSession(sessionId: string): Promise<{ session: ChatSession; messages: ChatMessage[] }> {
171 try {
172 const response = await fetch(`${API_BASE_URL}/sessions/${sessionId}`);
173 if (!response.ok) {
174 throw new Error(`Failed to get session: ${response.status}`);
175 }
176 return await response.json();
177 } catch (error) {
178 console.error('Get session failed:', error);
179 throw error;
180 }
181 }
182
183 async sendSessionMessage(
184 sessionId: string,

Callers 3

session-chat.tsxFile · 0.80
sendMessageFunction · 0.80
QuickChatFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected