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:
@@ -215,25 +215,30 @@ export class AssistPipelineDebug extends LitElement {
|
||||
? html`
|
||||
<div class="messages">
|
||||
${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`
|
||||
<ha-expansion-panel
|
||||
class="content-expansion ${content.role}"
|
||||
>
|
||||
<div slot="header">
|
||||
${content.role === "system"
|
||||
? "System"
|
||||
: `Result for ${content.tool_name}`}
|
||||
Result for ${content.tool_name}
|
||||
</div>
|
||||
${content.role === "system"
|
||||
? html`<pre>${content.content}</pre>`
|
||||
: html`
|
||||
<ha-yaml-editor
|
||||
read-only
|
||||
auto-update
|
||||
.value=${content}
|
||||
></ha-yaml-editor>
|
||||
`}
|
||||
</ha-expansion-panel>
|
||||
`
|
||||
: html`
|
||||
|
||||
Reference in New Issue
Block a user