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

Function updateSessionOwnerId

src/stores/session.ts:675–689  ·  view source on GitHub ↗

* 更新会话的所有者

(id: string, ownerId: string | null)

Source from the content-addressed store, hash-verified

673 * 更新会话的所有者
674 */
675 async function updateSessionOwnerId(id: string, ownerId: string | null): Promise<boolean> {
676 try {
677 const success = await useDataService().updateSessionOwnerId(id, ownerId)
678 if (success) {
679 const session = sessions.value.find((s) => s.id === id)
680 if (session) {
681 session.ownerId = ownerId
682 }
683 }
684 return success
685 } catch (error) {
686 console.error('更新会话所有者失败:', error)
687 return false
688 }
689 }
690
691 /**
692 * 手动选择"我是谁":写入当前会话 owner,更新平台 owner profile,

Callers

nothing calls this directly

Calls 3

useDataServiceFunction · 0.90
updateSessionOwnerIdMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected