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

Function updateSessionOwnerId

apps/desktop/main/database/core.ts:136–149  ·  view source on GitHub ↗
(sessionId: string, ownerId: string | null)

Source from the content-addressed store, hash-verified

134 * 更新会话的 ownerId
135 */
136export function updateSessionOwnerId(sessionId: string, ownerId: string | null): boolean {
137 const db = openDatabaseWithMigration(sessionId)
138 if (!db) return false
139
140 try {
141 coreUpdateOwnerId(new BetterSqliteAdapter(db), ownerId)
142 return true
143 } catch (error) {
144 console.error('[Database] Failed to update session ownerId:', error)
145 return false
146 } finally {
147 db.close()
148 }
149}
150
151/**
152 * 删除会话

Callers

nothing calls this directly

Calls 3

errorMethod · 0.65
closeMethod · 0.65

Tested by

no test coverage detected