Skip to content

[SOA] Enhance attachment handling in agent task messages with ignored reason support#7786

Open
tomasevicst wants to merge 6 commits intomainfrom
private/stomasevic/629496_SOA_Populate_Ignored_Reason_for_Attachment
Open

[SOA] Enhance attachment handling in agent task messages with ignored reason support#7786
tomasevicst wants to merge 6 commits intomainfrom
private/stomasevic/629496_SOA_Populate_Ignored_Reason_for_Attachment

Conversation

@tomasevicst
Copy link
Copy Markdown
Contributor

@tomasevicst tomasevicst commented Apr 21, 2026

Summary

This PR adds support for tracking and populating the ignored reason when handling attachments in agent task messages.

Changes:

  • Modified AgentTaskMessageBuilder.Codeunit.al to expose ignored reason functionality
  • Updated AgentMessageImpl.Codeunit.al to handle ignored reason in attachment processing
  • Enhanced AgentTaskMsgBuilderImpl.Codeunit.al to populate ignored reason for attachments

Work Item(s)

Fixes AB#629496

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

AL Documentation Audit

Documentation gaps were detected in the following apps:

  • Agent: 0% documentation coverage

To generate documentation, run /al-docs init or /al-docs update using GitHub Copilot CLI or Claude Code.
This review is for awareness to help keep documentation in sync with code changes. It is okay to dismiss this request.

attilatoury
attilatoury previously approved these changes Apr 22, 2026
Copilot AI review requested due to automatic review settings April 23, 2026 12:48
Copy link
Copy Markdown
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

Adds support in the Agent task message pipeline to capture and persist an “Ignored Reason” for message attachments, enabling richer diagnostics/auditing when attachments are intentionally skipped by the agent.

Changes:

  • Extend the public Agent Task Message Builder API with an AddAttachment(...; Ignored; IgnoredReason) overload.
  • Track ignored reasons per attachment in the internal message builder implementation and forward them during message creation.
  • Persist ignored reason onto the "Agent Task Message Attachment" record when linking attachments to messages.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/System Application/App/Agent/Interaction/Internal/AgentTaskMsgBuilderImpl.Codeunit.al Tracks per-attachment ignored reasons and forwards them into attachment creation flow.
src/System Application/App/Agent/Interaction/Internal/AgentMessageImpl.Codeunit.al Extends attachment creation to accept and persist an ignored reason.
src/System Application/App/Agent/Interaction/AgentTaskMessageBuilder.Codeunit.al Exposes a new builder overload that accepts an ignored reason for ignored attachments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants