Skip to content

refactor(ui): extract submit/vision logic from SidebarChat#84

Merged
Pterjudin merged 1 commit into
mainfrom
feat/phase1-submit-vision-extract
Jul 23, 2026
Merged

refactor(ui): extract submit/vision logic from SidebarChat#84
Pterjudin merged 1 commit into
mainfrom
feat/phase1-submit-vision-extract

Conversation

@Pterjudin

Copy link
Copy Markdown

Summary

  • Extract attachment conversion → common/prepareChatAttachments.ts (+ unit tests)
  • Extract submit-time vision validation → composer/prepareChatSubmit.ts
  • Extract paste/drop vision guards → composer/useVisionAttachmentHandlers.ts
  • SidebarChat.tsx down to ~430 lines (from ~574)

Test plan

  • npm run buildreact
  • npm run test-phase0-qa — 103/103 (106 after CI compile includes new attachment tests)
  • Manual: paste/drop image without vision model → warning notification
  • Manual: submit message with PDF/image on vision-capable model

Made with Cursor

Move attachment conversion and vision checks into prepareChatSubmit and useVisionAttachmentHandlers so SidebarChat focuses on layout orchestration.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Pterjudin
Pterjudin merged commit 73aedc8 into main Jul 23, 2026
14 of 26 checks passed
@Pterjudin
Pterjudin deleted the feat/phase1-submit-vision-extract branch July 23, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant