Sandeep Somavarapu e8df0398a5 Add per-model configuration support for language models (#302771)
* Add per-model configuration support to LanguageModelsService

* Update chatProvider version to 5 and add configuration schema support for per-model options

* Add per-model configuration support to chat request options

* Revert version number in chatProvider declaration from 5 to 4

* Refactor chat request options to use ILanguageModelChatRequestOptions interface and revert chatProvider version to 4

* Add per-model configuration support in LanguageModelsService and update ActionsColumnRenderer

* Enhance per-model configuration support by merging schema defaults with user config in sendChatRequest

* Add per-model configuration actions and update LanguageModelsService methods

* Optimize model resolution for default vendors by applying per-model configurations directly to resolved models

* Add per-model configuration actions for single model selection in ChatModelsWidget

* Improve label generation for model configuration actions by using propSchema.title and enhancing formatting

* Enhance model configuration action labels to indicate default values in LanguageModelsService

* Add languageModelsService to model action creation for enhanced toolbar actions

* Integrate languageModelsService into model action creation for improved model picker functionality

* Add configuration toolbar actions for models in chat model picker

* Refactor model configuration action handling to utilize languageModelsService for toolbar actions

* Add toolbar actions to model item creation in chat model picker

* Refactor action item rendering to flatten SubmenuActions into a single gear button for context menu access

* Enhance toolbar action interaction by preventing selection on click and updating visibility styles

* Refactor ActionItemRenderer to use a gear button for context menu access and improve toolbar action handling

* Refactor ActionItemRenderer to use inline menu for SubmenuActions and improve context menu handling

* Refactor ActionItemRenderer to use defaultMenuStyles for menu configuration

* Refactor ActionItemRenderer to display a gear button for SubmenuActions that opens an inline menu

* Add submenu support to ActionListItem and update styles for submenu indicator

* Enhance submenu handling in ActionItemRenderer with improved mouse event management and layout adjustments

* Refactor ActionItemRenderer to streamline submenu handling and improve hover interactions

* Prevent hover display for items with submenu actions to avoid conflicts

* Add hardcoded submenu actions for debugging in createModelItem function

* Refactor submenu positioning in ActionList to improve layout and visibility

* Fix submenu positioning to prevent overflow clipping and ensure visibility

* Refactor submenu positioning to append within action list's DOM context and adjust for transform offsets

* Refactor submenu positioning to append within row element and adjust layout for transform offsets

* Enhance submenu structure by adding rowElement to support fixed-position rendering and adjust overflow handling

* Refactor submenu handling to remove rowElement from submenu state and adjust positioning logic for improved layout

* Refactor submenu positioning to use bounding rectangles for accurate placement relative to the row element

* Refactor submenu positioning to append within action list's DOM context for improved layout

* Refactor submenu positioning to append within action-widget container and use fixed coordinates for accurate placement

* Refactor submenu positioning to append directly to the action list's DOM node and adjust placement logic for improved layout

* Refactor ActionList to set position of domNode to relative for accurate submenu positioning

* Remove hardcoded submenu actions from createModelItem and use action's toolbarActions instead

* Prevent hiding submenu when hovering over it to improve user interaction

* Add submenu indicator visibility handling and CSS class for submenu items

* Prevent hiding action widget when focus moves to a submenu

* Always render submenu indicator icon for consistent width and alignment

* Improve focus handling in ActionWidgetService to prevent premature hiding

* Refactor focus handling in ActionWidgetService to improve submenu interaction

* Prevent submenu from being focusable to maintain action widget focus

* Adjust submenu positioning logic to display correctly based on available space

* Add hasActiveSubmenu method to ActionList and update focus handling in ActionWidgetService

* Update hasActiveSubmenu method to account for scheduled submenu visibility

* Adjust submenu positioning to prevent overflow above the action list

* Remove scheduled submenu visibility check from hasActiveSubmenu method

* Enhance submenu positioning logic to dynamically determine expand direction based on available space

* Implement cleanupSubmenu method and update focus handling to ensure proper submenu cleanup on focus loss

* Refactor submenu handling: remove Menu widget and implement direct DOM rendering for submenu items

* Add check icon to submenu items and adjust styling for improved layout

* Immediately clean up submenu on hover change to enhance user experience

* Update submenu styles: increase min-width and adjust padding for better layout

* Refactor hover handling in ActionList: avoid showing hover for submenu items and adjust submenu display logic on hover

* Enhance submenu item rendering: add group label display and adjust styles for improved layout

* Refactor hover handling in ActionList: improve logic to skip re-rendering for active submenus

* Update submenu min-width: increase from 160px to 220px for improved layout

* Update submenu styles: change min-width to max-content for better adaptability

* Update action widget styles: set min-width to 200px for improved layout

* Improve submenu hover handling: prevent hiding when hovering over the same row or submenu

* Update submenu item hover styles: change background and text colors for better visibility

* Fix submenu selector handling: update class name for submenu detection and prevent default mouse down event

* Hide submenu after action execution to improve user experience

* Update submenu item hover styles: change background and text colors for improved visibility

* Refactor LanguageModelsService: update group retrieval logic to use configuration service as the source of truth

* Refactor LanguageModelsService: enhance model configuration handling by removing default properties and managing group updates

* Add model configuration description retrieval to LanguageModelsService

* Refactor LanguageModelsService: update property schema handling to use showInPicker and enhance description formatting

* Add showInPicker property to IJSONSchema and update LanguageModelsService to utilize it

* Refactor LanguageModelsService: update showInPicker handling to improve type safety and simplify value retrieval

* Add showInPicker property to ILanguageModelConfigurationSchemaProperty and update configurationSchema type in ILanguageModelChatMetadata

* Enhance model hover content: include configuration properties marked with showInPicker

* Refactor buildModelPickerItems: pass languageModelsService to createModelItem for improved functionality

* Refactor submenu handling in ActionList: add delay for hiding submenu to improve user experience

* Refactor language model options: rename configuration to modelConfiguration for consistency

* Refactor language model options: rename modelConfiguration to configuration for consistency

* Enhance ChatLanguageModelsDataContribution: add per-model configuration schemas for improved schema validation

* Enhance language model settings management: implement model settings update mechanism and extend interfaces for configuration handling

* Enhance language model integration: add model configuration handling in chat agent requests and update type definitions

* Refactor language model settings handling: remove unused model settings methods and update model configuration retrieval in chat requests

* Refactor language model configuration handling: rename configuration to modelConfiguration for consistency

* Enhance RunSubagentTool: add model configuration retrieval for user-selected model

* Refactor language model configuration: rename 'models' to 'settings' for consistency

* Enhance ActionList: prevent hover display when a submenu is active and adjust submenu positioning to avoid scrollbar overlap

* Enhance ActionList: add description text element and style submenu indicator for better interaction

* Enhance ActionItemRenderer and CSS: adjust submenu indicator positioning and improve hover feedback for submenu items

* Enhance ActionItemRenderer and CSS: wrap description and submenu indicator for improved hover feedback

* Enhance ActionWidget CSS: adjust description group visibility and padding for submenu items

* Refactor ActionItemRenderer: rearrange description group and toolbar for improved layout and hover feedback

* Enhance ActionWidget CSS: adjust padding for submenu indicator for improved layout

* Enhance ActionList hover behavior: update submenu display logic to trigger on description group hover

* Enhance ActionWidget CSS: update submenu indicator visibility on row hover for improved user interaction

* Refactor ActionList: remove submenu check from hover display logic for improved user experience

* Refactor ActionList hover logic: improve submenu visibility handling during mouse movement

* Enhance LanguageModel configuration: add support for enum item labels and descriptions in model picker

* Enhance ActionList submenu rendering: add group headers and descriptions for improved clarity

* Enhance ModelPicker: update label rendering to include model configuration descriptions and re-render on model changes

* Enhance ActionList hover functionality: show hover content in submenu when no submenu actions are present and add CSS styles for hover section

* Enhance ActionList submenu hover styles: adjust padding, font size, and colors for improved readability

* Refactor ActionList submenu rendering: improve separator logic and remove unused header styles

* Enhance ActionList submenu rendering: add group headers with labels and separators for improved organization

* Enhance ActionList submenu hover styles: adjust padding for improved layout

* Refactor ActionList rendering: remove unused description group and submenu indicator styles for cleaner layout

* Enhance ActionList submenu hover styles: adjust padding, font size, and line height for improved readability

* Enhance action list submenu hover styles: adjust padding, font size, and line height for improved readability and layout

* Enhance action list submenu styles: adjust padding for improved layout

* Enhance action list submenu group label styles: increase font size for better visibility

* Update action list submenu group label color for improved visibility

* Enhance ActionList submenu positioning and overflow handling for improved layout and visibility

* Enhance action list item layout: add right padding for improved spacing

* Refactor ActionList submenu: simplify styles and remove unused properties

* Enhance ActionList hover behavior: switch to instant hover display for improved responsiveness

* Enhance ActionList hover behavior: implement hover delay for improved user experience

* Refactor ActionList hover behavior: switch to delayed hover display for improved user experience

* Enhance ModelPickerActionItem: re-render label on model configuration changes

* Enhance ModelPickerWidget: re-register label rendering on language model changes

* Refactor ILanguageModelConfigurationSchemaProperty: rename showInPicker to isVisible for clarity

* Refactor ILanguageModelConfigurationSchemaProperty: rename isVisible to isPrimary for clarity

* Refactor ILanguageModelConfigurationSchemaProperty: rename isPrimary to showInDescription for clarity

* Refactor ILanguageModelConfigurationSchemaProperty: rename showInDescription to showInModelPicker for clarity

* Refactor ILanguageModelConfigurationSchemaProperty: rename showInModelPicker to pinToModelPicker for clarity

* Refactor ILanguageModelConfigurationSchemaProperty: change pinToModelPicker to group for improved clarity

* Refactor LanguageModelConfigurationSchemaProperty and LanguageModelConfigurationSchema: update configurationSchema type and add detailed property definitions

* Refactor LanguageModelConfigurationSchema: simplify schema property definition and enhance documentation

* Refactor LanguageModelConfigurationSchema: enhance documentation for properties and clarify enumItemLabels and group usage

* Refactor ILanguageModelConfigurationSchema: inline schema property definition and enhance documentation for group and enumItemLabels

* Refactor ILanguageModelsService: enhance documentation for getModelConfigurationDescription to clarify its purpose and usage

* Refactor language model configuration handling: replace direct service method calls with utility function for improved clarity and maintainability

* Refactor ActionItemRenderer: remove unused descriptionText property and streamline description handling

* Refactor ActionItemRenderer: streamline description element creation by removing redundant code

* Refactor ActionList: enhance hover content rendering and streamline submenu actions handling

* Refactor ActionListHoverContent: extract group rendering logic into ActionListHoverGroup class

* Refactor ActionListHoverContent and ActionListHoverGroup: enhance event handling and streamline disposables management

* Refactor ActionListHoverGroup and ActionListHoverContent: integrate Menu widget for submenu actions and remove unused CSS styles

* Refactor ActionListHoverGroup and ActionListHoverContent: remove unused Menu widget and enhance submenu item styling

* Enhance ActionList keyboard navigation and accessibility: add support for submenu actions with arrow keys and improve focus handling for submenu items

* Add OpenModelConfigPickerAction and model configuration picker UI component

* Refactor ModelConfigPickerActionItem render method: streamline DOM node creation and class assignment

* Enhance ModelConfigPickerActionItem: add disabled state handling for navigation actions

* Enhance ModelConfigPickerActionItem: add header for submenu actions with group label

* Enhance ModelConfigPickerActionItem: update submenu header to use action label as group title

* Refactor ModelConfigPickerActionItem and ModelPickerActionItem: simplify navigation properties handling and remove unused language models service references

* Enhance ModelConfigPickerActionItem: add navigation-group configuration values display in model picker

* Enhance ModelConfigPickerActionItem and language model interfaces: add support for enum icons in model configuration

* Refactor ModelConfigPickerActionItem and language model interfaces: replace enumIcons with a single icon property for configuration

* Refactor ModelConfigPickerActionItem and language model interfaces: remove icon property from configuration schema

* Refactor ActionList and ActionWidgetService: remove unused submenu actions and related hover logic

* Clarify comment in OpenModelConfigPickerAction: specify that the picker is opened by the ModelConfigPickerActionItem view item on click

* Remove model config picker UI: delete ModelConfigPickerActionItem, remove OpenModelConfigPickerAction and chatModelHasNavigationConfig context key

The config picker dropdown button in the chat input has been removed while keeping the underlying per-model configuration API, settings support, and model management editor intact.

Also fix ILanguageModelConfigurationSchema to not include boolean in properties type (incompatible with IJSONSchema), and add showUnavailableFeatured/showFeatured to IModelPickerDelegate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refactor LanguageModelConfigurationSchema: adjust properties type definition for clarity

* Refactor LanguageModelsService: merge configuration options and simplify default checks

* Revert newChatViewPane changes and fix code review issues

- Make showUnavailableFeatured/showFeatured optional on IModelPickerDelegate
  (defaults to true), removing the need to change newChatViewPane.ts
- Fix sendChatRequest merge order: caller's configuration takes precedence
  over stored model config
- Remove dead typeof propSchema !== 'boolean' checks after type cleanup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Revert unrelated changes to chatModelPicker and modelPickerActionItem

These files were modified to add showUnavailableFeatured/showFeatured
which already landed on main separately. Revert to merge-base versions
to keep the diff clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Revert unrelated changes to chatInputPart.ts

Revert to merge-base version — the diff was from main changes
(delegation picker, showUnavailableFeatured/showFeatured) that
will come in on merge.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-18 13:35:05 +00:00
2026-03-16 19:05:09 -07:00
2026-03-03 10:57:52 -08:00
2026-02-23 17:11:15 +01:00
2026-03-17 07:54:12 +00:00
2026-03-16 14:51:48 +00:00

Visual Studio Code - Open Source ("Code - OSS")

Feature Requests Bugs Gitter

The Repository

This repository ("Code - OSS") is where we (Microsoft) develop the Visual Studio Code product together with the community. Not only do we work on code and issues here, we also publish our roadmap, monthly iteration plans, and our endgame plans. This source code is available to everyone under the standard MIT license.

Visual Studio Code

VS Code in action

Visual Studio Code is a distribution of the Code - OSS repository with Microsoft-specific customizations released under a traditional Microsoft product license.

Visual Studio Code combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools.

Visual Studio Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on Visual Studio Code's website. To get the latest releases every day, install the Insiders build.

Contributing

There are many ways in which you can participate in this project, for example:

If you are interested in fixing issues and contributing directly to the code base, please see the document How to Contribute, which covers the following:

Feedback

See our wiki for a description of each of these channels and information on some other available community-driven channels.

Many of the core components and extensions to VS Code live in their own repositories on GitHub. For example, the node debug adapter and the mono debug adapter repositories are separate from each other. For a complete list, please visit the Related Projects page on our wiki.

Bundled Extensions

VS Code includes a set of built-in extensions located in the extensions folder, including grammars and snippets for many languages. Extensions that provide rich language support (inline suggestions, Go to Definition) for a language have the suffix language-features. For example, the json extension provides coloring for JSON and the json-language-features extension provides rich language support for JSON.

Development Container

This repository includes a Visual Studio Code Dev Containers / GitHub Codespaces development container.

  • For Dev Containers, use the Dev Containers: Clone Repository in Container Volume... command which creates a Docker volume for better disk I/O on macOS and Windows.

    • If you already have VS Code and Docker installed, you can also click here to get started. This will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.
  • For Codespaces, install the GitHub Codespaces extension in VS Code, and use the Codespaces: Create New Codespace command.

Docker / the Codespace should have at least 4 Cores and 6 GB of RAM (8 GB recommended) to run a full build. See the development container README for more information.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT license.

Languages
TypeScript 73.9%
jsonc 21.3%
CSS 1.4%
C 1%
JavaScript 0.8%
Other 1.5%