Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
feat(mobile): 伙伴近况底部面板取代顶栏待办按钮
zqchris858dca6cf5e7
diff --git a/apps/desktop/src/renderer/features/bots/botGeneratedArtifacts.ts b/apps/desktop/src/renderer/features/bots/botGeneratedArtifacts.tsindex 75e79bb279..0b895aa511 100644--- a/apps/desktop/src/renderer/features/bots/botGeneratedArtifacts.ts+++ b/apps/desktop/src/renderer/features/bots/botGeneratedArtifacts.ts@@ -1,110 +1,21 @@import type { GeneratedFileRef } from '@/lib/generatedFiles';+import {+ deliverableFileExtension,+ isBotDeliverableFile,+ isBotSupportingFile,+} from '@cindy/maker-shared/bot-deliverable';-const PRIMARY_EXTENSIONS = new Set([- // 本地媒体协议支持直接预览的视觉成果。- 'avif',- 'bmp',- 'gif',- 'heic',- 'heif',- 'ico',- 'jpeg',- 'jpg',- 'png',- 'svg',- 'tif',- 'tiff',- 'webp',- // 办公与媒体成果。即使不能在卡内渲染,它们仍是用户可直接使用的文件。- 'csv',- 'doc',- 'docx',- 'epub',- 'glb',- 'gltf',- 'key',- 'm4a',- 'mov',- 'mp3',- 'mp4',- 'numbers',- 'ods',- 'odp',- 'odt',- 'pages',- 'pdf',- 'ppt',- 'pptx',- 'rtf',- 'stl',- 'tsv',- 'wav',- 'webm',- 'xls',- 'xlsx',- 'zip',-]);--const HTML_EXTENSIONS = new Set(['htm', 'html', 'xhtml']);-const GENERIC_HTML_NAMES = new Set(['index.htm', 'index.html', 'index.xhtml', 'preview.html']);--const SUPPORTING_DIRECTORY_NAMES = new Set([- '.preview',- '.previews',- '.tmp',- '_preview',- '_previews',- 'preview',- 'previews',- 'temp',- 'tmp',-]);--function normalizedPathSegments(filePath: string): string[] {- return filePath- .replace(/\\/g, '/')- .split('/')- .filter(Boolean)- .map((segment) => segment.toLowerCase());-}--export function generatedFileExtension(file: GeneratedFileRef): string {- const name = file.name || normalizedPathSegments(file.path).at(-1) || '';- const match = /\.([^.]+)$/.exec(name);- return match?.[1]?.toLowerCase() ?? '';-}+export const generatedFileExtension = (file: GeneratedFileRef): string => deliverableFileExtension(file);/*** 伙伴工作目录里的预览截图与临时文件仍然可取,但不能和真正成果并列。- * 这里只收敛有明确产品语义的辅助目录,不用文件名猜测用户意图。+ * 判断见 maker-shared `bot-deliverable`,与手机近况共用。*/-export function isBotSupportingGeneratedFile(file: GeneratedFileRef, workingDir?: string): boolean {- const segments = normalizedPathSegments(file.path);- const root = workingDir ? normalizedPathSegments(workingDir) : [];- const isWithinRoot = root.length > 0 && root.every((part, index) => segments[index] === part);- // A workspace itself may be under the OS temp directory. Only its descendants- // describe supporting material; an explicit document artifact also wins below.- const relative = isWithinRoot ? segments.slice(root.length) : segments;- return relative.slice(0, -1).some((segment) =>- SUPPORTING_DIRECTORY_NAMES.has(segment),- );-}+export const isBotSupportingGeneratedFile = (file: GeneratedFileRef, workingDir?: string): boolean =>+ isBotSupportingFile(file, workingDir);-/**- * 没有结构化 artifact manifest 时的保守兜底:只把办公文件、媒体、网页等- * 用户可直接消费的格式提到首层;CSS / JS / JSON / 源码等留在「相关文件」。- */-export function isBotPrimaryGeneratedFile(file: GeneratedFileRef, workingDir?: string): boolean {- if (file.artifact) return true;- if (isBotSupportingGeneratedFile(file, workingDir)) return false;- const extension = generatedFileExtension(file);- if (HTML_EXTENSIONS.has(extension)) {- // 「index.html」常常只是把多份方案拼起来的内部预览页。真正的网页- // 成品应该有能表达内容的名字,才会进入首层。- return !GENERIC_HTML_NAMES.has(file.name.toLowerCase());- }- return PRIMARY_EXTENSIONS.has(extension);-}+export const isBotPrimaryGeneratedFile = (file: GeneratedFileRef, workingDir?: string): boolean =>+ isBotDeliverableFile(file, workingDir);export function partitionBotGeneratedFiles(files: readonly GeneratedFileRef[], workingDir?: string): {primary: GeneratedFileRef[];diff --git a/apps/desktop/src/renderer/features/bots/botGlanceTodos.ts b/apps/desktop/src/renderer/features/bots/botGlanceTodos.tsindex 4bda3c9ab1..f578ebd01d 100644--- a/apps/desktop/src/renderer/features/bots/botGlanceTodos.ts+++ b/apps/desktop/src/renderer/features/bots/botGlanceTodos.ts@@ -16,6 +16,7 @@ import {queryTodoItems,scheduleTodoDeferralRefresh,todoDue,+ todoDueKey,type TeammateTodo,type TodoListQuery,type TodoPatch,@@ -195,12 +196,6 @@ export function useGlanceTodos(host: GlanceTodoHost, enabled = true) {return { ...state, refresh };}-/** 一条待办这一次到期的身份:改了期限就是一次新的到期,入口红点会再亮。 */-function dueKey(t: TeammateTodo): string {- const deadline = t.deadlineOverride ? t.deadlineOverride.value : t.sourceDeadline;- return `${t.id}@${deadline?.kind === 'instant' ? deadline.at : deadline?.date ?? ''}`;-}-const SEEN_PREFIX = 'cindy:bots:glance-due-seen:';function readSeen(botId: string): Set<string> {@@ -221,13 +216,13 @@ export function dueTodos(todos: GlanceTodos, now = new Date()): TeammateTodo[] {export function hasUnseenDue(botId: string, due: readonly TeammateTodo[]): boolean {if (due.length === 0) return false;const seen = readSeen(botId);- return due.some((t) => !seen.has(dueKey(t)));+ return due.some((t) => !seen.has(todoDueKey(t)));}/** 打开近况就算看过了:只记当前到期的这几条,旧记录随之淘汰。 */export function markDueSeen(botId: string, due: readonly TeammateTodo[]): void {try {- window.localStorage.setItem(SEEN_PREFIX + botId, JSON.stringify(due.map(dueKey)));+ window.localStorage.setItem(SEEN_PREFIX + botId, JSON.stringify(due.map(todoDueKey)));} catch {// 本地存储不可用时只是红点多亮一次,不影响待办本身。}diff --git a/apps/mobile/app/sessions/[sessionId].tsx b/apps/mobile/app/sessions/[sessionId].tsxindex a82a3b7532..d17de0b91b 100644--- a/apps/mobile/app/sessions/[sessionId].tsx+++ b/apps/mobile/app/sessions/[sessionId].tsx@@ -357,6 +357,7 @@ import {replaceComposerTextRange,serializeComposerDocument,sessionLinkComposerNode,+ todoReferenceComposerNode,slashCommandTextNode,textComposerDocument,type ComposerDocument,@@ -9599,6 +9600,16 @@ function SessionScreenContent() {requestAnimationFrame(() => composerInputRef.current?.focus());}, [applyComposerDocument, canUseComposer, currentSession, deviceId, messages, sessionId]);+ // 伙伴近况里点一条待办:作为待办引用放进输入框,主人写一句话交代,伙伴按话更新它。+ const quoteTodoInComposer = useCallback((todo: { id: string; title: string }) => {+ if (!canUseComposer || !companionResource) return;+ const node = todoReferenceComposerNode({ botId: companionResource.ref.id, todoId: todo.id, title: todo.title });+ const editor = composerInputRef.current;+ if (editor) editor.insertNode(node);+ else applyComposerDocument(appendComposerNode(composerDocumentRef.current, node));+ requestAnimationFrame(() => composerInputRef.current?.focus());+ }, [applyComposerDocument, canUseComposer, companionResource]);+const deleteMessage = useCallback((clientId: string) => {if (!deviceId || messageActionBusy) return;// 运行中能否删由被控端判定:点停止后本地运行态可能晚于被控端收敛,@@ -9700,6 +9711,8 @@ function SessionScreenContent() {resource={companionResource} deviceId={deviceId} deviceName={deviceName} online={!remoteUnavailableReason} controlsReady={companionEntry.ready}settingsRequest={companionSettingsRequest?.sessionId === sessionId ? companionSettingsRequest : undefined}working={!!companionWorkingLabel}+ sessionId={sessionId ?? ''}+ onQuoteTodo={quoteTodoInComposer}onSearch={() => setSearchOpen(true)}onBack={goBackToHome} /></> : <SessionHeaderBardiff --git a/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx b/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsxindex 0d76b60b42..74d7853ce5 100644--- a/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx+++ b/apps/mobile/src/__tests__/CompanionHeaderNavigation.test.tsx@@ -9,7 +9,7 @@ import { useHostManagedSession } from '@/session/hostManagedSession';import type { RemoteResource } from '@cindy/device-link';const h = vi.hoisted(() => ({- todos: {} as any, profile: {} as any, dismiss: vi.fn(), chooseMode: vi.fn(), screenOptions: [] as Array<Record<string, unknown>>,+ glance: {} as any, profile: {} as any, glanceTodos: { enabled: false } as any, unseen: false, markSeen: vi.fn(), push: vi.fn(), dismiss: vi.fn(), chooseMode: vi.fn(), screenOptions: [] as Array<Record<string, unknown>>,auth: { accountGeneration: 1, user: null },cloud: { supported: false, actors: [] as Array<{ kind: string; externalId: string; homeDeviceId: string | null }> },homeSheet: {} as any,@@ -29,11 +29,17 @@ vi.mock('@/theme', async () => {const tokens = await import('@/theme/tokens');return { ...tokens, useTheme: () => ({ colors: tokens.lightColors }), useThemedStyles: (fn: any) => fn(tokens.lightColors) };});-vi.mock('lucide-react-native', () => ({ ChevronLeft: () => null, Settings2: () => null, ListTodo: () => null }));+vi.mock('lucide-react-native', () => ({ ChevronLeft: () => null, Settings2: () => null }));vi.mock('@/session/HomeHeaderGlassButton', () => ({ HomeHeaderGlassButton: ({ onPress, testID, children, disabled }: any) =>createElement('button', { onClick: onPress, disabled, 'data-testid': testID }, children) }));vi.mock('@/session/CompanionPresenceRing', () => ({ CompanionPresenceRing: ({ active }: any) => active ? createElement('i', { 'data-testid': 'ring' }) : null }));-vi.mock('@/session/CompanionTodos', () => ({ CompanionTodos: (props: unknown) => { h.todos = props; return null; } }));+vi.mock('@/session/CompanionGlanceSheet', () => ({ CompanionGlanceSheet: (props: unknown) => { h.glance = props; return null; } }));+vi.mock('@/session/useCompanionGlanceTodos', () => ({+ useCompanionGlanceTodos: (options: any) => { h.glanceTodos = options; return { todos: { open: [] }, refresh: vi.fn() }; },+ dueTodos: () => [],+ useGlanceDueSeen: () => ({ unseen: h.unseen, markSeen: h.markSeen }),+}));+vi.mock('expo-router', () => ({ useRouter: () => ({ push: h.push }) }));vi.mock('@/session/CompanionProfileSheet', () => ({ CompanionProfileSheet: (props: unknown) => { h.profile = props; return null; } }));vi.mock('@/session/useTeammateNavigation', () => ({ useTeammateNavigation: () => ({ chooseMode: h.chooseMode }) }));vi.mock('@/chat/useCloudCompanion', () => ({ useCloudCompanionHome: () => h.cloud }));@@ -44,21 +50,22 @@ let root: Root; let host: HTMLDivElement;const resource = { ref: { kind: 'bot', collectionId: 'bots', id: 'bot' }, display: { title: 'Cindy' } } as RemoteResource;const button = (id: string) => host.querySelector<HTMLButtonElement>(`[data-testid="${id}"]`)!;beforeEach(() => {- vi.clearAllMocks(); h.auth.accountGeneration = 1; h.profile = {}; h.todos = {}; h.screenOptions = [];+ vi.clearAllMocks(); h.auth.accountGeneration = 1; h.profile = {}; h.glance = {}; h.screenOptions = []; h.unseen = false;h.cloud = { supported: false, actors: [] }; h.homeSheet = {};host = document.createElement('div'); root = createRoot(host);});afterEach(() => act(() => root.unmount()));-it('goes back from the chat instead of opening a drawer, and opens the profile from the name or the settings button', async () => {+it('goes back from the chat instead of opening a drawer, opens 近况 from the avatar and the profile from settings', async () => {const onBack = vi.fn(), onSearch = vi.fn();- await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="PC" online onBack={onBack} onSearch={onSearch} />));+ await act(async () => root.render(<CompanionHeader sessionId="s1" onQuoteTodo={() => {}} resource={resource} deviceId="pc" deviceName="PC" online onBack={onBack} onSearch={onSearch} />));await act(async () => button('companion.back').click());expect(h.dismiss).toHaveBeenCalledOnce();expect(onBack).toHaveBeenCalledOnce();await act(async () => button('companion.identity').click());- expect(h.profile.visible).toBe(true);- await act(async () => h.profile.onClose());+ expect(h.glance).toMatchObject({ visible: true, botId: 'bot', deviceId: 'pc', sessionId: 's1' });+ expect(h.profile.visible).toBe(false);+ await act(async () => h.glance.onClose());await act(async () => button('companion.settings').click());expect(h.profile.visible).toBe(true);// Search from the profile waits until the sheet has closed.@@ -69,20 +76,21 @@ it('goes back from the chat instead of opening a drawer, and opens the profile f});it('shows the computer and whether it is online, and breathes while the companion works', async () => {- await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="Office iMac" online={false} working onBack={() => {}} onSearch={() => {}} />));+ await act(async () => root.render(<CompanionHeader sessionId="s1" onQuoteTodo={() => {}} resource={resource} deviceId="pc" deviceName="Office iMac" online={false} working onBack={() => {}} onSearch={() => {}} />));expect(host.textContent).toContain('devices.resources.hostOffline · Office iMac');expect(host.querySelector('[data-testid="ring"]')).not.toBeNull();- await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="Office iMac" online onBack={() => {}} onSearch={() => {}} />));+ await act(async () => root.render(<CompanionHeader sessionId="s1" onQuoteTodo={() => {}} resource={resource} deviceId="pc" deviceName="Office iMac" online onBack={() => {}} onSearch={() => {}} />));expect(host.textContent).toContain('Office iMac');expect(host.textContent).not.toContain('devices.resources.hostOffline');expect(host.querySelector('[data-testid="ring"]')).toBeNull();});it('keeps profile controls closed until the chat entry is validated', async () => {- await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="PC" online controlsReady={false} onBack={() => {}} onSearch={() => {}} />));+ await act(async () => root.render(<CompanionHeader sessionId="s1" onQuoteTodo={() => {}} resource={resource} deviceId="pc" deviceName="PC" online controlsReady={false} onBack={() => {}} onSearch={() => {}} />));expect(button('companion.settings').disabled).toBe(true);expect(button('companion.identity').disabled).toBe(true);expect(h.profile.visible).toBe(false);+ expect(h.glance.visible).toBe(false);});// Execute the production page header state and JSX, following the existing page-hook tests.@@ -119,7 +127,7 @@ const moduleConstant = (name: string) => source.statements.find(n => ts.isVariab&& n.declarationList.declarations.some(d => d.name.getText(source) === name))!.getText(source);const compiled = ts.transpileModule(`${moduleConstant('COMPANION_NATIVE_HEADER_OPTIONS')}function PageHost({ bindings }) {- const { auth, deviceId, sessionId, companionResource, companionEntry, shareSelectionActive, setSearchOpen, goBackToHome, companionWorkingLabel } = bindings;+ const { auth, deviceId, sessionId, companionResource, companionEntry, shareSelectionActive, setSearchOpen, goBackToHome, companionWorkingLabel, quoteTodoInComposer } = bindings;const currentSession = null;const isSideChatSheet = false;const companionSettingsRequest = bindings.companionSettingsRequest;@@ -135,7 +143,7 @@ const PageHost = new Function('React', 'useState', 'useHostManagedSession', 'Comconst pageBindings = () => ({ auth: h.auth, deviceId: 'pc', sessionId: 'session-a', shareSelectionActive: false,companionEntry: { ready: true },companionResource: { ref: { kind: 'bot', collectionId: 'bots', id: 'bot-a' }, display: { title: 'Cindy' } } as RemoteResource | null,- setSearchOpen: vi.fn(), goBackToHome: vi.fn(), companionWorkingLabel: null as string | null });+ setSearchOpen: vi.fn(), goBackToHome: vi.fn(), companionWorkingLabel: null as string | null, quoteTodoInComposer: vi.fn() });const showPage = (bindings: ReturnType<typeof pageBindings>) => act(async () => { root.render(<PageHost bindings={bindings} />); });it('wires the page: title while entry validation runs, Back to the roster, and the working breath', async () => {@@ -167,39 +175,37 @@ it('shows the ordinary task header on non-companion pages and while sharing', as});it('opens learning links in the existing profile sheet on the requested page', async () => {- await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="PC" online onBack={() => {}} onSearch={() => {}}+ await act(async () => root.render(<CompanionHeader sessionId="s1" onQuoteTodo={() => {}} resource={resource} deviceId="pc" deviceName="PC" online onBack={() => {}} onSearch={() => {}}settingsRequest={{ page: 'memory', sequence: 1 }} />));expect(h.profile).toMatchObject({ visible: true, initialPage: 'memory' });await act(async () => h.profile.onClose());- await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="PC" online onBack={() => {}} onSearch={() => {}}+ await act(async () => root.render(<CompanionHeader sessionId="s1" onQuoteTodo={() => {}} resource={resource} deviceId="pc" deviceName="PC" online onBack={() => {}} onSearch={() => {}}settingsRequest={{ page: 'capabilities', sequence: 2 }} />));expect(h.profile).toMatchObject({ visible: true, initialPage: 'capabilities' });});-it('only opens Todo for an advertised host capability after entry validation and closes it on account change', async () => {- const props = { resource, deviceId: 'pc', deviceName: 'PC', online: true, onBack: vi.fn(), onSearch: vi.fn() };+it('reads todos only for an advertised, online host, and clears the due dot by opening 近况', async () => {+ const props = { resource, deviceId: 'pc', deviceName: 'PC', online: true, sessionId: 's1', onQuoteTodo: vi.fn(), onBack: vi.fn(), onSearch: vi.fn() };await act(async () => root.render(<CompanionHeader {...props} />));- expect(button('companion.todos.open')).toBeNull();+ expect(h.glanceTodos).toMatchObject({ botId: 'bot', deviceId: 'pc', enabled: false });const withTodos: RemoteResource = { ...resource, links: [{ rel: 'todos', label: 'Todo', target: { kind: 'resource', ref: { collectionId: 'teammates', kind: 'bot', id: 'todos:bot' } } }] };- await act(async () => root.render(<CompanionHeader {...props} resource={withTodos} controlsReady={false} />));- expect(button('companion.todos.open').disabled).toBe(true);- await act(async () => button('companion.todos.open').click());- expect(h.todos.visible).toBe(false);+ await act(async () => root.render(<CompanionHeader {...props} resource={withTodos} online={false} />));+ expect(h.glanceTodos.enabled).toBe(false);+ h.unseen = true;await act(async () => root.render(<CompanionHeader {...props} resource={withTodos} />));- await act(async () => button('companion.todos.open').click());- expect(h.todos).toMatchObject({ visible: true, deviceId: 'pc', botId: 'bot', online: true });- expect(h.profile.visible).toBe(false);- await act(async () => h.todos.onClose());- expect(h.todos.visible).toBe(false);- await act(async () => button('companion.todos.open').click());- h.auth.accountGeneration++;- await act(async () => root.render(<CompanionHeader {...props} resource={withTodos} />));- expect(h.todos.visible).toBe(false);+ expect(h.glanceTodos.enabled).toBe(true);+ expect(button('companion.header.dueDot')).not.toBeNull();+ await act(async () => button('companion.identity').click());+ expect(h.markSeen).toHaveBeenCalledOnce();+ // Quoting a todo goes to this chat's composer.+ expect(h.glance.onQuoteTodo).toBe(props.onQuoteTodo);+ await act(async () => h.glance.onOpenTask('child-1'));+ expect(h.push).toHaveBeenCalledWith({ pathname: '/sessions/[sessionId]', params: { sessionId: 'child-1', deviceId: 'pc' } });});it('names the main computer of a cloud companion and lets the profile change it', async () => {h.cloud = { supported: true, actors: [{ kind: 'bot', externalId: 'bot', homeDeviceId: 'pc' }] };- await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="Office iMac" online onBack={() => {}} onSearch={() => {}} />));+ await act(async () => root.render(<CompanionHeader sessionId="s1" onQuoteTodo={() => {}} resource={resource} deviceId="pc" deviceName="Office iMac" online onBack={() => {}} onSearch={() => {}} />));expect(host.textContent).toContain('devices.cloudCompanion.runsOn');await act(async () => button('companion.settings').click());await act(async () => h.profile.onOpenHome());@@ -210,10 +216,14 @@ it('names the main computer of a cloud companion and lets the profile change it'expect(h.homeSheet).toMatchObject({ botId: 'bot', homeDeviceId: 'pc', homeName: 'Office iMac' });await act(async () => h.homeSheet.onMoved({ deviceId: 'mac', name: 'Mac', online: true }));expect(h.chooseMode).toHaveBeenCalledWith('teammates');+ // 近况 offers the same switch (its row closes the sheet first).+ expect(h.glance.cloudHome).toBe(true);+ await act(async () => h.glance.onSwitchHome());+ expect(h.homeSheet.visible).toBe(true);});it('offers no computer change for a companion without a known main computer', async () => {- await act(async () => root.render(<CompanionHeader resource={resource} deviceId="pc" deviceName="PC" online onBack={() => {}} onSearch={() => {}} />));+ await act(async () => root.render(<CompanionHeader sessionId="s1" onQuoteTodo={() => {}} resource={resource} deviceId="pc" deviceName="PC" online onBack={() => {}} onSearch={() => {}} />));await act(async () => button('companion.settings').click());expect(h.profile.onOpenHome).toBeUndefined();});diff --git a/apps/mobile/src/__tests__/CompanionTodos.test.tsx b/apps/mobile/src/__tests__/CompanionTodos.test.tsxdeleted file mode 100644index 67261410b2..0000000000--- a/apps/mobile/src/__tests__/CompanionTodos.test.tsx+++ /dev/null@@ -1,278 +0,0 @@-// @vitest-environment jsdom-import { act, createElement } from 'react';-import { createRoot, type Root } from 'react-dom/client';-import { afterEach, beforeEach, expect, it, vi } from 'vitest';-import { applyTodoPatch, emptyTodoState, queryTodoItems } from '@cindy/maker-shared/teammate-todo';--const h = vi.hoisted(() => ({- sheet: {} as any,- get: vi.fn(),- action: vi.fn(),- invoke: vi.fn(),- openLink: vi.fn(async () => {}),- onChanged: vi.fn(() => () => {}),- close: vi.fn(),- appState: new Set<(state: string) => void>(),-}));-vi.mock('react-native', () => ({- View: ({ children }: any) => createElement('div', null, children),- ScrollView: ({ children }: any) => createElement('div', null, children),- ActivityIndicator: () => null,- Linking: { openURL: vi.fn() },- AppState: { addEventListener: (_: string, fn: (state: string) => void) => {- h.appState.add(fn); return { remove: () => h.appState.delete(fn) };- } },- Pressable: ({ children, onPress, disabled, accessibilityLabel }: any) =>- createElement(- 'button',- { onClick: onPress, disabled, 'aria-label': accessibilityLabel },- children,- ),- StyleSheet: { create: (s: unknown) => s, hairlineWidth: 1 },-}));-vi.mock('react-i18next', () => ({- useTranslation: () => ({- t: (s: string) => s.replace('devices.teammateTodo.', ''),- i18n: { language: 'en' },- }),-}));-vi.mock('@/auth/AuthContext', () => ({- useAuth: () => ({ accountGeneration: 1 }),-}));-vi.mock('@/device-link/DeviceLinkContext', () => ({- useDeviceLink: () => ({- invoke: h.invoke,- openLink: h.openLink,- onRemoteResourceChanged: h.onChanged,- }),-}));-vi.mock('@/device-link/remoteResources', () => ({- getRemoteResource: h.get,- invokeRemoteResourceAction: h.action,-}));-vi.mock('@/components/AppText', () => ({- Text: ({ children }: any) => createElement('span', null, children),- TextInput: ({ value, onChangeText, accessibilityLabel }: any) =>- createElement('input', {- value,- onChange: (e: any) => onChangeText(e.target.value),- 'aria-label': accessibilityLabel,- }),-}));-vi.mock('@/theme', async () => {- const tokens = await import('@/theme/tokens');- return {- ...tokens,- useTheme: () => ({ colors: tokens.lightColors }),- useThemedStyles: (fn: any) => fn(tokens.lightColors),- };-});-vi.mock('lucide-react-native', () => ({- Plus: () => null,- ChevronDown: () => null,- ChevronRight: () => null,-}));-vi.mock('expo-crypto', () => ({ randomUUID: () => 'test-request' }));-vi.mock('@/session/TodoDateInput', () => ({ TodoDateInput: () => null }));-vi.mock('@/session/CompanionSheet', () => ({- CompanionSheet: (props: any) => {- h.sheet = props;- return props.children;- },-}));-vi.mock('@/session/CompanionTodoRow', () => ({- CompanionTodoRow: ({ item, busy, onAction }: any) =>- createElement(- 'button',- { 'data-testid': item.id, disabled: busy, onClick: onAction },- item.title,- ),-}));-import { CompanionTodos } from '@/session/CompanionTodos';-Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });-let root: Root, host: HTMLDivElement;-const todo = applyTodoPatch(- emptyTodoState(),- {- key: 'quote',- title: 'Compare quote',- outcome: 'Review the prepared comparison',- next: {- kind: 'advance',- label: 'Compare',- instruction: 'Prepare only, do not send',- },- },- 'todo-one',-);-const props = {- visible: true,- online: true,- deviceId: 'host',- deviceName: 'Computer',- botId: 'teammate',- onClose: h.close,-};-const flush = async () =>- act(async () => {- await new Promise((resolve) => setTimeout(resolve, 15));- });-async function render(online = true) {- await act(async () => root.render(<CompanionTodos {...props} online={online} />));- await flush();-}-const row = () => host.querySelector<HTMLButtonElement>('[data-testid="todo-one"]')!;-const button = (label: string) =>- Array.from(host.querySelectorAll<HTMLButtonElement>('button')).find(- (b) => b.textContent === label,- )!;-beforeEach(() => {- vi.clearAllMocks();- h.get.mockResolvedValue({- blocks: [- {- primitive: 'teammate-todos',- data: {- items: [todo],- total: 1,- completedTotal: 1,- offset: 0,- limit: 25,- },- },- ],- });- h.action.mockResolvedValue({});- host = document.createElement('div');- root = createRoot(host);-});-afterEach(() => { act(() => root.unmount()); vi.useRealTimers(); });--it('releases dismiss and button busy state on disconnect without replaying an in-flight action', async () => {- let oldResult!: (result: unknown) => void, newResult!: (result: unknown) => void;- h.action- .mockImplementationOnce(- () =>- new Promise((resolve) => {- oldResult = resolve;- }),- )- .mockImplementationOnce(- () =>- new Promise((resolve) => {- newResult = resolve;- }),- );- await render();- expect(h.sheet.contentScrolls).toBe(true);- await act(async () => row().click());- expect(h.action).toHaveBeenCalledOnce();- expect(row().disabled).toBe(true);- expect(h.sheet.preventDismiss).toBe(true);- await render(false);- expect(h.sheet.preventDismiss).toBe(false);- await render(true);- expect(row().disabled).toBe(false);- expect(h.action).toHaveBeenCalledOnce();- await act(async () => row().click());- expect(row().disabled).toBe(true);- // A late success from the previous connection must not unlock or close the new request.- await act(async () => oldResult({}));- expect(row().disabled).toBe(true);- expect(h.sheet.preventDismiss).toBe(true);- await act(async () => newResult({}));- expect(row().disabled).toBe(false);- expect(h.sheet.preventDismiss).toBe(false);-});--it('routes Open from completed directly to open, and labels the hidden-list action by its destination', async () => {- await render();- expect(button('hidden')).toBeDefined();- await act(async () => button('done · 1').click());- await flush();- expect(JSON.parse(h.get.mock.calls.at(-1)![5]).view).toBe('done');- await act(async () => button('open').click());- await flush();- expect(JSON.parse(h.get.mock.calls.at(-1)![5]).view).toBe('open');- await act(async () => button('hidden').click());- await flush();- expect(JSON.parse(h.get.mock.calls.at(-1)![5]).view).toBe('hidden');- await act(async () => button('open').click());- await flush();- expect(JSON.parse(h.get.mock.calls.at(-1)![5]).view).toBe('open');-});--it('does not send a stale operation whose link opens only after disconnect', async () => {- let finishLink!: () => void;- await render();- h.openLink.mockImplementationOnce(() => new Promise<void>(resolve => { finishLink = resolve; }));- await act(async () => row().click());- expect(h.sheet.preventDismiss).toBe(true);- await render(false);- await act(async () => finishLink());- expect(h.action).not.toHaveBeenCalled();- expect(h.sheet.preventDismiss).toBe(false);- await render(true);- expect(row().disabled).toBe(false);-});--it.each(['open', 'hidden'] as const)(- 'reloads %s at the nearest deferral expiry and cancels the timer when closed',- async (view) => {- vi.useFakeTimers();- const start = new Date('2026-10-10T12:00:00Z');- vi.setSystemTime(start);- const deferred = {- ...todo,- decision: { kind: 'later' as const, until: '2026-10-10T12:02:00Z' },- };- h.get.mockImplementation(async (...args) => ({- blocks: [- {- primitive: 'teammate-todos',- data: queryTodoItems([deferred], JSON.parse(args[5]), new Date()),- },- ],- }));- await act(async () => root.render(<CompanionTodos {...props} />));- await act(async () => vi.advanceTimersByTimeAsync(1));- if (view === 'hidden') {- await act(async () => button('hidden').click());- await act(async () => vi.advanceTimersByTimeAsync(1));- }- expect(!!host.querySelector('[data-testid="todo-one"]')).toBe(view === 'hidden');- const calls = h.get.mock.calls.length;- await act(async () => vi.advanceTimersByTimeAsync(120_000));- expect(h.get.mock.calls.length).toBe(calls + 1);- expect(!!host.querySelector('[data-testid="todo-one"]')).toBe(view === 'open');- expect(h.action).not.toHaveBeenCalled();- await act(async () => root.render(<CompanionTodos {...props} visible={false} />));- expect(h.appState.size).toBe(0);- const closedCalls = h.get.mock.calls.length;- await act(async () => vi.advanceTimersByTimeAsync(120_000));- expect(h.get.mock.calls.length).toBe(closedCalls);- },-);--it('rechecks expired deferrals on foreground without an action or a repeating scan', async () => {- vi.useFakeTimers();- vi.setSystemTime(new Date('2026-10-10T12:00:00Z'));- const deferred = { ...todo, decision: { kind: 'later' as const, until: '2026-10-10T12:02:00Z' } };- h.get.mockImplementation(async (...args) => ({- blocks: [- {- primitive: 'teammate-todos',- data: queryTodoItems([deferred], JSON.parse(args[5]), new Date()),- },- ],- }));- await act(async () => root.render(<CompanionTodos {...props} />));- await act(async () => vi.advanceTimersByTimeAsync(1));- expect(host.querySelector('[data-testid="todo-one"]')).toBeNull();- const calls = h.get.mock.calls.length;- vi.setSystemTime(new Date('2026-10-10T12:05:00Z'));- await act(async () => h.appState.forEach((fn) => fn('active')));- expect(h.get.mock.calls.length).toBe(calls + 1);- expect(row()).toBeDefined();- expect(h.action).not.toHaveBeenCalled();-});diff --git a/apps/mobile/src/__tests__/companionGlance.test.tsx b/apps/mobile/src/__tests__/companionGlance.test.tsxnew file mode 100644index 0000000000..253d0e8630--- /dev/null+++ b/apps/mobile/src/__tests__/companionGlance.test.tsx@@ -0,0 +1,72 @@+// @vitest-environment jsdom+/**+ * 测试价值+ * - 生产入口与可观察结果:手机伙伴近况的两份数据——「输出内容」列哪些文件(companionGlanceOutputs),+ * 「待办」能否读到宿主第一页(25 条)之后的条目(useCompanionGlanceTodos)。+ * - Bug/规则依据:docs/product-rules/cindy-bots-runtime.md「伙伴近况」;桌面同一入口在 #6681 review 中+ * 被指出只读一页时第 26 条之后看不到、引用不了、删不掉。+ * - 现有覆盖缺口:新入口;顶栏测试只验证打开近况,不覆盖数据。+ * - 最小失败输入:30 条未完成待办;一份含成品、源码、已删文件的完成委派与一份失败委派。+ * - tier:unit(jsdom 驱动真实 hook,device-link 用内存 fake)。+ */+import { act, createElement } from 'react';+import { createRoot, type Root } from 'react-dom/client';+import { afterEach, beforeEach, expect, it, vi } from 'vitest';+import type { TeammateTodo } from '@cindy/maker-shared/teammate-todo';++const h = vi.hoisted(() => ({ items: [] as unknown[], reads: [] as Array<Record<string, unknown>> }));+vi.mock('react-native', () => ({ AppState: { addEventListener: () => ({ remove: () => undefined }) } }));+vi.mock('react-i18next', () => ({ useTranslation: () => ({ t: (s: string) => s, i18n: { language: 'en' } }) }));+vi.mock('@react-native-async-storage/async-storage', () => ({ default: { getItem: async () => null, setItem: async () => undefined } }));+vi.mock('@/auth/AuthContext', () => ({ useAuth: () => ({ user: { id: 'u' }, accountGeneration: 1 }) }));+// Stable like the real context: new functions per render would re-run the read effect forever.+const link = vi.hoisted(() => ({ invoke: () => undefined, openLink: async () => undefined, onRemoteResourceChanged: () => () => undefined }));+vi.mock('@/device-link/DeviceLinkContext', () => ({ useDeviceLink: () => link }));+vi.mock('@/device-link/remoteResources', () => ({+ invokeRemoteResourceAction: vi.fn(),+ getRemoteResource: async (_invoke: unknown, _target: unknown, _ref: unknown, _locale: unknown, _primitives: unknown, query: string) => {+ const q = JSON.parse(query) as { view: string; offset: number; limit: number };+ h.reads.push(q);+ const matching = h.items.filter(item => (item as { status: string }).status === (q.view === 'done' ? 'done' : 'open'));+ return { blocks: [{ primitive: 'teammate-todos', data: { items: matching.slice(q.offset, q.offset + q.limit), total: matching.length } }] };+ },+}));+vi.mock('@/session/useRemoteCompanionQuery', () => ({ useRemoteCompanionQuery: () => ({ value: null }) }));++const { useCompanionGlanceTodos } = await import('@/session/useCompanionGlanceTodos');+const { companionGlanceOutputs } = await import('@/session/companionProfileData');++Object.assign(globalThis, { IS_REACT_ACT_ENVIRONMENT: true });+let root: Root;+beforeEach(() => { h.items = []; h.reads = []; root = createRoot(document.createElement('div')); });+afterEach(() => act(() => root.unmount()));++const todo = (id: string, status = 'open') => ({ id, status, title: id, revision: 1, sources: [], history: [] }) as unknown as TeammateTodo;++it('reads every page of open todos, not just the host first page of 25', async () => {+ h.items = Array.from({ length: 30 }, (_, index) => todo(`o${index}`));+ let latest: ReturnType<typeof useCompanionGlanceTodos> | null = null;+ function Probe() { latest = useCompanionGlanceTodos({ deviceId: 'pc', deviceName: 'PC', botId: 'bot', enabled: true }); return null; }+ await act(async () => root.render(createElement(Probe)));+ await act(async () => { await Promise.resolve(); });+ expect(latest!.todos.open).toHaveLength(30);+ expect(latest!.todos.openTotal).toBe(30);+ expect(h.reads.filter(read => read.view === 'open').map(read => read.offset)).toEqual([0, 25]);+});++it("lists only this teammate's finished deliverables, newest first, each opening its source task", () => {+ const outputs = companionGlanceOutputs({+ ok: true,+ delegations: [+ { id: 'd1', requestingBotId: 'bot', status: 'completed', title: 'Weekly report', childSessionId: 'c1', completedAt: 2, updatedAt: 2,+ artifacts: [{ path: 'out/report.docx', status: 'added' }, { path: 'src/app.ts', status: 'modified' }, { path: 'old.pdf', status: 'deleted' }] },+ { id: 'd2', requestingBotId: 'bot', status: 'completed', title: 'Deck', childSessionId: 'c2', completedAt: 5, updatedAt: 5,+ artifacts: [{ path: 'deck.pptx', status: 'added' }, { path: 'previews/shot.png', status: 'added' }] },+ { id: 'd3', requestingBotId: 'bot', status: 'failed', title: 'x', childSessionId: 'c3', completedAt: 9, updatedAt: 9,+ artifacts: [{ path: 'fail.pdf', status: 'added' }] },+ { id: 'd4', requestingBotId: 'other', status: 'completed', title: 'y', childSessionId: 'c4', completedAt: 9, updatedAt: 9,+ artifacts: [{ path: 'theirs.pdf', status: 'added' }] },+ ],+ } as never, 'bot');+ expect(outputs.map(file => [file.name, file.childSessionId])).toEqual([['deck.pptx', 'c2'], ['report.docx', 'c1']]);+});diff --git a/apps/mobile/src/__tests__/composerDocument.test.ts b/apps/mobile/src/__tests__/composerDocument.test.tsindex 030ecbf7ac..eb12a0a633 100644--- a/apps/mobile/src/__tests__/composerDocument.test.ts+++ b/apps/mobile/src/__tests__/composerDocument.test.ts@@ -23,6 +23,7 @@ import {sessionLinkComposerNode,slashCommandTextNode,textComposerDocument,+ todoReferenceComposerNode,} from '@/session/composerDocument';describe('mobile composer document', () => {@@ -290,6 +291,22 @@ describe('mobile composer document', () => {expect(serializeComposerDocument(restored)).toEqual(serialized);});+ // 近况里点一条待办:与桌面同一 wire([标题](cindy://bot-todo/…))与结构化 todo 引用,伙伴才知道是哪一条。+ it('sends a quoted todo as the same structured reference as Desktop and restores it for editing', () => {+ const node = todoReferenceComposerNode({ botId: 'bot-1', todoId: 't 1', title: 'Reply [Lizi]' });+ const serialized = serializeComposerDocument({ version: 1, nodes: [node, { type: 'text', text: ' 改到周五' }] });+ expect(serialized.text).toBe(`[Reply \\[Lizi\\]](${node.href}) 改到周五`);+ expect(serialized.agentReferences).toEqual([expect.objectContaining({+ kind: 'todo', botId: 'bot-1', todoId: 't 1', title: 'Reply [Lizi]', start: 0,+ })]);+ const restored = composerDocumentFromSerializedMessage(serialized.text, { agentReferences: serialized.agentReferences });+ expect(restored.nodes[0]).toMatchObject({ type: 'mention', kind: 'todo', label: 'Reply [Lizi]' });+ expect(serializeComposerDocument(restored)).toEqual(serialized);+ // A stored draft keeps the chip; a forged link is not accepted as a todo.+ expect(parseStoredComposerDocument({ version: 1, nodes: [node] })?.nodes[0]).toMatchObject({ kind: 'todo' });+ expect(parseStoredComposerDocument({ version: 1, nodes: [{ ...node, href: 'https://example.com' }] })?.nodes).toEqual([]);+ });+it('keeps unsupported Desktop Plugin references as exact editable wire text', () => {const href = 'cindy://plugin-resource/issues/search_issues/ISSUE-1';const text = `[Fix login](${href})`;diff --git a/apps/mobile/src/i18n/locales/en/devices.json b/apps/mobile/src/i18n/locales/en/devices.jsonindex 094bc2080e..ce4271e480 100644--- a/apps/mobile/src/i18n/locales/en/devices.json+++ b/apps/mobile/src/i18n/locales/en/devices.json@@ -832,84 +832,36 @@"sourceDisabled": "Already off","botOwner": "Owner ID {{id}}"},- "teammateTodo": {- "title": "Todos",- "new": "New todo",- "search": "Search todos",- "open": "Open",- "done": "Completed",- "hidden": "Dismissed / later",- "empty": "No todos",- "noMatch": "No matching todos",- "loading": "Loading…",- "retry": "Retry",- "error": "The action did not finish. Try again.",- "conflict": "This todo changed. Review it before editing.",- "received": "Received",- "accepted": "View progress",- "unknown": "Check progress",- "failed": "Retry next step",- "view": "View details",- "evidence": "View evidence",- "more": "More actions",- "discovered": "Discovered",- "assigned": "Assigned",- "suggested": "Suggested",- "candidate": "Confirm date",- "overdue": "Overdue",- "today": "Today",- "next": "Next step",- "outcome": "Completion condition",- "value": "Why it matters",- "sources": "Sources",- "associations": "Related work",- "deadline": "Due date",- "sourceDeadline": "Source deadline",- "clearDate": "Clear due date",- "date": "Date",- "time": "Exact time (optional)",- "zone": "Time zone",- "save": "Save",- "cancel": "Cancel",- "delete": "Delete this todo",- "mute": "Do not suggest this issue again",- "later": "Do later",- "until": "Do later until",- "restore": "Restore",- "reopen": "Reopen",- "complete": "Mark complete",- "summary": "Completion evidence",- "confirmDate": "Confirm date",- "deadlineReason": "Why the date needs confirmation",- "override": "Your deadline",- "reminder": "Deferred until",- "edit": "Edit todo",- "name": "Title",- "progress": "Progress",- "link": "Evidence link (optional)",- "saved": "Saved",- "page": "{{start}}–{{end}} / {{count}}",- "previous": "Previous",- "following": "Next",- "order": "Sort",- "dueOrder": "Due first",- "createdOrder": "Creation order",- "origin": "Origin",- "all": "All",- "close": "Close",- "laterConflict": "Deferring does not extend the deadline",- "legacyEvidence": "Legacy completion evidence needs verification",- "noPermission": "This source is not connected or authorized",- "copy": "Copy",+ "glance": {+ "open": "{{name}} at a glance",+ "dueUnseen": "A todo is due",+ "computers": "Computers",+ "runningHere": "Running here",+ "online": "Online",+ "offline": "Offline",+ "current": "Current",+ "offlineCount_one": "{{count}} offline",+ "offlineCount_other": "{{count}} offline",+ "todos": "Todos",+ "showMore": "Show more",+ "showLess": "Show less",+ "doneCount_one": "{{count}} done",+ "doneCount_other": "{{count}} done",+ "delete": "Delete",+ "deleted": "Deleted. It won't be added again.","undo": "Undo",- "history": "Completion history",- "clockNote": "Date-only deadlines end in the shown time zone; exact times retain their zone.",- "deleted": "Deleted",- "muted": "Not suggested again",- "deferred": "Deferred",- "continue": "Continue",- "addTime": "Add time",- "dateOnly": "Date only"+ "undoFailed": "Couldn't undo. Try again.",+ "deleteFailed": "Couldn't delete. Try again.",+ "outputs": "Outputs",+ "outputMeta": "{{time}} · {{task}}",+ "source": {+ "conversation": "You asked",+ "mail": "From email",+ "feishu": "From Feishu",+ "github": "From GitHub",+ "community": "From the community",+ "task": "From a task"+ }},"cloudCompanion": {"homeOffline": "Main computer “{{device}}” is offline",diff --git a/apps/mobile/src/i18n/locales/ja/devices.json b/apps/mobile/src/i18n/locales/ja/devices.jsonindex 4f5d977674..c180a9c030 100644--- a/apps/mobile/src/i18n/locales/ja/devices.json+++ b/apps/mobile/src/i18n/locales/ja/devices.json@@ -832,84 +832,36 @@"sourceDisabled": "元から停止中","botOwner": "オーナー ID {{id}}"},- "teammateTodo": {- "title": "Todo",- "new": "Todoを追加",- "search": "Todoを検索",- "open": "未完了",- "done": "完了",- "hidden": "非表示 / あとで",- "empty": "Todoはありません",- "noMatch": "一致するTodoはありません",- "loading": "読み込み中…",- "retry": "再試行",- "error": "操作が完了しませんでした。再試行してください。",- "conflict": "Todoが更新されました。確認してから編集してください。",- "received": "受付済み",- "accepted": "進捗を見る",- "unknown": "進捗を確認",- "failed": "次の手順を再試行",- "view": "詳細を見る",- "evidence": "完了の根拠を見る",- "more": "その他の操作",- "discovered": "見つけた項目",- "assigned": "依頼",- "suggested": "提案",- "candidate": "日付を確認",- "overdue": "期限超過",- "today": "今日",- "next": "次の手順",- "outcome": "完了条件",- "value": "取り組む理由",- "sources": "情報源",- "associations": "関連",- "deadline": "期限",- "sourceDeadline": "情報源の期限",- "clearDate": "期限を解除",- "date": "日付",- "time": "時刻(任意)",- "zone": "タイムゾーン",- "save": "保存",- "cancel": "キャンセル",- "delete": "この項目を削除",- "mute": "この問題を今後提案しない",- "later": "あとで",- "until": "延期先",- "restore": "復元",- "reopen": "再開",- "complete": "完了にする",- "summary": "完了の根拠",- "confirmDate": "日付を確定",- "deadlineReason": "日付の確認が必要な理由",- "override": "設定した期限",- "reminder": "延期先",- "edit": "Todoを編集",- "name": "タイトル",- "progress": "進捗",- "link": "根拠のリンク(任意)",- "saved": "保存済み",- "page": "{{start}}–{{end}} / {{count}}",- "previous": "前へ",- "following": "次へ",- "order": "並び順",- "dueOrder": "期限順",- "createdOrder": "作成順",- "origin": "種類",- "all": "すべて",- "close": "閉じる",- "laterConflict": "延期しても期限は変わりません",- "legacyEvidence": "旧記録の完了の根拠は未確認です",- "noPermission": "未接続または未承認の情報源です",- "copy": "コピー",+ "glance": {+ "open": "{{name}}の近況",+ "dueUnseen": "期限が来た Todo があります",+ "computers": "コンピュータ",+ "runningHere": "このコンピュータで実行中",+ "online": "オンライン",+ "offline": "オフライン",+ "current": "現在",+ "offlineCount_one": "オフライン {{count}} 台",+ "offlineCount_other": "オフライン {{count}} 台",+ "todos": "Todo",+ "showMore": "さらに表示",+ "showLess": "閉じる",+ "doneCount_one": "完了 {{count}}",+ "doneCount_other": "完了 {{count}}",+ "delete": "削除",+ "deleted": "削除しました。同じ件は今後記録しません","undo": "元に戻す",- "history": "完了履歴",- "clockNote": "日付のみの期限は表示されたタイムゾーンの一日の終わりです。日時にはタイムゾーンが保持されます。",- "deleted": "削除済み",- "muted": "今後提案しない",- "deferred": "延期中",- "continue": "続ける",- "addTime": "時刻を追加",- "dateOnly": "日付のみ"+ "undoFailed": "元に戻せませんでした。もう一度お試しください",+ "deleteFailed": "削除できませんでした。もう一度お試しください",+ "outputs": "成果物",+ "outputMeta": "{{time}} · {{task}}",+ "source": {+ "conversation": "あなたの依頼",+ "mail": "メールから",+ "feishu": "Feishu から",+ "github": "GitHub から",+ "community": "コミュニティから",+ "task": "タスクから"+ }},"cloudCompanion": {"homeOffline": "メインのパソコン「{{device}}」がオフラインです",diff --git a/apps/mobile/src/i18n/locales/ko/devices.json b/apps/mobile/src/i18n/locales/ko/devices.jsonindex 5cc71eb727..06954bebbc 100644--- a/apps/mobile/src/i18n/locales/ko/devices.json+++ b/apps/mobile/src/i18n/locales/ko/devices.json@@ -832,84 +832,36 @@"sourceDisabled": "원래 사용 중지됨","botOwner": "소유자 ID {{id}}"},- "teammateTodo": {- "title": "할 일",- "new": "할 일 추가",- "search": "할 일 검색",- "open": "미완료",- "done": "완료",- "hidden": "숨김 / 나중에",- "empty": "할 일이 없습니다",- "noMatch": "일치하는 할 일이 없습니다",- "loading": "불러오는 중…",- "retry": "다시 시도",- "error": "작업이 완료되지 않았습니다. 다시 시도하세요.",- "conflict": "할 일이 변경되었습니다. 확인 후 수정하세요.",- "received": "접수됨",- "accepted": "진행 보기",- "unknown": "진행 확인",- "failed": "다음 단계 재시도",- "view": "상세 보기",- "evidence": "완료 근거 보기",- "more": "더 많은 작업",- "discovered": "발견",- "assigned": "요청",- "suggested": "제안",- "candidate": "날짜 확인",- "overdue": "기한 지남",- "today": "오늘",- "next": "다음 단계",- "outcome": "완료 조건",- "value": "처리할 이유",- "sources": "출처",- "associations": "관련 항목",- "deadline": "기한",- "sourceDeadline": "출처 기한",- "clearDate": "기한 삭제",- "date": "날짜",- "time": "정확한 시각 (선택)",- "zone": "시간대",- "save": "저장",- "cancel": "취소",- "delete": "이 항목 삭제",- "mute": "이 문제를 다시 제안하지 않기",- "later": "나중에 처리",- "until": "미룰 날짜",- "restore": "복원",- "reopen": "다시 열기",- "complete": "완료로 표시",- "summary": "완료 근거",- "confirmDate": "날짜 확정",- "deadlineReason": "날짜 확인이 필요한 이유",- "override": "설정한 기한",- "reminder": "미룬 시각",- "edit": "할 일 수정",- "name": "제목",- "progress": "진행 상황",- "link": "근거 링크 (선택)",- "saved": "저장됨",- "page": "{{start}}–{{end}} / {{count}}",- "previous": "이전",- "following": "다음",- "order": "정렬",- "dueOrder": "기한순",- "createdOrder": "생성순",- "origin": "유형",- "all": "전체",- "close": "닫기",- "laterConflict": "미루어도 실제 기한은 연장되지 않습니다",- "legacyEvidence": "이전 완료 기록의 근거를 확인해야 합니다",- "noPermission": "연결되지 않았거나 승인되지 않은 출처입니다",- "copy": "복사",+ "glance": {+ "open": "{{name}}의 근황",+ "dueUnseen": "기한이 된 할 일이 있습니다",+ "computers": "컴퓨터",+ "runningHere": "이 컴퓨터에서 실행 중",+ "online": "온라인",+ "offline": "오프라인",+ "current": "현재",+ "offlineCount_one": "오프라인 {{count}}대",+ "offlineCount_other": "오프라인 {{count}}대",+ "todos": "할 일",+ "showMore": "더 보기",+ "showLess": "접기",+ "doneCount_one": "완료 {{count}}",+ "doneCount_other": "완료 {{count}}",+ "delete": "삭제",+ "deleted": "삭제했습니다. 같은 일은 다시 기록하지 않습니다","undo": "실행 취소",- "history": "완료 기록",- "clockNote": "날짜만 있는 기한은 표시된 시간대의 하루가 끝날 때입니다. 정확한 시각은 시간대를 유지합니다.",- "deleted": "삭제됨",- "muted": "다시 제안하지 않음",- "deferred": "미뤄짐",- "continue": "계속",- "addTime": "시각 추가",- "dateOnly": "날짜만"+ "undoFailed": "실행 취소하지 못했습니다. 다시 시도하세요",+ "deleteFailed": "삭제하지 못했습니다. 다시 시도하세요",+ "outputs": "결과물",+ "outputMeta": "{{time}} · {{task}}",+ "source": {+ "conversation": "직접 부탁한 일",+ "mail": "메일에서",+ "feishu": "Feishu에서",+ "github": "GitHub에서",+ "community": "커뮤니티에서",+ "task": "작업에서"+ }},"cloudCompanion": {"homeOffline": "주 컴퓨터 '{{device}}' 오프라인",diff --git a/apps/mobile/src/i18n/locales/zh-CN/devices.json b/apps/mobile/src/i18n/locales/zh-CN/devices.jsonindex 2419a19feb..1a290d964c 100644--- a/apps/mobile/src/i18n/locales/zh-CN/devices.json+++ b/apps/mobile/src/i18n/locales/zh-CN/devices.json@@ -832,84 +832,36 @@"sourceDisabled": "原来已停用","botOwner": "主人 ID {{id}}"},- "teammateTodo": {- "title": "待办",- "new": "新建待办",- "search": "搜索待办",- "open": "未完成",- "done": "已完成",- "hidden": "已忽略 / 稍后",- "empty": "暂无待办",- "noMatch": "没有匹配的待办",- "loading": "正在读取…",- "retry": "重试",- "error": "操作未完成,请重试。",- "conflict": "待办已更新,请重新查看后再修改。",- "received": "已收到",- "accepted": "查看进展",- "unknown": "核实进展",- "failed": "重试下一步",- "view": "查看详情",- "evidence": "查看依据",- "more": "更多操作",- "discovered": "发现",- "assigned": "交办",- "suggested": "建议",- "candidate": "待确认",- "overdue": "已逾期",- "today": "今天",- "next": "下一步",- "outcome": "完成条件",- "value": "为什么值得处理",- "sources": "来源依据",- "associations": "关联",- "deadline": "到期时间",- "sourceDeadline": "来源期限",- "clearDate": "清除到期",- "date": "日期",- "time": "确切时间(可选)",- "zone": "时区",- "save": "保存",- "cancel": "取消",- "delete": "删除此条",- "mute": "此问题不再提示",- "later": "稍后处理",- "until": "稍后至",- "restore": "恢复",- "reopen": "重新打开",- "complete": "标记完成",- "summary": "完成依据",- "confirmDate": "确认日期",- "deadlineReason": "日期待确认的原因",- "override": "你设置的期限",- "reminder": "稍后至",- "edit": "编辑待办",- "name": "标题",- "progress": "当前进展",- "link": "依据链接(可选)",- "saved": "已保存",- "page": "{{start}}–{{end}} / {{count}}",- "previous": "上一页",- "following": "下一页",- "order": "排序",- "dueOrder": "到期优先",- "createdOrder": "创建顺序",- "origin": "来源类型",- "all": "全部",- "close": "关闭",- "laterConflict": "稍后处理不延长真实期限",- "legacyEvidence": "旧记录的完成依据待核实",- "noPermission": "此来源未连接或尚未授权",- "copy": "复制",+ "glance": {+ "open": "{{name}}的近况",+ "dueUnseen": "有待办到期",+ "computers": "电脑",+ "runningHere": "正在这台上运行",+ "online": "在线",+ "offline": "离线",+ "current": "当前",+ "offlineCount_one": "离线 {{count}} 台",+ "offlineCount_other": "离线 {{count}} 台",+ "todos": "待办",+ "showMore": "显示更多",+ "showLess": "收起",+ "doneCount_one": "已完成 {{count}}",+ "doneCount_other": "已完成 {{count}}",+ "delete": "删除",+ "deleted": "已删除,同一件事以后不再记","undo": "撤销",- "history": "完成记录",- "clockNote": "仅日期按所示时区当天结束;确切时刻保留时区。",- "deleted": "已删除",- "muted": "不再提示",- "deferred": "稍后处理",- "continue": "继续",- "addTime": "添加时间",- "dateOnly": "仅日期"+ "undoFailed": "没能撤销,请重试",+ "deleteFailed": "没能删除,请重试",+ "outputs": "输出内容",+ "outputMeta": "{{time}} · {{task}}",+ "source": {+ "conversation": "你交代的",+ "mail": "来自邮件",+ "feishu": "来自飞书",+ "github": "来自 GitHub",+ "community": "来自社区",+ "task": "来自任务"+ }},"cloudCompanion": {"homeOffline": "主力电脑「{{device}}」离线",diff --git a/apps/mobile/src/i18n/locales/zh-TW/devices.json b/apps/mobile/src/i18n/locales/zh-TW/devices.jsonindex 3f294dd40a..4c7883e64d 100644--- a/apps/mobile/src/i18n/locales/zh-TW/devices.json+++ b/apps/mobile/src/i18n/locales/zh-TW/devices.json@@ -832,84 +832,36 @@"sourceDisabled": "原本已停用","botOwner": "主人 ID {{id}}"},- "teammateTodo": {- "title": "待辦",- "new": "新增待辦",- "search": "搜尋待辦",- "open": "未完成",- "done": "已完成",- "hidden": "已忽略 / 稍後",- "empty": "暫無待辦",- "noMatch": "沒有符合的待辦",- "loading": "正在讀取…",- "retry": "重試",- "error": "操作未完成,請重試。",- "conflict": "待辦已更新,請重新查看後再修改。",- "received": "已收到",- "accepted": "查看進度",- "unknown": "核實進度",- "failed": "重試下一步",- "view": "查看詳情",- "evidence": "查看依據",- "more": "更多操作",- "discovered": "發現",- "assigned": "交辦",- "suggested": "建議",- "candidate": "待確認",- "overdue": "已逾期",- "today": "今天",- "next": "下一步",- "outcome": "完成條件",- "value": "為何值得處理",- "sources": "來源依據",- "associations": "關聯",- "deadline": "到期時間",- "sourceDeadline": "來源期限",- "clearDate": "清除到期",- "date": "日期",- "time": "確切時間(選填)",- "zone": "時區",- "save": "儲存",- "cancel": "取消",- "delete": "刪除此項",- "mute": "此問題不再提示",- "later": "稍後處理",- "until": "稍後至",- "restore": "恢復",- "reopen": "重新開啟",- "complete": "標記完成",- "summary": "完成依據",- "confirmDate": "確認日期",- "deadlineReason": "日期待確認的原因",- "override": "你設定的期限",- "reminder": "稍後至",- "edit": "編輯待辦",- "name": "標題",- "progress": "目前進度",- "link": "依據連結(選填)",- "saved": "已儲存",- "page": "{{start}}–{{end}} / {{count}}",- "previous": "上一頁",- "following": "下一頁",- "order": "排序",- "dueOrder": "到期優先",- "createdOrder": "建立順序",- "origin": "來源類型",- "all": "全部",- "close": "關閉",- "laterConflict": "稍後處理不延長真實期限",- "legacyEvidence": "舊記錄的完成依據待核實",- "noPermission": "此來源未連接或尚未授權",- "copy": "複製",+ "glance": {+ "open": "{{name}}的近況",+ "dueUnseen": "有待辦到期",+ "computers": "電腦",+ "runningHere": "正在這台上執行",+ "online": "線上",+ "offline": "離線",+ "current": "目前",+ "offlineCount_one": "離線 {{count}} 台",+ "offlineCount_other": "離線 {{count}} 台",+ "todos": "待辦",+ "showMore": "顯示更多",+ "showLess": "收起",+ "doneCount_one": "已完成 {{count}}",+ "doneCount_other": "已完成 {{count}}",+ "delete": "刪除",+ "deleted": "已刪除,同一件事之後不再記錄","undo": "復原",- "history": "完成記錄",- "clockNote": "僅日期按所示時區當天結束;確切時刻保留時區。",- "deleted": "已刪除",- "muted": "不再提示",- "deferred": "稍後處理",- "continue": "繼續",- "addTime": "新增時間",- "dateOnly": "僅日期"+ "undoFailed": "無法復原,請重試",+ "deleteFailed": "無法刪除,請重試",+ "outputs": "輸出內容",+ "outputMeta": "{{time}} · {{task}}",+ "source": {+ "conversation": "你交代的",+ "mail": "來自郵件",+ "feishu": "來自飛書",+ "github": "來自 GitHub",+ "community": "來自社群",+ "task": "來自任務"+ }},"cloudCompanion": {"homeOffline": "主力電腦「{{device}}」離線",diff --git a/apps/mobile/src/session/ChatIdentityHeader.tsx b/apps/mobile/src/session/ChatIdentityHeader.tsxindex 3d638c7078..1f68e34a59 100644--- a/apps/mobile/src/session/ChatIdentityHeader.tsx+++ b/apps/mobile/src/session/ChatIdentityHeader.tsx@@ -19,10 +19,10 @@ export const CHAT_HEADER_BLUR_FADE_INSIDE = 0;/*** 私聊与群聊共用的顶栏(C1 / G1):返回 + 身份区(32 标记、标题 16/22 600、副标题 12/18 三级色)+- * 设置。点身份区和设置按钮打开同一份资料 / 设置。+ * 设置。点身份区默认与设置按钮打开同一份资料 / 设置;伙伴私聊的身份区打开近况(onOpenIdentity)。*/export function ChatIdentityHeader({- accessory, mark, title, subtitle, identityLabel, identityHint, controlsReady = true, onBack, onOpenSettings, settingsLabel, testIDPrefix, settingsTestID,+ accessory, mark, title, subtitle, identityLabel, identityHint, controlsReady = true, onBack, onOpenSettings, onOpenIdentity, settingsLabel, testIDPrefix, settingsTestID,}: {accessory?: ReactNode;mark: ReactNode;@@ -35,6 +35,8 @@ export function ChatIdentityHeader({onBack(): void;/** Omitted when there is nothing to open (the identity is then plain, without a settings button). */onOpenSettings?(): void;+ /** Tapping the identity opens this instead of the settings (the teammate's 近况). */+ onOpenIdentity?(): void;settingsLabel?: string;testIDPrefix: string;/** Defaults to `${testIDPrefix}.settings`. */@@ -45,13 +47,15 @@ export function ChatIdentityHeader({const styles = useThemedStyles(makeStyles);const settings = !!onOpenSettings;const open = () => { if (controlsReady && onOpenSettings) { Keyboard.dismiss(); onOpenSettings(); } };+ const identityAction = onOpenIdentity ?? onOpenSettings;+ const openIdentity = () => { if (controlsReady && identityAction) { Keyboard.dismiss(); identityAction(); } };return <View style={styles.header} testID={`${testIDPrefix}.header`}>{/* Same system back as the task header. */}<NativeChromeBackButton testID={`${testIDPrefix}.back`} label={t('shared.back')} onPress={() => { Keyboard.dismiss(); onBack(); }} />- <Pressable style={({ pressed }) => [styles.identity, pressed && styles.pressed]} accessibilityRole={settings ? 'button' : 'header'}- accessibilityLabel={identityLabel} accessibilityHint={settings ? identityHint : undefined}- accessibilityState={settings ? { disabled: !controlsReady } : undefined}- disabled={!controlsReady || !settings} onPress={open} testID={`${testIDPrefix}.identity`}>+ <Pressable style={({ pressed }) => [styles.identity, pressed && styles.pressed]} accessibilityRole={identityAction ? 'button' : 'header'}+ accessibilityLabel={identityLabel} accessibilityHint={identityAction ? identityHint : undefined}+ accessibilityState={identityAction ? { disabled: !controlsReady } : undefined}+ disabled={!controlsReady || !identityAction} onPress={openIdentity} testID={`${testIDPrefix}.identity`}><View style={styles.mark}>{mark}</View><View style={styles.identityText}><Text numberOfLines={1} style={styles.title}>{title}</Text>diff --git a/apps/mobile/src/session/CompanionGlanceSheet.tsx b/apps/mobile/src/session/CompanionGlanceSheet.tsxnew file mode 100644index 0000000000..04b54891a4--- /dev/null+++ b/apps/mobile/src/session/CompanionGlanceSheet.tsx@@ -0,0 +1,206 @@+/**+ * 伙伴近况(手机):点伙伴聊天顶栏的头像打开,与桌面 BotGlancePopover 同三块——电脑 / 待办 / 输出内容;+ * 没内容的块整块不出现。规则见 docs/product-rules/cindy-bots-runtime.md「伙伴近况」。+ * 待办行没有按钮:点一条交给对话(作为待办引用放进输入框),长按只有「删除」,可撤销。+ */+import { useMemo, useState } from 'react';+import { Alert, StyleSheet, View } from 'react-native';+import { Check, ChevronDown, ChevronUp, Monitor } from 'lucide-react-native';+import { useTranslation } from 'react-i18next';+import type { BotDelegationListResult } from '@cindy/maker-shared/botDelegation';+import { todoDateLabel, todoDue, type TeammateTodo } from '@cindy/maker-shared/teammate-todo';+import { useAuth } from '@/auth/AuthContext';+import { useDeviceLink } from '@/device-link/DeviceLinkContext';+import type { HostedRemoteCollectionItem } from '@/device-link/remoteResources';+import { readRemoteCollectionCache, remoteResourceConnectionState } from '@/device-link/remoteResourceAvailability';+import { iconSize, iconStroke, radius, spacing, useTheme, useThemedStyles, type ThemeColors } from '@/theme';+import { ContextSheet, ContextSheetGroup, ContextSheetRow } from './ContextSheet';+import { useRemoteCompanionQuery } from './useRemoteCompanionQuery';+import { companionGlanceOutputs } from './companionProfileData';+import type { useCompanionGlanceTodos } from './useCompanionGlanceTodos';++const TODO_PREVIEW = 5;+const OUTPUT_PREVIEW = 3;+const DUE_DOT = 6;+const CINDY_BOT_ID = 'cindy-default';++type GlanceTodoState = ReturnType<typeof useCompanionGlanceTodos>;++function dayLabel(at: number, language: string): string {+ const now = new Date();+ const date = new Date(at);+ const startOf = (value: Date) => new Date(value.getFullYear(), value.getMonth(), value.getDate()).getTime();+ const days = Math.round((startOf(now) - startOf(date)) / 86_400_000);+ if (days >= 0 && days <= 1) return new Intl.RelativeTimeFormat(language, { numeric: 'auto' }).format(-days, 'day');+ return new Intl.DateTimeFormat(language, { month: 'numeric', day: 'numeric' }).format(date);+}++export function CompanionGlanceSheet({+ visible, onClose, name, botId, deviceId, deviceName, sessionId, online, cloudHome, todos,+ onQuoteTodo, onOpenTask, onOpenCindy, onSwitchHome,+}: {+ visible: boolean;+ onClose(): void;+ name: string;+ botId: string;+ deviceId: string;+ deviceName: string;+ /** The teammate's conversation, whose delegations carry the outputs. */+ sessionId: string;+ online: boolean;+ /** A cloud companion homed on this computer: another computer is chosen in the existing switch flow. */+ cloudHome: boolean;+ todos: GlanceTodoState;+ onQuoteTodo(todo: TeammateTodo): void;+ onOpenTask(sessionId: string): void;+ onOpenCindy(hosted: HostedRemoteCollectionItem): void;+ onSwitchHome(): void;+}) {+ const { t } = useTranslation();+ return <ContextSheet visible={visible} onClose={onClose} title={t('devices.glance.open', { name })} keyboardAvoidingBehavior={undefined}+ testID="companion.glance">+ <ContextSheetGroup label={t('devices.glance.computers')}>+ <Computers botId={botId} deviceId={deviceId} deviceName={deviceName} online={online} cloudHome={cloudHome}+ onOpenCindy={onOpenCindy} onSwitchHome={onSwitchHome} />+ </ContextSheetGroup>+ <Todos todos={todos} online={online} onQuote={onQuoteTodo} />+ <Outputs botId={botId} deviceId={deviceId} sessionId={sessionId} online={online} onOpenTask={onOpenTask} />+ </ContextSheet>;+}++// ---------------------------------------------------------------- 电脑++function Computers({ botId, deviceId, deviceName, online, cloudHome, onOpenCindy, onSwitchHome }: {+ botId: string; deviceId: string; deviceName: string; online: boolean; cloudHome: boolean;+ onOpenCindy(hosted: HostedRemoteCollectionItem): void; onSwitchHome(): void;+}) {+ const { t } = useTranslation();+ const { colors } = useTheme();+ const { user, accountGeneration } = useAuth();+ const { status, getPresenceAvailability } = useDeviceLink();+ const [showOffline, setShowOffline] = useState(false);+ const icon = <Monitor size={iconSize.lg} strokeWidth={iconStroke.regular} color={colors.textSecondary} />;+ // Cindy runs a copy on each computer: the other copies come from the teammate list already read+ // on this phone (no extra discovery); other teammates only show the computer they run on.+ const copies = useMemo(() => {+ if (cloudHome || botId !== CINDY_BOT_ID) return [];+ return readRemoteCollectionCache(`${user?.id ?? ''}:${accountGeneration}`, 'teammates')+ .filter(row => row.item.ref.kind === 'bot' && row.item.ref.id === CINDY_BOT_ID && row.host.deviceId !== deviceId)+ .map(row => ({ row, online: remoteResourceConnectionState(status, getPresenceAvailability(row.host.deviceId)) === true }));+ }, [accountGeneration, botId, cloudHome, deviceId, getPresenceAvailability, status, user?.id]);+ const onlineCopies = copies.filter(copy => copy.online);+ const offlineCopies = copies.filter(copy => !copy.online);+ return <>+ <ContextSheetRow icon={icon} label={deviceName} detail={online ? t('devices.glance.runningHere') : t('devices.glance.offline')}+ trailing={<Check size={iconSize.lg} strokeWidth={iconStroke.medium} color={colors.textPrimary} />} onPress={() => undefined}+ testID="companion.glance.computer.current" />+ {onlineCopies.map(copy => <ContextSheetRow key={copy.row.key} icon={icon} label={copy.row.host.deviceName} detail={t('devices.glance.online')}+ dismissBeforePress onPress={() => onOpenCindy(copy.row)} testID={`companion.glance.computer.${copy.row.host.deviceId}`} />)}+ {offlineCopies.length > 0 ? <ContextSheetRow label={t('devices.glance.offlineCount', { count: offlineCopies.length })}+ trailing={<FoldIcon open={showOffline} />} onPress={() => setShowOffline(value => !value)} testID="companion.glance.computer.offline" /> : null}+ {showOffline ? offlineCopies.map(copy => <ContextSheetRow key={copy.row.key} icon={icon} label={copy.row.host.deviceName}+ detail={t('devices.glance.offline')} disabled onPress={() => undefined} />) : null}+ {cloudHome && online ? <ContextSheetRow label={t('devices.cloudCompanion.switchAction')} trailing="chevron" dismissBeforePress+ onPress={onSwitchHome} testID="companion.glance.computer.switch" /> : null}+ </>;+}++function FoldIcon({ open }: { open: boolean }) {+ const { colors } = useTheme();+ const Icon = open ? ChevronUp : ChevronDown;+ return <Icon size={iconSize.lg} strokeWidth={iconStroke.regular} color={colors.textTertiary} />;+}++// ---------------------------------------------------------------- 待办++function sourceText(todo: TeammateTodo, t: (key: string) => string): string {+ const source = todo.sources[0];+ if (!source || source.kind === 'conversation') return t('devices.glance.source.conversation');+ const kind = t(`devices.glance.source.${source.kind}`);+ const label = source.label?.trim();+ // 来源名已含标签(「来自 GitHub」+「GitHub」)时不再重复。+ return label && !kind.toLowerCase().includes(label.toLowerCase()) ? `${kind} · ${label}` : kind;+}++function Todos({ todos, online, onQuote }: { todos: GlanceTodoState; online: boolean; onQuote(todo: TeammateTodo): void }) {+ const { t, i18n } = useTranslation();+ const styles = useThemedStyles(makeStyles);+ const [showAll, setShowAll] = useState(false);+ const [showDone, setShowDone] = useState(false);+ const [deleted, setDeleted] = useState<TeammateTodo | null>(null);+ const [error, setError] = useState<string | null>(null);+ const { open, done, doneTotal, openTotal } = todos.todos;+ if (open.length === 0 && doneTotal === 0 && !deleted) return null;++ const remove = async (todo: TeammateTodo) => {+ setError(null);+ try {+ const result = await todos.patch({ id: todo.id, expectedRevision: todo.revision, operation: 'delete' });+ setDeleted(result ?? todo);+ void todos.refresh();+ } catch {+ setError(t('devices.glance.deleteFailed'));+ }+ };+ const undo = async () => {+ const target = deleted;+ if (!target) return;+ setError(null);+ try {+ await todos.patch({ id: target.id, expectedRevision: target.revision, operation: 'restore' });+ setDeleted(null);+ void todos.refresh();+ } catch {+ setError(t('devices.glance.undoFailed'));+ }+ };+ const menu = (todo: TeammateTodo) => Alert.alert(todo.title, undefined, [+ { text: t('devices.glance.delete'), style: 'destructive', onPress: () => void remove(todo) },+ { text: t('devices.common.cancel'), style: 'cancel' },+ ]);+ const row = (todo: TeammateTodo, isDone: boolean) => {+ const due = !isDone && todoDue(todo);+ const completion = isDone ? todo.history[todo.history.length - 1]?.summary : undefined;+ return <ContextSheetRow key={todo.id} label={todo.title} detail={completion || sourceText(todo, t)}+ value={isDone ? undefined : todoDateLabel(todo, i18n.language) || undefined}+ trailing={due ? <View style={styles.dueDot} accessibilityLabel={t('devices.glance.dueUnseen')} /> : undefined}+ dismissBeforePress onPress={() => onQuote(todo)} onLongPress={online ? () => menu(todo) : undefined}+ testID={isDone ? 'companion.glance.todo.done' : 'companion.glance.todo'} />;+ };+ const visible = showAll ? open : open.slice(0, TODO_PREVIEW);+ return <ContextSheetGroup label={t('devices.glance.todos')} footer={error} footerTone="error">+ {deleted ? <ContextSheetRow label={t('devices.glance.undo')} detail={t('devices.glance.deleted')} onPress={() => void undo()}+ testID="companion.glance.todo.undo" /> : null}+ {visible.map(todo => row(todo, false))}+ {openTotal > TODO_PREVIEW ? <ContextSheetRow label={showAll ? t('devices.glance.showLess') : t('devices.glance.showMore')}+ trailing={<FoldIcon open={showAll} />} onPress={() => setShowAll(value => !value)} testID="companion.glance.todo.more" /> : null}+ {doneTotal > 0 ? <ContextSheetRow label={t('devices.glance.doneCount', { count: doneTotal })} trailing={<FoldIcon open={showDone} />}+ onPress={() => setShowDone(value => !value)} testID="companion.glance.todo.doneToggle" /> : null}+ {showDone ? done.map(todo => row(todo, true)) : null}+ </ContextSheetGroup>;+}++// ---------------------------------------------------------------- 输出内容++function Outputs({ botId, deviceId, sessionId, online, onOpenTask }: {+ botId: string; deviceId: string; sessionId: string; online: boolean; onOpenTask(sessionId: string): void;+}) {+ const { t, i18n } = useTranslation();+ const [showAll, setShowAll] = useState(false);+ const { value } = useRemoteCompanionQuery<BotDelegationListResult>(deviceId, 'maker:bot-delegations:list', [sessionId], { enabled: online && !!sessionId });+ const files = useMemo(() => companionGlanceOutputs(value, botId), [botId, value]);+ if (files.length === 0) return null;+ const visible = showAll ? files : files.slice(0, OUTPUT_PREVIEW);+ return <ContextSheetGroup label={t('devices.glance.outputs')}>+ {visible.map(file => <ContextSheetRow key={file.key} label={file.name}+ detail={t('devices.glance.outputMeta', { time: dayLabel(file.at, i18n.language), task: file.taskTitle })}+ dismissBeforePress onPress={() => onOpenTask(file.childSessionId)} testID="companion.glance.output" />)}+ {files.length > OUTPUT_PREVIEW ? <ContextSheetRow label={showAll ? t('devices.glance.showLess') : t('devices.glance.showMore')}+ trailing={<FoldIcon open={showAll} />} onPress={() => setShowAll(value => !value)} testID="companion.glance.output.more" /> : null}+ </ContextSheetGroup>;+}++const makeStyles = (colors: ThemeColors) => StyleSheet.create({+ dueDot: { width: DUE_DOT, height: DUE_DOT, borderRadius: radius.pill, backgroundColor: colors.statusError, marginLeft: spacing.xs },+});+diff --git a/apps/mobile/src/session/CompanionHeader.tsx b/apps/mobile/src/session/CompanionHeader.tsxindex 1b944bba8c..cdcee7019c 100644--- a/apps/mobile/src/session/CompanionHeader.tsx+++ b/apps/mobile/src/session/CompanionHeader.tsx@@ -1,50 +1,62 @@-import { ListTodo } from 'lucide-react-native';-import { HomeHeaderGlassButton } from './HomeHeaderGlassButton';-import { CompanionTodos } from './CompanionTodos';import { useEffect, useRef, useState } from 'react';import { StyleSheet, View } from 'react-native';import { useTranslation } from 'react-i18next';import { resolveRemoteText, type RemoteResource } from '@cindy/device-link';import { useAuth } from '@/auth/AuthContext';import { RemoteCompanionAvatar } from '@/components/RemoteCompanionAvatar';-import { radius, spacing, iconSize, useTheme, useThemedStyles, type ThemeColors } from '@/theme';-import { CHAT_HEADER_GLYPH_STROKE, CHAT_HEADER_MARK_SIZE, ChatIdentityHeader, ChatIdentitySubtitle } from './ChatIdentityHeader';+import type { TeammateTodo } from '@cindy/maker-shared/teammate-todo';+import { radius, spacing, useThemedStyles, type ThemeColors } from '@/theme';+import { CHAT_HEADER_MARK_SIZE, ChatIdentityHeader, ChatIdentitySubtitle } from './ChatIdentityHeader';+import { CompanionGlanceSheet } from './CompanionGlanceSheet';+import { dueTodos, useCompanionGlanceTodos, useGlanceDueSeen } from './useCompanionGlanceTodos';import { CompanionPresenceRing } from './CompanionPresenceRing';import { CompanionProfileSheet } from './CompanionProfileSheet';import { useTeammateNavigation } from './useTeammateNavigation';import { CloudHomeSwitchSheet } from './CloudHomeSwitchSheet';import { useCloudCompanionHome } from '@/chat/useCloudCompanion';+import { useRouter } from 'expo-router';/** Presence dot before the computer name (the list's dot, sized for a 12pt line). */const PRESENCE_DOT = 6;+/** Due-todo dot on the avatar's top-right, the same dot as the due row in 近况. */+const DUE_DOT = 7;/*** 伙伴私聊顶栏(C1,与群聊顶栏同一个 ChatIdentityHeader):返回 + 身份(32 头像、名字、在线点与- * 电脑名)+ 伙伴设置;宿主提供 Todo 能力时增加独立入口。点身份区与设置按钮都打开- * 伙伴资料;切换伙伴回到列表里做。+ * 电脑名)+ 伙伴设置。点身份区打开伙伴近况(电脑 / 待办 / 输出内容),设置按钮打开伙伴资料;+ * 有没看过的到期待办时头像右上亮小红点,打开近况即灭。*/export function CompanionHeader(props: {resource: RemoteResource; deviceId: string; deviceName: string; online: boolean; controlsReady?: boolean;/** The companion is working on a reply (the avatar breathes). */working?: boolean;settingsRequest?: { page: 'memory' | 'capabilities'; sequence: number };+ /** The teammate's conversation (this chat), whose delegations carry 近况's outputs. */+ sessionId: string;+ /** Put a todo into this chat's composer as a reference; the owner then tells the teammate what to do. */+ onQuoteTodo(todo: TeammateTodo): void;onSearch(): void; onBack(): void;}) {const { accountGeneration } = useAuth();return <CompanionHeaderContent key={accountGeneration} {...props} />;}-function CompanionHeaderContent({ resource, deviceId, deviceName, online, controlsReady = true, working = false, onSearch, onBack, settingsRequest }: Parameters<typeof CompanionHeader>[0]) {+function CompanionHeaderContent({ resource, deviceId, deviceName, online, controlsReady = true, working = false, sessionId, onQuoteTodo, onSearch, onBack, settingsRequest }: Parameters<typeof CompanionHeader>[0]) {const { t, i18n } = useTranslation();const styles = useThemedStyles(makeStyles);- const {colors}=useTheme();const navigation = useTeammateNavigation();+ const router = useRouter();// A cloud companion is one teammate wherever it runs: name its main computer and offer to change it.const cloud = useCloudCompanionHome(true);const homed = cloud.supported && cloud.actors.some(actor => actor.kind === 'bot' && actor.externalId === resource.ref.id && actor.homeDeviceId === deviceId);const [homeSheet, setHomeSheet] = useState(false);const [profile, setProfile] = useState(false);- const [todos, setTodos] = useState(false);+ const [glance, setGlance] = useState(false);+ // Older hosts do not advertise todos; their 近况 simply has no todo section.+ const todosOffered = !!resource.links?.some(link => link.target.kind === 'resource' && link.target.ref.id === 'todos:' + resource.ref.id);+ const todos = useCompanionGlanceTodos({ deviceId, deviceName, botId: resource.ref.id, enabled: todosOffered && online });+ const due = dueTodos(todos.todos);+ const dueSeen = useGlanceDueSeen({ deviceId, botId: resource.ref.id }, due);const [initialPage, setInitialPage] = useState<'home' | 'memory' | 'capabilities'>('home');useEffect(() => { if (settingsRequest) { setInitialPage(settingsRequest.page); setProfile(true); } }, [settingsRequest]);const pending = useRef<(() => void) | null>(null);@@ -58,20 +70,26 @@ function CompanionHeaderContent({ resource, deviceId, deviceName, online, contromark={<><RemoteCompanionAvatar avatar={resource.display.avatar} name={name} deviceId={deviceId} online={online} size={CHAT_HEADER_MARK_SIZE} framed /><CompanionPresenceRing active={working} width={1.5} />+ {dueSeen.unseen ? <View style={styles.dueDot} testID="companion.header.dueDot" /> : null}</>}title={name}subtitle={<View style={styles.subtitleRow}>{homed ? null : <View style={[styles.presence, online ? styles.presenceOn : styles.presenceOff]} testID="companion.header.presence" />}<ChatIdentitySubtitle>{[connection, homed ? t('devices.cloudCompanion.runsOn', { device: deviceName }) : deviceName].filter(Boolean).join(' · ')}</ChatIdentitySubtitle></View>}- identityLabel={[name, deviceName, connection].filter(Boolean).join(', ')}- identityHint={t('devices.companions.openProfile', { name })}+ identityLabel={[name, deviceName, connection, dueSeen.unseen ? t('devices.glance.dueUnseen') : ''].filter(Boolean).join(', ')}+ identityHint={t('devices.glance.open', { name })}controlsReady={controlsReady}onBack={onBack}+ onOpenIdentity={() => { setGlance(true); dueSeen.markSeen(); void todos.refresh(); }}onOpenSettings={() => { setInitialPage('home'); setProfile(true); }}- accessory={resource.links?.some(link=>link.target.kind==='resource'&&link.target.ref.id==='todos:'+resource.ref.id)?<HomeHeaderGlassButton testID="companion.todos.open" disabled={!controlsReady} accessibilityLabel={t('devices.teammateTodo.title')} onPress={()=>setTodos(true)}><ListTodo size={iconSize.lg} strokeWidth={CHAT_HEADER_GLYPH_STROKE} color={colors.textPrimary}/></HomeHeaderGlassButton>:undefined}settingsLabel={t('devices.companionProfile.settingsTitle')} />- <CompanionTodos visible={todos} onClose={()=>setTodos(false)} botId={resource.ref.id} deviceId={deviceId} deviceName={deviceName} online={online}/>+ <CompanionGlanceSheet visible={glance} onClose={() => setGlance(false)} name={name} botId={resource.ref.id}+ deviceId={deviceId} deviceName={deviceName} sessionId={sessionId} online={online} cloudHome={homed} todos={todos}+ onQuoteTodo={onQuoteTodo}+ onOpenTask={taskId => router.push({ pathname: '/sessions/[sessionId]', params: { sessionId: taskId, deviceId } })}+ onOpenCindy={hosted => void navigation.openTeammate(hosted, { replace: true })}+ onSwitchHome={() => setHomeSheet(true)} /><CompanionProfileSheet initialPage={initialPage} visible={profile} onClose={() => setProfile(false)} onClosed={() => { const action = pending.current; pending.current = null; action?.(); }}resource={resource} collectionId={resource.ref.collectionId} deviceId={deviceId} deviceName={deviceName} online={online}onDeleted={() => void navigation.chooseMode('teammates')}@@ -89,4 +107,8 @@ const makeStyles = (colors: ThemeColors) => StyleSheet.create({// Same tones as the list's StatusDot: ready when connected, the quiet border tone when not.presenceOn: { backgroundColor: colors.statusReady },presenceOff: { backgroundColor: colors.borderStrong },+ dueDot: {+ position: 'absolute', top: -1, right: -1, width: DUE_DOT, height: DUE_DOT, borderRadius: radius.pill,+ backgroundColor: colors.statusError,+ },});diff --git a/apps/mobile/src/session/CompanionTodoRow.tsx b/apps/mobile/src/session/CompanionTodoRow.tsxdeleted file mode 100644index c88d5de7ed..0000000000--- a/apps/mobile/src/session/CompanionTodoRow.tsx+++ /dev/null@@ -1,102 +0,0 @@-import { Pressable, View } from 'react-native';-import { MoreHorizontal } from 'lucide-react-native';-import { Text } from '@/components/AppText';-import { iconSize, useTheme, useThemedStyles } from '@/theme';-import {- effectiveTodoDeadline,- todoDateLabel,- todoOverdue,- todoVisible,- type TeammateTodo,-} from '@cindy/maker-shared/teammate-todo';-import { makeTodoStyles as makeStyles } from './companionTodoStyles';-/** Fixed text block followed by a date/action/menu rail, shared by every production row. */-export function CompanionTodoRow({- item: x,- label,- locale,- busy,- onOpen,- onAction,- onDate,- onMore,- tr,-}: {- item: TeammateTodo;- label: string;- locale: string;- busy: boolean;- onOpen(): void;- onAction(): void;- onDate(): void;- onMore(): void;- tr(key: string): string;-}) {- const styles = useThemedStyles(makeStyles),- { colors } = useTheme();- return (- <View style={styles.row} testID="todo-row">- <Pressable- accessibilityRole="button"- accessibilityLabel={x.title}- onPress={onOpen}- style={styles.heading}- >- <Text numberOfLines={1} style={styles.title}>- {x.title}- </Text>- <Text numberOfLines={1} style={styles.progress}>- {!todoVisible(x) && x.decision- ? tr(- x.decision.kind === 'deleted'- ? 'deleted'- : x.decision.kind === 'muted'- ? 'muted'- : 'deferred',- ) + ' · '- : ''}- {x.origin === 'discovered' ? tr('discovered') + ' · ' : ''}- {x.progress || x.next?.instruction || x.outcome}- </Text>- </Pressable>- <View style={styles.rail}>- <Pressable- accessibilityRole="button"- accessibilityLabel={tr('deadline')}- onPress={onDate}- style={styles.date}- >- <Text numberOfLines={1} style={styles.caption}>- {!effectiveTodoDeadline(x) && x.deadlineCandidate- ? tr('candidate') + ' '- : !effectiveTodoDeadline(x) && x.suggestedDate- ? tr('suggested') + ' '- : ''}- {todoDateLabel(x, locale)}- {todoOverdue(x) && x.status !== 'done' ? ' · ' + tr('overdue') : ''}- </Text>- </Pressable>- <Pressable- disabled={busy}- accessibilityRole="button"- accessibilityLabel={label}- accessibilityState={{ disabled: busy }}- onPress={onAction}- style={[styles.action, busy && styles.disabled]}- >- <Text numberOfLines={1} style={styles.actionText}>- {label}- </Text>- </Pressable>- <Pressable- accessibilityRole="button"- accessibilityLabel={tr('more')}- onPress={onMore}- style={styles.icon}- >- <MoreHorizontal color={colors.textSecondary} size={iconSize.action} />- </Pressable>- </View>- </View>- );-}diff --git a/apps/mobile/src/session/CompanionTodos.tsx b/apps/mobile/src/session/CompanionTodos.tsxdeleted file mode 100644index 6eb28d1f92..0000000000--- a/apps/mobile/src/session/CompanionTodos.tsx+++ /dev/null@@ -1,709 +0,0 @@-import { TodoDateInput } from './TodoDateInput';-import { CompanionTodoRow } from './CompanionTodoRow';-import { makeTodoStyles as makeStyles } from './companionTodoStyles';-import { useCallback, useEffect, useRef, useState } from 'react';-import {- ActivityIndicator,- AppState,- Linking,- Pressable,- ScrollView,- StyleSheet,- View,-} from 'react-native';-import { Plus, ChevronDown, ChevronRight } from 'lucide-react-native';-import { randomUUID } from 'expo-crypto';-import { useTranslation } from 'react-i18next';-import { useAuth } from '@/auth/AuthContext';-import { useDeviceLink } from '@/device-link/DeviceLinkContext';-import { getRemoteResource, invokeRemoteResourceAction } from '@/device-link/remoteResources';-import { Text, TextInput } from '@/components/AppText';-import {- iconSize,- fontWeight,- lineHeight,- radius,- spacing,- typeScale,- useTheme,- useThemedStyles,- type ThemeColors,-} from '@/theme';-import { CompanionSheet } from './CompanionSheet';-import {- effectiveTodoDeadline,- scheduleTodoDeferralRefresh,- todoDateLabel,- todoOverdue,- todoLocalDate,- type TeammateTodo,- type TodoPatch,- type TodoListQuery,-} from '@cindy/maker-shared/teammate-todo';--interface Props {- visible: boolean;- onClose(): void;- deviceId: string;- deviceName: string;- botId: string;- online: boolean;-}-interface Page {- items: TeammateTodo[];- total: number;- completedTotal: number;- nextDeferredAt?: string | null;- offset: number;- limit: number;-}-export function CompanionTodos(props: Props) {- const { accountGeneration } = useAuth();- return (- <CompanionTodosContent- key={`${accountGeneration}:${props.deviceId}:${props.botId}`}- {...props}- />- );-}-function CompanionTodosContent({ visible, onClose, deviceId, deviceName, botId, online }: Props) {- const { t, i18n } = useTranslation();- const tr = (key: string, args?: Record<string, unknown>): string =>- String(t('devices.teammateTodo.' + key, args));- const { invoke, openLink, onRemoteResourceChanged } = useDeviceLink();- const styles = useThemedStyles(makeStyles);- const { colors } = useTheme();- const [page, setPage] = useState<Page>({- items: [],- total: 0,- completedTotal: 0,- offset: 0,- limit: 25,- }),- [query, setQuery] = useState(''),- [filter, setFilter] = useState<TodoListQuery>({- view: 'open',- order: 'due',- }),- [offset, setOffset] = useState(0);- const [loading, setLoading] = useState(false),- [busy, setBusy] = useState(false),- [error, setError] = useState(''),- [detail, setDetail] = useState<TeammateTodo | null>(null),- [editing, setEditing] = useState<false | 'edit' | 'deadline' | 'complete' | 'later'>(false);- const [form, setForm] = useState<Record<string, string>>({});- const [showActions, setShowActions] = useState(false);- const pending = useRef(false);- const operationEpoch = useRef(0);- const formRevision = useRef<number | undefined>(undefined);- const epoch = useRef(0),- binding = useRef(''),- mounted = useRef(true);- binding.current = `${deviceId}:${botId}:${visible}:${online}`;- useEffect(() => {- // A lost link invalidates this panel's UI request, not the host's operation.- // Do not replay it on reconnect; reload the host record instead.- operationEpoch.current++;- pending.current = false;- setBusy(false);- setLoading(false);- }, [deviceId, botId, visible, online]);- const readingOrder = useRef<{ key: string; ids: string[] }>({ key: '', ids: [] });- const ref = { collectionId: 'teammates', kind: 'bot', id: 'todos:' + botId };- const reload = useCallback(async () => {- if (!visible || !online) return;- const scope = binding.current,- n = ++epoch.current;- setLoading(true);- try {- await openLink(deviceId);- const resource = await getRemoteResource(- invoke,- { deviceId, deviceName },- ref,- i18n.language,- ['teammate-todos'],- JSON.stringify({ query, offset, ...filter }),- );- if (!mounted.current || scope !== binding.current || n !== epoch.current) return;- const data = resource.blocks?.find((b) => b.primitive === 'teammate-todos')?.data as- Page | undefined;- if (- !data ||- !Array.isArray(data.items) ||- !Number.isSafeInteger(data.total) ||- data.items.length > 25- )- throw new Error('INVALID_RESPONSE');- const orderKey = JSON.stringify({ scope, query, offset: data.offset, ...filter });- if (readingOrder.current.key === orderKey) {- const ranks = new Map(readingOrder.current.ids.map((id, index) => [id, index]));- data.items = [...data.items].sort(- (a, b) =>- (ranks.get(a.id) ?? Number.MAX_SAFE_INTEGER) -- (ranks.get(b.id) ?? Number.MAX_SAFE_INTEGER),- );- }- readingOrder.current = { key: orderKey, ids: data.items.map((item) => item.id) };- setPage(data);- setDetail((old) => (old ? (data.items.find((x) => x.id === old.id) ?? old) : null));- setError('');- } catch {- if (mounted.current && scope === binding.current) setError('error');- } finally {- if (mounted.current && scope === binding.current) setLoading(false);- }- }, [- visible,- online,- deviceId,- deviceName,- invoke,- openLink,- query,- offset,- filter,- i18n.language,- ]);- useEffect(() => {- mounted.current = true;- const timer = setTimeout(() => void reload(), query ? 250 : 0);- return () => {- clearTimeout(timer);- epoch.current++;- };- }, [reload]);- useEffect(() => {- if (!visible || !online || !page.nextDeferredAt) return;- // A mounted-list visibility refresh, never a background reminder or action.- return scheduleTodoDeferralRefresh(page.nextDeferredAt, () => void reload());- }, [visible, online, page.nextDeferredAt, reload]);- useEffect(() => {- if (!visible || !online) return;- const subscription = AppState.addEventListener('change', (state) => {- if (state === 'active') void reload();- });- return () => subscription.remove();- }, [visible, online, reload]);- useEffect(- () => () => {- mounted.current = false;- },- [],- );- useEffect(- () =>- onRemoteResourceChanged((id, payload) => {- if (- id === deviceId &&- payload.collectionId === 'teammates' &&- (!payload.resourceRefs ||- payload.resourceRefs.some((ref) => ref.id === botId || ref.id === 'todos:' + botId))- )- void reload();- }),- [onRemoteResourceChanged, deviceId, botId, reload],- );- useEffect(() => {- if (!visible) {- setDetail(null);- setEditing(false);- setShowActions(false);- }- }, [visible]);- const run = async (input: Record<string, unknown>, actionId = 'todo-update') => {- if (pending.current || !online) return;- pending.current = true;- setBusy(true);- const scope = binding.current;- const operation = ++operationEpoch.current;- const current = () =>- mounted.current && scope === binding.current && operation === operationEpoch.current;- try {- await openLink(deviceId);- if (!current()) return;- await invokeRemoteResourceAction(- invoke,- { deviceId, deviceName },- { collectionId: 'teammates', resourceRef: ref, actionId, input },- i18n.language,- );- if (current()) {- setEditing(false);- setDetail(null);- setShowActions(false);- await reload();- }- } catch (e) {- if (current()) setError(String(e).includes('CONFLICT') ? 'conflict' : 'error');- } finally {- if (operation === operationEpoch.current) {- pending.current = false;- if (mounted.current) setBusy(false);- }- }- };- const update = (item: TeammateTodo, patch: TodoPatch) =>- void run({ ...patch, id: item.id, expectedRevision: item.revision });- const label = (x: TeammateTodo) =>- x.status === 'done'- ? tr('evidence')- : x.action- ? tr(- x.action.state === 'failed'- ? 'failed'- : x.action.state === 'accepted'- ? 'accepted'- : x.action.state === 'unknown'- ? 'unknown'- : 'received',- )- : x.legacyId && x.next?.label === 'Continue'- ? tr('continue')- : (x.next?.label ?? tr('view'));- const act = (x: TeammateTodo, confirmed = false) => {- if (- x.status === 'done' ||- !x.next ||- x.next.kind === 'view' ||- (x.next.kind === 'decide' && !confirmed) ||- (x.action && x.action.state !== 'failed')- ) {- setDetail(x);- setEditing(false);- setShowActions(false);- return;- }- void run(- { id: x.id, revision: x.revision, requestId: randomUUID(), locale: i18n.language },- 'todo-act',- );- };- const edit = (x: TeammateTodo | null, mode: NonNullable<typeof editing>) => {- formRevision.current = x?.revision;- setDetail(x);- setEditing(mode);- setShowActions(false);- const d = x ? effectiveTodoDeadline(x) : null;- setForm({- title: x?.title ?? '',- outcome: x?.outcome ?? '',- progress: x?.progress ?? '',- date: d?.at- ? todoLocalDate(new Date(d.at), Intl.DateTimeFormat().resolvedOptions().timeZone)- : (d?.date ?? ''),- time: d?.at ?? '',- zone: Intl.DateTimeFormat().resolvedOptions().timeZone,- summary: '',- ref: '',- until: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(),- });- };- const menu = (x: TeammateTodo) => {- setDetail(x);- setEditing(false);- setShowActions(true);- };- const button = (text: string, fn: () => void, style?: object, disabled = false) => (- <Pressable- accessibilityRole="button"- accessibilityLabel={text}- accessibilityState={{ disabled: disabled || busy || !online }}- disabled={disabled || busy || !online}- onPress={fn}- style={[styles.button, style, (disabled || busy || !online) && styles.disabled]}- >- <Text numberOfLines={1} style={styles.buttonText}>- {text}- </Text>- </Pressable>- );- const field = (key: string, label = key) => (- <View key={key} style={styles.field}>- <Text style={styles.caption}>{tr(label)}</Text>- <TextInput- accessibilityLabel={tr(label)}- value={form[key] ?? ''}- onChangeText={(value) => setForm({ ...form, [key]: value })}- style={styles.input}- multiline={['outcome', 'summary', 'progress'].includes(key)}- autoCapitalize="none"- />- </View>- );- const save = () => {- const patch: TodoPatch =- editing === 'edit'- ? { title: form.title, outcome: form.outcome, progress: form.progress }- : editing === 'deadline'- ? {- deadlineOverride: {- value: form.date- ? {- kind: form.time ? 'instant' : 'date',- date: form.date,- timeZone: form.zone,- ...(form.time ? { at: form.time } : {}),- }- : null,- },- }- : editing === 'complete'- ? {- operation: 'complete',- completion: {- summary: form.summary,- ...(form.ref ? { ref: form.ref } : {}),- },- }- : { operation: 'later', until: form.until };- if (detail) void run({ ...patch, id: detail.id, expectedRevision: formRevision.current });- else- void run({- ...patch,- key: 'user:' + randomUUID(),- origin: 'assigned',- next: { kind: 'advance', label: tr('continue'), instruction: form.outcome },- });- };- const info = (key: string, value: string | undefined) =>- value ? (- <View style={styles.field}>- <Text style={styles.caption}>{tr(key)}</Text>- <Text selectable style={styles.body}>- {value}- </Text>- </View>- ) : null;- return (- <CompanionSheet- visible={visible}- title={tr('title')}- onClose={onClose}- onBack={- detail || editing || showActions- ? () => {- setDetail(null);- setEditing(false);- setShowActions(false);- }- : undefined- }- preventDismiss={busy}- testID="companion.todos"- contentScrolls- >- <ScrollView- keyboardShouldPersistTaps="handled"- contentContainerStyle={styles.content}- maintainVisibleContentPosition={{ minIndexForVisible: 0 }}- >- {!online && (- <Text accessibilityRole="alert" style={styles.body}>- {t('devices.resources.hostOffline')}- </Text>- )}- {!!error && (- <View>- <Text accessibilityRole="alert" style={styles.body}>- {tr(error)}- </Text>- {button(tr('retry'), () => void reload())}- </View>- )}- {showActions && detail ? (- <>- {button(tr('edit'), () => edit(detail, 'edit'))}- {button(tr('deadline'), () => edit(detail, 'deadline'))}- {button(tr(detail.status === 'done' ? 'reopen' : 'complete'), () =>- detail.status === 'done'- ? update(detail, { operation: 'reopen' })- : edit(detail, 'complete'),- )}- {detail.decision ? (- button(tr('restore'), () => update(detail, { operation: 'restore' }))- ) : (- <>- {button(tr('later'), () => edit(detail, 'later'))}- {button(tr('delete'), () => update(detail, { operation: 'delete' }))}- {button(tr('mute'), () => update(detail, { operation: 'mute' }))}- </>- )}- {button(tr('cancel'), () => setShowActions(false))}- </>- ) : editing ? (- <>- {editing === 'edit' ? (- ['title', 'outcome', 'progress'].map((key) =>- field(key, key === 'title' ? 'name' : key),- )- ) : editing === 'complete' ? (- ['summary', 'ref'].map((key) => field(key, key === 'ref' ? 'link' : key))- ) : editing === 'deadline' ? (- <>- {form.date ? (- <TodoDateInput- label={tr('date')}- kind="date"- value={- form.time- ? new Date(form.time)- : form.date- ? new Date(form.date + 'T12:00:00')- : new Date()- }- onChange={(date) =>- setForm({- ...form,- date: todoLocalDate(date, form.zone),- ...(form.time ? { time: date.toISOString() } : {}),- })- }- />- ) : (- button(tr('deadline'), () =>- setForm({- ...form,- date: todoLocalDate(new Date(), form.zone),- }),- )- )}- {form.time ? (- <>- <TodoDateInput- label={tr('time')}- kind="time"- value={new Date(form.time)}- onChange={(date) =>- setForm({- ...form,- date: todoLocalDate(date, form.zone),- time: date.toISOString(),- })- }- />- {button(tr('dateOnly'), () => setForm({ ...form, time: '' }))}- </>- ) : (- button(tr('addTime'), () => {- const date = form.date ? new Date(form.date + 'T12:00:00') : new Date();- setForm({- ...form,- date: todoLocalDate(date, form.zone),- time: date.toISOString(),- });- })- )}- {info('zone', form.zone)}- </>- ) : (- <TodoDateInput- label={tr('until')}- kind="datetime"- value={new Date(form.until)}- onChange={(date) => setForm({ ...form, until: date.toISOString() })}- />- )}- {editing === 'deadline' && (- <>- {button(tr('clearDate'), () => setForm({ ...form, date: '', time: '' }))}- {detail?.deadlineCandidate && (- <>- {info('deadlineReason', detail.deadlineCandidate.reason)}- {button(tr('confirmDate'), () =>- update(detail, { operation: 'confirm-deadline' }),- )}- </>- )}- </>- )}- {editing === 'later' && info('laterConflict', tr('laterConflict'))}- {button(tr('save'), save)}- {button(tr('cancel'), () => setEditing(false))}- </>- ) : detail ? (- <>- <Text selectable style={styles.title}>- {detail.title}- </Text>- {info('progress', detail.progress)}- {info('outcome', detail.outcome)}- {info('value', detail.value)}- {info('next', detail.next?.label)}- {detail.next &&- detail.next.kind !== 'view' &&- (!detail.action || detail.action.state === 'failed') &&- detail.status === 'open' &&- button(detail.next.label, () => act(detail, true))}- {info(- 'sourceDeadline',- detail.sourceDeadline- ? `${detail.sourceDeadline.date} ${detail.sourceDeadline.at ?? ''} · ${detail.sourceDeadline.timeZone}\n${detail.sourceDeadline.quote ?? ''}`- : undefined,- )}- {detail.deadlineOverride &&- info('override', effectiveTodoDeadline(detail)?.date ?? tr('clearDate'))}- {detail.deadlineCandidate && (- <>- {info('deadlineReason', detail.deadlineCandidate.reason)}- {button(tr('confirmDate'), () => update(detail, { operation: 'confirm-deadline' }))}- </>- )}- {info('reminder', detail.decision?.until)}- {!!detail.sources.length && (- <View style={styles.field}>- <Text style={styles.caption}>{tr('sources')}</Text>- {detail.sources.map((s) => (- <View key={s.kind + ':' + s.id}>- <Text selectable style={styles.body}>- {s.label}- {s.observedAt ? ' · ' + s.observedAt : ''}- </Text>- {s.ref && button(tr('view'), () => void Linking.openURL(s.ref!))}- </View>- ))}- </View>- )}- {!!detail.associations.length &&- info(- 'associations',- detail.associations.map((a) => a.label).join('\n'),- )}- {detail.history.map((h, n) => (- <View key={n}>- {info(- 'evidence',- (h.summary === 'Legacy completion evidence was not recorded'- ? tr('legacyEvidence')- : h.summary) +- ' · ' +- h.at,- )}- {h.ref &&- /^https:\/\//.test(h.ref) &&- button(tr('evidence'), () => void Linking.openURL(h.ref!))}- </View>- ))}- {button(tr('edit'), () => edit(detail, 'edit'))}- {button(tr('more'), () => menu(detail))}- </>- ) : (- <>- <View style={styles.toolbar}>- <TextInput- style={[styles.input, styles.flex]}- value={query}- onChangeText={(value) => {- setQuery(value);- setOffset(0);- }}- placeholder={tr('search')}- accessibilityLabel={tr('search')}- />- <Pressable- style={styles.icon}- accessibilityRole="button"- accessibilityLabel={tr('new')}- onPress={() => edit(null, 'edit')}- >- <Plus color={colors.textPrimary} size={iconSize.action} />- </Pressable>- </View>- <View style={styles.toolbar}>- {button(- tr(filter.view === 'open' ? 'hidden' : 'open'),- () => {- setFilter({- ...filter,- view: filter.view === 'open' ? 'hidden' : 'open',- });- setOffset(0);- },- styles.flex,- )}- {button(- tr(filter.order === 'created' ? 'createdOrder' : 'dueOrder'),- () => {- setFilter({- ...filter,- order: filter.order === 'created' ? 'due' : 'created',- });- setOffset(0);- },- styles.flex,- )}- </View>- {loading && (- <ActivityIndicator accessibilityLabel={tr('loading')} color={colors.textSecondary} />- )}- {!loading && !page.items.length && (- <Text style={styles.body}>{tr(query ? 'noMatch' : 'empty')}</Text>- )}- {page.items.map((x) => (- <CompanionTodoRow- key={x.id}- item={x}- label={label(x)}- locale={i18n.language}- busy={busy || !online}- onOpen={() => {- setDetail(x);- setEditing(false);- setShowActions(false);- }}- onAction={() => act(x)}- onDate={() => edit(x, 'deadline')}- onMore={() => menu(x)}- tr={tr}- />- ))}- {page.total > 25 && (- <View style={styles.toolbar}>- {button(- tr('previous'),- () => setOffset(Math.max(0, page.offset - 25)),- undefined,- !page.offset,- )}- <Text style={styles.caption}>- {tr('page', {- start: page.offset + 1,- end: Math.min(page.offset + 25, page.total),- count: page.total,- })}- </Text>- {button(- tr('following'),- () => setOffset(page.offset + 25),- undefined,- page.offset + 25 >= page.total,- )}- </View>- )}- <Pressable- style={styles.disclosure}- accessibilityRole="button"- accessibilityState={{ expanded: filter.view === 'done' }}- onPress={() => {- setFilter({- ...filter,- view: filter.view === 'done' ? 'open' : 'done',- });- setOffset(0);- }}- >- {filter.view === 'done' ? (- <ChevronDown color={colors.textSecondary} size={iconSize.md} />- ) : (- <ChevronRight color={colors.textSecondary} size={iconSize.md} />- )}- <Text style={styles.caption}>- {tr('done')} · {page.completedTotal}- </Text>- </Pressable>- </>- )}- </ScrollView>- </CompanionSheet>- );-}diff --git a/apps/mobile/src/session/TodoDateInput.android.tsx b/apps/mobile/src/session/TodoDateInput.android.tsxdeleted file mode 100644index 7cf10d05cb..0000000000--- a/apps/mobile/src/session/TodoDateInput.android.tsx+++ /dev/null@@ -1,80 +0,0 @@-import { useState } from 'react';-import { Pressable, View } from 'react-native';-import { Host } from '@expo/ui';-import { DatePickerDialog, TimePickerDialog } from '@expo/ui/jetpack-compose';-import { Text } from '@/components/AppText';-import { useTheme, useThemedStyles } from '@/theme';-import { makeTodoStyles } from './companionTodoStyles';-import type { TodoDateInputProps } from './TodoDateInput';-export function TodoDateInput({ label, value, kind, onChange }: TodoDateInputProps) {- const [part, setPart] = useState<'date' | 'time' | null>(null),- { mode, colors } = useTheme(),- styles = useThemedStyles(makeTodoStyles);- const chooseDate = (d: Date) => {- const merged = new Date(value);- merged.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());- onChange(merged);- setPart(null);- };- const chooseTime = (d: Date) => {- const merged = new Date(value);- merged.setHours(d.getHours(), d.getMinutes(), 0, 0);- onChange(merged);- setPart(null);- };- return (- <View>- <Pressable- accessibilityRole="button"- accessibilityLabel={label}- onPress={() => setPart(kind === 'time' ? 'time' : 'date')}- style={styles.button}- >- <Text style={styles.buttonText}>- {kind === 'date'- ? value.toLocaleDateString()- : kind === 'time'- ? value.toLocaleTimeString([], {- hour: '2-digit',- minute: '2-digit',- })- : value.toLocaleString()}- </Text>- </Pressable>- {kind === 'datetime' && (- <Pressable- accessibilityRole="button"- accessibilityLabel={label}- onPress={() => setPart('time')}- style={styles.button}- >- <Text style={styles.buttonText}>- {value.toLocaleTimeString([], {- hour: '2-digit',- minute: '2-digit',- })}- </Text>- </Pressable>- )}- {part && (- <Host colorScheme={mode} seedColor={colors.textPrimary} matchContents>- {part === 'date' ? (- <DatePickerDialog- initialDate={new Date(- Date.UTC(value.getFullYear(), value.getMonth(), value.getDate()),- ).toISOString()}- onDateSelected={chooseDate}- onDismissRequest={() => setPart(null)}- />- ) : (- <TimePickerDialog- initialDate={value.toISOString()}- onDateSelected={chooseTime}- onDismissRequest={() => setPart(null)}- />- )}- </Host>- )}- </View>- );-}diff --git a/apps/mobile/src/session/TodoDateInput.ios.tsx b/apps/mobile/src/session/TodoDateInput.ios.tsxdeleted file mode 100644index 08c5665c74..0000000000--- a/apps/mobile/src/session/TodoDateInput.ios.tsx+++ /dev/null@@ -1,25 +0,0 @@-import { Host } from '@expo/ui';-import { DatePicker } from '@expo/ui/swift-ui';-import { datePickerStyle, frame } from '@expo/ui/swift-ui/modifiers';-import { useTheme } from '@/theme';-import type { TodoDateInputProps } from './TodoDateInput';-export function TodoDateInput({ label, value, kind, onChange }: TodoDateInputProps) {- const { mode } = useTheme();- return (- <Host colorScheme={mode} matchContents style={{ minHeight: 44 }}>- <DatePicker- title={label}- selection={value}- displayedComponents={- kind === 'datetime'- ? ['date', 'hourAndMinute']- : kind === 'time'- ? ['hourAndMinute']- : ['date']- }- onDateChange={onChange}- modifiers={[datePickerStyle('compact'), frame({ height: 44 })]}- />- </Host>- );-}diff --git a/apps/mobile/src/session/TodoDateInput.tsx b/apps/mobile/src/session/TodoDateInput.tsxdeleted file mode 100644index 43e0c8cbdc..0000000000--- a/apps/mobile/src/session/TodoDateInput.tsx+++ /dev/null@@ -1,24 +0,0 @@-import { TextInput } from '@/components/AppText';-import { useThemedStyles } from '@/theme';-import { makeTodoStyles } from './companionTodoStyles';-export interface TodoDateInputProps {- label: string;- value: Date;- kind: 'date' | 'time' | 'datetime';- onChange(date: Date): void;-}-/** Web fallback; native platforms use the existing Expo UI date/time controls. */-export function TodoDateInput({ label, value, onChange }: TodoDateInputProps) {- const styles = useThemedStyles(makeTodoStyles);- return (- <TextInput- accessibilityLabel={label}- style={styles.input}- value={value.toLocaleString()}- onChangeText={(text) => {- const date = new Date(text);- if (Number.isFinite(date.getTime())) onChange(date);- }}- />- );-}diff --git a/apps/mobile/src/session/companionProfileData.ts b/apps/mobile/src/session/companionProfileData.tsindex 9ed6ef4b81..676a26bde4 100644--- a/apps/mobile/src/session/companionProfileData.ts+++ b/apps/mobile/src/session/companionProfileData.ts@@ -1,6 +1,8 @@import { REMOTE_RESOURCE_GET_CHANNEL, REMOTE_RESOURCE_PROTOCOL_VERSION, type RemoteActionDescriptor, type RemoteResource, type RemoteResourceRef, type RemoteText } from '@cindy/device-link';import type { RemoteInvoke } from '@/device-link/mobileMakerTransport';import { normalizeRemoteCollectionItems } from '@/device-link/remoteResources';+import { isBotDeliverableFile } from '@cindy/maker-shared/bot-deliverable';+import type { BotDelegationListResult } from '@cindy/maker-shared/botDelegation';export type ProfileValues = Record<string, string | boolean>;export interface ProfilePanel {@@ -135,6 +137,31 @@ export function companionArtifactRows(value: unknown, botId: string): Array<{ idreturn files.length ? [{ id: row.id, title: string(row.title, 2000) ? row.title : '', childSessionId: string(row.childSessionId, 160) ? row.childSessionId : null, files }] : [];});}+const GLANCE_OUTPUT_LIMIT = 30;+export interface GlanceOutput { key: string; name: string; childSessionId: string; taskTitle: string; at: number }++/** Finished deliverables of this teammate's own delegated tasks, newest first (same rule as Desktop). */+export function companionGlanceOutputs(value: BotDelegationListResult | null | undefined, botId: string): GlanceOutput[] {+ if (!value?.ok) return [];+ const files: GlanceOutput[] = [];+ for (const delegation of value.delegations) {+ if (delegation.requestingBotId !== botId || delegation.status !== 'completed' || !delegation.childSessionId) continue;+ for (const artifact of delegation.artifacts ?? []) {+ if (artifact.status === 'deleted') continue;+ const name = artifact.path.split(/[\\/]/).at(-1) || artifact.path;+ if (!isBotDeliverableFile({ path: artifact.path, name })) continue;+ files.push({+ key: `${delegation.id}:${artifact.path}`,+ name,+ childSessionId: delegation.childSessionId,+ taskTitle: delegation.title,+ at: delegation.completedAt ?? delegation.updatedAt,+ });+ }+ }+ return files.sort((a, b) => b.at - a.at).slice(0, GLANCE_OUTPUT_LIMIT);+}+export function profileFormDirty(panel: ProfilePanel | undefined, values: ProfileValues): boolean {return !!panel?.action?.fields?.some(field => (values[field.id] ?? '') !== (panel.values[field.id] ?? ''));}diff --git a/apps/mobile/src/session/companionTodoStyles.ts b/apps/mobile/src/session/companionTodoStyles.tsdeleted file mode 100644index 0e84689200..0000000000--- a/apps/mobile/src/session/companionTodoStyles.ts+++ /dev/null@@ -1,107 +0,0 @@-import { StyleSheet } from 'react-native';-import { fontWeight, lineHeight, radius, spacing, typeScale, type ThemeColors } from '@/theme';-export const makeTodoStyles = (c: ThemeColors) =>- StyleSheet.create({- content: {- paddingHorizontal: spacing.lg,- paddingBottom: spacing.lg,- gap: spacing.sm,- },- toolbar: { flexDirection: 'row', alignItems: 'center', gap: spacing.sm },- flex: { flex: 1, minWidth: 0 },- row: {- paddingVertical: spacing.sm,- borderBottomWidth: StyleSheet.hairlineWidth,- borderBottomColor: c.border,- minWidth: 0,- },- heading: { minHeight: 46, minWidth: 0 },- title: {- fontSize: typeScale.subtitle,- lineHeight: lineHeight.subtitle,- fontWeight: fontWeight.medium,- color: c.textPrimary,- },- progress: {- fontSize: typeScale.bodySmall,- lineHeight: lineHeight.bodySmall,- fontWeight: fontWeight.regular,- color: c.textSecondary,- },- rail: {- flexDirection: 'row',- alignItems: 'center',- gap: spacing.sm,- marginTop: spacing.sm,- minHeight: 44,- },- date: { flex: 1, minWidth: 0, minHeight: 44, justifyContent: 'center' },- caption: {- fontSize: typeScale.caption,- lineHeight: lineHeight.caption,- fontWeight: fontWeight.regular,- color: c.textSecondary,- },- action: {- width: 144,- minHeight: 44,- justifyContent: 'center',- alignItems: 'center',- paddingHorizontal: spacing.sm,- borderRadius: radius.pill,- backgroundColor: c.surfaceChip,- },- actionText: {- fontSize: typeScale.bodySmall,- lineHeight: lineHeight.bodySmall,- fontWeight: fontWeight.medium,- color: c.textPrimary,- maxWidth: '100%',- },- icon: {- width: 44,- minHeight: 44,- alignItems: 'center',- justifyContent: 'center',- },- button: {- minHeight: 44,- paddingHorizontal: spacing.sm,- justifyContent: 'center',- alignItems: 'center',- borderRadius: radius.control,- backgroundColor: c.surfaceChip,- },- buttonText: {- fontSize: typeScale.bodySmall,- lineHeight: lineHeight.bodySmall,- fontWeight: fontWeight.medium,- color: c.textPrimary,- },- disabled: { opacity: 0.5 },- body: {- fontSize: typeScale.bodySmall,- lineHeight: lineHeight.bodySmall,- fontWeight: fontWeight.regular,- color: c.textPrimary,- },- field: { gap: spacing.xs },- input: {- minHeight: 44,- padding: spacing.sm,- borderRadius: radius.control,- borderWidth: StyleSheet.hairlineWidth,- borderColor: c.border,- color: c.textPrimary,- fontSize: typeScale.bodySmall,- lineHeight: lineHeight.bodySmall,- fontWeight: fontWeight.regular,- backgroundColor: c.surfaceElevated,- },- disclosure: {- flexDirection: 'row',- alignItems: 'center',- gap: spacing.xs,- minHeight: 44,- },- });diff --git a/apps/mobile/src/session/composerDocument.ts b/apps/mobile/src/session/composerDocument.tsindex f45a7b8739..f5e57cf028 100644--- a/apps/mobile/src/session/composerDocument.ts+++ b/apps/mobile/src/session/composerDocument.ts@@ -8,6 +8,8 @@*/import {boundAgentReferenceText,+ buildTodoReferenceHref,+ parseTodoReferenceHref,type AgentInputReference,} from '@cindy/maker-shared/agent-input-projection';import {@@ -57,7 +59,7 @@ export interface ComposerQuoteNode {export interface ComposerMentionNode {type: 'mention';- kind: ComposerAtResourceItem['type'] | 'project';+ kind: ComposerAtResourceItem['type'] | 'project' | 'todo';label: string;raw: string;/** Project references retain their decoded semantic location beside `raw`. */@@ -386,6 +388,13 @@ export function slashCommandTextNode(commandName: string): ComposerTextNode {return { type: 'text', text: value, slashCommand: value };}+/** One of the teammate's todos, quoted from its 近况 sheet (same wire as Desktop's todo chip). */+export function todoReferenceComposerNode(input: { botId: string; todoId: string; title: string }): ComposerMentionNode {+ const href = buildTodoReferenceHref(input.botId, input.todoId);+ const label = input.title.trim() || 'Todo';+ return { type: 'mention', kind: 'todo', label, raw: `[${label.replace(/([[\]\\])/g, '\\$1')}](${href})`, href };+}+export function sessionLinkComposerNode(input: {href: string;label: string;@@ -584,6 +593,19 @@ export function serializeComposerDocument(document: ComposerDocument): Serialize...(node.titled && node.label ? { title: node.label } : {}),});}+ } else if (node.type === 'mention' && node.kind === 'todo' && node.href) {+ const target = parseTodoReferenceHref(node.href);+ if (target) {+ agentReferences.push({+ kind: 'todo',+ start,+ end: start + wire.length,+ href: node.href,+ botId: target.botId,+ todoId: target.todoId,+ title: node.label,+ });+ }} else if (node.type === 'mention'&& node.kind === 'project'@@ -690,6 +712,9 @@ function composerNodeFromAgentReference(workingDir: reference.workingDir,};}+ if (reference.kind === 'todo') {+ return { type: 'mention', kind: 'todo', label: reference.title, raw, href: reference.href };+ }// Desktop-only live context and Plugin resources have no Mobile atom yet.// Preserve the exact wire span as editable text instead of miscasting it as// a project mention or dropping user-visible content.@@ -772,7 +797,7 @@ function normalizeNode(node: ComposerNode): ComposerNode | null {if (node.type === 'mention') {if (typeof node.kind !== 'string'- || !['file', 'dir', 'agent', 'project'].includes(node.kind)+ || !['file', 'dir', 'agent', 'project', 'todo'].includes(node.kind)|| typeof node.raw !== 'string'|| !node.raw|| typeof node.label !== 'string'@@ -794,6 +819,10 @@ function normalizeNode(node: ComposerNode): ComposerNode | null {workingDir: parsed.workingDir,};}+ if (node.kind === 'todo') {+ if (typeof node.href !== 'string' || !parseTodoReferenceHref(node.href)) return null;+ return { type: 'mention', kind: 'todo', raw: node.raw, label: node.label, href: node.href };+ }return { type: 'mention', kind: node.kind, raw: node.raw, label: node.label };}if (node.type === 'session-link') {diff --git a/apps/mobile/src/session/composerRichInputHtml.ts b/apps/mobile/src/session/composerRichInputHtml.tsindex 5309fe13f3..b0e9a0a804 100644--- a/apps/mobile/src/session/composerRichInputHtml.ts+++ b/apps/mobile/src/session/composerRichInputHtml.ts@@ -147,7 +147,7 @@ export function buildComposerRichInputHtml(config: ComposerRichInputConfig): str};const atomIcon = (node) => {if (node.type === 'quote' || (node.type === 'session-link' && node.messageClientId)) return '❝';- if (node.type === 'mention') return node.kind === 'dir' || node.kind === 'project' ? '⌁' : node.kind === 'agent' ? '◇' : '▧';+ if (node.type === 'mention') return node.kind === 'dir' || node.kind === 'project' ? '⌁' : node.kind === 'agent' ? '◇' : node.kind === 'todo' ? '☐' : '▧';if (node.type === 'session-link') return '↳';return '▤';};diff --git a/apps/mobile/src/session/useCompanionGlanceTodos.ts b/apps/mobile/src/session/useCompanionGlanceTodos.tsnew file mode 100644index 0000000000..e000179bc1--- /dev/null+++ b/apps/mobile/src/session/useCompanionGlanceTodos.ts@@ -0,0 +1,161 @@+/**+ * 伙伴近况里的「待办」(与桌面 BotGlancePopover 同一份数据):经 device-link 读伙伴所在电脑的+ * `todos:<botId>` 远程资源,宿主每页最多 25 条,这里按页读完(单类上限 200 条)。+ * 近况只展示与删除:完成、改期、不再提示都由伙伴在对话里按主人的话去改。+ */+import { useCallback, useEffect, useRef, useState } from 'react';+import { AppState } from 'react-native';+import AsyncStorage from '@react-native-async-storage/async-storage';+import { useTranslation } from 'react-i18next';+import {+ scheduleTodoDeferralRefresh,+ todoDue,+ todoDueKey,+ type TeammateTodo,+ type TodoListQuery,+ type TodoPatch,+} from '@cindy/maker-shared/teammate-todo';+import { useAuth } from '@/auth/AuthContext';+import { useDeviceLink } from '@/device-link/DeviceLinkContext';+import { getRemoteResource, invokeRemoteResourceAction } from '@/device-link/remoteResources';++const PAGE = 25;+const MAX_ITEMS = 200;++export interface GlanceTodos {+ open: TeammateTodo[];+ openTotal: number;+ /** Most recently finished first. */+ done: TeammateTodo[];+ doneTotal: number;+ nextDeferredAt: string | null;+}++const EMPTY: GlanceTodos = { open: [], openTotal: 0, done: [], doneTotal: 0, nextDeferredAt: null };++interface Page { items: TeammateTodo[]; total: number; nextDeferredAt?: string | null }++export function todosResourceRef(botId: string) {+ return { collectionId: 'teammates', kind: 'bot', id: `todos:${botId}` } as const;+}++/** Reads every page of one view; the total read up front bounds the loop. */+async function readAll(readPage: (query: TodoListQuery) => Promise<Page>, view: 'open' | 'done'): Promise<Page> {+ const order = view === 'open' ? 'due' : 'created';+ const first = await readPage({ view, order, offset: 0, limit: PAGE });+ const items = [...first.items];+ let total = first.total;+ while (items.length < Math.min(total, MAX_ITEMS)) {+ const page = await readPage({ view, order, offset: items.length, limit: PAGE });+ total = page.total;+ if (page.items.length === 0) break;+ items.push(...page.items);+ }+ return { items: items.slice(0, MAX_ITEMS), total, nextDeferredAt: first.nextDeferredAt ?? null };+}++/**+ * `enabled` is false while the host has not advertised todos (older desktops) or is offline:+ * nothing is read and the section stays hidden.+ */+export function useCompanionGlanceTodos({ deviceId, deviceName, botId, enabled }: {+ deviceId: string; deviceName: string; botId: string; enabled: boolean;+}) {+ const { i18n } = useTranslation();+ const { invoke, openLink, onRemoteResourceChanged } = useDeviceLink();+ const [state, setState] = useState<{ todos: GlanceTodos; loaded: boolean; failed: boolean }>({ todos: EMPTY, loaded: false, failed: false });+ const epoch = useRef(0);++ const refresh = useCallback(async () => {+ if (!enabled) return;+ const mine = ++epoch.current;+ try {+ await openLink(deviceId);+ const readPage = async (query: TodoListQuery): Promise<Page> => {+ const resource = await getRemoteResource(invoke, { deviceId, deviceName }, todosResourceRef(botId), i18n.language,+ ['teammate-todos'], JSON.stringify(query));+ const data = resource.blocks?.find(block => block.primitive === 'teammate-todos')?.data as Page | undefined;+ if (!data || !Array.isArray(data.items) || !Number.isSafeInteger(data.total) || data.items.length > PAGE) throw new Error('INVALID_RESPONSE');+ return data;+ };+ const [open, done] = await Promise.all([readAll(readPage, 'open'), readAll(readPage, 'done')]);+ if (mine !== epoch.current) return;+ setState({+ todos: { open: open.items, openTotal: open.total, done: [...done.items].reverse(), doneTotal: done.total, nextDeferredAt: open.nextDeferredAt ?? null },+ loaded: true,+ failed: false,+ });+ } catch {+ if (mine === epoch.current) setState(previous => ({ ...previous, loaded: true, failed: true }));+ }+ }, [botId, deviceId, deviceName, enabled, i18n.language, invoke, openLink]);++ useEffect(() => {+ setState({ todos: EMPTY, loaded: false, failed: false });+ if (!enabled) return;+ void refresh();+ const offChanged = onRemoteResourceChanged((id, payload) => {+ if (id !== deviceId || payload.collectionId !== 'teammates') return;+ if (payload.resourceRefs && !payload.resourceRefs.some(ref => ref.id === botId || ref.id === `todos:${botId}`)) return;+ void refresh();+ });+ const appState = AppState.addEventListener('change', next => { if (next === 'active') void refresh(); });+ return () => { epoch.current++; offChanged(); appState.remove(); };+ }, [botId, deviceId, enabled, onRemoteResourceChanged, refresh]);++ // Keep up with time while the chat is open: a deferred todo comes back, and past midnight+ // today's due dots are recomputed.+ const nextDeferredAt = state.todos.nextDeferredAt;+ useEffect(() => {+ if (!enabled || !state.loaded) return;+ const now = new Date();+ const midnight = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1).toISOString();+ const next = nextDeferredAt && Date.parse(nextDeferredAt) < Date.parse(midnight) ? nextDeferredAt : midnight;+ return scheduleTodoDeferralRefresh(next, () => void refresh());+ }, [enabled, nextDeferredAt, refresh, state.loaded, state.todos]);++ /** One todo update on the teammate's computer; undoing a delete uses `restore` the same way. */+ const patch = useCallback(async (input: TodoPatch): Promise<TeammateTodo | null> => {+ await openLink(deviceId);+ const result = await invokeRemoteResourceAction(invoke, { deviceId, deviceName }, {+ collectionId: 'teammates', resourceRef: todosResourceRef(botId), actionId: 'todo-update', input: input as unknown as Record<string, unknown>,+ }, i18n.language) as { todo?: TeammateTodo | null } | null;+ return result?.todo ?? null;+ }, [botId, deviceId, deviceName, i18n.language, invoke, openLink]);++ return { ...state, refresh, patch };+}++/** Due todos; the entry dot only counts the ones the owner has not seen in 近况 yet. */+export function dueTodos(todos: GlanceTodos, now = new Date()): TeammateTodo[] {+ return todos.open.filter(todo => todoDue(todo, now));+}++const SEEN_PREFIX = 'cindy.companionGlance.dueSeen:';++/** Due occurrences already seen in 近况, per account, computer and teammate. */+export function useGlanceDueSeen(scope: { deviceId: string; botId: string }, due: readonly TeammateTodo[]) {+ const { user } = useAuth();+ const key = `${SEEN_PREFIX}${user?.id ?? ''}:${scope.deviceId}:${scope.botId}`;+ const [seen, setSeen] = useState<{ key: string; keys: Set<string> } | null>(null);+ useEffect(() => {+ let live = true;+ void AsyncStorage.getItem(key).then(raw => {+ if (!live) return;+ let parsed: unknown = [];+ try { parsed = raw ? JSON.parse(raw) : []; } catch { parsed = []; }+ setSeen({ key, keys: new Set(Array.isArray(parsed) ? parsed.filter((value): value is string => typeof value === 'string') : []) });+ }).catch(() => { if (live) setSeen({ key, keys: new Set() }); });+ return () => { live = false; };+ }, [key]);+ const ready = seen?.key === key;+ const unseen = ready && due.some(todo => !seen.keys.has(todoDueKey(todo)));+ /** Opening 近况 counts as seeing what is due now; older entries drop out. */+ const markSeen = useCallback(() => {+ const keys = due.map(todoDueKey);+ setSeen({ key, keys: new Set(keys) });+ // A failed write only lights the dot once more; the todos themselves are unaffected.+ void AsyncStorage.setItem(key, JSON.stringify(keys)).catch(() => undefined);+ }, [due, key]);+ return { unseen, markSeen };+}diff --git a/docs/design-rules/design-inventory.md b/docs/design-rules/design-inventory.mdindex 74471ccb1f..f2c0b54ef4 100644--- a/docs/design-rules/design-inventory.md+++ b/docs/design-rules/design-inventory.md@@ -54,7 +54,7 @@| `mobile.auth` | mobile | 登录与添加账号 | app/(auth)/login.tsx / app/add-account.tsx | AccountSwitcherSheet, AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, CompanionNativeContent.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, IncomingShareBridge, LoginCaptchaWebView, LoginNativeButton, LoginNativeButton.ios, LoginSkinControls, McpAppViews, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, MobileUserAvatar, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativeMcpAppSurface, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteHistoryPrefetchBridge, ResidentHomeList, SheetModal, SheetSurface, StartupSplashOverlay, SystemNavigationBack, ThemeProvider, _layout, add-account, gestureHandler, login, peerFileTransport, useLocale | apps/mobile/app/(auth)/login.tsx, apps/mobile/app/_layout.tsx, apps/mobile/app/add-account.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/LoginCaptchaWebView.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/LoginNativeButton.ios.tsx, apps/mobile/src/components/LoginNativeButton.tsx, apps/mobile/src/components/LoginSkinControls.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileUserAvatar.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/McpAppViews.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeMcpAppSurface.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 221 | 84 || `mobile.chat.incoming-share` | mobile | 外部分享内容预览与任务、伙伴目标选择 | app/incoming-share.tsx | AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ConnectionBanner, ConnectionNoticeOverlay, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, McpAppViews, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativeMcpAppSurface, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteHistoryPrefetchBridge, ResidentHomeList, SheetModal, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, incoming-share, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/incoming-share.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/McpAppViews.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeMcpAppSurface.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 214 | 53 || `mobile.chat.new` | mobile | 新建任务 | app/sessions/new.tsx | AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, BlurBackdrop, CenteredScreen, CompanionNativeContent.ios, ComposerActivityPill, ComposerAttachmentTray, ComposerDockKeyboardFollow, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetCollabView, ContextSheetGoalView, ContextSheetGoalView.ios, ContextSheetMediaViews, ContextSheetPlugins, DeviceLinkContext, ErrorNotice, FileTypeIcon, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, HomeStackHeader, ImageLightbox, IncomingShareBridge, McpAppViews, MobileAgentMark, MobileAgentSwitcher, MobileChoicePickerList, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileVendorIcon, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, ModelSpeedIcon, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativeErrorNotice.ios, NativeMcpAppSurface, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NativeVideoPlayer, NewTaskSelectionRow, NewTaskSelectionSheet, NewTaskSelectionSheet.android, NewTaskSelectionSheet.ios, OrcaWorkerDirectoryPicker, OutsideTap, PaperPlaneIcon, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteHistoryPrefetchBridge, RemoteSourceMark, ResidentHomeList, SheetModal, SheetSurface, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, ThemeProvider, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, VoiceRecordingPill, _layout, composerPullThrough, gestureHandler, mediaPlayerWebView, nativeToolbarMenuItems, new, peerFileTransport, useComposerPendingImagePreview, useLocale, voicePillWidthMotion | apps/mobile/app/_layout.tsx, apps/mobile/app/sessions/new.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/ErrorNotice.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/NativeErrorNotice.ios.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/chrome/nativeToolbarMenuItems.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/ComposerActivityPill.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerDockKeyboardFollow.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.tsx, apps/mobile/src/session/ComposerKeyboardAvoidingView.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ContextSheetCollabView.tsx, apps/mobile/src/session/ContextSheetGoalView.ios.tsx, apps/mobile/src/session/ContextSheetGoalView.tsx, apps/mobile/src/session/ContextSheetMediaViews.tsx, apps/mobile/src/session/ContextSheetPlugins.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/McpAppViews.tsx, apps/mobile/src/session/MobileAgentSwitcher.tsx, apps/mobile/src/session/MobileChoicePickerList.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileModelPickerList.ios.tsx, apps/mobile/src/session/MobileModelPickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/MobilePermissionPickerList.ios.tsx, apps/mobile/src/session/MobilePermissionPickerList.tsx, apps/mobile/src/session/MobileProviderMark.tsx, apps/mobile/src/session/ModelOptionsSheetView.ios.tsx, apps/mobile/src/session/ModelOptionsSheetView.tsx, apps/mobile/src/session/ModelPickerNativeHeader.ios.tsx, apps/mobile/src/session/ModelPickerNativeHeader.tsx, apps/mobile/src/session/ModelPickerSheet.tsx, apps/mobile/src/session/ModelSpeedIcon.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeMcpAppSurface.tsx, apps/mobile/src/session/NativePermissionSheet.ios.tsx, apps/mobile/src/session/NativePermissionSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NativeVideoPlayer.tsx, apps/mobile/src/session/NewTaskSelectionRow.tsx, apps/mobile/src/session/NewTaskSelectionSheet.android.tsx, apps/mobile/src/session/NewTaskSelectionSheet.ios.tsx, apps/mobile/src/session/NewTaskSelectionSheet.tsx, apps/mobile/src/session/OrcaWorkerDirectoryPicker.tsx, apps/mobile/src/session/PlanModeChip.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/RemoteSourceMark.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SlowSendNotice.tsx, apps/mobile/src/session/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/VoiceRecordingPill.tsx, apps/mobile/src/session/composerPullThrough.tsx, apps/mobile/src/session/mediaPlayerWebView.tsx, apps/mobile/src/session/mediaPlayerWebViewHtml.ts, apps/mobile/src/session/useComposerPendingImagePreview.tsx, apps/mobile/src/session/voicePillWidthMotion.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 251 | 120 |-| `mobile.chat.session` | mobile | 任务内容与输入 | app/sessions/[sessionId].tsx | AccountSwitcherSheet, AdaptiveWindow, AgentErrorDetails, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, AuthorizationMessageCard, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ChatFileChipMenuSheet, ChatIdentityHeader, ChatPathChipSpan, ChatReplyIcon, CindyMakeSessionGate, CloudHomeSwitchSheet, CloudHomeUnreachableNotice, CodexResetAutoUseControl, CompanionCardButton, CompanionChoice, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionEntering, CompanionFollowUpInvitation, CompanionHeader, CompanionImportSheet, CompanionLearningFooter, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionMessageActions, CompanionMessageCard, CompanionModelChain, CompanionNativeContent.ios, CompanionPortraitPicker, CompanionPresenceRing, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, CompanionTaskResultCard, CompanionTodoRow, CompanionTodos, CompanionWorkingStatus, ComposerActivityPill, ComposerAttachmentTray, ComposerDockKeyboardFollow, ComposerExpandButton, ComposerExpandButton.ios, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerMorphSource, ComposerMorphSource.ios, ComposerNativeInput, ComposerNativeInput.ios, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerRichInput, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetCollabView, ContextSheetGoalView, ContextSheetGoalView.ios, ContextSheetMediaViews, ContextSheetPlugins, ConversationSearchFilterSheet, ConversationShareSvg, ConversationShareWebView, DeviceLinkContext, ErrorNotice, FailedScheduleNotice, FileTypeIcon, FilterReminderDot, FoldTouchpad, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeListVisuals, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSessionInfoMeta, HomeStackHeader, HomeSurface, HomeUnreadContext, ImageLightbox, IncomingShareBridge, InlineQueueSection, InlineQuoteChip, InlineReferenceChip, InputHandoffCard, InputHandoffDeviceCode, InputHandoffPictureStep, InputHandoffQrCode, InputHandoffRecordRow, InputHandoffSheet, InputHandoffSheet.ios, InputHandoffStepFields, InteractionPanel, MailLinkSpan, MarkdownBlockContent, McpAppCard, McpAppViews, MessageActionSheet, MessageLoadingImage, MessageRenderer, MobileAgentMark, MobileAgentSwitcher, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileMailHtmlPreview, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileUserAvatar, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, ModelSpeedIcon, MountOnFirstOpen, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton, NativeChromeBackButton.ios, NativeChromeButton.ios, NativeErrorNotice.ios, NativeMcpAppSurface, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NativeVideoPlayer, NewTaskSelectionRow, NewTaskSelectionSheet, NewTaskSelectionSheet.android, NewTaskSelectionSheet.ios, OrcaWorkerDirectoryPicker, OutsideTap, PaperPlaneIcon, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PluginCardActions, PluginCardRecipients, PluginInvocationHeader, PluginMenuUnreadDot, PluginSetupNativeActions, PluginSetupNativeForm, PromptRecommendation, PushNotificationsBridge, QuestionReferenceText, QuietSyncIndicator, QuoteCapsule, ReadableHistoryRecovery, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteHistoryPrefetchBridge, RemoteSourceMark, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, RewindPreviewPanel, RichAnswer, RunningTokenRatePopover, SelectionMenuText, SentInlineAtomBody, SessionActionSheet, SessionActionSheetFrame, SessionActionSheetFrame.android, SessionDetailsNative, SessionDetailsNative.ios, SessionEntryRecovery, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionListDrawer, SessionMenuSheet, SessionOptionsExpoSheet, SessionResourceCards, SessionRightSpinner, SessionSearchNative, SessionSearchNative.ios, SessionTailBanner, SessionTransientNotice, SessionUsageSummary, ShareImageNativeButton, ShareImageNativeButton.ios, ShareMessageCheckbox, ShareSelectAllButton, ShareSelectionBar, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SideChatTaskBoundary, SideChatsSheet, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, SwipeableProjectHeader, SwipeableSessionRow, SwipeableSessionRow.ios, SystemNavigationBack, TaskTags, TaskTagsNative, TaskTagsNative.ios, TaskTagsSheet, ThemeProvider, ThinkingDots, TodoDateInput, TodoDateInput.android, TodoDateInput.ios, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, VideoSitePreview, VoiceRecordingPill, WorkingStatusText, [sessionId], _layout, composerPullThrough, gestureHandler, listDisclosureTransition, mathWebView, mediaPlayerWebView, mermaidWebView, nativeToolbarMenuItems, peerFileTransport, useComposerPendingImagePreview, useLocale, useSharedTaskConfirmation, voicePillWidthMotion | apps/mobile/app/_layout.tsx, apps/mobile/app/sessions/[sessionId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ChatReplyIcon.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/ErrorNotice.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/FilterReminderDot.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileUserAvatar.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/NativeErrorNotice.ios.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/inputHandoff/InputHandoffCard.tsx, apps/mobile/src/inputHandoff/InputHandoffDeviceCode.tsx, apps/mobile/src/inputHandoff/InputHandoffPictureStep.tsx, apps/mobile/src/inputHandoff/InputHandoffQrCode.tsx, apps/mobile/src/inputHandoff/InputHandoffRecordRow.tsx, apps/mobile/src/inputHandoff/InputHandoffSheet.ios.tsx, apps/mobile/src/inputHandoff/InputHandoffSheet.tsx, apps/mobile/src/inputHandoff/InputHandoffStepFields.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/chrome/nativeToolbarMenuItems.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/plugins/MobileMailHtmlPreview.tsx, apps/mobile/src/plugins/PluginCardActions.tsx, apps/mobile/src/plugins/PluginCardRecipients.tsx, apps/mobile/src/plugins/PluginMenuUnreadDot.tsx, apps/mobile/src/plugins/PluginSetupNativeActions.tsx, apps/mobile/src/plugins/PluginSetupNativeForm.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AgentErrorDetails.tsx, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/AuthorizationMessageCard.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ChatFileChipMenuSheet.tsx, apps/mobile/src/session/ChatIdentityHeader.tsx, apps/mobile/src/session/ChatPathChipSpan.tsx, apps/mobile/src/session/CindyMakeSessionGate.tsx, apps/mobile/src/session/CloudHomeSwitchSheet.tsx, apps/mobile/src/session/CloudHomeUnreachableNotice.tsx, apps/mobile/src/session/CodexResetAutoUseControl.tsx, apps/mobile/src/session/CompanionCardButton.tsx, apps/mobile/src/session/CompanionChoice.tsx, apps/mobile/src/session/CompanionCreateNativeView.ios.tsx, apps/mobile/src/session/CompanionCreateNativeView.tsx, apps/mobile/src/session/CompanionEntering.tsx, apps/mobile/src/session/CompanionFollowUpInvitation.tsx, apps/mobile/src/session/CompanionHeader.tsx, apps/mobile/src/session/CompanionImportSheet.tsx, apps/mobile/src/session/CompanionLearningFooter.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionPresenceRing.tsx, apps/mobile/src/session/CompanionProfileArtifacts.tsx, apps/mobile/src/session/CompanionProfileNativeView.ios.tsx, apps/mobile/src/session/CompanionProfileNativeView.tsx, apps/mobile/src/session/CompanionProfileSheet.tsx, apps/mobile/src/session/CompanionSettingsRow.ios.tsx, apps/mobile/src/session/CompanionSettingsRow.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/CompanionTaskResultCard.tsx, apps/mobile/src/session/CompanionTodoRow.tsx, apps/mobile/src/session/CompanionTodos.tsx, apps/mobile/src/session/CompanionWorkingStatus.tsx, apps/mobile/src/session/ComposerActivityPill.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerDockKeyboardFollow.tsx, apps/mobile/src/session/ComposerExpandButton.ios.tsx, apps/mobile/src/session/ComposerExpandButton.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.tsx, apps/mobile/src/session/ComposerKeyboardAvoidingView.tsx, apps/mobile/src/session/ComposerMorphSource.ios.tsx, apps/mobile/src/session/ComposerMorphSource.tsx, apps/mobile/src/session/ComposerNativeInput.ios.tsx, apps/mobile/src/session/ComposerNativeInput.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerRichInput.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ContextSheetCollabView.tsx, apps/mobile/src/session/ContextSheetGoalView.ios.tsx, apps/mobile/src/session/ContextSheetGoalView.tsx, apps/mobile/src/session/ContextSheetMediaViews.tsx, apps/mobile/src/session/ContextSheetPlugins.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/ConversationShareSvg.tsx, apps/mobile/src/session/ConversationShareWebView.tsx, apps/mobile/src/session/FailedScheduleNotice.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeListVisuals.tsx, apps/mobile/src/session/HomeModeSwitch.tsx, apps/mobile/src/session/HomeNewTaskButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/HomeSessionInfoMeta.tsx, apps/mobile/src/session/HomeSurface.tsx, apps/mobile/src/session/HomeUnreadContext.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/InlineQueueSection.tsx, apps/mobile/src/session/InlineQuoteChip.tsx, apps/mobile/src/session/InlineReferenceChip.tsx, apps/mobile/src/session/InteractionPanel.tsx, apps/mobile/src/session/MailLinkSpan.tsx, apps/mobile/src/session/MarkdownBlockContent.tsx, apps/mobile/src/session/McpAppCard.tsx, apps/mobile/src/session/McpAppViews.tsx, apps/mobile/src/session/MessageActionSheet.tsx, apps/mobile/src/session/MessageLoadingImage.tsx, apps/mobile/src/session/MessageRenderer.tsx, apps/mobile/src/session/MobileAgentSwitcher.tsx, apps/mobile/src/session/MobileBoundaryNotice.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileModelPickerList.ios.tsx, apps/mobile/src/session/MobileModelPickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/MobilePermissionPickerList.ios.tsx, apps/mobile/src/session/MobilePermissionPickerList.tsx, apps/mobile/src/session/MobileProviderMark.tsx, apps/mobile/src/session/ModelOptionsSheetView.ios.tsx, apps/mobile/src/session/ModelOptionsSheetView.tsx, apps/mobile/src/session/ModelPickerNativeHeader.ios.tsx, apps/mobile/src/session/ModelPickerNativeHeader.tsx, apps/mobile/src/session/ModelPickerSheet.tsx, apps/mobile/src/session/ModelSpeedIcon.tsx, apps/mobile/src/session/MountOnFirstOpen.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeMcpAppSurface.tsx, apps/mobile/src/session/NativePermissionSheet.ios.tsx, apps/mobile/src/session/NativePermissionSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NativeVideoPlayer.tsx, apps/mobile/src/session/NewTaskSelectionRow.tsx, apps/mobile/src/session/NewTaskSelectionSheet.android.tsx, apps/mobile/src/session/NewTaskSelectionSheet.ios.tsx, apps/mobile/src/session/NewTaskSelectionSheet.tsx, apps/mobile/src/session/OrcaWorkerDirectoryPicker.tsx, apps/mobile/src/session/PendingSendBubble.tsx, apps/mobile/src/session/PlanModeChip.tsx, apps/mobile/src/session/PluginInvocationHeader.tsx, apps/mobile/src/session/PromptRecommendation.tsx, apps/mobile/src/session/QuestionReferenceText.tsx, apps/mobile/src/session/QuoteCapsule.tsx, apps/mobile/src/session/ReadableHistoryRecovery.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/RemoteSourceMark.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/RewindPreviewPanel.tsx, apps/mobile/src/session/RichAnswer.tsx, apps/mobile/src/session/RunningTokenRatePopover.tsx, apps/mobile/src/session/SelectionMenuText.tsx, apps/mobile/src/session/SentInlineAtomBody.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionActionSheetFrame.android.tsx, apps/mobile/src/session/SessionActionSheetFrame.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionEntryRecovery.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionListDrawer.tsx, apps/mobile/src/session/SessionMenuSheet.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SessionResourceCards.tsx, apps/mobile/src/session/SessionRightSpinner.tsx, apps/mobile/src/session/SessionSearchNative.ios.tsx, apps/mobile/src/session/SessionSearchNative.tsx, apps/mobile/src/session/SessionTailBanner.tsx, apps/mobile/src/session/SessionTransientNotice.tsx, apps/mobile/src/session/SessionUsageSummary.tsx, apps/mobile/src/session/ShareImageNativeButton.ios.tsx, apps/mobile/src/session/ShareImageNativeButton.tsx, apps/mobile/src/session/ShareMessageCheckbox.tsx, apps/mobile/src/session/ShareSelectAllButton.tsx, apps/mobile/src/session/ShareSelectionBar.tsx, apps/mobile/src/session/SharedTaskEndedState.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SideChatTaskBoundary.tsx, apps/mobile/src/session/SideChatsSheet.tsx, apps/mobile/src/session/SlowSendNotice.tsx, apps/mobile/src/session/SwipeableProjectHeader.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/session/TaskTagsNative.ios.tsx, apps/mobile/src/session/TaskTagsNative.tsx, apps/mobile/src/session/TaskTagsSheet.tsx, apps/mobile/src/session/ThinkingDots.tsx, apps/mobile/src/session/TodoDateInput.android.tsx, apps/mobile/src/session/TodoDateInput.ios.tsx, apps/mobile/src/session/TodoDateInput.tsx, apps/mobile/src/session/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/VideoSitePreview.tsx, apps/mobile/src/session/VoiceRecordingPill.tsx, apps/mobile/src/session/WorkingStatusText.tsx, apps/mobile/src/session/composerPullThrough.tsx, apps/mobile/src/session/composerRichInputHtml.ts, apps/mobile/src/session/conversationShareWebViewHtml.ts, apps/mobile/src/session/listDisclosureTransition.tsx, apps/mobile/src/session/mathWebView.tsx, apps/mobile/src/session/mathWebViewHtml.ts, apps/mobile/src/session/mediaPlayerWebView.tsx, apps/mobile/src/session/mediaPlayerWebViewHtml.ts, apps/mobile/src/session/mermaidWebView.tsx, apps/mobile/src/session/mermaidWebViewHtml.ts, apps/mobile/src/session/selectableMarkdownHtml.ts, apps/mobile/src/session/useComposerPendingImagePreview.tsx, apps/mobile/src/session/useSharedTaskConfirmation.tsx, apps/mobile/src/session/voicePillWidthMotion.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 7 | 252 | 338 |+| `mobile.chat.session` | mobile | 任务内容与输入 | app/sessions/[sessionId].tsx | AccountSwitcherSheet, AdaptiveWindow, AgentErrorDetails, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AnnotationBurnInWebView, AppText, AuthContext, AuthorizationMessageCard, AutomationTimerIcon, BlurBackdrop, CenteredScreen, ChatFileChipMenuSheet, ChatIdentityHeader, ChatPathChipSpan, ChatReplyIcon, CindyMakeSessionGate, CloudHomeSwitchSheet, CloudHomeUnreachableNotice, CodexResetAutoUseControl, CompanionCardButton, CompanionChoice, CompanionCreateNativeView, CompanionCreateNativeView.ios, CompanionEntering, CompanionFollowUpInvitation, CompanionGlanceSheet, CompanionHeader, CompanionImportSheet, CompanionLearningFooter, CompanionMemoryPage, CompanionMemoryPage.ios, CompanionMessageActions, CompanionMessageCard, CompanionModelChain, CompanionNativeContent.ios, CompanionPortraitPicker, CompanionPresenceRing, CompanionProfileArtifacts, CompanionProfileNativeView, CompanionProfileNativeView.ios, CompanionProfileSheet, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, CompanionTaskResultCard, CompanionWorkingStatus, ComposerActivityPill, ComposerAttachmentTray, ComposerDockKeyboardFollow, ComposerExpandButton, ComposerExpandButton.ios, ComposerFrame, ComposerFrame.ios, ComposerKeyboardAvoidingView, ComposerMorphSource, ComposerMorphSource.ios, ComposerNativeInput, ComposerNativeInput.ios, ComposerNativeRow, ComposerNativeRow.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerRichInput, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, ContextSheetCollabView, ContextSheetGoalView, ContextSheetGoalView.ios, ContextSheetMediaViews, ContextSheetPlugins, ConversationSearchFilterSheet, ConversationShareSvg, ConversationShareWebView, DeviceLinkContext, ErrorNotice, FailedScheduleNotice, FileTypeIcon, FilterReminderDot, FoldTouchpad, HomeChromeDrawer, HomeChromeFrost, HomeEntryProvider, HomeGlassMenuPanel, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeListVisuals, HomeModeSwitch, HomeNativeStackHeader, HomeNewTaskButton, HomeProjectMachineLabel, HomeSearchBar, HomeSessionInfoMeta, HomeStackHeader, HomeSurface, HomeUnreadContext, ImageLightbox, IncomingShareBridge, InlineQueueSection, InlineQuoteChip, InlineReferenceChip, InputHandoffCard, InputHandoffDeviceCode, InputHandoffPictureStep, InputHandoffQrCode, InputHandoffRecordRow, InputHandoffSheet, InputHandoffSheet.ios, InputHandoffStepFields, InteractionPanel, MailLinkSpan, MarkdownBlockContent, McpAppCard, McpAppViews, MessageActionSheet, MessageLoadingImage, MessageRenderer, MobileAgentMark, MobileAgentSwitcher, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileMailHtmlPreview, MobileModelPickerList, MobileModelPickerList.ios, MobileOutboxBridge, MobilePermissionPickerList, MobilePermissionPickerList.ios, MobilePrimitives, MobileProviderMark, MobileUserAvatar, MobileVendorIcon, ModalContentArea, ModelOptionsSheetView, ModelOptionsSheetView.ios, ModelPickerNativeHeader, ModelPickerNativeHeader.ios, ModelPickerSheet, ModelSpeedIcon, MountOnFirstOpen, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton, NativeChromeBackButton.ios, NativeChromeButton.ios, NativeErrorNotice.ios, NativeMcpAppSurface, NativePermissionSheet, NativePermissionSheet.ios, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NativeVideoPlayer, NewTaskSelectionRow, NewTaskSelectionSheet, NewTaskSelectionSheet.android, NewTaskSelectionSheet.ios, OrcaWorkerDirectoryPicker, OutsideTap, PaperPlaneIcon, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PlanModeChip, PluginCardActions, PluginCardRecipients, PluginInvocationHeader, PluginMenuUnreadDot, PluginSetupNativeActions, PluginSetupNativeForm, PromptRecommendation, PushNotificationsBridge, QuestionReferenceText, QuietSyncIndicator, QuoteCapsule, ReadableHistoryRecovery, RecentMessageHistories, RemoteAccessGuide, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteHistoryPrefetchBridge, RemoteSourceMark, RemoteTaskSuggestions, RenameSessionModal, ResidentHomeList, RewindPreviewPanel, RichAnswer, RunningTokenRatePopover, SelectionMenuText, SentInlineAtomBody, SessionActionSheet, SessionActionSheetFrame, SessionActionSheetFrame.android, SessionDetailsNative, SessionDetailsNative.ios, SessionEntryRecovery, SessionHeaderNativeControls, SessionHeaderNativeControls.ios, SessionListDrawer, SessionMenuSheet, SessionOptionsExpoSheet, SessionResourceCards, SessionRightSpinner, SessionSearchNative, SessionSearchNative.ios, SessionTailBanner, SessionTransientNotice, SessionUsageSummary, ShareImageNativeButton, ShareImageNativeButton.ios, ShareMessageCheckbox, ShareSelectAllButton, ShareSelectionBar, SharedTaskEndedState, SharedTaskScreen, SheetModal, SheetSurface, SideChatTaskBoundary, SideChatsSheet, SimpleStackHeader, SlowSendNotice, StartupSplashOverlay, SwipeableProjectHeader, SwipeableSessionRow, SwipeableSessionRow.ios, SystemNavigationBack, TaskTags, TaskTagsNative, TaskTagsNative.ios, TaskTagsSheet, ThemeProvider, ThinkingDots, UnifiedModelPickerSheet, UnifiedModelPickerView, UnifiedModelPickerView.ios, VideoSitePreview, VoiceRecordingPill, WorkingStatusText, [sessionId], _layout, composerPullThrough, gestureHandler, listDisclosureTransition, mathWebView, mediaPlayerWebView, mermaidWebView, nativeToolbarMenuItems, peerFileTransport, useComposerPendingImagePreview, useLocale, useSharedTaskConfirmation, voicePillWidthMotion | apps/mobile/app/_layout.tsx, apps/mobile/app/sessions/[sessionId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ChatReplyIcon.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/ErrorNotice.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/FilterReminderDot.tsx, apps/mobile/src/components/MobileAgentMark.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/MobileUserAvatar.tsx, apps/mobile/src/components/MobileVendorIcon.tsx, apps/mobile/src/components/NativeErrorNotice.ios.tsx, apps/mobile/src/components/PaperPlaneIcon.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteAccessGuide.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/inputHandoff/InputHandoffCard.tsx, apps/mobile/src/inputHandoff/InputHandoffDeviceCode.tsx, apps/mobile/src/inputHandoff/InputHandoffPictureStep.tsx, apps/mobile/src/inputHandoff/InputHandoffQrCode.tsx, apps/mobile/src/inputHandoff/InputHandoffRecordRow.tsx, apps/mobile/src/inputHandoff/InputHandoffSheet.ios.tsx, apps/mobile/src/inputHandoff/InputHandoffSheet.tsx, apps/mobile/src/inputHandoff/InputHandoffStepFields.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/ModalContentArea.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/chrome/SystemNavigationBack.tsx, apps/mobile/src/platform/chrome/nativeToolbarMenuItems.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/plugins/MobileMailHtmlPreview.tsx, apps/mobile/src/plugins/PluginCardActions.tsx, apps/mobile/src/plugins/PluginCardRecipients.tsx, apps/mobile/src/plugins/PluginMenuUnreadDot.tsx, apps/mobile/src/plugins/PluginSetupNativeActions.tsx, apps/mobile/src/plugins/PluginSetupNativeForm.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AccountSwitcherSheet.tsx, apps/mobile/src/session/AgentErrorDetails.tsx, apps/mobile/src/session/AnnotationBurnInWebView.tsx, apps/mobile/src/session/AuthorizationMessageCard.tsx, apps/mobile/src/session/AutomationTimerIcon.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/ChatFileChipMenuSheet.tsx, apps/mobile/src/session/ChatIdentityHeader.tsx, apps/mobile/src/session/ChatPathChipSpan.tsx, apps/mobile/src/session/CindyMakeSessionGate.tsx, apps/mobile/src/session/CloudHomeSwitchSheet.tsx, apps/mobile/src/session/CloudHomeUnreachableNotice.tsx, apps/mobile/src/session/CodexResetAutoUseControl.tsx, apps/mobile/src/session/CompanionCardButton.tsx, apps/mobile/src/session/CompanionChoice.tsx, apps/mobile/src/session/CompanionCreateNativeView.ios.tsx, apps/mobile/src/session/CompanionCreateNativeView.tsx, apps/mobile/src/session/CompanionEntering.tsx, apps/mobile/src/session/CompanionFollowUpInvitation.tsx, apps/mobile/src/session/CompanionGlanceSheet.tsx, apps/mobile/src/session/CompanionHeader.tsx, apps/mobile/src/session/CompanionImportSheet.tsx, apps/mobile/src/session/CompanionLearningFooter.tsx, apps/mobile/src/session/CompanionMemoryPage.ios.tsx, apps/mobile/src/session/CompanionMemoryPage.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionModelChain.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionPortraitPicker.tsx, apps/mobile/src/session/CompanionPresenceRing.tsx, apps/mobile/src/session/CompanionProfileArtifacts.tsx, apps/mobile/src/session/CompanionProfileNativeView.ios.tsx, apps/mobile/src/session/CompanionProfileNativeView.tsx, apps/mobile/src/session/CompanionProfileSheet.tsx, apps/mobile/src/session/CompanionSettingsRow.ios.tsx, apps/mobile/src/session/CompanionSettingsRow.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/CompanionTaskResultCard.tsx, apps/mobile/src/session/CompanionWorkingStatus.tsx, apps/mobile/src/session/ComposerActivityPill.tsx, apps/mobile/src/session/ComposerAttachmentTray.tsx, apps/mobile/src/session/ComposerDockKeyboardFollow.tsx, apps/mobile/src/session/ComposerExpandButton.ios.tsx, apps/mobile/src/session/ComposerExpandButton.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.tsx, apps/mobile/src/session/ComposerKeyboardAvoidingView.tsx, apps/mobile/src/session/ComposerMorphSource.ios.tsx, apps/mobile/src/session/ComposerMorphSource.tsx, apps/mobile/src/session/ComposerNativeInput.ios.tsx, apps/mobile/src/session/ComposerNativeInput.tsx, apps/mobile/src/session/ComposerNativeRow.ios.tsx, apps/mobile/src/session/ComposerNativeRow.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerRichInput.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/ContextSheetCollabView.tsx, apps/mobile/src/session/ContextSheetGoalView.ios.tsx, apps/mobile/src/session/ContextSheetGoalView.tsx, apps/mobile/src/session/ContextSheetMediaViews.tsx, apps/mobile/src/session/ContextSheetPlugins.tsx, apps/mobile/src/session/ConversationSearchFilterSheet.tsx, apps/mobile/src/session/ConversationShareSvg.tsx, apps/mobile/src/session/ConversationShareWebView.tsx, apps/mobile/src/session/FailedScheduleNotice.tsx, apps/mobile/src/session/HomeChromeDrawer.tsx, apps/mobile/src/session/HomeChromeFrost.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeGlassMenuPanel.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/HomeListVisuals.tsx, apps/mobile/src/session/HomeModeSwitch.tsx, apps/mobile/src/session/HomeNewTaskButton.tsx, apps/mobile/src/session/HomeProjectMachineLabel.tsx, apps/mobile/src/session/HomeSearchBar.tsx, apps/mobile/src/session/HomeSessionInfoMeta.tsx, apps/mobile/src/session/HomeSurface.tsx, apps/mobile/src/session/HomeUnreadContext.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/InlineQueueSection.tsx, apps/mobile/src/session/InlineQuoteChip.tsx, apps/mobile/src/session/InlineReferenceChip.tsx, apps/mobile/src/session/InteractionPanel.tsx, apps/mobile/src/session/MailLinkSpan.tsx, apps/mobile/src/session/MarkdownBlockContent.tsx, apps/mobile/src/session/McpAppCard.tsx, apps/mobile/src/session/McpAppViews.tsx, apps/mobile/src/session/MessageActionSheet.tsx, apps/mobile/src/session/MessageLoadingImage.tsx, apps/mobile/src/session/MessageRenderer.tsx, apps/mobile/src/session/MobileAgentSwitcher.tsx, apps/mobile/src/session/MobileBoundaryNotice.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileModelPickerList.ios.tsx, apps/mobile/src/session/MobileModelPickerList.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/MobilePermissionPickerList.ios.tsx, apps/mobile/src/session/MobilePermissionPickerList.tsx, apps/mobile/src/session/MobileProviderMark.tsx, apps/mobile/src/session/ModelOptionsSheetView.ios.tsx, apps/mobile/src/session/ModelOptionsSheetView.tsx, apps/mobile/src/session/ModelPickerNativeHeader.ios.tsx, apps/mobile/src/session/ModelPickerNativeHeader.tsx, apps/mobile/src/session/ModelPickerSheet.tsx, apps/mobile/src/session/ModelSpeedIcon.tsx, apps/mobile/src/session/MountOnFirstOpen.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeMcpAppSurface.tsx, apps/mobile/src/session/NativePermissionSheet.ios.tsx, apps/mobile/src/session/NativePermissionSheet.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NativeVideoPlayer.tsx, apps/mobile/src/session/NewTaskSelectionRow.tsx, apps/mobile/src/session/NewTaskSelectionSheet.android.tsx, apps/mobile/src/session/NewTaskSelectionSheet.ios.tsx, apps/mobile/src/session/NewTaskSelectionSheet.tsx, apps/mobile/src/session/OrcaWorkerDirectoryPicker.tsx, apps/mobile/src/session/PendingSendBubble.tsx, apps/mobile/src/session/PlanModeChip.tsx, apps/mobile/src/session/PluginInvocationHeader.tsx, apps/mobile/src/session/PromptRecommendation.tsx, apps/mobile/src/session/QuestionReferenceText.tsx, apps/mobile/src/session/QuoteCapsule.tsx, apps/mobile/src/session/ReadableHistoryRecovery.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/RemoteSourceMark.tsx, apps/mobile/src/session/RemoteTaskSuggestions.tsx, apps/mobile/src/session/RenameSessionModal.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/RewindPreviewPanel.tsx, apps/mobile/src/session/RichAnswer.tsx, apps/mobile/src/session/RunningTokenRatePopover.tsx, apps/mobile/src/session/SelectionMenuText.tsx, apps/mobile/src/session/SentInlineAtomBody.tsx, apps/mobile/src/session/SessionActionSheet.tsx, apps/mobile/src/session/SessionActionSheetFrame.android.tsx, apps/mobile/src/session/SessionActionSheetFrame.tsx, apps/mobile/src/session/SessionDetailsNative.ios.tsx, apps/mobile/src/session/SessionDetailsNative.tsx, apps/mobile/src/session/SessionEntryRecovery.tsx, apps/mobile/src/session/SessionHeaderNativeControls.ios.tsx, apps/mobile/src/session/SessionHeaderNativeControls.tsx, apps/mobile/src/session/SessionListDrawer.tsx, apps/mobile/src/session/SessionMenuSheet.tsx, apps/mobile/src/session/SessionOptionsExpoSheet.tsx, apps/mobile/src/session/SessionResourceCards.tsx, apps/mobile/src/session/SessionRightSpinner.tsx, apps/mobile/src/session/SessionSearchNative.ios.tsx, apps/mobile/src/session/SessionSearchNative.tsx, apps/mobile/src/session/SessionTailBanner.tsx, apps/mobile/src/session/SessionTransientNotice.tsx, apps/mobile/src/session/SessionUsageSummary.tsx, apps/mobile/src/session/ShareImageNativeButton.ios.tsx, apps/mobile/src/session/ShareImageNativeButton.tsx, apps/mobile/src/session/ShareMessageCheckbox.tsx, apps/mobile/src/session/ShareSelectAllButton.tsx, apps/mobile/src/session/ShareSelectionBar.tsx, apps/mobile/src/session/SharedTaskEndedState.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/SideChatTaskBoundary.tsx, apps/mobile/src/session/SideChatsSheet.tsx, apps/mobile/src/session/SlowSendNotice.tsx, apps/mobile/src/session/SwipeableProjectHeader.tsx, apps/mobile/src/session/SwipeableSessionRow.ios.tsx, apps/mobile/src/session/SwipeableSessionRow.tsx, apps/mobile/src/session/TaskTags.tsx, apps/mobile/src/session/TaskTagsNative.ios.tsx, apps/mobile/src/session/TaskTagsNative.tsx, apps/mobile/src/session/TaskTagsSheet.tsx, apps/mobile/src/session/ThinkingDots.tsx, apps/mobile/src/session/UnifiedModelPickerSheet.tsx, apps/mobile/src/session/UnifiedModelPickerView.ios.tsx, apps/mobile/src/session/UnifiedModelPickerView.tsx, apps/mobile/src/session/VideoSitePreview.tsx, apps/mobile/src/session/VoiceRecordingPill.tsx, apps/mobile/src/session/WorkingStatusText.tsx, apps/mobile/src/session/composerPullThrough.tsx, apps/mobile/src/session/composerRichInputHtml.ts, apps/mobile/src/session/conversationShareWebViewHtml.ts, apps/mobile/src/session/listDisclosureTransition.tsx, apps/mobile/src/session/mathWebView.tsx, apps/mobile/src/session/mathWebViewHtml.ts, apps/mobile/src/session/mediaPlayerWebView.tsx, apps/mobile/src/session/mediaPlayerWebViewHtml.ts, apps/mobile/src/session/mermaidWebView.tsx, apps/mobile/src/session/mermaidWebViewHtml.ts, apps/mobile/src/session/selectableMarkdownHtml.ts, apps/mobile/src/session/useComposerPendingImagePreview.tsx, apps/mobile/src/session/useSharedTaskConfirmation.tsx, apps/mobile/src/session/voicePillWidthMotion.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 7 | 252 | 340 || `mobile.chat.sharing` | mobile | 共享任务邀请与成员;供应商分享链接提示 | app/shared-session.tsx / app/provider-share.tsx | AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ConnectionBanner, ConnectionNoticeOverlay, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, IncomingShareBridge, McpAppViews, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativeMcpAppSurface, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteHistoryPrefetchBridge, ResidentHomeList, SharedTaskAdmissionDialog, SharedTaskEndedState, SharedTaskScreen, SheetModal, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, _layout, gestureHandler, peerFileTransport, provider-share, shared-session, useLocale, useSharedTaskConfirmation | apps/mobile/app/_layout.tsx, apps/mobile/app/provider-share.tsx, apps/mobile/app/shared-session.tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/McpAppViews.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeMcpAppSurface.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SharedTaskAdmissionDialog.tsx, apps/mobile/src/session/SharedTaskEndedState.tsx, apps/mobile/src/session/SharedTaskScreen.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/useSharedTaskConfirmation.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 214 | 68 || `mobile.companions.cloud` | mobile | 云端伙伴:主力电脑离线时的对话与换电脑 | app/companions/cloud/[actorId].tsx | AdaptiveWindow, AgentErrorDetails, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, AuthorizationMessageCard, BlurBackdrop, BotGroupAvatars, BotGroupMessageText, CenteredScreen, ChatIdentityHeader, ChatPathChipSpan, ChatReplyIcon, CloudCompanionScreen, CompanionCardButton, CompanionEntering, CompanionLearningFooter, CompanionMessageActions, CompanionMessageCard, CompanionNativeContent.ios, CompanionPresenceRing, CompanionSettingsRow, CompanionSettingsRow.ios, CompanionSheet, CompanionSheet.ios, CompanionTaskResultCard, ComposerFrame, ComposerFrame.ios, ComposerNativeSection, ComposerNativeSection.ios, ComposerSheet, ComposerSheet.ios, ConnectionBanner, ConnectionNoticeOverlay, ContextSheet, ContextSheet.ios, DeviceLinkContext, ErrorNotice, FileTypeIcon, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, HomeStackHeader, ImageLightbox, IncomingShareBridge, InlineQuoteChip, InlineReferenceChip, InputHandoffCard, InputHandoffDeviceCode, InputHandoffPictureStep, InputHandoffQrCode, InputHandoffRecordRow, InputHandoffSheet, InputHandoffSheet.ios, InputHandoffStepFields, InteractionPanel, MailLinkSpan, MarkdownBlockContent, McpAppCard, McpAppViews, MessageActionSheet, MessageLoadingImage, MessageRenderer, MobileBoundaryNotice, MobileComposerInputRow, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileMailHtmlPreview, MobileOutboxBridge, MobilePrimitives, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton, NativeChromeBackButton.ios, NativeChromeButton.ios, NativeErrorNotice.ios, NativeMcpAppSurface, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, NativeVideoPlayer, OutsideTap, PendingSendBubble, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PluginCardActions, PluginCardRecipients, PluginInvocationHeader, PluginSetupNativeActions, PluginSetupNativeForm, PushNotificationsBridge, QuestionReferenceText, QuietSyncIndicator, QuoteCapsule, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteHistoryPrefetchBridge, ResidentHomeList, RichAnswer, SelectionMenuText, SentInlineAtomBody, ShareMessageCheckbox, SheetModal, SheetSurface, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, VideoSitePreview, [actorId], _layout, gestureHandler, mathWebView, mediaPlayerWebView, mermaidWebView, nativeToolbarMenuItems, peerFileTransport, useLocale, voicePillWidthMotion | apps/mobile/app/_layout.tsx, apps/mobile/app/companions/cloud/[actorId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ChatReplyIcon.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/ErrorNotice.tsx, apps/mobile/src/components/FileTypeIcon.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/NativeErrorNotice.ios.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/inputHandoff/InputHandoffCard.tsx, apps/mobile/src/inputHandoff/InputHandoffDeviceCode.tsx, apps/mobile/src/inputHandoff/InputHandoffPictureStep.tsx, apps/mobile/src/inputHandoff/InputHandoffQrCode.tsx, apps/mobile/src/inputHandoff/InputHandoffRecordRow.tsx, apps/mobile/src/inputHandoff/InputHandoffSheet.ios.tsx, apps/mobile/src/inputHandoff/InputHandoffSheet.tsx, apps/mobile/src/inputHandoff/InputHandoffStepFields.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/chrome/nativeToolbarMenuItems.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/plugins/MobileMailHtmlPreview.tsx, apps/mobile/src/plugins/PluginCardActions.tsx, apps/mobile/src/plugins/PluginCardRecipients.tsx, apps/mobile/src/plugins/PluginSetupNativeActions.tsx, apps/mobile/src/plugins/PluginSetupNativeForm.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/AgentErrorDetails.tsx, apps/mobile/src/session/AuthorizationMessageCard.tsx, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/BotGroupAvatars.tsx, apps/mobile/src/session/BotGroupMessageText.tsx, apps/mobile/src/session/ChatIdentityHeader.tsx, apps/mobile/src/session/ChatPathChipSpan.tsx, apps/mobile/src/session/CloudCompanionScreen.tsx, apps/mobile/src/session/CompanionCardButton.tsx, apps/mobile/src/session/CompanionEntering.tsx, apps/mobile/src/session/CompanionLearningFooter.tsx, apps/mobile/src/session/CompanionMessageActions.tsx, apps/mobile/src/session/CompanionMessageCard.tsx, apps/mobile/src/session/CompanionNativeContent.ios.tsx, apps/mobile/src/session/CompanionPresenceRing.tsx, apps/mobile/src/session/CompanionSettingsRow.ios.tsx, apps/mobile/src/session/CompanionSettingsRow.tsx, apps/mobile/src/session/CompanionSheet.ios.tsx, apps/mobile/src/session/CompanionSheet.tsx, apps/mobile/src/session/CompanionTaskResultCard.tsx, apps/mobile/src/session/ComposerFrame.ios.tsx, apps/mobile/src/session/ComposerFrame.tsx, apps/mobile/src/session/ComposerNativeSection.ios.tsx, apps/mobile/src/session/ComposerNativeSection.tsx, apps/mobile/src/session/ComposerSheet.ios.tsx, apps/mobile/src/session/ComposerSheet.tsx, apps/mobile/src/session/ContextSheet.ios.tsx, apps/mobile/src/session/ContextSheet.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/ImageLightbox.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/InlineQuoteChip.tsx, apps/mobile/src/session/InlineReferenceChip.tsx, apps/mobile/src/session/InteractionPanel.tsx, apps/mobile/src/session/MailLinkSpan.tsx, apps/mobile/src/session/MarkdownBlockContent.tsx, apps/mobile/src/session/McpAppCard.tsx, apps/mobile/src/session/McpAppViews.tsx, apps/mobile/src/session/MessageActionSheet.tsx, apps/mobile/src/session/MessageLoadingImage.tsx, apps/mobile/src/session/MessageRenderer.tsx, apps/mobile/src/session/MobileBoundaryNotice.tsx, apps/mobile/src/session/MobileComposerInputRow.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeMcpAppSurface.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/NativeVideoPlayer.tsx, apps/mobile/src/session/PendingSendBubble.tsx, apps/mobile/src/session/PluginInvocationHeader.tsx, apps/mobile/src/session/QuestionReferenceText.tsx, apps/mobile/src/session/QuoteCapsule.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/RichAnswer.tsx, apps/mobile/src/session/SelectionMenuText.tsx, apps/mobile/src/session/SentInlineAtomBody.tsx, apps/mobile/src/session/ShareMessageCheckbox.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/session/SheetSurface.tsx, apps/mobile/src/session/VideoSitePreview.tsx, apps/mobile/src/session/mathWebView.tsx, apps/mobile/src/session/mathWebViewHtml.ts, apps/mobile/src/session/mediaPlayerWebView.tsx, apps/mobile/src/session/mediaPlayerWebViewHtml.ts, apps/mobile/src/session/mermaidWebView.tsx, apps/mobile/src/session/mermaidWebViewHtml.ts, apps/mobile/src/session/voicePillWidthMotion.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 251 | 196 || `mobile.companions.direct` | mobile | 伙伴私聊回看 | app/companions/direct/[threadId].tsx | AdaptiveWindow, AnchoredPullDownMenu, AnchoredPullDownMenu.android, AndroidUpdateSheet, AppText, AuthContext, BlurBackdrop, CenteredScreen, ConnectionBanner, ConnectionNoticeOverlay, DeviceLinkContext, FoldTouchpad, HomeEntryProvider, HomeHeaderGlassButton, HomeHeaderGlassButton.ios, HomeNativeStackHeader, HomeStackHeader, IncomingShareBridge, McpAppViews, MobileLoginHandoffContext, MobileLoginHandoffStage, MobileOutboxBridge, MobilePrimitives, NativeBottomSheet, NativeBottomSheet.android, NativeChromeBackButton.ios, NativeChromeButton.ios, NativeMcpAppSurface, NativePullDownMenu, NativeRemoteDesktopView, NativeResidentHistory, NativeSwitch, OutsideTap, PermissionGuide, PermissionGuideView, PermissionGuideView.ios, PushNotificationsBridge, QuietSyncIndicator, RecentMessageHistories, RemoteCompanionAvatar, RemoteDesktopActionButton, RemoteDesktopActionButton.ios, RemoteDesktopBackButton, RemoteDesktopBackButton.ios, RemoteDesktopChrome, RemoteDesktopChrome.ios, RemoteDesktopClipboardButton, RemoteDesktopControls, RemoteDesktopDisplaySettings, RemoteDesktopHost, RemoteDesktopIcons, RemoteDesktopMouseControls, RemoteDesktopMouseControls.ios, RemoteDesktopNetworkStatus, RemoteDesktopPanelButton, RemoteDesktopPanelButton.ios, RemoteDesktopScreen, RemoteDesktopSecuritySettings, RemoteDesktopWindows, RemoteHistoryPrefetchBridge, ResidentHomeList, SheetModal, SimpleStackHeader, StartupSplashOverlay, ThemeProvider, [threadId], _layout, gestureHandler, nativeToolbarMenuItems, peerFileTransport, useLocale | apps/mobile/app/_layout.tsx, apps/mobile/app/companions/direct/[threadId].tsx, apps/mobile/src/auth/AuthContext.tsx, apps/mobile/src/auth/MobileLoginHandoffContext.tsx, apps/mobile/src/components/AppText.tsx, apps/mobile/src/components/CenteredScreen.tsx, apps/mobile/src/components/ConnectionBanner.tsx, apps/mobile/src/components/ConnectionNoticeOverlay.tsx, apps/mobile/src/components/MobileLoginHandoffStage.tsx, apps/mobile/src/components/MobilePrimitives.tsx, apps/mobile/src/components/QuietSyncIndicator.tsx, apps/mobile/src/components/RemoteCompanionAvatar.tsx, apps/mobile/src/components/StartupSplashOverlay.tsx, apps/mobile/src/device-link/DeviceLinkContext.tsx, apps/mobile/src/device-link/peerFileTransport.tsx, apps/mobile/src/i18n/useLocale.tsx, apps/mobile/src/notifications/PushNotificationsBridge.tsx, apps/mobile/src/platform/AdaptiveWindow.tsx, apps/mobile/src/platform/OutsideTap.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.android.tsx, apps/mobile/src/platform/chrome/AnchoredPullDownMenu.tsx, apps/mobile/src/platform/chrome/HomeNativeStackHeader.tsx, apps/mobile/src/platform/chrome/HomeStackHeader.tsx, apps/mobile/src/platform/chrome/NativeChromeBackButton.ios.tsx, apps/mobile/src/platform/chrome/NativeChromeButton.ios.tsx, apps/mobile/src/platform/chrome/NativePullDownMenu.tsx, apps/mobile/src/platform/chrome/NativeSwitch.tsx, apps/mobile/src/platform/chrome/SimpleStackHeader.tsx, apps/mobile/src/platform/chrome/nativeToolbarMenuItems.tsx, apps/mobile/src/platform/gestureHandler.tsx, apps/mobile/src/remote-desktop/FoldTouchpad.tsx, apps/mobile/src/remote-desktop/NativeRemoteDesktopView.tsx, apps/mobile/src/remote-desktop/PermissionGuide.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.ios.tsx, apps/mobile/src/remote-desktop/PermissionGuideView.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopActionButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopBackButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopChrome.tsx, apps/mobile/src/remote-desktop/RemoteDesktopClipboardButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopHost.tsx, apps/mobile/src/remote-desktop/RemoteDesktopIcons.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopMouseControls.tsx, apps/mobile/src/remote-desktop/RemoteDesktopNetworkStatus.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.ios.tsx, apps/mobile/src/remote-desktop/RemoteDesktopPanelButton.tsx, apps/mobile/src/remote-desktop/RemoteDesktopScreen.tsx, apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx, apps/mobile/src/remote-desktop/RemoteDesktopWindows.tsx, apps/mobile/src/remote-desktop/viewerHtml.ts, apps/mobile/src/session/BlurBackdrop.tsx, apps/mobile/src/session/HomeEntryProvider.tsx, apps/mobile/src/session/HomeHeaderGlassButton.ios.tsx, apps/mobile/src/session/HomeHeaderGlassButton.tsx, apps/mobile/src/session/IncomingShareBridge.tsx, apps/mobile/src/session/McpAppViews.tsx, apps/mobile/src/session/MobileOutboxBridge.tsx, apps/mobile/src/session/NativeBottomSheet.android.tsx, apps/mobile/src/session/NativeBottomSheet.tsx, apps/mobile/src/session/NativeMcpAppSurface.tsx, apps/mobile/src/session/NativeResidentHistory.tsx, apps/mobile/src/session/RecentMessageHistories.tsx, apps/mobile/src/session/RemoteHistoryPrefetchBridge.tsx, apps/mobile/src/session/ResidentHomeList.tsx, apps/mobile/src/session/SheetModal.tsx, apps/mobile/src/theme/ThemeProvider.tsx, apps/mobile/src/theme/navigationTheme.ts, apps/mobile/src/theme/tokens.ts, apps/mobile/src/update/AndroidUpdateSheet.tsx | 0 | 214 | 57 |diff --git a/docs/product-rules/cindy-bots-runtime.md b/docs/product-rules/cindy-bots-runtime.mdindex 71f2bc8a72..05e26779c2 100644--- a/docs/product-rules/cindy-bots-runtime.md+++ b/docs/product-rules/cindy-bots-runtime.md@@ -265,7 +265,7 @@ provider 的 `final_answer` 从首段正文起可见,历史视图接管、后普通设置不显示“永久 Session”“手动压缩”“自动换 Session”或运行时 fallback 开关。健康、归档和故障信息可以在需要时呈现,但维护动作默认由系统完成。用户只管理伙伴,不管理容器。-伙伴设置采用紧凑的分组列表,右侧抽屉最大宽度 448px,窄于该宽度的可视区域内占满可用宽度;此尺寸只用于伙伴设置,不改变全局设置。头像居中且可更换。伙伴聊天头部保留姓名/头像、近况(6.3.4)与设置入口;伙伴在哪台电脑上运行与切换电脑都收进近况,头部不再单列电脑名或切换器;支持独立 Todo 的手机宿主可提供待办入口,例行任务不设独立图标;例行任务从伙伴设置内管理。资料、性格、记忆、模型、能力、自动化任务、历史检索和高级配置在同一抽屉内打开完整内页;返回与关闭前先保存资料,保存失败留在原页。自动化任务复用既有编辑与执行接口,未保存的任务草稿离开前允许继续编辑。模型复用统一选择器,保留来源、Harness、思考深度、Fast 与备用链,不另造默认模型规则。+伙伴设置采用紧凑的分组列表,右侧抽屉最大宽度 448px,窄于该宽度的可视区域内占满可用宽度;此尺寸只用于伙伴设置,不改变全局设置。头像居中且可更换。伙伴聊天头部保留姓名/头像、近况(6.3.4)与设置入口;伙伴在哪台电脑上运行与切换电脑都收进近况,头部不再单列电脑名或切换器;待办也只在近况里,手机顶栏不再有单独的待办按钮,例行任务不设独立图标;例行任务从伙伴设置内管理。资料、性格、记忆、模型、能力、自动化任务、历史检索和高级配置在同一抽屉内打开完整内页;返回与关闭前先保存资料,保存失败留在原页。自动化任务复用既有编辑与执行接口,未保存的任务草稿离开前允许继续编辑。模型复用统一选择器,保留来源、Harness、思考深度、Fast 与备用链,不另造默认模型规则。手机端不提供例行任务管理:伙伴资料页不显示自动化任务入口,「所有任务」下拉菜单不展示 `routines`,旧的独立自动化管理页也已移除。上述例行任务编辑与草稿规则仅适用于桌面端;手机仍保留任务运行历史。实现见 Mobile `CompanionHeader.tsx`、`CompanionProfileSheet.tsx` 与 `remoteResources.ts`。不提供新的「暂停伙伴」操作;已有暂停状态仍保留恢复入口。设置页与伙伴列表复用同一删除确认,保留任务历史和独立工作树;确认文案必须说明伙伴自身资料、记忆与工作区会被删除。@@ -814,6 +814,12 @@ Session 任务遵守同一套机制与呈现契约:`todos:<botId>` 远程资源读写,与手机同一路径。- **输出内容**:伙伴开的任务做完时留下的成品文件(委派回执里未删除、属于成品类型的文件),最近在前,先列 3 条;点开本机文件,别的电脑上的打开来源任务。+- **手机**(2026-10-22):点伙伴聊天顶栏的头像(身份区)打开同内容的近况,设置按钮仍进伙伴资料。iOS 用系统 sheet 与+ 原生分组(中等高度起、可上拉、下拉关闭),Android 用现有面板。电脑:Cindy 的其它副本取自手机已读到的伙伴列表,+ 云端伙伴用「换一台电脑继续」进入原有的更换主力电脑流程;待办长按弹系统确认「删除」,删除后该块顶部出现「撤销」+ 一行直到关闭;输出内容一律打开来源任务。到期红点在顶栏头像右上,看过的到期项按账号、电脑与伙伴记在手机本地。+ 「成品类型」判断与桌面共用 `@cindy/maker-shared/bot-deliverable`。实现见 Mobile `CompanionGlanceSheet.tsx`、+ `useCompanionGlanceTodos.ts`。- 右侧栏历史里遗留的 `bot-workbench` 页签在打开时静默关闭;设置里的待办列表一并移除,待办只在近况里看、在对话里改。#### 6.3.5 伙伴工具与逐任务责任@@ -884,7 +890,7 @@ Todo 是伙伴维护的事务清单:既包含用户交办,也允许从已授`list_teammate_todos`、`update_teammate_todo` 是与任务调用并列的伙伴公共能力,调用者由本机在用伙伴主任务反查。更新是部分合并,旧来源/引用默认保留;已有记录必须带修订号,冲突重新读取。完成必须记录依据,重开保留历史。到期支持日期/确切时刻及来源时区,模糊日期先待确认,用户覆盖/清除不被新来源替换;来源版本仅在相同 sourceId 内比较,双方缺失 ID 时按同一旧版来源处理。到期优先按确切时刻排序,仅日期按来源时区当天结束参与排序,不保存虚构时刻;同一排序时刻沿创建时间/id稳定排序。稍后只暂缓呈现,不延长真实期限。已打开的列表按最近暂缓期限安排一次只读刷新,回到前台时复核;远程分页返回全清单的最近期限,不受当前页截断。Todo 本身不另起提醒定时器:后台跟进由 6.3.1 的内置「跟进」例行任务承担,伙伴被叫醒时更新对应待办。删除/不再提示保留同一问题的抑制记录,跨来源去重也遵守它,恢复不影响整个项目或来源。-桌面的 Todo 只在伙伴近况(6.3.4)里展示;手机版伙伴 Todo 入口与桌面共享同一宿主记录。远程通过已有受信 device-link resource get/invoke 路径和账号/可见伙伴边界,不新增广域 IPC 权限。读取与写入回执只返回可展示的投影,不发送宿主目录、去重键、旧记录内部标识或模型执行指令;来源与关联在手机显示可读名称,来源引用保留 HTTPS 链接。旧客户端有只读文本回退;新客户端专用组件按25条翻页并展示总数,搜索在完整记录中进行。+Todo 在桌面与手机都只在伙伴近况(6.3.4)里展示,两端共享同一宿主记录。远程通过已有受信 device-link resource get/invoke 路径和账号/可见伙伴边界,不新增广域 IPC 权限。读取与写入回执只返回可展示的投影,不发送宿主目录、去重键、旧记录内部标识或模型执行指令;来源与关联在手机显示可读名称,来源引用保留 HTTPS 链接。旧客户端有只读文本回退;宿主单页最多 25 条,近况按页读完(每类最多 200 条)。具体动作通过既有伙伴输入路径推进,接收/排队与真实开始/完成各自独立;入队成功只显示已收到,既有输入协调器确认实际派发或插话后才显示已接受。未派发的排队项被移除、Stop 或清空时,同条 Todo 记录失败并可重试;重复请求不重复投递,未知回执不能盲重试。重启或切回账号后,生命周期回执按当前账号的伙伴主任务与磁盘 requestId 重建关联;读取清单时核对既有持久队列和消息记录,仍排队/在途则等待,取消墓碑确认未执行则可重试,只有已落库文字而无派发证据则待核实。内存 prepare/enqueue 在途不被当作孤立回执,队列读取失败不推断取消。手机断连解除本地忙态与关闭保护,重连只重新读取、不重发操作,旧连接迟到结果不干扰新请求。邮件等来源正文不自动授予外发或费用授权,原授权流程仍适用。diff --git a/packages/maker-shared/package.json b/packages/maker-shared/package.jsonindex ffef077898..02cd994859 100644--- a/packages/maker-shared/package.json+++ b/packages/maker-shared/package.json@@ -102,6 +102,7 @@"./botGroupMentions": "./src/botGroupMentions.ts","./botGroupPresentation": "./src/botGroupPresentation.ts","./botDelegation": "./src/botDelegation.ts",+ "./bot-deliverable": "./src/botDeliverable.ts","./botTimeline": "./src/botTimeline.ts","./remote-desktop-viewer": "./src/remote-desktop/viewerRuntime.js","./remote-desktop-mobile": "./src/remote-desktop/mobileHtml.ts",diff --git a/packages/maker-shared/src/botDeliverable.ts b/packages/maker-shared/src/botDeliverable.tsnew file mode 100644index 0000000000..5c4efcb19b--- /dev/null+++ b/packages/maker-shared/src/botDeliverable.ts@@ -0,0 +1,117 @@+/**+ * 伙伴做完的任务里,哪些文件算「成品」:办公文件、媒体、有名字的网页等用户可直接使用的格式。+ * 桌面的生成文件卡与近况、手机近况共用这一份判断。+ */+export interface BotDeliverableFile {+ path: string;+ /** 展示名;缺省取路径最后一段。 */+ name?: string;+ /** 宿主给出了结构化成品清单时直接算成品。 */+ artifact?: unknown;+}++const PRIMARY_EXTENSIONS = new Set([+ // 本地媒体协议支持直接预览的视觉成果。+ 'avif',+ 'bmp',+ 'gif',+ 'heic',+ 'heif',+ 'ico',+ 'jpeg',+ 'jpg',+ 'png',+ 'svg',+ 'tif',+ 'tiff',+ 'webp',+ // 办公与媒体成果。即使不能在卡内渲染,它们仍是用户可直接使用的文件。+ 'csv',+ 'doc',+ 'docx',+ 'epub',+ 'glb',+ 'gltf',+ 'key',+ 'm4a',+ 'mov',+ 'mp3',+ 'mp4',+ 'numbers',+ 'ods',+ 'odp',+ 'odt',+ 'pages',+ 'pdf',+ 'ppt',+ 'pptx',+ 'rtf',+ 'stl',+ 'tsv',+ 'wav',+ 'webm',+ 'xls',+ 'xlsx',+ 'zip',+]);++const HTML_EXTENSIONS = new Set(['htm', 'html', 'xhtml']);+const GENERIC_HTML_NAMES = new Set(['index.htm', 'index.html', 'index.xhtml', 'preview.html']);++const SUPPORTING_DIRECTORY_NAMES = new Set([+ '.preview',+ '.previews',+ '.tmp',+ '_preview',+ '_previews',+ 'preview',+ 'previews',+ 'temp',+ 'tmp',+]);++function normalizedPathSegments(filePath: string): string[] {+ return filePath+ .replace(/\\/g, '/')+ .split('/')+ .filter(Boolean)+ .map((segment) => segment.toLowerCase());+}++export function deliverableFileExtension(file: BotDeliverableFile): string {+ const name = file.name || normalizedPathSegments(file.path).at(-1) || '';+ const match = /\.([^.]+)$/.exec(name);+ return match?.[1]?.toLowerCase() ?? '';+}++/**+ * 伙伴工作目录里的预览截图与临时文件仍然可取,但不能和真正成果并列。+ * 这里只收敛有明确产品语义的辅助目录,不用文件名猜测用户意图。+ */+export function isBotSupportingFile(file: BotDeliverableFile, workingDir?: string): boolean {+ const segments = normalizedPathSegments(file.path);+ const root = workingDir ? normalizedPathSegments(workingDir) : [];+ const isWithinRoot = root.length > 0 && root.every((part, index) => segments[index] === part);+ // A workspace itself may be under the OS temp directory. Only its descendants+ // describe supporting material; an explicit document artifact also wins below.+ const relative = isWithinRoot ? segments.slice(root.length) : segments;+ return relative.slice(0, -1).some((segment) =>+ SUPPORTING_DIRECTORY_NAMES.has(segment),+ );+}++/**+ * 没有结构化 artifact manifest 时的保守兜底:只把办公文件、媒体、网页等+ * 用户可直接消费的格式提到首层;CSS / JS / JSON / 源码等留在「相关文件」。+ */+export function isBotDeliverableFile(file: BotDeliverableFile, workingDir?: string): boolean {+ if (file.artifact) return true;+ if (isBotSupportingFile(file, workingDir)) return false;+ const extension = deliverableFileExtension(file);+ if (HTML_EXTENSIONS.has(extension)) {+ // 「index.html」常常只是把多份方案拼起来的内部预览页。真正的网页+ // 成品应该有能表达内容的名字,才会进入首层。+ return !GENERIC_HTML_NAMES.has((file.name || normalizedPathSegments(file.path).at(-1) || '').toLowerCase());+ }+ return PRIMARY_EXTENSIONS.has(extension);+}diff --git a/packages/maker-shared/src/teammateTodo.ts b/packages/maker-shared/src/teammateTodo.tsindex a30decf759..8eafaf9796 100644--- a/packages/maker-shared/src/teammateTodo.ts+++ b/packages/maker-shared/src/teammateTodo.ts@@ -160,6 +160,11 @@ export function todoLocalDate(now: Date, zone: string): string {export function effectiveTodoDeadline(t: TeammateTodo): TodoDeadline | null {return t.deadlineOverride ? t.deadlineOverride.value : t.sourceDeadline;}+/** One due occurrence of a todo: moving its deadline makes it a new one, so the "due" dot lights again. */+export function todoDueKey(t: TeammateTodo): string {+ const deadline = effectiveTodoDeadline(t);+ return `${t.id}@${deadline?.kind === 'instant' ? deadline.at : deadline?.date ?? ''}`;+}/** Date-only items sort at the end of their source-local day, without inventing a stored time. */export function createTodoDueComparator() {const values = new Map<string, number>();