@@ -47,6 +47,8 @@ export type QuickSettingsSecurity = {
4747 gatewayAuth : string ;
4848 execPolicy : string ;
4949 deviceAuth : boolean ;
50+ browserEnabled : boolean ;
51+ toolProfile : string ;
5052} ;
5153
5254export type QuickSettingsProps = {
@@ -71,6 +73,8 @@ export type QuickSettingsProps = {
7173 // Security
7274 security : QuickSettingsSecurity ;
7375 onSecurityConfigure ?: ( ) => void ;
76+ onBrowserEnabledToggle ?: ( enabled : boolean ) => void ;
77+ onToolProfileChange ?: ( profile : string ) => void ;
7478
7579 // Appearance
7680 theme : ThemeName ;
@@ -136,6 +140,7 @@ const BORDER_RADIUS_STOPS: Array<{ value: BorderRadiusStop; label: string }> = [
136140] ;
137141
138142const THINKING_LEVELS = [ "off" , "low" , "medium" , "high" ] ;
143+ const TOOL_PROFILES = [ "minimal" , "coding" , "messaging" , "full" ] ;
139144const LOCAL_USER_LABEL = "You" ;
140145// Keep raw uploads comfortably below the 2 MB persisted data URL limit after
141146// base64 expansion and a small MIME/header prefix are added.
@@ -503,7 +508,11 @@ function renderAutomationsCard(props: QuickSettingsProps) {
503508}
504509
505510function renderSecurityCard ( props : QuickSettingsProps ) {
506- const { gatewayAuth, execPolicy, deviceAuth } = props . security ;
511+ const { gatewayAuth, execPolicy, deviceAuth, browserEnabled, toolProfile } = props . security ;
512+ const normalizedToolProfile = toolProfile . trim ( ) || "full" ;
513+ const toolProfiles = TOOL_PROFILES . includes ( normalizedToolProfile )
514+ ? TOOL_PROFILES
515+ : [ ...TOOL_PROFILES , normalizedToolProfile ] ;
507516
508517 return html `
509518 < div class ="qs-card qs-card--security ">
@@ -525,6 +534,37 @@ function renderSecurityCard(props: QuickSettingsProps) {
525534 < span class ="qs-row__label "> Exec policy</ span >
526535 < span class ="qs-row__value "> < span class ="qs-badge "> ${ execPolicy } </ span > </ span >
527536 </ div >
537+ < div class ="qs-row ">
538+ < span class ="qs-row__label "> Browser enabled</ span >
539+ < label class ="qs-toggle ">
540+ < input
541+ type ="checkbox "
542+ .checked =${ browserEnabled }
543+ @change =${ ( event : Event ) =>
544+ props . onBrowserEnabledToggle ?.( ( event . currentTarget as HTMLInputElement ) . checked ) }
545+ />
546+ < span class ="qs-toggle__track "> </ span >
547+ < span class ="qs-toggle__hint muted "> ${ browserEnabled ? "Enabled" : "Disabled" } </ span >
548+ </ label >
549+ </ div >
550+ < div class ="qs-row qs-row--tool-profile ">
551+ < span class ="qs-row__label "> Tool profile</ span >
552+ < div class ="qs-segmented ">
553+ ${ toolProfiles . map (
554+ ( profile ) => html `
555+ < button
556+ class ="qs-segmented__btn qs-segmented__btn--compact ${ profile ===
557+ normalizedToolProfile
558+ ? "qs-segmented__btn--active"
559+ : "" } "
560+ @click =${ ( ) => props . onToolProfileChange ?.( profile ) }
561+ >
562+ ${ profile }
563+ </ button >
564+ ` ,
565+ ) }
566+ </ div >
567+ </ div >
528568 < div class ="qs-row ">
529569 < span class ="qs-row__label "> Device auth</ span >
530570 < span class ="qs-row__value ">
0 commit comments