(request: ComposerStateRequest = {})
| 547 | } |
| 548 | |
| 549 | export async function startNewThread(request: ComposerStateRequest = {}) { |
| 550 | const projectId = request.projectId ?? getDesktopWorkingDirectory() |
| 551 | const composer = await buildComposerStateSnapshot({ ...request, projectId, sessionPath: null }) |
| 552 | const draft = createLocalThreadDraft(projectId, undefined, { chatGroupId: request.chatGroupId }) |
| 553 | |
| 554 | publishComposerUpdate(composer, { projectId, sessionPath: null }) |
| 555 | |
| 556 | return { |
| 557 | composer, |
| 558 | projectId, |
| 559 | sessionPath: draft.sessionPath, |
| 560 | threadId: draft.threadId, |
| 561 | } |
| 562 | } |
| 563 | |
| 564 | export async function selectProjectRuntime( |
| 565 | request: ComposerStateRequest = {}, |
no test coverage detected