Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/vs/platform/actionWidget/browser/actionList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ export interface IActionListOptions {
*/
readonly showFilter?: boolean;

/**
* Placeholder text for the filter input.
*/
readonly filterPlaceholder?: string;

/**
* Section IDs that should be collapsed by default.
*/
Expand Down Expand Up @@ -480,7 +485,7 @@ export class ActionList<T> extends Disposable {
this._filterInput = document.createElement('input');
this._filterInput.type = 'text';
this._filterInput.className = 'action-list-filter-input';
this._filterInput.placeholder = localize('actionList.filter.placeholder', "Search...");
this._filterInput.placeholder = this._options?.filterPlaceholder ?? localize('actionList.filter.placeholder', "Search...");
this._filterInput.setAttribute('aria-label', localize('actionList.filter.ariaLabel', "Filter items"));
this._filterContainer.appendChild(this._filterInput);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export function buildModelPickerItems(
id: 'manageModels',
enabled: true,
checked: false,
class: 'manage-models-action',
class: undefined,
tooltip: localize('chat.manageModels.tooltip', "Manage Language Models"),
label: localize('chat.manageModels', "Manage Models..."),
icon: Codicon.settingsGear,
Expand All @@ -336,7 +336,6 @@ export function buildModelPickerItems(
group: { title: '', icon: Codicon.settingsGear },
hideIcon: false,
section: otherModels.length ? ModelPickerSection.Other : undefined,
className: 'manage-models-link',
showAlways: true,
});
}
Expand All @@ -353,7 +352,7 @@ export function buildModelPickerItems(
id: 'moreModels',
enabled: true,
checked: false,
class: 'more-models-action',
class: undefined,
tooltip: isNewOrAnonymousUser ? localize('chat.moreModels.tooltip', "Add Language Models") : localize('chat.morePremiumModels.tooltip', "Add Premium Models"),
label: isNewOrAnonymousUser ? localize('chat.moreModels', "Add Language Models") : localize('chat.morePremiumModels', "Add Premium Models"),
icon: Codicon.add,
Expand All @@ -366,7 +365,6 @@ export function buildModelPickerItems(
label: isNewOrAnonymousUser ? localize('chat.moreModels', "Add Language Models") : localize('chat.morePremiumModels', "Add Premium Models"),
group: { title: '', icon: Codicon.add },
hideIcon: false,
className: 'manage-models-link',
showAlways: true,
});
}
Expand Down Expand Up @@ -554,6 +552,7 @@ export class ModelPickerWidget extends Disposable {

const listOptions = {
showFilter: models.length >= 10,
filterPlaceholder: localize('chat.modelPicker.search', "Search models..."),
collapsedByDefault: new Set([ModelPickerSection.Other]),
minWidth: 300,
};
Expand Down
16 changes: 0 additions & 16 deletions src/vs/workbench/contrib/chat/browser/widget/media/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -1376,22 +1376,6 @@ have to be updated for changes to the rules above, or to support more deeply nes
}
}

/* Manage Models link style in model picker */
.action-widget .monaco-list-row.action.manage-models-link {
color: var(--vscode-textLink-foreground) !important;
}

.action-widget .monaco-list-row.action.manage-models-link .codicon {
color: var(--vscode-textLink-foreground) !important;
}

.action-widget .monaco-list-row.action.manage-models-link:hover,
.action-widget .monaco-list-row.action.manage-models-link.focused {
color: var(--vscode-textLink-activeForeground) !important;
}



.interactive-session .chat-input-toolbar .chat-input-picker-item .action-label,
.interactive-session .chat-input-toolbar .chat-sessionPicker-item .action-label {
height: 16px;
Expand Down
Loading