@@ -80,7 +80,7 @@ const ModelPickerSection = {
8080} as const ;
8181
8282/**
83- * Id of the synthetic "Trust Workspace..." entry shown in Restricted Mode. It is
83+ * Id of the synthetic "Trust Workspace to enable models ..." entry shown in Restricted Mode. It is
8484 * a command (not a selectable model), so the accessibility provider gives it a
8585 * plain `menuitem` role instead of `menuitemradio`.
8686 */
@@ -473,8 +473,9 @@ function createManageModelsAction(commandService: ICommandService): IActionWidge
473473 * 4. Optional "Manage Models..." action shown in Other Models after a separator
474474 *
475475 * When `restrictedMode` is set (untrusted workspace), an explanatory "Models
476- * Unavailable in Restricted Mode" header and a "Trust Workspace..." action
477- * (invoking `onRequestTrust`) replace all of the above. Likewise, when
476+ * unavailable while in Restricted mode" header and a "Trust Workspace to enable
477+ * models..." action (invoking `onRequestTrust`) replace all of the above.
478+ * Likewise, when
478479 * `setupRequired` is set (trusted, but Chat still needs sign-in / setup), a
479480 * "Sign in to use Copilot" header and a Sign In action (invoking
480481 * `onRequestSetup`) replace all of the above. `restrictedMode` takes precedence.
@@ -515,20 +516,20 @@ export function buildModelPickerItems(
515516 // non-empty.
516517 items . push ( {
517518 kind : ActionListItemKind . Header ,
518- label : localize ( 'chat.modelPicker.restrictedMode' , "Models Unavailable in Restricted Mode " ) ,
519+ label : localize ( 'chat.modelPicker.restrictedMode' , "Models unavailable while in Restricted mode " ) ,
519520 } ) ;
520521 items . push ( {
521522 item : {
522523 id : RESTRICTED_MODE_TRUST_ACTION_ID ,
523524 enabled : ! ! onRequestTrust ,
524525 checked : false ,
525526 class : undefined ,
526- tooltip : localize ( 'chat.modelPicker.restrictedMode.trustTooltip' , "Trust the workspace to enable AI models." ) ,
527- label : localize ( 'chat.modelPicker.restrictedMode.trust' , "Trust Workspace..." ) ,
527+ tooltip : localize ( 'chat.modelPicker.restrictedMode.trustTooltip' , "Trust the workspace to enable models." ) ,
528+ label : localize ( 'chat.modelPicker.restrictedMode.trust' , "Trust Workspace to enable models ..." ) ,
528529 run : ( ) => onRequestTrust ?.( )
529530 } ,
530531 kind : ActionListItemKind . Action ,
531- label : localize ( 'chat.modelPicker.restrictedMode.trust' , "Trust Workspace..." ) ,
532+ label : localize ( 'chat.modelPicker.restrictedMode.trust' , "Trust Workspace to enable models ..." ) ,
532533 group : { title : '' , icon : ThemeIcon . fromId ( Codicon . workspaceTrusted . id ) } ,
533534 disabled : ! onRequestTrust ,
534535 hideIcon : false ,
@@ -1387,9 +1388,14 @@ export class ModelPickerWidget extends Disposable {
13871388 }
13881389 }
13891390
1391+ // Hide the filter in the unavailable states (Restricted Mode / setup
1392+ // required): the only entries are the explanatory header and the Trust /
1393+ // Sign In action, so a search field would just let users filter through
1394+ // stale, unusable models. Shown otherwise (it also hosts the secondary
1395+ // heading).
1396+ const unavailable = this . isRestrictedMode ( ) || this . isSetupRequired ( ) ;
13901397 const listOptions = {
1391- // Always show the filter to allow for the secondary heading to show
1392- showFilter : true ,
1398+ showFilter : ! unavailable ,
13931399 filterPlaceholder : localize ( 'chat.modelPicker.search' , "Search models" ) ,
13941400 filterActions : ! isUBB && manageModelsAction ? [ manageModelsAction ] : undefined ,
13951401 focusFilterOnOpen : true ,
@@ -1466,13 +1472,13 @@ export class ModelPickerWidget extends Disposable {
14661472
14671473 const { name, statusIcon } = this . _selectedModel ?. metadata || { } ;
14681474
1469- // Untrusted workspace: present a normal "Pick Model " placeholder (no badge)
1475+ // Untrusted workspace: present a normal "Models " placeholder (no badge)
14701476 // rather than a dead-end label; the hover and dropdown carry the Restricted
14711477 // Mode explanation and the Trust Workspace action.
14721478 const restrictedMode = this . isRestrictedMode ( ) ;
14731479
14741480 // Trusted, but Chat still needs sign-in / setup before any model is
1475- // usable: present the same "Pick Model " placeholder, with the dropdown
1481+ // usable: present the same "Models " placeholder, with the dropdown
14761482 // carrying a Sign In action instead of a misleading "Auto".
14771483 const setupRequired = this . isSetupRequired ( ) ;
14781484 const unavailable = restrictedMode || setupRequired ;
@@ -1495,7 +1501,7 @@ export class ModelPickerWidget extends Disposable {
14951501 nameChildren . push ( renderIcon ( statusIcon ) ) ;
14961502 }
14971503 const modelLabel = unavailable
1498- ? localize ( 'chat.modelPicker.label ' , "Pick Model " )
1504+ ? localize ( 'chat.modelPicker.modelsLabel ' , "Models " )
14991505 : activating
15001506 ? localize ( 'chat.modelPicker.activating' , "Activating..." )
15011507 : genericNoModels
@@ -1549,12 +1555,13 @@ export class ModelPickerWidget extends Disposable {
15491555 }
15501556 }
15511557
1552- // Aria
1558+ // Aria — name the control "Models" to match the visible label; the comma
1559+ // separates the control name from its current value / state.
15531560 this . _domNode . ariaLabel = restrictedMode
1554- ? localize ( 'chat.modelPicker.ariaLabelRestricted' , "Pick Model, models are unavailable in Restricted Mode " )
1561+ ? localize ( 'chat.modelPicker.ariaLabelRestricted' , "Models, unavailable while in Restricted mode " )
15551562 : setupRequired
1556- ? localize ( 'chat.modelPicker.ariaLabelSetupRequired' , "Pick Model , sign in to use Copilot" )
1557- : localize ( 'chat.modelPicker.ariaLabel' , "Pick Model , {0}" , fullLabel ) ;
1563+ ? localize ( 'chat.modelPicker.ariaLabelSetupRequired' , "Models , sign in to use Copilot" )
1564+ : localize ( 'chat.modelPicker.ariaLabel' , "Models , {0}" , fullLabel ) ;
15581565 }
15591566
15601567 /**
0 commit comments