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(desktop): composerSendSnapshot fixture 跟上附件与浏览器评论类型演进

Dashfc40fe15c379
diff --git a/apps/desktop/src/renderer/components/new-chat/__tests__/composerSendSnapshot.test.ts b/apps/desktop/src/renderer/components/new-chat/__tests__/composerSendSnapshot.test.ts
index b0757d51ac..74c941d9e1 100644
--- a/apps/desktop/src/renderer/components/new-chat/__tests__/composerSendSnapshot.test.ts
+++ b/apps/desktop/src/renderer/components/new-chat/__tests__/composerSendSnapshot.test.ts
@@ -12,13 +12,31 @@ const attachment = {
path: '/tmp/one.txt',
ext: 'txt',
size: 3,
- category: 'document' as const,
+ category: 'text' as const,
+ mimeType: 'text/plain',
};
const comment = {
id: 'comment-1',
markerNumber: 1,
+ pageUrl: 'https://example.com/page',
+ target: {
+ kind: 'element' as const,
+ point: { x: 10, y: 10 },
+ viewport: { width: 1280, height: 800 },
+ region: null,
+ selectedText: null,
+ immediate: false,
+ targetTag: 'div',
+ targetLabel: null,
+ targetRole: null,
+ targetSelector: '#one',
+ targetPath: null,
+ nearbyText: null,
+ themeVariant: null,
+ designBaseline: null,
+ markerNumber: 1,
+ },
comment: 'keep this',
- selector: { type: 'element' as const, value: '#one' },
screenshot: attachment,
};