feat: parse execute tool commands and render them in the chat UI (#25478)

When the execute tool runs a chained shell command, the UI previously
rendered the raw string. Long chains like "cd /repo && git pull &&
git add . && git commit -m fix" were hard to scan.

A new ChatMessagePart.ParsedCommands [][]string field on tool-call
parts carries one entry per simple command, parsed in chatd from args
via mvdan.cc/sh/v3/syntax. The frontend renders the joined list ("cd,
git pull, git add, git commit") in place of the raw command, and falls
back to the raw command when the field is absent.

Closes CODAGT-446
This commit is contained in:
Mathias Fredriksson
2026-05-21 11:12:34 +03:00
committed by GitHub
parent ec1e861152
commit f1b772928d
24 changed files with 749 additions and 22 deletions
+1
View File
@@ -522,6 +522,7 @@ require (
github.com/sony/gobreaker/v2 v2.4.0
github.com/tidwall/sjson v1.2.5
gonum.org/v1/gonum v0.17.0
mvdan.cc/sh/v3 v3.13.1
)
require (