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}
${this.#renderVersionBanner()}
@@ -886,6 +888,7 @@ export class ChatView extends HTMLElement { } else { // Render normal expanded view for conversation Lit.render(html` + ${stylesTemplate}
${this.#renderVersionBanner()} diff --git a/front_end/panels/ai_chat/ui/ConversationHistoryList.ts b/front_end/panels/ai_chat/ui/ConversationHistoryList.ts index e50098ab0b..962c0b9d49 100644 --- a/front_end/panels/ai_chat/ui/ConversationHistoryList.ts +++ b/front_end/panels/ai_chat/ui/ConversationHistoryList.ts @@ -18,7 +18,9 @@ const {unsafeHTML} = Directives; */ export class ConversationHistoryList extends HTMLElement { static readonly litTagName = Lit.StaticHtml.literal`ai-conversation-history-list`; - readonly #shadow = this.attachShadow({mode: 'open'}); + // Use Light DOM + // readonly #shadow = this.attachShadow({mode: 'open'}); + readonly #shadow = this; readonly #boundRender = this.#render.bind(this); #conversations: ConversationMetadata[] = []; @@ -119,7 +121,7 @@ export class ConversationHistoryList extends HTMLElement { Lit.render( html`
diff --git a/front_end/panels/ai_chat/ui/FileListDisplay.ts b/front_end/panels/ai_chat/ui/FileListDisplay.ts index 84701931d0..21cbdd5aaf 100644 --- a/front_end/panels/ai_chat/ui/FileListDisplay.ts +++ b/front_end/panels/ai_chat/ui/FileListDisplay.ts @@ -17,7 +17,9 @@ const {html, nothing} = Lit; */ export class FileListDisplay extends HTMLElement { static readonly litTagName = Lit.StaticHtml.literal`ai-file-list-display`; - readonly #shadow = this.attachShadow({mode: 'open'}); + // Use Light DOM + // readonly #shadow = this.attachShadow({mode: 'open'}); + readonly #shadow = this; readonly #boundRender = this.#render.bind(this); #files: FileSummary[] = []; @@ -212,7 +214,7 @@ export class FileListDisplay extends HTMLElement { Lit.render(html` -
- -
- `, this.#shadow, {host: this}); + ai-message-list::-webkit-scrollbar { width: 4px; } + ai-message-list::-webkit-scrollbar-track { background: transparent; } + ai-message-list::-webkit-scrollbar-thumb { background-color: var(--color-scrollbar); border-radius: 4px; } + `; + this.prepend(style); + } } } diff --git a/front_end/panels/ai_chat/ui/version/VersionBanner.ts b/front_end/panels/ai_chat/ui/version/VersionBanner.ts index 52bf18a2d1..e025f989dd 100644 --- a/front_end/panels/ai_chat/ui/version/VersionBanner.ts +++ b/front_end/panels/ai_chat/ui/version/VersionBanner.ts @@ -12,7 +12,9 @@ export interface VersionInfo { latestVersion: string; releaseUrl: string; isUpda @customElement('ai-version-banner') export class VersionBanner extends HTMLElement { static readonly litTagName = Lit.StaticHtml.literal`ai-version-banner`; - readonly #shadow = this.attachShadow({mode: 'open'}); + // Use Light DOM + // readonly #shadow = this.attachShadow({mode: 'open'}); + readonly #shadow = this; // Manual properties #info: VersionInfo | null = null; @@ -32,7 +34,7 @@ export class VersionBanner extends HTMLElement { const info = this.#info; Lit.render(html`