(sessionId: string, ownerId: string | null)
| 134 | * 更新会话的 ownerId |
| 135 | */ |
| 136 | export 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 | * 删除会话 |
nothing calls this directly
no test coverage detected