Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

Merge pull request #7045 from makecindy/dash/duo-companion-header

Lizif88d28fb6d16
diff --cc apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx
index a753f6a57f,a6e0cf99dd..e1e69ca8eb
--- a/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx
+++ b/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx
@@@ -39,9 -41,15 +41,15 @@@ vi.mock('@/session/useCompanionGlanceTo
dueTodos: () => [],
useGlanceDueSeen: () => ({ unseen: h.unseen, markSeen: h.markSeen }),
}));
- vi.mock('expo-router', () => ({ useRouter: () => ({ push: h.push }) }));
+ vi.mock('expo-router', () => ({ useRouter: () => ({ push: h.push }), Stack: {
+ Screen: ({ options }: any) => { h.screenOptions.push(options); return typeof options.headerTitle === 'function'
+ ? createElement('div', { 'data-testid': 'native-title' }, options.headerTitle()) : null; },
+ Toolbar: Object.assign(({ children, placement }: any) => createElement('div', { 'data-toolbar': placement }, children), {
+ View: ({ children }: any) => children,
+ }),
+ } }));
vi.mock('@/session/CompanionProfileSheet', () => ({ CompanionProfileSheet: (props: unknown) => { h.profile = props; return null; } }));
-vi.mock('@/session/useTeammateNavigation', () => ({ useTeammateNavigation: () => ({ chooseMode: h.chooseMode }) }));
+vi.mock('@/session/useTeammateNavigation', () => ({ useTeammateNavigation: () => ({ returnHome: h.returnHome }) }));
vi.mock('@/chat/useCloudCompanion', () => ({ useCloudCompanionHome: () => h.cloud }));
vi.mock('@/session/CloudHomeSwitchSheet', () => ({ CloudHomeSwitchSheet: (props: unknown) => { h.homeSheet = props; return null; } }));
import { CompanionHeader } from '@/session/CompanionHeader';