MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / ensureConversation

Function ensureConversation

web/js/chat.js:324–335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

322}
323
324async function ensureConversation() {
325 const conversations = await listConversations();
326 const existing = conversations.find(
327 (conversation) => conversation.channelId === DEFAULT_WEB_CHANNEL_ID,
328 );
329 if (existing) {
330 return existing.channelId;
331 }
332
333 const created = await createConversation();
334 return created.channelId || DEFAULT_WEB_CHANNEL_ID;
335}
336
337async function loadConversationHistory(channelId) {
338 const messages = await getConversationMessages(channelId, 200);

Callers 1

initializeConversationFunction · 0.85

Calls 2

listConversationsFunction · 0.90
createConversationFunction · 0.90

Tested by

no test coverage detected