Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(models): 统一分享与远程模型收藏视图
DavidShena796ec8f19a1
diff --git a/apps/desktop/src/renderer/__tests__/providerShareFavorites.test.tsx b/apps/desktop/src/renderer/__tests__/providerShareFavorites.test.tsxindex 8aa15865d8..efd67594a2 100644--- a/apps/desktop/src/renderer/__tests__/providerShareFavorites.test.tsx+++ b/apps/desktop/src/renderer/__tests__/providerShareFavorites.test.tsx@@ -10,6 +10,7 @@ import {import {parseProviderShareFavoriteSource, providerShareFavoriteSource, reconcileProviderShareFavorites,useProviderShareFavorites, useProviderShareFavoriteCleanupFailed,+ useProviderShareFavoriteSources,} from '@/state/providerShareFavorites';import { useModelFavoritesHost } from '@/state/useModelFavoritesHost';@@ -34,6 +35,37 @@ beforeEach(() => {afterEach(() => { cleanup(); vi.restoreAllMocks(); vi.unstubAllGlobals(); });describe('recipient-owned shared model favorites', () => {+ it('aggregates only exact, available grants for the current account', () => {+ const sources = renderHook(() => useProviderShareFavoriteSources());+ expect([...sources.result.current.values()]).toEqual(['share:s1', 'share:s2']);+ act(() => publish([{ ...share(), status: 'paused' }, { ...share('s2', 'm2'), hostOnline: false }]));+ expect(sources.result.current.size).toBe(0);+ act(() => publish([share('s1', 'replacement')]));+ expect(sources.result.current.has(providerShareFavoriteSource(share()))).toBe(false);+ expect(sources.result.current.get(providerShareFavoriteSource(share('s1', 'replacement')))).toBe('share:s1');+ act(() => { setDataOwnerGeneration('other', 2); publish([], true, 'other', 2); });+ expect(sources.result.current.size).toBe(0);+ });++ it('projects and edits the task computer store without touching the controller copy', () => {+ addModelFavorite(config);+ const item = { ...config, uid: 'remote-1', providerId: providerShareFavoriteSource(share()) };+ const home = { items: [item], store: {+ get: vi.fn((uid: string) => uid === item.uid ? item : undefined),+ add: vi.fn(), update: vi.fn(), remove: vi.fn(),+ } };+ const view = renderHook(() => useProviderShareFavorites('share:s1', useModelFavorites(), home));+ expect(view.result.current.items).toEqual([{ ...config, uid: item.uid }]);+ act(() => view.result.current.store.update(item.uid, { effort: 'low', fast: false }));+ expect(home.store.update).toHaveBeenCalledWith(item.uid, { effort: 'low', fast: false });+ expect(() => view.result.current.store.update('unknown', { effort: 'low' })).toThrow();+ expect(listModelFavorites()).toEqual([expect.objectContaining(config)]);+ const stale = view.result.current.store;+ act(() => publish([share('s1', 'replacement')]));+ expect(() => stale.remove(item.uid)).toThrow('Shared favorite source unavailable');+ expect(home.store.remove).not.toHaveBeenCalled();+ });+it('keeps long local sources out of legacy remote replies without removing stored favorites', () => {const received = providerShareParsers.received({ ...share('s'.repeat(128), 'm'.repeat(128)), providerId: 'p'.repeat(256) });publish([received]);diff --git a/apps/desktop/src/renderer/__tests__/remoteAgentDeviceFavoritesPanel.test.tsx b/apps/desktop/src/renderer/__tests__/remoteAgentDeviceFavoritesPanel.test.tsxindex 7a5bb97286..e24114cad5 100644--- a/apps/desktop/src/renderer/__tests__/remoteAgentDeviceFavoritesPanel.test.tsx+++ b/apps/desktop/src/renderer/__tests__/remoteAgentDeviceFavoritesPanel.test.tsx@@ -146,7 +146,10 @@ import {__resetForTest as resetFavorites,addModelFavorite,listModelFavorites,+ setModelFavoritesOwner,} from '@/state/modelFavorites';+import { setDataOwnerGeneration } from '@/contexts/dataOwnerGeneration';+import { providerShareFavoriteSource, reconcileProviderShareFavorites } from '@/state/providerShareFavorites';const devices = [{ deviceId: 'device-c', name: 'Studio' }];const C_SOURCE = agentDeviceFavoriteSource({ deviceId: 'device-c', providerId: 'c-open' });@@ -158,6 +161,7 @@ beforeEach(() => {resetEnginePrefs();resetFavorites();catalogs.offline.clear();+ setDataOwnerGeneration(null, 0);remoteLists = { 'device-b': [] };let seq = 1;invoke = vi.fn(async (deviceId: string, channel: string, args: unknown[]) => {@@ -187,6 +191,7 @@ beforeEach(() => {afterEach(() => {cleanup();vi.unstubAllGlobals();+ setDataOwnerGeneration(null, 0);});const list = () => screen.getByRole('listbox');@@ -392,3 +397,109 @@ describe('被控电脑上的任务:收藏读写被控电脑那一份', () => {expect(within(favoritesGroup()).getByText('B Model')).toBeTruthy();});});++describe('收藏 / 全部聚合来源,供应商只筛自己的收藏', () => {+ const share = (id: string) => ({+ shareId: id, memberId: `member-${id}`, providerId: 'a-local', providerLabel: 'A Local',+ hostDeviceId: 'host', deviceName: 'Host', status: 'active' as const, hostOnline: true, hostCapable: true,+ owner: { displayName: id, avatarUrl: null, region: 'global' as const },+ });+ const shares = [share('one'), share('two')];+ const allDevices = [...devices, ...shares.map((s) => ({ deviceId: `share:${s.shareId}`, name: s.shareId }))];+ const publish = (received = shares) => reconcileProviderShareFavorites({+ received, confirmedRegions: ['global'], ownerStamp: { dataOwnerId: 'recipient', ownerGeneration: 1 },+ });+ const clickRail = async (key: string) => {+ await act(async () => fireEvent.click(document.querySelector(`[data-rail-item="${key}"]`)!));+ };+ const favoriteNames = () => [...favoritesGroup().querySelectorAll('[data-unified-anchor]')]+ .map((row) => row.textContent);++ beforeEach(() => {+ setDataOwnerGeneration('recipient', 1);+ setModelFavoritesOwner('recipient');+ publish();+ for (const s of shares) {+ catalogs.byDevice[`share:${s.shareId}`] = [{+ ...(catalogs.local[0] as object), remoteInvocationEnabled: true,+ models: { 'claude-code': [{ id: 'a-model', name: `Shared ${s.shareId}`, efforts: ['low', 'high'], defaultEffort: 'high' }] },+ }];+ }+ addModelFavorite({ providerId: 'a-local', modelId: 'a-model', agent: 'cc' });+ addModelFavorite({ providerId: C_SOURCE, modelId: 'c-model', agent: 'cc' });+ for (const s of shares) addModelFavorite({+ providerId: providerShareFavoriteSource(s), modelId: 'a-model', agent: 'cc', effort: 'low',+ });+ });++ it('从任一来源反复切回收藏 / 全部,四份收藏顺序稳定;同名连接不串收藏', async () => {+ renderPanel({ devices: allDevices });+ const initial = favoriteNames();+ expect(initial).toHaveLength(4);+ for (const [rail, name] of [+ ['remote:share:one:a-local', 'Shared one'],+ ['remote:device-c:c-open', 'C Model'],+ ['provider:a-local', 'A Model'],+ ['remote:share:two:a-local', 'Shared two'],+ ]) {+ await clickRail(rail!);+ expect(favoriteNames()).toHaveLength(1);+ expect(within(favoritesGroup()).getByText(name!)).toBeTruthy();+ await clickRail('favorites');+ expect(favoriteNames()).toEqual(initial);+ await clickRail('all');+ expect(favoriteNames()).toEqual(initial);+ }+ expect(listModelFavorites()).toHaveLength(4);+ expect(invoke).not.toHaveBeenCalled();+ });++ it('聚合收藏选择保留分享路由和配置,取消只删除对应副本', async () => {+ const { onUnifiedSelect } = renderPanel({ devices: allDevices });+ await clickRail('favorites');+ const row = rowOf(favoritesGroup(), 'Shared one');+ await act(async () => fireEvent.click(row));+ expect(onUnifiedSelect).toHaveBeenCalledWith(expect.objectContaining({+ providerId: 'a-local', modelId: 'a-model', engine: 'cc', effort: 'low',+ agentDevice: { deviceId: 'share:one', name: 'one' },+ }));+ await act(async () => fireEvent.click(within(row).getByRole('button', { name: '取消收藏' })));+ expect(listModelFavorites().map((item) => item.providerId)).toEqual([+ 'a-local', C_SOURCE, providerShareFavoriteSource(shares[1]!),+ ]);+ await clickRail('remote:share:one:a-local');+ expect(within(list()).queryByRole('group', { name: '收藏' })).toBeNull();+ });++ it('分享下线或授权变化后,缓存目录不能把旧收藏重新显示出来', async () => {+ renderPanel({ devices: allDevices });+ await act(async () => publish([{ ...shares[0]!, hostOnline: false }, shares[1]!]));+ expect(within(favoritesGroup()).queryByText('Shared one')).toBeNull();+ expect(listModelFavorites()).toHaveLength(4);+ await act(async () => publish());+ expect(within(favoritesGroup()).getByText('Shared one')).toBeTruthy();+ await act(async () => publish([{ ...shares[0]!, memberId: 'new-member' }, shares[1]!]));+ expect(within(favoritesGroup()).queryByText('Shared one')).toBeNull();+ expect(within(favoritesGroup()).getByText('A Model')).toBeTruthy();+ });++ it('被控任务浏览分享时,收藏增删仍写被控电脑;控制端收藏保持原样', async () => {+ const controllerItems = listModelFavorites();+ remoteLists['device-b'] = [{ uid: 'home-fav', providerId: 'b-main', modelId: 'b-model', agent: 'cc' }];+ renderPanel({ devices: allDevices, homeDeviceId: 'device-b' }, {+ deviceId: 'device-b', modelId: 'b-model', currentProviderId: 'b-main',+ });+ await clickRail('remote:share:one:a-local');+ expect(within(list()).queryByRole('group', { name: '收藏' })).toBeNull();+ await act(async () => fireEvent.click(within(rowOf(list(), 'Shared one')).getByRole('button', { name: '收藏' })));+ expect(remoteLists['device-b']).toHaveLength(2);+ expect(remoteLists['device-b']![1]!.providerId).toBe(providerShareFavoriteSource(shares[0]!));+ await clickRail('favorites');+ expect(favoriteNames()).toHaveLength(2);+ expect(within(favoritesGroup()).getByText('B Model')).toBeTruthy();+ await act(async () => fireEvent.click(within(rowOf(favoritesGroup(), 'Shared one')).getByRole('button', { name: '取消收藏' })));+ expect(remoteLists['device-b']).toHaveLength(1);+ expect(listModelFavorites()).toEqual(controllerItems);+ expect(invoke.mock.calls.every(([deviceId]) => deviceId === 'device-b')).toBe(true);+ });+});diff --git a/apps/desktop/src/renderer/components/new-chat/UnifiedModelPanel.tsx b/apps/desktop/src/renderer/components/new-chat/UnifiedModelPanel.tsxindex 6e840a83f4..636d3fb861 100644--- a/apps/desktop/src/renderer/components/new-chat/UnifiedModelPanel.tsx+++ b/apps/desktop/src/renderer/components/new-chat/UnifiedModelPanel.tsx@@ -1,5 +1,9 @@import { useRemoteModelFavorites } from '@/state/useRemoteModelFavorites';-import { useProviderShareFavorites } from '@/state/providerShareFavorites';+import {+ parseProviderShareFavoriteSource,+ useProviderShareFavorites,+ useProviderShareFavoriteSources,+} from '@/state/providerShareFavorites';import {agentDeviceOfFavorite,LOCAL_MODEL_FAVORITE_STORE,@@ -396,11 +400,17 @@ export function UnifiedModelPanel({const isSharedProvider = isProviderShareAgentDeviceId(deviceId);// 远程 Agent:收藏一律读写任务所在电脑那一份(§1.5),浏览其他电脑的目录时也不读那台自己的收藏;// 其余入口照旧 —— 远程控制读被控电脑的列表,本机读本机。- const favoritesListDeviceId = isSharedProvider- ? undefined- : remoteSources ? remoteSources.favoritesDeviceId : deviceId;+ const favoritesListDeviceId = remoteSources+ ? remoteSources.favoritesDeviceId+ : isSharedProvider ? undefined : deviceId;const remoteFavorites = useRemoteModelFavorites(favoritesListDeviceId);- const sharedFavorites = useProviderShareFavorites(deviceId, storedFavorites);+ const sharedFavorites = useProviderShareFavorites(+ deviceId,+ storedFavorites,+ remoteSources?.favoritesDeviceId ? remoteFavorites : undefined,+ );+ const sharedFavoriteSources = useProviderShareFavoriteSources();+ const hasRemoteSources = !!remoteSources;const favoritesHomeDeviceId = remoteSources?.homeDeviceId ?? null;const agentDeviceFavorites = useAgentDeviceFavorites({deviceId: remoteSources?.active && !isSharedProvider ? deviceId : undefined,@@ -410,8 +420,8 @@ export function UnifiedModelPanel({: { items: storedFavorites, store: LOCAL_MODEL_FAVORITE_STORE },});useEffect(() => {- if (isSharedProvider) ensureProviderShareReceivedStarted();- }, [isSharedProvider]);+ if (isSharedProvider || hasRemoteSources) ensureProviderShareReceivedStarted();+ }, [isSharedProvider, hasRemoteSources]);const favorites = selectionPolicy === 'official' ? NO_FAVORITES: isSharedProvider ? sharedFavorites.items: remoteSources ? agentDeviceFavorites.items@@ -537,8 +547,7 @@ export function UnifiedModelPanel({: null,[remoteActiveDeviceId, remoteActiveProviderId],);- const effectiveRail = isSharedProvider && rail.kind === 'favorites' && !query.trim()- ? rail : remoteRail ?? (query.trim() ? RAIL_ALL : rail);+ const effectiveRail = remoteRail ?? (query.trim() ? RAIL_ALL : rail);// 切到另一台电脑的途中(或读取失败)列表数据还不是那台的目录:列表区只显示状态,不出行。const remoteListPending = remoteRail !== null && !remoteSources?.ready;const handleRailSelect = useCallback(@@ -548,11 +557,11 @@ export function UnifiedModelPanel({remoteSources?.onActivate({ deviceId: item.deviceId, providerId: item.providerId });return;}- // 分享收藏属于受邀者,但条目仍要在该分享的目录里解析与选用。- if (remoteSources?.active && !(isSharedProvider && item.kind === 'favorites')) remoteSources.onActivate(null);+ // ★ / 全部回到任务电脑的收藏列表;每条远程收藏按自身来源解析,不能把视图锁在刚浏览的分享。+ if (remoteSources?.active) remoteSources.onActivate(null);setRail(item);},- [remoteSources, isSharedProvider],+ [remoteSources],);// ── 行配置合成 ────────────────────────────────────────────────────────────@@ -758,7 +767,11 @@ export function UnifiedModelPanel({const resolveDeviceFavorite = useMemo(() => {if (!deviceFavoritesEnabled) return undefined;return (item: ModelFavoriteItem): ForeignFavoriteRow | null => {- const source = agentDeviceOfFavorite(item.providerId, favoritesHomeDeviceId);+ const shareDeviceId = sharedFavoriteSources.get(item.providerId);+ const share = shareDeviceId ? parseProviderShareFavoriteSource(item.providerId) : null;+ const source = share && shareDeviceId+ ? { deviceId: shareDeviceId, providerId: share.providerId }+ : agentDeviceOfFavorite(item.providerId, favoritesHomeDeviceId);if (!source) return null;const favorite: ModelFavoriteItem = { ...item, providerId: source.providerId };const group = deviceFavoriteGroups?.find((candidate) => candidate.deviceId === source.deviceId);@@ -778,7 +791,7 @@ export function UnifiedModelPanel({}: null;};- }, [deviceFavoritesEnabled, favoritesHomeDeviceId, deviceFavoriteGroups, unavailableDeviceIds]);+ }, [deviceFavoritesEnabled, favoritesHomeDeviceId, deviceFavoriteGroups, unavailableDeviceIds, sharedFavoriteSources]);const sections = useMemo(() =>diff --git a/apps/desktop/src/renderer/state/providerShareFavorites.ts b/apps/desktop/src/renderer/state/providerShareFavorites.tsindex c7bcbb74b3..62c1687e7a 100644--- a/apps/desktop/src/renderer/state/providerShareFavorites.ts+++ b/apps/desktop/src/renderer/state/providerShareFavorites.ts@@ -19,7 +19,7 @@ type Source = { shareId: string; memberId: string; providerId: string; region: P/*** 复用受邀者账号的收藏存储;远程同步保留既有长度约束。providerId 是带分享/成员身份的存储键,- * 只在对应分享的选择器里投影为真实 providerId,绝不用于模型请求。+ * 按对应分享的目录投影为真实 providerId(包括聚合收藏视图),绝不把存储键用于模型请求。* 老客户端不认识这个来源时不会把它误认成本机同名供应商。*/export function providerShareFavoriteSource(source: Pick<ProviderShareReceived, 'shareId' | 'memberId' | 'providerId' | 'owner'>): string {@@ -85,10 +85,24 @@ export function useProviderShareFavoriteCleanupFailed(): boolean {return !!state.membership && isDataOwnerPushStampCurrent(state.membership.ownerStamp) && state.cleanupFailed;}+/** 聚合收藏只解析当前账号仍可用的原授权;同名供应商或重新申请的分享不能接管旧副本。 */+export function useProviderShareFavoriteSources(): ReadonlyMap<string, string> {+ const state = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);+ const current = state.membership && isDataOwnerPushStampCurrent(state.membership.ownerStamp)+ ? state.membership : null;+ return useMemo(() => new Map(+ (current?.received ?? [])+ .filter((share) => share.status === 'active' && share.hostOnline && share.hostCapable)+ .map((share) => [providerShareFavoriteSource(share), `share:${share.shareId}`]),+ ), [current]);+}+export function useProviderShareFavorites(deviceId: string | undefined,- stored: readonly ModelFavoriteItem[],+ localItems: readonly ModelFavoriteItem[],+ home?: { items: readonly ModelFavoriteItem[]; store: FavoriteStore },): { items: readonly ModelFavoriteItem[]; store: FavoriteStore } {+ const stored = home?.items ?? localItems;const state = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);const owner = getDataOwnerGeneration();const membership = state.membership && isDataOwnerPushStampCurrent(state.membership.ownerStamp)@@ -105,8 +119,10 @@ export function useProviderShareFavorites(};const expected = (uid: string) => {assertCurrent();- const item = accessHostModelFavorites(owner.dataOwnerId).find((item) => item.uid === uid && item.providerId === source);- if (!item) throw new Error('Shared favorite unavailable');+ const item = home+ ? home.store.get(uid)+ : accessHostModelFavorites(owner.dataOwnerId).find((item) => item.uid === uid);+ if (!item || item.providerId !== source) throw new Error('Shared favorite unavailable');return item;};const store: FavoriteStore = {@@ -117,10 +133,12 @@ export function useProviderShareFavorites(add: (config: ModelFavoriteConfig) => {assertCurrent();if (config.providerId !== share!.providerId) throw new Error('Shared provider changed');+ if (home) return home.store.add({ ...config, providerId: source! });accessHostModelFavorites(owner.dataOwnerId, { kind: 'add', item: { ...config, providerId: source! } });},update: (uid, patch) => {const before = expected(uid);+ if (home) return home.store.update(uid, patch);const item = { ...before, ...patch };accessHostModelFavorites(owner.dataOwnerId, {kind: 'update', expected: before,@@ -128,7 +146,9 @@ export function useProviderShareFavorites(});},remove: (uid) => {- accessHostModelFavorites(owner.dataOwnerId, { kind: 'remove', expected: expected(uid) });+ const before = expected(uid);+ if (home) return home.store.remove(uid);+ accessHostModelFavorites(owner.dataOwnerId, { kind: 'remove', expected: before });},};const items = useMemo(() => source && sharediff --git a/docs/assets/model-favorites/all-dark.png b/docs/assets/model-favorites/all-dark.pngnew file mode 100644index 0000000000..f9a0c9ac8bBinary files /dev/null and b/docs/assets/model-favorites/all-dark.png differdiff --git a/docs/assets/model-favorites/all-light.png b/docs/assets/model-favorites/all-light.pngnew file mode 100644index 0000000000..83de4c1d03Binary files /dev/null and b/docs/assets/model-favorites/all-light.png differdiff --git a/docs/product-rules/model-selector-unified.md b/docs/product-rules/model-selector-unified.mdindex a562dd3452..df00ec11c9 100644--- a/docs/product-rules/model-selector-unified.md+++ b/docs/product-rules/model-selector-unified.md@@ -66,8 +66,9 @@### 1.5 收藏 = 配置副本- **远程收藏按被控电脑共享**:Desktop 与 Mobile 连接同一台电脑时读取和修改该电脑当前账号的既有收藏。各被控电脑独立,不将控制端的本机收藏套用或自动合并到远端。收藏以单条新增、条件编辑、条件删除同步,等持久化确认后反馈成功;并发修改同一副本时拒绝旧快照覆盖,重读后再编辑。断线、账号切换、旧版不支持时不得声称已同步;不自动重试写操作,也不影响会话和连接恢复。-- **其他电脑上的模型照样收藏**(2026-10-13):同账号另一台电脑开放了远程调用的模型,收藏、编辑、取消收藏与本机模型完全一样,用户不用关心模型在哪台电脑上运行。收藏仍存在被控电脑上,运行位置编进来源(`agent-device-favorite:["<电脑>","<供应商>"]`,见 `packages/device-link/src/modelFavorites.ts`),不另加字段——旧版解析会丢掉不认识的字段,把那台电脑的供应商当成被控电脑的同名供应商而派错地方;编进来源后旧版只把这条当作不认识的供应商藏起来。它与本机收藏排在同一个收藏区,说明行带电脑名以区分本机同名模型;选中即在那台电脑运行。同一模型在本机与那台电脑上的收藏互不匹配。那台电脑离线(包括只因任务的 Agent 在那台、靠缓存目录留在列表里)、关闭远程调用、供应商被收进供应商组,或那台电脑上已没有这个模型时先不显示,收藏本身保留;Desktop 在那台电脑仍在列表里、目录还在读取或读取失败时置灰显示,Mobile 等目录读到后再显示。Desktop 收藏区里这类条目不弹参数浮层,参数在那台电脑的视图里调;已建任务的 Agent 已在那台电脑上时,点它先切到那台电脑的视图,再点一次应用。供应商分享(`share:`)沿用各自的收藏方式,Mobile 暂不支持收藏分享来的模型。+- **其他电脑上的模型照样收藏**(2026-10-13):同账号另一台电脑开放了远程调用的模型,收藏、编辑、取消收藏与本机模型完全一样,用户不用关心模型在哪台电脑上运行。收藏仍存在被控电脑上,运行位置编进来源(`agent-device-favorite:["<电脑>","<供应商>"]`,见 `packages/device-link/src/modelFavorites.ts`),不另加字段——旧版解析会丢掉不认识的字段,把那台电脑的供应商当成被控电脑的同名供应商而派错地方;编进来源后旧版只把这条当作不认识的供应商藏起来。它与本机收藏排在同一个收藏区,说明行带电脑名以区分本机同名模型;选中即在那台电脑运行。同一模型在本机与那台电脑上的收藏互不匹配。那台电脑离线(包括只因任务的 Agent 在那台、靠缓存目录留在列表里)、关闭远程调用、供应商被收进供应商组,或那台电脑上已没有这个模型时先不显示,收藏本身保留;Desktop 在那台电脑仍在列表里、目录还在读取或读取失败时置灰显示,Mobile 等目录读到后再显示。Desktop 收藏区里这类条目不弹参数浮层,参数在那台电脑的视图里调;已建任务的 Agent 已在那台电脑上时,点它先切到那台电脑的视图,再点一次应用。Mobile 暂不支持收藏分享来的模型。+- **Desktop 收藏视图不随浏览来源切换**(2026-10-13):★ / 全部统一展示任务所在电脑收藏的本机、同账号远程与分享模型,保持收藏顺序;点任何供应商图标时,收藏区与模型区都只显示该连接的条目,同品牌不同电脑、不同分享互不混用。分享收藏沿用带分享与成员身份的既有存储键,仅在原授权可用且对应目录包含模型时解析;浏览分享时点 ★ 同样返回聚合收藏。远控任务的分享收藏也读写被控电脑,不能写入控制端收藏。侧栏仍为供应商图标,不增加设备标题;配置与选择交互沿用既有路径。实现及回归见 `UnifiedModelPanel.tsx`、`providerShareFavorites.ts` 与 `remoteAgentDeviceFavoritesPanel.test.tsx`。- Desktop 行/浮层的 ☆ 是**单向「添加副本」动作**:把当前生效配置(模型+引擎+深度+Fast)拷进收藏区,点亮 0.7s 反馈后恢复;源头行不持有收藏态。重复添加去重。- **Mobile 收藏与参数调整分开**(用户确认交互原型,2026-10-02):按来源、模型、引擎、推理强度与 Fast 完整匹配已保存副本,展示当前配置摘要。空心星标对应「收藏此配置」,保存确认后保持实心星标并显示「已收藏 · 点击取消」;再次点击只删除匹配的副本,所有入口都保持当前配置与详情页,不触发恢复推荐。模型目录 ID 与同一条目的 wire ID 视为同一模型,不把已失效档位或不可用 Fast 自动降级后当成匹配。状态跟随被控端收藏快照,失败保留原状态并允许重试。- Mobile 从普通模型或收藏进入详情,普通参数调整均保存模型偏好;当前选中模型继续走完整配置应用与取消/失败回滚规则。原收藏不变,配置不再匹配时星标回到空心,并提示「参数已调整,原收藏保留」。再次收藏新增独立副本。从收藏打开时提供「编辑原收藏」,参数先留在编辑草稿,点击「保存收藏」才更新原条目,且不改变正在使用的配置。取消编辑不落库;保存失败保留编辑内容;原收藏被远端修改或删除时拒绝旧编辑覆盖,相同配置去重。实现与回归见 `UnifiedModelPickerSheet.tsx`、`unifiedMobilePicker.test.tsx`、`unifiedMobilePickerView.test.tsx`。