Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(orca): Orca 图片标记 desktop-host, 修复无视觉 worker 收图失败
Zhang Yunjin975c81c1b812
diff --git a/apps/desktop/src/main/maker-ipc/__tests__/orcaInterAgentDispatcher.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/orcaInterAgentDispatcher.test.tsindex 5dddb2f46b..2759c0ad3c 100644--- a/apps/desktop/src/main/maker-ipc/__tests__/orcaInterAgentDispatcher.test.ts+++ b/apps/desktop/src/main/maker-ipc/__tests__/orcaInterAgentDispatcher.test.ts@@ -337,8 +337,8 @@ describe('Orca lead/worker dispatcher', () => {type: 'user',content: [{ type: 'text', text: expect.stringContaining('Check this screenshot') },- { type: 'image', path: 'C:/tmp/a.png', mimeType: 'image/png' },- { type: 'image', path: 'C:/tmp/b.png', mimeType: 'image/png' },+ { type: 'image', path: 'C:/tmp/a.png', mimeType: 'image/png', pathOrigin: 'desktop-host' },+ { type: 'image', path: 'C:/tmp/b.png', mimeType: 'image/png', pathOrigin: 'desktop-host' },],});@@ -356,7 +356,7 @@ describe('Orca lead/worker dispatcher', () => {});const item = firstQueuedItem(queued.queuedItems);expect(item.files).toEqual([expect.objectContaining({- path: 'C:/tmp/a.png', category: 'image', mimeType: 'image/png',+ path: 'C:/tmp/a.png', category: 'image', mimeType: 'image/png', pathOrigin: 'desktop-host',})]);});diff --git a/apps/desktop/src/main/maker-ipc/orcaInterAgentDispatcher.ts b/apps/desktop/src/main/maker-ipc/orcaInterAgentDispatcher.tsindex a29784f663..6ca05eb1d9 100644--- a/apps/desktop/src/main/maker-ipc/orcaInterAgentDispatcher.ts+++ b/apps/desktop/src/main/maker-ipc/orcaInterAgentDispatcher.ts@@ -426,6 +426,10 @@ export function createOrcaInterAgentDispatcher<TSessionMeta>(size: image.size,category: 'image',mimeType: image.mimeType,+ // 图片只可能来自本机(SSH 远端在入口已拒):标记 desktop-host,+ // 视觉桥才会桥接无视觉模型的 worker,否则原始 block 进 Pi 会抛+ // PiImageInputUnsupportedError 整条任务失败。+ pathOrigin: 'desktop-host',}));}// 直发时 image block 跟在格式化文本后;排队/插话时文件挂在 entry.files,@@ -437,7 +441,12 @@ export function createOrcaInterAgentDispatcher<TSessionMeta>(type: 'user',content: [{ type: 'text', text },- ...imageFiles.map((file) => ({ type: 'image' as const, path: file.path, mimeType: file.mimeType })),+ ...imageFiles.map((file) => ({+ type: 'image' as const,+ path: file.path,+ mimeType: file.mimeType,+ pathOrigin: 'desktop-host' as const,+ })),],};};