Merge pull request #1838 from pikasTech/fix/workbench-provider-catalog-1837

修复 Workbench provider catalog 刷新被 session list 短路
This commit is contained in:
Lyon
2026-06-21 21:11:28 +08:00
committed by GitHub
@@ -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 });