feat: [TBB] add model thinking effort selection (Thinking Effort Part2)#194
Conversation
Extract the per-row focus/selection CSS state and focused-background paint from DropdownPopup into a new ItemController helper. The controller owns: - The base CSS id (default vs. selected) for the row and its descendants. - The focused flag and the rounded-background paint while focused. - Propagation of the resulting CSS id to every descendant so the focused background renders behind child labels. This removes the inline Control.setData(...) state slots and ad-hoc paint listener that were previously duplicated inside DropdownPopup, and gives future popup rows (e.g. inline action rows inside hover content) a single shared implementation to attach to. No behavior changes for the existing model picker: the same CSS ids, focus arc, and focus background color are used; only the ownership of the state moves out of DropdownPopup.
- The base CSS id (default vs. selected) for the row and its descendants. - The focused flag and the rounded-background paint while focused. - Propagation of the resulting CSS id to every descendant so the focused background renders behind child labels. This removes the inline Control.setData(...) state slots and ad-hoc paint listener that were previously duplicated inside DropdownPopup, and gives future popup rows (e.g. inline action rows inside hover content) a single shared implementation to attach to. No behavior changes for the existing model picker: the same CSS ids, focus arc, and focus background color are used; only the ownership of the state moves out of DropdownPopup.
Add a Thinking Effort section to the model hover popup that lets the user pick a reasoning effort level for each model and persists the choice across sessions. The chosen effort is forwarded to the language server on conversation/create and conversation/turn via a new modelInfo.reasoningEffort field, recorded on the per-turn reply data, and rendered alongside the model name in both the model picker button face and the per-turn footer. Key pieces: - UserPreference: model-scoped reasoning-effort map, published atomically as an immutable snapshot via Map.copyOf so concurrent Gson serialization on a background thread cannot CME the map. - ModelService: getSelectedReasoningEffort / setSelectedReasoningEffort / resolveEffectiveReasoningEffort APIs, plus refresh hooks that re-bind the picker label and item suffix on change. - LSP protocol: new ModelInfo record (id, providerName, reasoningEffort) attached to ConversationCreateParams and ConversationTurnParams. CopilotModel.CopilotModelCapabilitiesSupports gains reasoningEfforts + supportsReasoningEffortLevel so we know when to surface the picker. CopilotLanguageServerConnection.buildModelInfo emits modelInfo only when an effort is present. - Persistence: ReplyData carries reasoningEffort; ConversationPersistenceManager.persistModelInfo captures it at reply time so restored turns show the effort that was actually used. - UI: ItemController gains installHoverFocus for clickable rows. DropdownPopup uses a polling loop instead of mouseExit-driven close so the cursor can transit from a model row into the hover shell to click an effort. DropdownButton gains setSelectedDisplayText so the button face can show 'Model - Effort'. ModelHoverContentProvider renders the thinking-effort options with the shared ItemController hover focus and dismisses the dropdown via a host-provided closeRequest callback. IDropdownItemHoverProvider.configureHover gains that closeRequest parameter. - ModelUtils: shared getModelKey extraction, formatReasoningEffort with localized labels, resolveDefaultReasoningEffort (high for Claude, medium otherwise, first supported as fallback), and a reasoning-effort suffix in getModelSuffix. - i18n: localized labels and descriptions for none / low / medium / high / xhigh.
|
Haven't review the code yet. There is a ux feedback. See: Screen.Recording.2026-05-14.at.18.34.13.movYou can see that if the mouse moves not fast enough and stay on the scroll bar for a short while, the detailed pane will be disposed. Making it difficult to select thinking effort. Does windows has this issue? What about moving the detailed pane on the left. |
There was a problem hiding this comment.
Pull request overview
Adds selectable model thinking/reasoning effort support to the chat model picker and forwards the selected/default effort through chat requests and persistence.
Changes:
- Adds reasoning-effort capability metadata, display labels, suffix formatting, and default-effort resolution.
- Adds interactive thinking effort rows in model hover popups and updates dropdown hover behavior to support interaction.
- Persists selected effort per model and stores per-turn reasoning effort for restored conversation history.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/utils/ModelUtils.java |
Adds reasoning-effort formatting/default logic and includes effort in model suffixes. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/ModelHoverContentProvider.java |
Adds interactive thinking effort options to model hover content. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/ItemController.java |
Extends row hover/focus handling for reusable popup rows. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/IDropdownItemHoverProvider.java |
Adds a close callback for interactive hover content. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/DropdownPopup.java |
Keeps hover shells open for interaction and supports hover-driven dismissal. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/DropdownButton.java |
Allows model picker button text to include selected effort. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/messages.properties |
Adds localized thinking effort labels/descriptions. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/Messages.java |
Adds NLS fields for thinking effort text. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/services/ModelService.java |
Persists/resolves per-model reasoning effort and refreshes bound model pickers. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ModelPickerGroupsBuilder.java |
Passes effective reasoning effort into model dropdown suffix construction. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/CopilotTurnWidget.java |
Displays reasoning effort in turn footer model info. |
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatView.java |
Sends, renders, and persists reasoning effort for chat turns. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/persistence/CopilotTurnData.java |
Stores reasoning effort in persisted reply data. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/persistence/ConversationPersistenceManager.java |
Persists reasoning effort alongside model info. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/ModelInfo.java |
Adds protocol model metadata record. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/CopilotModel.java |
Extends model capabilities with reasoning effort metadata and model key helper. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/ConversationTurnParams.java |
Adds modelInfo to turn requests. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/ConversationCreateParams.java |
Adds modelInfo to create requests. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/CopilotLanguageServerConnection.java |
Sends reasoning effort through modelInfo on conversation create/turn requests. |
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/chat/UserPreference.java |
Stores selected reasoning effort per model key. |
Can repro on Windows. Fixed by checking boundary using shell. |
fe62c79 to
5201133
Compare
Test:



1.The model with thinking ability should have thinking effort on its model selector hover popup:
2. After the thinking effort is selected, the thinking effort should also be shown as a suffix of the selected model displayName:
3. For TBB enabled accounts, the thinking effort should also be shown on the model item:
5. For the default thinking effort, Claude should be high and other models should be Medium.
#204