Skip to content

feat(chat-messages): add activity trace pattern - #2557

Open
robertwilde wants to merge 1 commit into
mainfrom
feat/chat/activity-trace
Open

feat(chat-messages): add activity trace pattern#2557
robertwilde wants to merge 1 commit into
mainfrom
feat/chat/activity-trace

Conversation

@robertwilde

@robertwilde robertwilde commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Closes #2339

Changes

  • Supports running, completed, and failed states.
  • Provides expandable markdown details.
  • Supports readonly and interactive inline entities.
  • Emits entity clicks with the parent trace ID.
  • Adds activity icons and connector lines.

Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

@robertwilde
robertwilde force-pushed the feat/chat/activity-trace branch from 29e7250 to 039cec2 Compare August 14, 2026 16:02
@dr-itz

dr-itz commented Aug 14, 2026

Copy link
Copy Markdown
Member

Some comments:

  • looks awesome
  • creates a hard dependency on the markdown renderer with customization of the inlineCode handling. In chat-message we have content projection instead, so this creates an inconsistency
  • the problem addressed is how to handle "file links" provided by the AI
  • copying a chat session from VSCode, I get files in the format [](file:///Users/dritz/devel/siemens/element/projects/element-ng/markdown/extensions/code/si-markdown-code.component.spec.ts#20-20), so basically a link w/o a label
    • currently renders nothing
    • maybe should render as file like you did here
    • i.e. we need to handle this generically anway
    • what do different AIs generate?

So I would prefer to build this in steps, i.e. for now only do content-projection and land this quickly. And address the file links in a generic way

@robertwilde
robertwilde marked this pull request as ready for review August 17, 2026 07:59
@robertwilde
robertwilde requested review from a team as code owners August 17, 2026 07:59
@kfenner kfenner added this to the 51.0.0 milestone Aug 17, 2026
@robertwilde
robertwilde force-pushed the feat/chat/activity-trace branch 4 times, most recently from 66ce2ab to d219c1f Compare August 18, 2026 13:47
@robertwilde
robertwilde requested a review from dr-itz as a code owner August 18, 2026 13:47
@robertwilde
robertwilde force-pushed the feat/chat/activity-trace branch from 94c679e to 3cbf665 Compare August 18, 2026 14:59
Comment thread projects/element-ng/chat-messages/si-trace-message.component.scss Outdated
Comment thread projects/element-ng/chat-messages/si-trace-message.component.html Outdated
Comment thread projects/element-ng/chat-messages/si-trace-message.component.scss Outdated
Comment thread projects/element-ng/chat-messages/si-trace-message.component.ts Outdated
Comment thread src/app/examples/si-chat-messages/si-trace-message.html Outdated
Comment thread src/app/examples/si-chat-messages/si-trace-message.scss Outdated
Comment thread src/app/examples/si-chat-messages/si-trace-message.scss Outdated
Comment thread src/app/examples/si-chat-messages/si-trace-message.scss Outdated
Comment thread src/app/examples/si-chat-messages/si-trace-message.scss Outdated
Comment thread src/app/examples/si-chat-messages/si-trace-message.ts Outdated
@robertwilde
robertwilde force-pushed the feat/chat/activity-trace branch 2 times, most recently from 00202a4 to 5c625b4 Compare August 19, 2026 16:08
@robertwilde

Copy link
Copy Markdown
Collaborator Author

@dr-itz @kfenner applied review feedback.

Comment thread api-goldens/element-ng/chat-messages/index.api.md Outdated
@Killusions

Copy link
Copy Markdown
Member

General comment:

I know in the UX specs we call this Activity Trace and in general for the entire thing (multiple ones) it makes sense to call it "activity trace" but individual messages should not be called trace messages IMO. This is not a term used for this and also doesn't really make sense, it should be something more generic, I like tool but maybe we can find a more generic name.

@Killusions

Copy link
Copy Markdown
Member

Tools also can have 3 different things to display:

  1. Tool title or name
  2. Input parameters (can be code, JSON, raw text, markdown)
  3. Output (can be code, JSON, raw text, markdown)

One "trace message" needs to support having all of these 3 at the same time, otherwise every product will need to choose their own Markdown representation which is precisely what we want to avoid.

@robertwilde

Copy link
Copy Markdown
Collaborator Author

Tools also can have 3 different things to display:

  1. Tool title or name
  2. Input parameters (can be code, JSON, raw text, markdown)
  3. Output (can be code, JSON, raw text, markdown)

One "trace message" needs to support having all of these 3 at the same time, otherwise every product will need to choose their own Markdown representation which is precisely what we want to avoid.

That's more like general feedback for #2339 ?

@robertwilde
robertwilde force-pushed the feat/chat/activity-trace branch from 5c625b4 to 1feda89 Compare August 21, 2026 09:51
@robertwilde

Copy link
Copy Markdown
Collaborator Author

Tools also can have 3 different things to display:

  1. Tool title or name
  2. Input parameters (can be code, JSON, raw text, markdown)
  3. Output (can be code, JSON, raw text, markdown)

One "trace message" needs to support having all of these 3 at the same time, otherwise every product will need to choose their own Markdown representation which is precisely what we want to avoid.

Tool, activity or action message perhaps?

@robertwilde
robertwilde force-pushed the feat/chat/activity-trace branch from 1feda89 to 8758018 Compare August 21, 2026 09:56
@robertwilde
robertwilde force-pushed the feat/chat/activity-trace branch from 8758018 to ca2d0eb Compare August 21, 2026 10:35
@kfenner

kfenner commented Aug 21, 2026

Copy link
Copy Markdown
Member

Tools also can have 3 different things to display:

  1. Tool title or name
  2. Input parameters (can be code, JSON, raw text, markdown)
  3. Output (can be code, JSON, raw text, markdown)

One "trace message" needs to support having all of these 3 at the same time, otherwise every product will need to choose their own Markdown representation which is precisely what we want to avoid.

Tool, activity or action message perhaps?

I like activity-message to indicate that some kind of system activity is taking place/going on right now.

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.

Add activity trace pattern to AI components (tool calling + reasoning output)

4 participants