Skip to content

fix: include file attachments in queued messages#5961

Merged
zanesq merged 3 commits intoblock:mainfrom
Abhijay007:fix/QueuedAttachment
Dec 11, 2025
Merged

fix: include file attachments in queued messages#5961
zanesq merged 3 commits intoblock:mainfrom
Abhijay007:fix/QueuedAttachment

Conversation

@Abhijay007
Copy link
Collaborator

Closes: #5866

PR Description

This PR fixes an issue where queued messages were being sent without their attached files. when a user queued a message while another prompt was still processing, any drag-and-dropped or pasted files were not included. The issue was that the handleInterruptionAndQueue() only stored the trimmed text value and ignored file paths from pastedImages and allDroppedFiles, causing queued messages to lose their attachments and not count it as one message, even though performSubmit() handles file paths correctly.

Changes made

  • Extracts file paths from pastedImages and allDroppedFiles.
  • Builds a unified contentToQueue that combines text and file paths to count them as one.
  • Replaces the previous displayValue.trim() usage with contentToQueue.
  • Clears pastedImages and droppedFiles after queuing to prevent duplication.

Type of Change

  • Bug fix

AI Assistance

  • This PR was created or reviewed with AI assistance - used Goose to find the root cause

Testing

Tested in the desktop UI by dragging and dropping file attachments while another message was in progress, confirming the queued message includes attachments correctly.

Screenshots / Demos (for UX changes)

Before:

beforeQueued-ezgif com-censor

After:

aferQueued-ezgif com-optimize

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Copilot AI review requested due to automatic review settings December 3, 2025 15:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where queued messages were losing their file attachments. Previously, when a user queued a message while another prompt was processing, file paths from pastedImages and allDroppedFiles were ignored, causing attachments to be dropped. The fix extracts and combines file paths with text content before queuing, matching the format used by performSubmit().

  • Extracts file paths from pastedImages and allDroppedFiles arrays with proper filtering
  • Combines text and file paths into a unified contentToQueue string
  • Clears file-related state (pastedImages, droppedFiles, localDroppedFiles) after queuing

@zanesq zanesq self-assigned this Dec 3, 2025
@zanesq
Copy link
Collaborator

zanesq commented Dec 3, 2025

thanks @Abhijay007! If its an easy fix while you are in there can you make it so the stop button changes to a send if any input is added? Confusing now that it still shows stop button but you can technically hit enter to send/queue it.

@Abhijay007
Copy link
Collaborator Author

thanks @Abhijay007! If its an easy fix while you are in there can you make it so the stop button changes to a send if any input is added? Confusing now that it still shows stop button but you can technically hit enter to send/queue it.

sure will do

Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
Copilot AI review requested due to automatic review settings December 4, 2025 16:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copy link
Collaborator

@zanesq zanesq left a comment

Choose a reason for hiding this comment

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

LGTM, Verified works locally also

@zanesq zanesq merged commit 090e33c into block:main Dec 11, 2025
23 checks passed
katzdave added a commit that referenced this pull request Dec 12, 2025
…nses-streaming

* 'main' of github.com:block/goose:
  Fix community page mobile responsiveness and horizontal overflow (#6082)
  Tool reply meta (#6074)
  chore: avoid accidentally using native tls again (#6086)
  Update vars to be capitalised to be in line with other variables in config file (#6085)
  docs: restructure recipe reference (#5972)
  docs: configure custom providers (#6044)
  docs: Community All-Stars Spotlight November 2025, CodeTV Hackathon edition (#6070)
  fix: include file attachments in queued messages (#5961)
  fix(ui): prevent incorrect provider type suffix in update dialog #5908 (#5909)
  docs: mcp elicitation (#6060)
zanesq added a commit that referenced this pull request Dec 15, 2025
* 'main' of github.com:block/goose: (22 commits)
  Disallow subagents with no extensions (#5825)
  chore(deps): bump js-yaml in /documentation (#6093)
  feat: external goosed server (#5978)
  fix: Make datetime info message more explicit to prevent LLM confusion about current year (#6101)
  refactor: unify subagent and subrecipe tools into single tool (#5893)
  goose repo is too big for the issue solver workflow worker (#6099)
  fix: use system not developer role in db (#6098)
  Add /goose issue solver github workflow (#6068)
  OpenAI responses streaming (#5837)
  Canonical models for Providers (#5694)
  feat: add Inception provider for Mercury models (#6029)
  fix old sessions with tool results not loading (#6094)
  Fix community page mobile responsiveness and horizontal overflow (#6082)
  Tool reply meta (#6074)
  chore: avoid accidentally using native tls again (#6086)
  Update vars to be capitalised to be in line with other variables in config file (#6085)
  docs: restructure recipe reference (#5972)
  docs: configure custom providers (#6044)
  docs: Community All-Stars Spotlight November 2025, CodeTV Hackathon edition (#6070)
  fix: include file attachments in queued messages (#5961)
  ...

# Conflicts:
#	crates/goose-server/src/routes/agent.rs
#	crates/goose/src/agents/extension_manager.rs
#	ui/desktop/src/api/sdk.gen.ts
zanesq added a commit that referenced this pull request Dec 16, 2025
…sions

* 'main' of github.com:block/goose: (22 commits)
  Disallow subagents with no extensions (#5825)
  chore(deps): bump js-yaml in /documentation (#6093)
  feat: external goosed server (#5978)
  fix: Make datetime info message more explicit to prevent LLM confusion about current year (#6101)
  refactor: unify subagent and subrecipe tools into single tool (#5893)
  goose repo is too big for the issue solver workflow worker (#6099)
  fix: use system not developer role in db (#6098)
  Add /goose issue solver github workflow (#6068)
  OpenAI responses streaming (#5837)
  Canonical models for Providers (#5694)
  feat: add Inception provider for Mercury models (#6029)
  fix old sessions with tool results not loading (#6094)
  Fix community page mobile responsiveness and horizontal overflow (#6082)
  Tool reply meta (#6074)
  chore: avoid accidentally using native tls again (#6086)
  Update vars to be capitalised to be in line with other variables in config file (#6085)
  docs: restructure recipe reference (#5972)
  docs: configure custom providers (#6044)
  docs: Community All-Stars Spotlight November 2025, CodeTV Hackathon edition (#6070)
  fix: include file attachments in queued messages (#5961)
  ...

# Conflicts:
#	crates/goose-server/src/routes/agent.rs
#	crates/goose/src/agents/extension_manager.rs
#	ui/desktop/src/api/sdk.gen.ts
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.

2 participants