Skip to content

armgit / cindy

Public Imported from GitHub
0

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

test(mobile): inject share ordering into goal send harness

Chrisfebddedc5e76
diff --git a/apps/mobile/src/__tests__/mobileGoalCommands.test.ts b/apps/mobile/src/__tests__/mobileGoalCommands.test.ts
index 6de5fc02c5..a2e1ecefc0 100644
--- a/apps/mobile/src/__tests__/mobileGoalCommands.test.ts
+++ b/apps/mobile/src/__tests__/mobileGoalCommands.test.ts
@@ -5,6 +5,7 @@ import { describe, expect, it, vi } from 'vitest';
import { parseGoalCommand } from '@cindy/maker-shared/goal-command';
import { executeMobileGoalCommand, parseMobileDesktopCommand } from '@/session/desktopSlashCommands';
import { humanizeRemoteError } from '@/device-link/remoteStatus';
+import { incomingShareSlotOrder } from '@/session/mobileLocalAttachmentUpload';
import { composerDocumentProjectedText, emptyComposerDocument, normalizeComposerDocument, reconcileComposerProjectedText, serializeComposerDocument, textComposerDocument } from '@/session/composerDocument';
// Execute the actual page callbacks, excluding unrelated native/network UI.
@@ -98,7 +99,7 @@ function existingHarness(args = 'target') {
dismissPromptRecommendation: noop, hydrateComposerMessageReferenceBodies: async (doc: unknown) => doc,
resolvePastedSessionLinkLabel: noop, requestMessageListFollowLatest: noop, hasPastePlaceholders: () => false,
beginOutboxAttachmentHandoff: async () => ({ prepare: async () => [], release: noop }),
- attachmentPreviews: {}, buildOutboxItem: (input: unknown) => input, createOutboxClientId: () => 'ordinary-message',
+ attachmentPreviews: {}, incomingShareSlotOrder, buildOutboxItem: (input: unknown) => input, createOutboxClientId: () => 'ordinary-message',
mobileDurableOutbox: { add: vi.fn(async (_record: unknown) => {}) }, rememberSentAttachmentPreviews: noop,
releaseUploadedSources: noop, setMediaAssetAttachments: noop, setAttachmentPreviews: noop,
composerAnnotationsRef: { current: null }, setAttachments: noop, setAttachmentError: noop,