feat(chat): turn /btw into an isolated composer (#3398)
* feat(chat): turn /btw into an isolated composer * fix(chat): preserve direct BTW sends and isolate pending preparation --------- Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
Bohdan Triapitsyn
parent
7b206b1014
commit
02581d08c5
@@ -1601,9 +1601,15 @@ export async function unarchiveSessions(
|
||||
return { restoredIds, failedIds }
|
||||
}
|
||||
|
||||
export async function updateSessionTitle(sessionId: string, title: string): Promise<void> {
|
||||
const sessionDirectory = getSessionDirectory(sessionId)
|
||||
export async function updateSessionTitle(
|
||||
sessionId: string,
|
||||
title: string,
|
||||
options?: { directory?: string | null; expectedRuntimeKey?: string },
|
||||
): Promise<void> {
|
||||
if (isStaleRuntime(options?.expectedRuntimeKey)) throw new Error("runtime changed")
|
||||
const sessionDirectory = options?.directory ?? getSessionDirectory(sessionId)
|
||||
const session = await opencodeClient.updateSession(sessionId, { title }, sessionDirectory)
|
||||
if (isStaleRuntime(options?.expectedRuntimeKey)) throw new Error("runtime changed")
|
||||
useGlobalSessionsStore.getState().upsertSession(session)
|
||||
mirrorSessionIntoLiveStores(session, sessionDirectory)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user