fix workbench provider catalog refresh

This commit is contained in:
lyon
2026-06-21 21:10:42 +08:00
parent 350bfede1a
commit 4067c92a72
@@ -101,6 +101,7 @@ export const useWorkbenchStore = defineStore("workbench", () => {
recordWorkbenchLoadingState({ scope: "workbench", active: true, reason: "hydrate", sessionId: includeSessionId });
recordWorkbenchLoadingState({ scope: "session_list", active: true, reason: "hydrate", sessionId: includeSessionId });
error.value = null;
void refreshProviderOptions();
if (routeSessionId) {
sessionDetailLoadingId.value = routeSessionId;
recordWorkbenchLoadingState({ scope: "session_detail", active: true, reason: "hydrate", sessionId: routeSessionId });
@@ -169,6 +170,7 @@ export const useWorkbenchStore = defineStore("workbench", () => {
loading.value = true;
recordWorkbenchLoadingState({ scope: "workbench", active: true, reason: "create_session", sessionId: activeSessionId.value });
error.value = null;
void refreshProviderOptions();
const response = await api.agent.createAgentSession({ providerProfile: providerProfile.value });
loading.value = false;
recordWorkbenchLoadingState({ scope: "workbench", active: false, reason: "create_session", sessionId: activeSessionId.value });