Refactor channel account management: move binding/editing to Channels, align Agents display, and simplify UX (#523)

This commit is contained in:
Felix
2026-03-16 18:20:11 +08:00
committed by GitHub
Unverified
parent db480dff17
commit 4be679ac56
20 changed files with 1192 additions and 346 deletions

View File

@@ -8,6 +8,7 @@ interface AgentsState {
defaultAgentId: string;
configuredChannelTypes: string[];
channelOwners: Record<string, string>;
channelAccountOwners: Record<string, string>;
loading: boolean;
error: string | null;
fetchAgents: () => Promise<void>;
@@ -25,6 +26,7 @@ function applySnapshot(snapshot: AgentsSnapshot | undefined) {
defaultAgentId: snapshot.defaultAgentId,
configuredChannelTypes: snapshot.configuredChannelTypes,
channelOwners: snapshot.channelOwners,
channelAccountOwners: snapshot.channelAccountOwners,
} : {};
}
@@ -33,6 +35,7 @@ export const useAgentsStore = create<AgentsState>((set) => ({
defaultAgentId: 'main',
configuredChannelTypes: [],
channelOwners: {},
channelAccountOwners: {},
loading: false,
error: null,