Display args in the tool type message in the agentic chat

Overview

For example, when Duo Workflow Service returns a message of tool type, it contains tool_info, i.e name and args of the tool that is being called:

Example
{
   "channel_values":{
      "ui_chat_log":[
         ...
         {
            "message_type":"tool",
            "message_sub_type":"create_commit",
            "content":"Create commit in project 3 with 1 file action (create)",
            "timestamp":"2025-06-20T07:54:13.989177+00:00",
            "status":"success",
            "correlation_id":null,
            "tool_info":{
               "name":"create_commit",
               "args":{
                  "branch":"feature/add-commit2-rb",
                  "actions":[
                     {
                        "action":"create",
                        "content":"# commit2.rb\n# This is a new Ruby file\n\nclass Commit2\n  def initialize\n    puts \"Commit2 initialized\"\n  end\n  \n  def execute\n    puts \"Executing commit2 functionality\"\n  end\nend\n",
                        "file_path":"commit2.rb"
                     }
                  ],
                  "project_id":3,
                  "start_branch":"main",
                  "commit_message":"Add commit2.rb file"
               }
            },
            "context_elements":null
         }
      ],
   }
}

When/if the tool info is added to the message, let's display it. Maybe it can be even expanded/collapsed

Currently, we only display file_path arg if it passed: https://gitlab.com/gitlab-org/duo-ui/-/blob/main/src/components/chat/components/duo_chat_message/message_types/message_tool.vue#L48, but it would be useful to display the full args object

Why

  • Transparency: it's useful and more secure to see the arguments with which the tool is being called
  • Perceived performance: when arguments contains a bit more data, for example a tool to create an issue with a long description, the tool execution takes time to be generated. If we display the arguments, we can also stream the content that is being displayed (not yet supported by backend, but potentially can be introduced: [Duo Workflow] Stream tool execution (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#1195 - closed)). In this case, a user will see the progress rather than a delay without an action
Edited by Igor Drozdov