MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / startNewThread

Function startNewThread

desktop/runtime-host/live-runtime-service.ts:639–645  ·  view source on GitHub ↗
(request: ComposerStateRequest = {})

Source from the content-addressed store, hash-verified

637}
638
639export async function startNewThread(request: ComposerStateRequest = {}) {
640 const projectId = request.projectId ?? getDesktopWorkingDirectory()
641 const composer = await buildComposerStateSnapshot({ ...request, projectId, sessionPath: null })
642 const draft = createLocalThreadDraft(projectId, undefined, { chatGroupId: request.chatGroupId })
643 publishComposerUpdate(composer, { projectId, sessionPath: null })
644 return { composer, projectId, sessionPath: draft.sessionPath, threadId: draft.threadId }
645}
646
647export async function selectProjectRuntime(request: ComposerStateRequest = {}) {
648 const { composer } = await emitComposerUpdate({ ...request, sessionPath: null })

Callers 1

handleRequestFunction · 0.90

Calls 4

createLocalThreadDraftFunction · 0.90
publishComposerUpdateFunction · 0.90

Tested by

no test coverage detected