feat(web): tidy the channel sidebar and let owners delete groups

This commit is contained in:
justme committed 2026-10-16 18:30:58 +08:00
1 parent 6310f93469
commit 6d6490055e
12 files changed
+66 -13

No files matched your search

+2
View File
@@ -66,6 +66,7 @@ interface Actions {
createThread: (name: string, groupId?: string) => Promise<string>;
createGroup: typeof api.createGroup;
renameGroup: typeof api.renameGroup;
deleteGroup: typeof api.deleteGroup;
groupThread: typeof api.groupThread;
renameThread: (threadId: string, name: string) => Promise<void>;
setChannelHistory: typeof api.setChannelHistory;
@@ -112,6 +113,7 @@ export const useWorkspace = create<WorkspaceData & Actions>()(() => ({
createThread: (name, groupId) => api.createThread(name, groupId),
createGroup: (name) => api.createGroup(name),
renameGroup: (id, name) => api.renameGroup(id, name),
deleteGroup: (id) => api.deleteGroup(id),
groupThread: (id, groupId) => api.groupThread(id, groupId),
renameThread: (threadId, name) => api.renameThread(threadId, name),
setChannelHistory: (threadId, chatHistory, filesHistory) => api.setChannelHistory(threadId, chatHistory, filesHistory),