Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(provider-share): 拒绝能力与关闭状态矛盾的响应
fmfsaisaid5ced7ca147e
diff --git a/apps/desktop/src/main/device-link/__tests__/providerShareInsights.test.ts b/apps/desktop/src/main/device-link/__tests__/providerShareInsights.test.tsindex 3a3c5f06a5..3c73991792 100644--- a/apps/desktop/src/main/device-link/__tests__/providerShareInsights.test.ts+++ b/apps/desktop/src/main/device-link/__tests__/providerShareInsights.test.ts@@ -437,6 +437,12 @@ describe('provider share insights', () => {// #4317520064:ready+null 曾让已展开明细永久加载,原覆盖没有状态/数据矛盾。for (const capability of ['quota', 'usage'] as const) {expect(parseProviderShareInsights({ ...view, [capability]: null })).toBeNull();+ // #4318099606:开启能力却标 disabled 同样会使展开明细永久加载。+ expect(parseProviderShareInsights({+ ...view,+ status: { ...view.status, [capability]: 'disabled' },+ [capability]: null,+ })).toBeNull();}const parsed = parseProviderShareInsights({...view,diff --git a/apps/desktop/src/shared/providerShareInsights.ts b/apps/desktop/src/shared/providerShareInsights.tsindex c1dd9a236f..9e38f6048f 100644--- a/apps/desktop/src/shared/providerShareInsights.ts+++ b/apps/desktop/src/shared/providerShareInsights.ts@@ -150,7 +150,8 @@ export function parseProviderShareInsights(raw: unknown): ProviderShareInsightsif (!value.capabilities[key]) {value[key] = null;value.status[key] = 'disabled';- } else if (value.status[key] !== 'ready') value[key] = null;+ } else if (value.status[key] === 'disabled') return null;+ else if (value.status[key] !== 'ready') value[key] = null;else if (value[key] === null) return null;}return value;