MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / setActiveTaskMeta

Function setActiveTaskMeta

src/stores/aiChat.ts:455–474  ·  view source on GitHub ↗
(
    chatKey: string,
    content: string,
    requestId: string,
    aiChatId: string | null = null
  )

Source from the content-addressed store, hash-verified

453 }
454
455 function setActiveTaskMeta(
456 chatKey: string,
457 content: string,
458 requestId: string,
459 aiChatId: string | null = null
460 ): void {
461 const state = getSessionState(chatKey)
462 if (!state) return
463
464 activeTask.value = {
465 requestId,
466 chatKey,
467 sessionId: state.sessionId,
468 sessionName: state.sessionName,
469 chatType: state.chatType,
470 aiChatId,
471 questionPreview: content.trim().slice(0, 80),
472 startedAt: Date.now(),
473 }
474 }
475
476 function clearActiveTask(chatKey: string, requestId?: string): void {
477 if (!activeTask.value) return

Callers 2

sendMessageFunction · 0.85
editCurrentRoundOnlyFunction · 0.85

Calls 2

getSessionStateFunction · 0.85
nowMethod · 0.45

Tested by

no test coverage detected