Skip to content

fix(desktop): classify attachments by real file type#3474

Merged
esengine merged 1 commit into
esengine:main-v2from
iysun:fix/desktop-attachment-misclassified-as-image
Jun 8, 2026
Merged

fix(desktop): classify attachments by real file type#3474
esengine merged 1 commit into
esengine:main-v2from
iysun:fix/desktop-attachment-misclassified-as-image

Conversation

@iysun

@iysun iysun commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • classify .reasonix/attachments/* refs as refImage only for real image extensions, so .yml/.zip now resolve as normal file refs
  • add control-layer regression tests for png/yml/zip attachment classification and ResolveRefs behavior
  • update transcript/user-message replacement so image attachments render as [image] and non-image attachments as [file:<name>]

Fixes #3452.

Test plan

  • go test ./internal/control
  • npm run typecheck (in desktop/frontend)

Treat .reasonix/attachments refs as images only when the attachment is an actual image extension, so yaml/zip attachments resolve as file refs and no longer render as misleading image placeholders.

Co-authored-by: Cursor <cursoragent@cursor.com>
@iysun iysun requested review from SivanCola and esengine as code owners June 7, 2026 17:06
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) agent Core agent loop (internal/agent, internal/control) and removed v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 7, 2026

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

附件按扩展名分类,.yml/.zip 不再被当图片发出;Go/TS 两侧对称、扩展名一致,测试覆盖 png/yml/zip。

@esengine esengine merged commit 7cef203 into esengine:main-v2 Jun 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) desktop Wails desktop app (desktop/**)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 上传 .yml 文件被错误识别为图片

2 participants