diff --git a/extensions/intellij/src/main/resources/META-INF/plugin.xml b/extensions/intellij/src/main/resources/META-INF/plugin.xml index 2d4b2e1af..9f407a573 100644 --- a/extensions/intellij/src/main/resources/META-INF/plugin.xml +++ b/extensions/intellij/src/main/resources/META-INF/plugin.xml @@ -151,9 +151,9 @@ - + text="Settings" + description="Settings"> + tabGroup.tabs); - return tabs.find((tab) => - (tab.input as any)?.viewType?.endsWith("continue.continueGUIView"), - ); -} type TelemetryCaptureParams = Parameters; @@ -67,27 +59,15 @@ function captureCommandTelemetry( } function focusGUI() { - const fullScreenTab = getFullScreenTab(); - if (fullScreenTab) { - // focus fullscreen - fullScreenPanel?.reveal(); - } else { - // focus sidebar - vscode.commands.executeCommand("continue.continueGUIView.focus"); - // vscode.commands.executeCommand("workbench.action.focusAuxiliaryBar"); - } + // focus sidebar + vscode.commands.executeCommand("continue.continueGUIView.focus"); + // vscode.commands.executeCommand("workbench.action.focusAuxiliaryBar"); } function hideGUI() { - const fullScreenTab = getFullScreenTab(); - if (fullScreenTab) { - // focus fullscreen - fullScreenPanel?.dispose(); - } else { - // focus sidebar - vscode.commands.executeCommand("workbench.action.closeAuxiliaryBar"); - // vscode.commands.executeCommand("workbench.action.toggleAuxiliaryBar"); - } + // focus sidebar + vscode.commands.executeCommand("workbench.action.closeAuxiliaryBar"); + // vscode.commands.executeCommand("workbench.action.toggleAuxiliaryBar"); } function waitForSidebarReady( @@ -436,74 +416,6 @@ const getCommandsMap: ( "continue.applyCodeFromChat": () => { void sidebar.webviewProtocol.request("applyCodeFromChat", undefined); }, - "continue.toggleFullScreen": async () => { - focusGUI(); - - const sessionId = await sidebar.webviewProtocol.request( - "getCurrentSessionId", - undefined, - ); - // Check if full screen is already open by checking open tabs - const fullScreenTab = getFullScreenTab(); - - if (fullScreenTab && fullScreenPanel) { - // Full screen open, but not focused - focus it - fullScreenPanel.reveal(); - return; - } - - // Clear the sidebar to prevent overwriting changes made in fullscreen - vscode.commands.executeCommand("continue.newSession"); - - // Full screen not open - open it - captureCommandTelemetry("openFullScreen"); - - // Create the full screen panel - let panel = vscode.window.createWebviewPanel( - "continue.continueGUIView", - "Continue", - vscode.ViewColumn.One, - { - retainContextWhenHidden: true, - enableScripts: true, - }, - ); - fullScreenPanel = panel; - - // Add content to the panel - panel.webview.html = sidebar.getSidebarContent( - extensionContext, - panel, - undefined, - undefined, - true, - ); - - const sessionLoader = panel.onDidChangeViewState(() => { - vscode.commands.executeCommand("continue.newSession"); - if (sessionId) { - vscode.commands.executeCommand( - "continue.focusContinueSessionId", - sessionId, - ); - } - panel.reveal(); - sessionLoader.dispose(); - }); - - // When panel closes, reset the webview and focus - panel.onDidDispose( - () => { - sidebar.resetWebviewProtocolWebview(); - vscode.commands.executeCommand("continue.focusContinueInput"); - }, - null, - extensionContext.subscriptions, - ); - - vscode.commands.executeCommand("workbench.action.copyEditorToNewWindow"); - vscode.commands.executeCommand("workbench.action.closeAuxiliaryBar"); - }, "continue.openConfigPage": () => { vscode.commands.executeCommand("continue.navigateTo", "/config", false); }, @@ -652,11 +564,6 @@ const getCommandsMap: ( label: "$(comment) Open chat", description: getMetaKeyLabel() + " + L", }, - { - label: "$(screen-full) Open full screen chat", - description: - getMetaKeyLabel() + " + K, " + getMetaKeyLabel() + " + M", - }, { label: quickPickStatusText(targetStatus), description: @@ -699,8 +606,6 @@ const getCommandsMap: ( } } else if (selectedOption === "$(comment) Open chat") { vscode.commands.executeCommand("continue.focusContinueInput"); - } else if (selectedOption === "$(screen-full) Open full screen chat") { - vscode.commands.executeCommand("continue.toggleFullScreen"); } else if (selectedOption === "$(gear) Open settings") { vscode.commands.executeCommand("continue.navigateTo", "/config"); } diff --git a/extensions/vscode/src/extension/VsCodeMessenger.ts b/extensions/vscode/src/extension/VsCodeMessenger.ts index 516e47983..352e4fd66 100644 --- a/extensions/vscode/src/extension/VsCodeMessenger.ts +++ b/extensions/vscode/src/extension/VsCodeMessenger.ts @@ -112,9 +112,6 @@ export class VsCodeMessenger { this.onWebview("focusEditor", (msg) => { vscode.commands.executeCommand("workbench.action.focusActiveEditorGroup"); }); - this.onWebview("toggleFullScreen", (msg) => { - vscode.commands.executeCommand("continue.toggleFullScreen"); - }); this.onWebview("acceptDiff", async ({ data: { filepath, streamId } }) => { await vscode.commands.executeCommand( diff --git a/gui/src/components/AssistantAndOrgListbox/SelectedAssistantButton.tsx b/gui/src/components/AssistantAndOrgListbox/SelectedAssistantButton.tsx index 80fe60f69..325367153 100644 --- a/gui/src/components/AssistantAndOrgListbox/SelectedAssistantButton.tsx +++ b/gui/src/components/AssistantAndOrgListbox/SelectedAssistantButton.tsx @@ -26,13 +26,13 @@ export function SelectedAssistantButton({ return (
-
+
{selectedProfile === null ? ( "Create your first agent" ) : configLoading ? ( @@ -49,7 +49,7 @@ export function SelectedAssistantButton({ <> {selectedProfile.title} diff --git a/gui/src/components/InfoHover.tsx b/gui/src/components/InfoHover.tsx index 79d8eb136..e20e83530 100644 --- a/gui/src/components/InfoHover.tsx +++ b/gui/src/components/InfoHover.tsx @@ -1,4 +1,5 @@ import { InformationCircleIcon } from "@heroicons/react/24/outline"; +import { ReactNode } from "react"; import { ToolTip } from "./gui/Tooltip"; const DEFAULT_SIZE = "5"; @@ -17,7 +18,7 @@ const InfoHover = ({ id, }: { id: string; - msg: string; + msg: ReactNode; size?: string; }) => { const sizeClasses = diff --git a/gui/src/components/PageHeader.tsx b/gui/src/components/PageHeader.tsx index 93d5a941f..56985e811 100644 --- a/gui/src/components/PageHeader.tsx +++ b/gui/src/components/PageHeader.tsx @@ -13,7 +13,7 @@ export function PageHeader({ }: PageHeaderProps) { return (
diff --git a/gui/src/components/gui/NumberInput.tsx b/gui/src/components/gui/NumberInput.tsx deleted file mode 100644 index 4db9596c9..000000000 --- a/gui/src/components/gui/NumberInput.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import React, { useState } from "react"; - -interface NumberInputProps { - value: number; - onChange: (value: number) => void; - max: number; - min: number; - disabled?: boolean; -} - -const NumberInput: React.FC = ({ - value, - onChange, - max, - min, - disabled = false, -}) => { - const [inputValue, setInputValue] = useState(value.toString()); - - const handleIncrement = () => { - if (disabled || value >= max) return; - const newValue = value + 1; - onChange(newValue); - setInputValue(newValue.toString()); - }; - - const handleDecrement = () => { - if (disabled || value <= min) return; - const newValue = value - 1; - onChange(newValue); - setInputValue(newValue.toString()); - }; - - const handleInputChange = (e: React.ChangeEvent) => { - if (disabled) return; - const newInputValue = e.target.value; - setInputValue(newInputValue); - - // Only update the actual value if it's a valid number - const numValue = parseInt(newInputValue, 10); - if (!isNaN(numValue)) { - // Apply min/max constraints - const constrainedValue = Math.min(Math.max(numValue, min), max); - onChange(constrainedValue); - } - }; - - const handleBlur = () => { - // When input loses focus, ensure the displayed value matches the actual value - // This handles cases where the user entered an invalid value - setInputValue(value.toString()); - }; - - return ( -
- -
- - -
-
- ); -}; - -export default NumberInput; diff --git a/gui/src/components/mainInput/ContextStatus.tsx b/gui/src/components/mainInput/ContextStatus.tsx index 4ed048d86..b6dc7bca6 100644 --- a/gui/src/components/mainInput/ContextStatus.tsx +++ b/gui/src/components/mainInput/ContextStatus.tsx @@ -68,7 +68,7 @@ const ContextStatus = () => {
} > -
+
); } diff --git a/gui/src/components/ui/EmptyState.tsx b/gui/src/components/ui/EmptyState.tsx index c2546057b..324adca63 100644 --- a/gui/src/components/ui/EmptyState.tsx +++ b/gui/src/components/ui/EmptyState.tsx @@ -4,7 +4,7 @@ interface EmptyStateProps { export function EmptyState({ message }: EmptyStateProps) { return ( -
+
{message}
); diff --git a/gui/src/components/ui/TabButton.tsx b/gui/src/components/ui/TabButton.tsx index ddc11639f..847c8ddec 100644 --- a/gui/src/components/ui/TabButton.tsx +++ b/gui/src/components/ui/TabButton.tsx @@ -1,20 +1,13 @@ import { ToolTip } from "../gui/Tooltip"; interface TabButtonProps { - id: string; label: string; icon: React.ReactNode; isActive: boolean; onClick: () => void; } -export function TabButton({ - id, - label, - icon, - isActive, - onClick, -}: TabButtonProps) { +export function TabButton({ label, icon, isActive, onClick }: TabButtonProps) { return (
( {title} {subtitle && ( -

{subtitle}

+

+ {subtitle} +

)}
diff --git a/gui/src/pages/config/components/ConfigHeader.tsx b/gui/src/pages/config/components/ConfigHeader.tsx index d3c344d37..6449d11d1 100644 --- a/gui/src/pages/config/components/ConfigHeader.tsx +++ b/gui/src/pages/config/components/ConfigHeader.tsx @@ -34,8 +34,12 @@ export function ConfigHeader({
{onAddClick && ( - )} diff --git a/gui/src/pages/config/components/ConfigRow.tsx b/gui/src/pages/config/components/ConfigRow.tsx index 36c56b235..b9ced19a2 100644 --- a/gui/src/pages/config/components/ConfigRow.tsx +++ b/gui/src/pages/config/components/ConfigRow.tsx @@ -1,5 +1,6 @@ import React from "react"; import { Button } from "../../../components/ui/Button"; +import { cn } from "../../../util/cn"; export interface ConfigRowProps { title: string; @@ -20,7 +21,8 @@ export function ConfigRow({ children, className = "", }: ConfigRowProps) { - const baseClasses = `flex items-start justify-between rounded-md transition-colors px-4 py-3 ${className}`; + const baseClasses = + "flex items-start justify-between rounded-md transition-colors px-4 py-3"; const interactiveClasses = onClick ? "hover:bg-list-hover cursor-pointer" : ""; @@ -46,7 +48,13 @@ export function ConfigRow({ return ( diff --git a/gui/src/pages/config/components/ModelRoleSelector.tsx b/gui/src/pages/config/components/ModelRoleSelector.tsx index 2632f98a0..68f7466d9 100644 --- a/gui/src/pages/config/components/ModelRoleSelector.tsx +++ b/gui/src/pages/config/components/ModelRoleSelector.tsx @@ -5,7 +5,7 @@ import { } from "@heroicons/react/24/outline"; import { ModelDescription } from "core"; import { LLMConfigurationStatuses } from "core/llm/constants"; -import { MouseEvent, useContext } from "react"; +import { MouseEvent, ReactNode, useContext } from "react"; import { defaultBorderRadius } from "../../../components"; import InfoHover from "../../../components/InfoHover"; import { @@ -23,7 +23,7 @@ interface ModelRoleSelectorProps { selectedModel: ModelDescription | null; onSelect: (model: ModelDescription | null) => void; displayName: string; - description: string; + description: string | ReactNode; setupURL: string; hideTitle?: boolean; } @@ -71,7 +71,7 @@ const ModelRoleSelector = ({ {models.length === 0 ? ( ideMessenger.post("openUrl", setupURL)} - className="bg-input border-description-muted hover:bg-list-active hover:text-list-active-foreground text-description w-full justify-between rounded border px-3 py-2 underline hover:underline" + className="bg-input border-command-border hover:bg-list-active hover:text-list-active-foreground text-description w-full justify-between rounded border px-2 py-1.5 underline hover:underline" > Setup {displayName} model @@ -81,7 +81,7 @@ const ModelRoleSelector = ({ <> {models.length === 0 || noConfiguredModels ? ( diff --git a/gui/src/pages/config/components/ToolPolicyItem.tsx b/gui/src/pages/config/components/ToolPolicyItem.tsx index 2c9eaf400..a68093450 100644 --- a/gui/src/pages/config/components/ToolPolicyItem.tsx +++ b/gui/src/pages/config/components/ToolPolicyItem.tsx @@ -134,7 +134,7 @@ export function ToolPolicyItem(props: ToolPolicyItemProps) { >
diff --git a/gui/src/pages/config/components/UserSetting.tsx b/gui/src/pages/config/components/UserSetting.tsx index 8df6e7457..8365cba0d 100644 --- a/gui/src/pages/config/components/UserSetting.tsx +++ b/gui/src/pages/config/components/UserSetting.tsx @@ -1,18 +1,17 @@ +import { + CheckIcon, + ChevronDownIcon, + XMarkIcon, +} from "@heroicons/react/24/outline"; import React from "react"; -import NumberInput from "../../../components/gui/NumberInput"; import ToggleSwitch from "../../../components/gui/Switch"; -import { Input } from "../../../components"; +import { ToolTip } from "../../../components/gui/Tooltip"; import { Listbox, ListboxButton, ListboxOption, ListboxOptions, -} from "../../../components/ui/Listbox"; -import { - ChevronDownIcon, - CheckIcon, - XMarkIcon, -} from "@heroicons/react/24/outline"; +} from "../../../components/ui"; interface BaseUserSettingProps { title: string; @@ -46,6 +45,7 @@ interface InputUserSettingProps extends BaseUserSettingProps { value: string; onChange: (value: string) => void; className?: string; + placeholder?: string; onSubmit?: () => void; onCancel?: () => void; isDirty?: boolean; @@ -75,13 +75,17 @@ export function UserSetting(props: UserSettingProps) { case "number": return ( - +
+ props.onChange(Number(e.target.value))} + min={props.min ?? 0} + max={props.max ?? 100} + disabled={disabled} + className="text-vsc-foreground flex-1 border-none bg-transparent px-2 py-1 text-right outline-none focus:outline-none focus:ring-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none" + /> +
); case "select": @@ -91,12 +95,12 @@ export function UserSetting(props: UserSettingProps) { onChange={props.onChange} disabled={disabled} > - + {props.options.find((opt) => opt.value === props.value)?.label || props.value} - + - + {props.options.map((option) => ( {option.label} @@ -116,45 +120,54 @@ export function UserSetting(props: UserSettingProps) { }} >
- props.onChange(e.target.value)} - disabled={disabled} - /> -
- {props.isDirty ? ( - <> + } ${disabled ? "cursor-not-allowed opacity-50" : ""}`} + > + props.onChange(e.target.value)} + placeholder={props.placeholder} + disabled={disabled} + className="text-vsc-foreground flex-1 border-none bg-inherit px-1.5 py-1 outline-none ring-0 focus:border-none focus:outline-none focus:ring-0 disabled:cursor-not-allowed" + /> +
+ {props.isDirty && ( +
+
+
+
- - ) : ( -
- -
- )} -
+ +
+ )}
); } return ( - props.onChange(e.target.value)} - className={props.className} - disabled={disabled} - /> +
+ props.onChange(e.target.value)} + disabled={disabled} + className="text-vsc-foreground flex-1 border-none bg-inherit px-1.5 py-1 outline-none ring-0 focus:border-none focus:outline-none focus:ring-0 disabled:cursor-not-allowed" + /> +
); default: @@ -162,9 +175,24 @@ export function UserSetting(props: UserSettingProps) { } }; + // Use vertical layout for input types, horizontal for others + const isInputType = props.type === "input"; + + if (isInputType) { + return ( +
+
+ {title} +
{description}
+
+ {renderControl()} +
+ ); + } + return ( -
-
+
+
{title}
{description}
diff --git a/gui/src/pages/config/index.tsx b/gui/src/pages/config/index.tsx index 0360791b9..4e654566f 100644 --- a/gui/src/pages/config/index.tsx +++ b/gui/src/pages/config/index.tsx @@ -40,8 +40,8 @@ function ConfigPage() { return (
{/* Vertical Sidebar - full height */} -
-
+
+
{topTabSections.map((section, index) => ( 0 ? ( profiles.map((profile, index) => (
-
-
+
+

0 ? "text-error" : ""}`} + className={`my-2 text-sm font-medium ${profile.errors && profile.errors.length > 0 ? "text-error" : ""}`} > {profile.title}

diff --git a/gui/src/pages/config/sections/DocsSection.tsx b/gui/src/pages/config/sections/DocsSection.tsx index aec53b95e..d00831b41 100644 --- a/gui/src/pages/config/sections/DocsSection.tsx +++ b/gui/src/pages/config/sections/DocsSection.tsx @@ -1,6 +1,6 @@ import { useDispatch } from "react-redux"; import AddDocsDialog from "../../../components/dialogs/AddDocsDialog"; -import { Card } from "../../../components/ui"; +import { Card, Divider } from "../../../components/ui"; import { setDialogMessage, setShowDialog } from "../../../redux/slices/uiSlice"; import { ConfigHeader } from "../components/ConfigHeader"; import DocsIndexingStatuses from "./docs/DocsSection"; @@ -23,7 +23,7 @@ export function DocsSection() { /> -
+
diff --git a/gui/src/pages/config/sections/McpSection.tsx b/gui/src/pages/config/sections/McpSection.tsx index d51684682..c24a9dbf4 100644 --- a/gui/src/pages/config/sections/McpSection.tsx +++ b/gui/src/pages/config/sections/McpSection.tsx @@ -157,7 +157,7 @@ function MCPServerCard({ server, serverFromYaml }: MCPServerStatusProps) {
- {isExpanded && ( + {isExpanded && server.status === "connected" && (
{/* Tools, Prompts, Resources with counts */}
diff --git a/gui/src/pages/config/sections/OrganizationsSection.tsx b/gui/src/pages/config/sections/OrganizationsSection.tsx index 33aa03f50..e43aec7bd 100644 --- a/gui/src/pages/config/sections/OrganizationsSection.tsx +++ b/gui/src/pages/config/sections/OrganizationsSection.tsx @@ -1,4 +1,4 @@ -import { Cog6ToothIcon, PlusIcon } from "@heroicons/react/24/outline"; +import { Cog6ToothIcon } from "@heroicons/react/24/outline"; import { BuildingOfficeIcon, UserIcon } from "@heroicons/react/24/solid"; import { isOnPremSession } from "core/control-plane/AuthTypes"; import { useContext } from "react"; @@ -70,13 +70,15 @@ export function OrganizationsSection() { {organizations.map((organization, index) => (
-
+
{getOrgIcon(organization)}
-

{organization.name}

+

+ {organization.name} +