Skip to content

[WebAgenticChat] Display tool messages and other roles correctly

Overview

Currently, we reuse ee/app/assets/javascripts/ai/tanuki_bot/store/mutations.js to build messages list. However, it supports only user, assistant and system roles.

So, if we change this line to more powerful:

message_type: msg.message_type === 'agent' ? 'assistant' : msg.message_type,
role: msg.message_type === 'agent' ? 'assistant' : msg.message_type,
tool_info: msg.tool_info,

Some of the messages won't be displayed because the roles are unsupported.

Proposal

Extend the existing store or implement its own for Duo Agentic Chat in order to support other roles and messages type, so we apply custom design to specific roles like:

Screenshot_2025-06-30_at_00.01.08

Edited by 🤖 GitLab Bot 🤖