diff --git a/src/vs/workbench/contrib/void/browser/chatThreadService.ts b/src/vs/workbench/contrib/void/browser/chatThreadService.ts index eb1a6883..30f38f10 100644 --- a/src/vs/workbench/contrib/void/browser/chatThreadService.ts +++ b/src/vs/workbench/contrib/void/browser/chatThreadService.ts @@ -641,7 +641,7 @@ class ChatThreadService extends Disposable implements IChatThreadService { // 2. if tool requires approval, break from the loop, awaiting approval - const approvalType = isBuiltInTool ? approvalTypeOfBuiltinToolName[toolName] : 'mcp-tools' + const approvalType = isBuiltInTool ? approvalTypeOfBuiltinToolName[toolName] : 'MCP tools' if (approvalType) { const autoApprove = this._settingsService.state.globalSettings.autoApprove[approvalType] // add a tool_request because we use it for UI if a tool is loading (this should be improved in the future) 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 26b12cc8..4bd6424a 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 @@ -1616,7 +1616,7 @@ const ToolRequestAcceptRejectButtons = ({ toolName }: { toolName: ToolName }) => ) - const approvalType = isABuiltinToolName(toolName) ? approvalTypeOfBuiltinToolName[toolName] : 'mcp-tools' + const approvalType = isABuiltinToolName(toolName) ? approvalTypeOfBuiltinToolName[toolName] : 'MCP tools' const approvalToggle = approvalType ?
: null diff --git a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx index 52e00dc2..60294f06 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx @@ -22,6 +22,16 @@ import { TransferEditorType, TransferFilesInfo } from '../../../extensionTransfe import { MCPServer } from '../../../../common/mcpServiceTypes.js'; import { useMCPServiceState } from '../util/services.js'; +type Tab = + | 'models' + | 'localProviders' + | 'providers' + | 'featureOptions' + | 'mcp' + | 'general' + | 'all'; + + const ButtonLeftTextRightOption = ({ text, leftButton }: { text: string, leftButton?: React.ReactNode }) => { return
@@ -1018,6 +1028,20 @@ const MCPServersList = () => { export const Settings = () => { const isDark = useIsDark() + // ─── sidebar nav ────────────────────────── + const [selectedSection, setSelectedSection] = + useState('models'); + + const navItems: { tab: Tab; label: string }[] = [ + { tab: 'models', label: 'Models' }, + { tab: 'localProviders', label: 'Local Providers' }, + { tab: 'providers', label: 'Other Providers' }, + { tab: 'featureOptions', label: 'Feature Options' }, + { tab: 'general', label: 'General' }, + { tab: 'mcp', label: 'MCP' }, + { tab: 'all', label: 'All Settings' }, + ]; + const shouldShowTab = (tab: Tab) => selectedSection === 'all' || selectedSection === tab; const accessor = useAccessor() const commandService = accessor.get('ICommandService') const environmentService = accessor.get('IEnvironmentService') @@ -1092,317 +1116,378 @@ export const Settings = () => { } - return
-
+ return ( +
+
+ {/* ────────────── SIDEBAR ────────────── */} -
+ -

{`Void's Settings`}

- -
- - {/* Models section (formerly FeaturesTab) */} - - - - -
- - {/* Models section (formerly FeaturesTab) */} - -

Models

- -
- - - - - -

Local Providers

-

{`Void can access any model that you host locally. We automatically detect your local models by default.`}

- -
- -
- - - - - -

Providers

-

{`Void can access models from Anthropic, OpenAI, OpenRouter, and more.`}

- - - + {/* ───────────── MAIN PANE ───────────── */} +
-

Feature Options

+
-
- - {/* FIM */} -
-

{displayInfoOfFeatureName('Autocomplete')}

-
- - Experimental.{' '} - - - Only works with FIM models.* - +

{`Void's Settings`}

+ +
+ + {/* Models section (formerly FeaturesTab) */} + + + + +
+ + {/* All sections in flex container with gap-12 */} +
+ {/* Models section (formerly FeaturesTab) */} +
+ +

Models

+ +
+ + +
-
- {/* Enable Switch */} + {/* Local Providers section */} +
-
- voidSettingsService.setGlobalSetting('enableAutocomplete', newVal)} - /> - {settingsState.globalSettings.enableAutocomplete ? 'Enabled' : 'Disabled'} +

Local Providers

+

{`Void can access any model that you host locally. We automatically detect your local models by default.`}

+ +
+ +
+ + + +
+ + {/* Other Providers section */} +
+ +

Other Providers

+

{`Void can access models from Anthropic, OpenAI, OpenRouter, and more.`}

+ + +
+
+ + {/* Feature Options section */} +
+ +

Feature Options

+ +
+ + {/* FIM */} +
+

{displayInfoOfFeatureName('Autocomplete')}

+
+ + Experimental.{' '} + + + Only works with FIM models.* + +
+ +
+ {/* Enable Switch */} + +
+ voidSettingsService.setGlobalSetting('enableAutocomplete', newVal)} + /> + {settingsState.globalSettings.enableAutocomplete ? 'Enabled' : 'Disabled'} +
+
+ + {/* Model Dropdown */} + +
+ +
+
+ +
+ +
+
+ + {/* Apply */} + + +
+

{displayInfoOfFeatureName('Apply')}

+
Settings that control the behavior of the Apply button.
+ +
+ {/* Sync to Chat Switch */} +
+ voidSettingsService.setGlobalSetting('syncApplyToChat', newVal)} + /> + {settingsState.globalSettings.syncApplyToChat ? 'Same as Chat model' : 'Different model'} +
+ + {/* Model Dropdown */} +
+ +
+
+ + +
+ {/* Fast Apply Method Dropdown */} +
+ +
+
+ +
+
+ + + + + {/* Tools Section */} +
+

Tools

+
{`Tools are functions that LLMs can call. Some tools require user approval.`}
+ +
+ {/* Auto Accept Switch */} + + {[...toolApprovalTypes].map((approvalType) => { + return
+ +
+ })} + +
+ + {/* Tool Lint Errors Switch */} + + +
+ voidSettingsService.setGlobalSetting('includeToolLintErrors', newVal)} + /> + {settingsState.globalSettings.includeToolLintErrors ? 'Fix lint errors' : `Fix lint errors`} +
+
+
+
+ + + +
+

Editor

+
{`Settings that control the visibility of Void suggestions in the code editor.`}
+ +
+ {/* Auto Accept Switch */} + +
+ voidSettingsService.setGlobalSetting('showInlineSuggestions', newVal)} + /> + {settingsState.globalSettings.showInlineSuggestions ? 'Show suggestions on select' : 'Show suggestions on select'} +
+
+
+
+
- {/* Model Dropdown */} - -
- + {/* General section */} +
+ {/* One-Click Switch section */} +
+ +

One-Click Switch

+

{`Transfer your editor settings into Void.`}

+ +
+ + + +
+
+
+ + {/* Import/Export section */} +
+

Import/Export

+

{`Transfer Void's settings and chats in and out of Void.`}

+
+ {/* Settings Subcategory */} +
+ + { fileInputSettingsRef.current?.click() }}> + Import Settings + + onDownload('Settings')}> + Export Settings + + { voidSettingsService.resetState(); }}> + Reset Settings + +
+ {/* Chats Subcategory */} +
+ + { fileInputChatsRef.current?.click() }}> + Import Chats + + onDownload('Chats')}> + Export Chats + + { chatThreadsService.resetState(); }}> + Reset Chats + +
- - -
- -
- - - {/* Apply */} - - -
-

{displayInfoOfFeatureName('Apply')}

-
Settings that control the behavior of the Apply button.
- -
- {/* Sync to Chat Switch */} -
- voidSettingsService.setGlobalSetting('syncApplyToChat', newVal)} - /> - {settingsState.globalSettings.syncApplyToChat ? 'Same as Chat model' : 'Different model'}
- {/* Model Dropdown */} -
- + + + {/* Built-in Settings section */} +
+

Built-in Settings

+

{`IDE settings, keyboard settings, and theme customization.`}

+ + +
+ { commandService.executeCommand('workbench.action.openSettings') }}> + General Settings + + { commandService.executeCommand('workbench.action.openGlobalKeybindings') }}> + Keyboard Settings + + { commandService.executeCommand('workbench.action.selectTheme') }}> + Theme Settings + + { nativeHostService.showItemInFolder(environmentService.logsHome.fsPath) }}> + Open Logs + +
+
-
-
- {/* Fast Apply Method Dropdown */} -
- -
-
- -
- - - - - - - {/* Tools Section */} -
-

Tools

-
{`Tools are functions that LLMs can call. Some tools require user approval.`}
- -
- {/* Auto Accept Switch */} - - {[...toolApprovalTypes].map((approvalType) => { - return
- -
- })} - -
- - {/* Tool Lint Errors Switch */} - - -
- voidSettingsService.setGlobalSetting('includeToolLintErrors', newVal)} - /> - {settingsState.globalSettings.includeToolLintErrors ? 'Fix lint errors' : `Fix lint errors`} -
-
-
-
- - - -
-

Editor

-
{`Settings that control the visibility of Void suggestions in the code editor.`}
- -
- {/* Auto Accept Switch */} - -
- voidSettingsService.setGlobalSetting('showInlineSuggestions', newVal)} - /> - {settingsState.globalSettings.showInlineSuggestions ? 'Show suggestions on select' : 'Show suggestions on select'} -
-
-
-
-
- - - {/* General section (formerly GeneralTab) */} -
- -

One-Click Switch

-

{`Transfer your editor settings into Void.`}

- -
- - - -
-
-
- - {/* Import/Export section, as its own block right after One-Click Switch */} -
-

Import/Export

-

{`Transfer Void's settings and chats in and out of Void.`}

-
- {/* Settings Subcategory */} -
- - { fileInputSettingsRef.current?.click() }}> - Import Settings - - onDownload('Settings')}> - Export Settings - - { voidSettingsService.resetState(); }}> - Reset Settings - -
- {/* Chats Subcategory */} -
- - { fileInputChatsRef.current?.click() }}> - Import Chats - - onDownload('Chats')}> - Export Chats - - { chatThreadsService.resetState(); }}> - Reset Chats - -
-
-
- - - -
- -

Built-in Settings

-

{`IDE settings, keyboard settings, and theme customization.`}

- - -
- { commandService.executeCommand('workbench.action.openSettings') }}> - General Settings - - { commandService.executeCommand('workbench.action.openGlobalKeybindings') }}> - Keyboard Settings - - { commandService.executeCommand('workbench.action.selectTheme') }}> - Theme Settings - - { nativeHostService.showItemInFolder(environmentService.logsHome.fsPath) }}> - Open Logs - -
-
-
- - -
-

AI Instructions

- -

- +

AI Instructions

+

+ -

- - - - {/* --- Disable System Message Toggle --- */} -
- -
- { - voidSettingsService.setGlobalSetting('disableSystemMessage', newValue); - }} - /> - - {settingsState.globalSettings.disableSystemMessage ? 'Disable system message' : 'Disable system message'} - +

+ + + + {/* --- Disable System Message Toggle --- */} +
+ +
+ { + voidSettingsService.setGlobalSetting('disableSystemMessage', newValue); + }} + /> + + {'Disable system message'} + +
+
+
+ {`When disabled, Void will not include anything in the system message except for content you specified above.`} +
+
+
-
-
- {`When disabled, Void will not include anything in the system message except for content you specified above.`} -
-
-
-
-

MCP

-

- + +

MCP

+

+ -

-
- { await mcpService.revealMCPConfigFile() }}> - Add MCP Server - -
+

+
+ { await mcpService.revealMCPConfigFile() }}> + Add MCP Server + +
- - - -
+ + + +
+
+ + + + + +
+ +
+
-
+ ); } - diff --git a/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts b/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts index d930f5de..d5da3e17 100644 --- a/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts +++ b/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts @@ -18,7 +18,7 @@ export type ShallowDirectoryItem = { } -export const approvalTypeOfBuiltinToolName: Partial<{ [T in BuiltinToolName]?: 'edits' | 'terminal' | 'mcp-tools' }> = { +export const approvalTypeOfBuiltinToolName: Partial<{ [T in BuiltinToolName]?: 'edits' | 'terminal' | 'MCP tools' }> = { 'create_file_or_folder': 'edits', 'delete_file_or_folder': 'edits', 'rewrite_file': 'edits', @@ -35,7 +35,7 @@ export type ToolApprovalType = NonNullable<(typeof approvalTypeOfBuiltinToolName export const toolApprovalTypes = new Set([ ...Object.values(approvalTypeOfBuiltinToolName), - 'mcp-tools', + 'MCP tools', ])