diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index b05b95ce..b86cdd22 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -165,34 +165,42 @@ const ReasoningOptionDropdown = () => { let toggleButton: React.ReactNode = null if (canToggleReasoning) { - toggleButton = { voidSettingsService.setOptionsOfModelSelection(modelSelection.providerName, modelSelection.modelName, { reasoningEnabled: newVal }) }} - /> + toggleButton = +
+ {isEnabled ? 'Thinking' : 'Thinking'} + { voidSettingsService.setOptionsOfModelSelection(modelSelection.providerName, modelSelection.modelName, { reasoningEnabled: newVal }) }} + /> +
+ } let slider: React.ReactNode = null if (isEnabled && reasoningBudgetOptions?.type === 'slider') { const { min, max, default: defaultVal } = reasoningBudgetOptions const value = voidSettingsState.optionsOfModelSelection[modelSelection.providerName]?.[modelSelection.modelName]?.reasoningBudget ?? defaultVal - slider = { voidSettingsService.setOptionsOfModelSelection(modelSelection.providerName, modelSelection.modelName, { reasoningBudget: newVal }) }} - label={value + ''} - /> + slider =
+ Budget + { voidSettingsService.setOptionsOfModelSelection(modelSelection.providerName, modelSelection.modelName, { reasoningBudget: newVal }) }} + /> + {`${value} tokens`} +
+ } return <> {toggleButton} {slider} - } @@ -294,14 +302,12 @@ export const VoidChatArea: React.FC = ({ {/* Bottom row */}
{showModelDropdown && ( -
{ e.preventDefault(); e.stopPropagation() }}> +
+
)} - - {isStreaming ? ( ) : ( diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx index c76b46d2..f5a45795 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx @@ -169,7 +169,7 @@ export const VoidInputBox = ({ onChangeText, onCreateInstance, inputBoxRef, plac ctor={InputBox} className=' bg-void-bg-1 - @@[&_::placeholder]:!void-text-void-fg-3 + placeholder:!void-text-void-fg-3 ' propsFn={useCallback((container) => [ container, @@ -213,13 +213,10 @@ export const VoidInputBox = ({ onChangeText, onCreateInstance, inputBoxRef, plac - - export const VoidSlider = ({ value, onChange, size = 'md', - label, disabled = false, min = 0, max = 7, @@ -229,7 +226,6 @@ export const VoidSlider = ({ }: { value: number; onChange: (value: number) => void; - label?: string; disabled?: boolean; size?: 'xs' | 'sm' | 'sm+' | 'md'; min?: number; @@ -241,6 +237,12 @@ export const VoidSlider = ({ // Calculate percentage for position const percentage = ((value - min) / (max - min)) * 100; + // Get numeric thumb size for padding calculation + const thumbSizePx = + size === 'xs' ? 2.5 * 4 : // Convert rem to px (approx) + size === 'sm' ? 3 * 4 : + size === 'sm+' ? 3.5 * 4 : 4 * 4; // md size + // Handle track click const handleTrackClick = (e: React.MouseEvent) => { if (disabled) return; @@ -293,90 +295,89 @@ export const VoidSlider = ({ return (
-
- {/* Track */} -
+ {/* Track container with adjusted width */} +
+ {/* Track */} +
- {/* Filled part of track */} -
+ {/* Filled part of track */} +
+
+ + {/* Thumb with sizes matching VoidSwitch */} +
{ + if (disabled) return; + + const track = e.currentTarget.previousElementSibling; + + const handleMouseMove = (moveEvent: MouseEvent) => { + handleThumbDrag(moveEvent, track as Element); + }; + + const handleMouseUp = () => { + document.removeEventListener('mousemove', handleMouseMove); + document.removeEventListener('mouseup', handleMouseUp); + document.body.style.cursor = ''; + document.body.style.userSelect = ''; + }; + + document.body.style.userSelect = 'none'; + document.body.style.cursor = 'grabbing'; + document.addEventListener('mousemove', handleMouseMove); + document.addEventListener('mouseup', handleMouseUp); + + e.preventDefault(); + }} />
- - {/* Thumb */} -
{ - if (disabled) return; - - const track = e.currentTarget.previousElementSibling; - - const handleMouseMove = (moveEvent: MouseEvent) => { - handleThumbDrag(moveEvent, track as Element); - }; - - const handleMouseUp = () => { - document.removeEventListener('mousemove', handleMouseMove); - document.removeEventListener('mouseup', handleMouseUp); - document.body.style.cursor = ''; - document.body.style.userSelect = ''; - }; - - document.body.style.userSelect = 'none'; - document.body.style.cursor = 'grabbing'; - document.addEventListener('mousemove', handleMouseMove); - document.addEventListener('mouseup', handleMouseUp); - - e.preventDefault(); - }} - />
- - {label && ( - - {label} - - )}
); }; - - export const VoidSwitch = ({ value, onChange, size = 'md', - label, disabled = false, }: { value: boolean; onChange: (value: boolean) => void; - label?: string; disabled?: boolean; size?: 'xs' | 'sm' | 'sm+' | 'md'; }) => { return ( -