1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Hide empty System message in assist debug view (#28296)

This commit is contained in:
Petar Petrov
2025-12-03 11:29:07 +02:00
committed by GitHub
parent d7e18b0520
commit 0447d87f18

View File

@@ -215,25 +215,30 @@ export class AssistPipelineDebug extends LitElement {
? html` ? html`
<div class="messages"> <div class="messages">
${messages.map((content) => ${messages.map((content) =>
content.role === "system" || content.role === "tool_result" content.role === "system"
? content.content
? html`
<ha-expansion-panel
class="content-expansion ${content.role}"
>
<div slot="header">System</div>
<pre>${content.content}</pre>
</ha-expansion-panel>
`
: nothing
: content.role === "tool_result"
? html` ? html`
<ha-expansion-panel <ha-expansion-panel
class="content-expansion ${content.role}" class="content-expansion ${content.role}"
> >
<div slot="header"> <div slot="header">
${content.role === "system" Result for ${content.tool_name}
? "System"
: `Result for ${content.tool_name}`}
</div> </div>
${content.role === "system"
? html`<pre>${content.content}</pre>`
: html`
<ha-yaml-editor <ha-yaml-editor
read-only read-only
auto-update auto-update
.value=${content} .value=${content}
></ha-yaml-editor> ></ha-yaml-editor>
`}
</ha-expansion-panel> </ha-expansion-panel>
` `
: html` : html`