Skip to content

feat(sidechat): accept pasted and selected images - #1099

Merged
Menghuan1918 merged 6 commits into
omdsh-dev:devfrom
CCColastic:feat/sidechat-image-input
Nov 4, 2026
Merged

Menghuan1918 merged 6 commits into
omdsh-dev:devfrom
CCColastic:feat/sidechat-image-input

Conversation

@CCColastic

Copy link
Copy Markdown
Contributor

Why

Side Chat only submitted text, so screenshots pasted or selected in its composer could not reach the Agent. Add image drafts and submit their bytes with the user message through the host attachment service.

Scope

  • Add paste, file selection, previews, removal and image-only sends through a host paperclip icon, with all 21 locale dictionaries updated.
  • Reconcile echoes, pending input and history by the host message ID. Read images through an authenticated occurrence locator, including cold history.
  • Bound body size and concurrent admission, recheck the validated model synchronously before enqueue, preserve newer drafts, and cancel delivery when a thread closes or the plugin unloads.
  • Share cold session snapshots and restore the thread binding after a page refresh.

Tradeoffs

One combined prompt avoids a separate upload receipt registry. Attachment storage and the Agent inbox remain separate host operations, so the plugin cannot make them crash-atomic. A lost response preserves the draft and prompts the user to check the conversation before retrying.

Blast Radius

The change touches Side Chat and the shared JSON reader. The larger body allowance applies only to sidechat.prompt; other methods retain the 1 MiB cap. Image reads require an owned user-message occurrence. No DSH source changes or runtime version increase.

Verification

  • Typecheck, ESLint, build, pack and Windows search-engine assertions pass.
  • 317 focused regression tests pass on the final code, including the enqueue microtask race, paperclip export, composer, owned image reads and native admission fence.
  • The real rc.1/Chrome harness selects and pastes a 1024×768 PNG, sends JSON bodies above 3 MB, and decodes the provider images to check dimensions and fixture pixels. Image reads survive page reload and a full host restart. The Files editor and in-page client entry replacement also pass with no page or registration errors.
  • The Windows full sweep recorded 2,960 passed, 7 skipped and one pre-existing tar-list CRLF assertion failure. The final model-race guard and icon adjustment are covered by the focused rerun above.

Design, rerun command and verification receipt.

Before Draft preview Cold restart
Before Draft Cold restart

Copilot AI balanced review requested due to automatic review settings November 2, 2026 07:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Menghuan1918
Menghuan1918 merged commit 9601182 into omdsh-dev:dev Nov 4, 2026
3 checks passed
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.

3 participants