@@ -30,13 +30,15 @@ import {
3030 PageTitle ,
3131 SectionHeading ,
3232} from "@/components/ui/typography" ;
33+ import { useDemo } from "@/hooks/useDemo" ;
3334
3435type Message = components [ "schemas" ] [ "Message" ] ;
3536type SessionSummaries = components [ "schemas" ] [ "SessionSummaries" ] ;
3637type Summary = components [ "schemas" ] [ "Summary" ] ;
3738type Tab = "messages" | "summaries" | "context" | "peers" ;
3839
3940export function SessionDetail ( ) {
41+ const { mask } = useDemo ( ) ;
4042 const { workspaceId, sessionId } = useParams ( { strict : false } ) as {
4143 workspaceId : string ;
4244 sessionId : string ;
@@ -207,8 +209,8 @@ export function SessionDetail() {
207209 className = "text-sm py-2"
208210 style = { { borderBottom : "1px solid var(--border)" , color : "var(--text-2)" } }
209211 >
210- { r . peer_id && < Badge variant = "blue" > { r . peer_id } </ Badge > }
211- < p className = "mt-1 whitespace-pre-wrap" > { r . content } </ p >
212+ { r . peer_id && < Badge variant = "blue" > { mask ( r . peer_id ) } </ Badge > }
213+ < p className = "mt-1 whitespace-pre-wrap" > { mask ( r . content ) } </ p >
212214 </ div >
213215 ) )
214216 ) }
@@ -269,14 +271,14 @@ export function SessionDetail() {
269271 >
270272 < div className = "flex items-center gap-2 mb-2 flex-wrap" >
271273 < Badge variant = { msg . peer_id ? "blue" : "default" } >
272- { msg . peer_id ?? "system" }
274+ { msg . peer_id ? mask ( msg . peer_id ) : "system" }
273275 </ Badge >
274276 { msg . token_count != null && < Caption > { msg . token_count } tokens</ Caption > }
275277 { msg . created_at && (
276278 < Caption > { new Date ( msg . created_at ) . toLocaleString ( ) } </ Caption >
277279 ) }
278280 </ div >
279- < Body className = "whitespace-pre-wrap" > { msg . content } </ Body >
281+ < Body className = "whitespace-pre-wrap" > { mask ( msg . content ) } </ Body >
280282 </ div >
281283 ) ) }
282284 </ div >
@@ -414,6 +416,7 @@ function SessionPeersTab({
414416}
415417
416418function SummaryCard ( { label, summary } : { label : string ; summary : Summary } ) {
419+ const { mask } = useDemo ( ) ;
417420 return (
418421 < div
419422 className = "rounded-xl p-4"
@@ -436,7 +439,7 @@ function SummaryCard({ label, summary }: { label: string; summary: Summary }) {
436439 ) }
437440 </ div >
438441 </ div >
439- < Body className = "whitespace-pre-wrap" > { summary . content } </ Body >
442+ < Body className = "whitespace-pre-wrap" > { mask ( summary . content ) } </ Body >
440443 </ div >
441444 ) ;
442445}
0 commit comments