diff --git a/front_end/panels/ai_chat/ui/AgentSessionHeaderComponent.ts b/front_end/panels/ai_chat/ui/AgentSessionHeaderComponent.ts index a07150ddbb..f3cdd4b83a 100644 --- a/front_end/panels/ai_chat/ui/AgentSessionHeaderComponent.ts +++ b/front_end/panels/ai_chat/ui/AgentSessionHeaderComponent.ts @@ -14,7 +14,9 @@ export type SessionStatus = 'running' | 'completed' | 'error'; @customElement('agent-session-header') export class AgentSessionHeaderComponent extends HTMLElement { static readonly litTagName = Lit.StaticHtml.literal`agent-session-header`; - private readonly shadow = this.attachShadow({mode: 'open'}); + // Use Light DOM + // private readonly shadow = this.attachShadow({mode: 'open'}); + private readonly shadow = this; private session: AgentSession | null = null; private isExpanded = true; @@ -80,7 +82,7 @@ export class AgentSessionHeaderComponent extends HTMLElement { Lit.render(html` `; + // Build a set of nested child session IDs present in the current message set. // Include both nestedSessions[].sessionId and any handoff anchors in messages that // have a concrete nestedSessionId (ignore pending-* placeholders). Also build @@ -865,6 +866,7 @@ export class ChatView extends HTMLElement { const suggestions = this.#renderExampleSuggestions(); Lit.render(html` + ${stylesTemplate}