Skip to content

fix(DATAGO-124692): Fix issue with chat session reloading showing raw backend response#994

Closed
amir-ghasemi wants to merge 2 commits intomainfrom
amir/fix-embed-resolution
Closed

fix(DATAGO-124692): Fix issue with chat session reloading showing raw backend response#994
amir-ghasemi wants to merge 2 commits intomainfrom
amir/fix-embed-resolution

Conversation

@amir-ghasemi
Copy link
Collaborator

@amir-ghasemi amir-ghasemi commented Feb 6, 2026

This pull request introduces comprehensive support for resolving and displaying inline artifact content (using «artifact_content:...») in both the frontend and backend. The changes ensure that any artifact content markers embedded in chat messages are properly detected, resolved to actual content, and safely stored or displayed, both when saving tasks and when logging background agent messages. This improves artifact handling reliability and user experience, and prevents unresolved markers from leaking into the UI or database.

Artifact content marker handling and embed resolution:

  • The frontend (ChatProvider.tsx) now detects and processes «artifact_content:...», ensuring inline artifact displays are handled like other artifact markers, and strips these markers from visible text. This is a fallback only if BE save of resolved content fails. [1] [2] [3]
  • The backend task save endpoint (sessions.py) resolves all embeds (including «artifact_content:...») in chat message bubbles before saving, using the shared artifact service and new embed resolution utilities. This ensures that stored messages contain the actual artifact content, not just the marker. [1] [2] [3]
  • The TaskLoggerService is updated to support artifact resolution when logging background agent messages. It now resolves embeds in accumulated agent text before saving, using the artifact service if available, and falls back to stripping unresolved markers if resolution fails. [1] [2] [3] [4]

Data structure and artifact marker management:

  • When saving agent messages, the backend now ensures that only resolved text is included in message parts, preventing the frontend from showing unresolved artifact markers. The resolved text is placed as the first part, followed by any non-text, non-data parts.

These improvements collectively ensure robust and consistent artifact content handling throughout the chat system, from user input to background agent actions and frontend display.

@amir-ghasemi amir-ghasemi requested a review from efunneko February 6, 2026 21:50
@amir-ghasemi amir-ghasemi changed the title fix: embed resolution for artifact_content on task replay fix(DATAGO-124692): Fix issue with chat session reloading showing raw backend response Feb 6, 2026
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

WhiteSource Policy Violation Summary

✅︎ No Blocking Whitesource Policy Violations found in solaceai/solace-agent-mesh-ui-pr-994!

@sonarqube-solacecloud
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
28.0% Coverage on New Code (required ≥ 70%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE SonarQube for IDE

@amir-ghasemi
Copy link
Collaborator Author

Superseded by new architecture in #996

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