@@ -6,10 +6,12 @@ import { t } from "../../i18n/index.ts";
66import { resolveAssistantAttachmentAuthToken } from "./chat-pane-state.ts" ;
77import type { ChatSessionCompanionThread } from "./chat-session-companion.ts" ;
88import type { ChatPageHost } from "./chat-state-host.ts" ;
9+ import { resolveSessionDiffSidebarContent } from "./components/chat-session-workspace.ts" ;
910import type {
1011 SidebarPanelDefinition ,
1112 SidebarPanelTemplates ,
1213} from "./components/chat-sidebar-region-types.ts" ;
14+ import type { SidebarContent } from "./components/chat-sidebar.ts" ;
1315import type { SessionDiscussionPanelConfig } from "./components/session-discussion-panel.ts" ;
1416import type { SidebarSlotId } from "./sidebar-layout-types.ts" ;
1517
@@ -21,7 +23,8 @@ type SidebarPanelDefinitionParams = {
2123 chat : TemplateResult ;
2224 workspace : TemplateResult | typeof nothing ;
2325 tasks : TemplateResult | typeof nothing ;
24- detail : TemplateResult | null ;
26+ detailOpen : boolean ;
27+ renderDetail : ( content : SidebarContent ) => TemplateResult ;
2528 digest : SessionObserverDigest | null ;
2629 activeRunId : string | null ;
2730 startedAt : number | undefined ;
@@ -135,8 +138,16 @@ export function sidebarPanelDefinitions(
135138 .onStateChange=${ params . discussion . onStateChange }
136139 > </ openclaw-session-discussion > `
137140 : null ;
141+ const detailContent =
142+ state ?. sidebarContent ??
143+ ( state && params ?. detailOpen ? resolveSessionDiffSidebarContent ( state ) : null ) ;
138144 return [
139- definePanel ( "detail" , "review" , icons . diff , params ?. detail ?? null ) ,
145+ definePanel (
146+ "detail" ,
147+ "review" ,
148+ icons . diff ,
149+ detailContent && params ? params . renderDetail ( detailContent ) : null ,
150+ ) ,
140151 definePanel ( "terminal" , "terminal" , icons . terminal , terminal , {
141152 available : terminalAvailable ,
142153 shortcut : "Ctrl+`" ,
0 commit comments