[codex] Add group chat room reset and clone (#756)

* Add group chat room reset and clone

* Clean npm cache before self update
This commit is contained in:
ekko
2026-05-15 15:52:16 +08:00
committed by GitHub
parent 94f1061734
commit 8196e49478
18 changed files with 373 additions and 9 deletions
@@ -125,6 +125,14 @@ export async function createRoom(data: {
})
}
export async function cloneRoom(roomId: string, data?: { name?: string; inviteCode?: string }): Promise<{ room: RoomInfo; agents: RoomAgent[] }> {
return request(`/api/hermes/group-chat/rooms/${roomId}/clone`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data || {}),
})
}
export async function listRooms(): Promise<{ rooms: RoomInfo[] }> {
return request('/api/hermes/group-chat/rooms')
}
@@ -174,6 +182,12 @@ export async function deleteRoom(roomId: string): Promise<void> {
})
}
export async function clearRoomContext(roomId: string): Promise<{ success: boolean; room: RoomInfo }> {
return request(`/api/hermes/group-chat/rooms/${roomId}/clear-context`, {
method: 'POST',
})
}
export async function updateRoomConfig(roomId: string, config: { triggerTokens?: number; maxHistoryTokens?: number; tailMessageCount?: number }): Promise<{ room: RoomInfo }> {
return request(`/api/hermes/group-chat/rooms/${roomId}/config`, {
method: 'PUT',