dallins feedback
This commit is contained in:
parent
3fa83b766e
commit
b4dbb32b7f
30 changed files with 173 additions and 332 deletions
|
|
@ -151,9 +151,9 @@
|
|||
<action id="continue.openConfigPage"
|
||||
class="com.github.continuedev.continueintellijextension.actions.OpenConfigAction"
|
||||
icon="AllIcons.General.GearPlain"
|
||||
text="Continue Config"
|
||||
description="Continue Config">
|
||||
<override-text place="GoToAction" text="Continue Config"/>
|
||||
text="Settings"
|
||||
description="Settings">
|
||||
<override-text place="GoToAction" text="Settings"/>
|
||||
</action>
|
||||
|
||||
<action id="continue.openLogs"
|
||||
|
|
|
|||
|
|
@ -210,13 +210,6 @@
|
|||
"title": "Exit Edit Mode",
|
||||
"group": "Continue"
|
||||
},
|
||||
{
|
||||
"command": "continue.toggleFullScreen",
|
||||
"category": "Continue",
|
||||
"title": "Open in new window",
|
||||
"icon": "$(link-external)",
|
||||
"group": "Continue"
|
||||
},
|
||||
{
|
||||
"command": "continue.openConfigPage",
|
||||
"category": "Continue",
|
||||
|
|
@ -444,12 +437,6 @@
|
|||
"mac": "cmd+shift+r",
|
||||
"key": "ctrl+shift+r"
|
||||
},
|
||||
{
|
||||
"command": "continue.toggleFullScreen",
|
||||
"mac": "cmd+k cmd+m",
|
||||
"key": "ctrl+k ctrl+m",
|
||||
"when": "!terminalFocus"
|
||||
},
|
||||
{
|
||||
"command": "continue.toggleTabAutocompleteEnabled",
|
||||
"mac": "cmd+k cmd+a",
|
||||
|
|
@ -511,9 +498,6 @@
|
|||
{
|
||||
"command": "continue.debugTerminal"
|
||||
},
|
||||
{
|
||||
"command": "continue.toggleFullScreen"
|
||||
},
|
||||
{
|
||||
"command": "continue.newSession"
|
||||
},
|
||||
|
|
@ -566,11 +550,6 @@
|
|||
"group": "navigation@2",
|
||||
"when": "view == continue.continueGUIView"
|
||||
},
|
||||
{
|
||||
"command": "continue.toggleFullScreen",
|
||||
"group": "navigation@3",
|
||||
"when": "view == continue.continueGUIView"
|
||||
},
|
||||
{
|
||||
"command": "continue.openConfigPage",
|
||||
"group": "navigation@4",
|
||||
|
|
|
|||
|
|
@ -45,14 +45,6 @@ import { getMetaKeyLabel } from "./util/util";
|
|||
import { openEditorAndRevealRange } from "./util/vscode";
|
||||
import { VsCodeIde } from "./VsCodeIde";
|
||||
|
||||
let fullScreenPanel: vscode.WebviewPanel | undefined;
|
||||
|
||||
function getFullScreenTab() {
|
||||
const tabs = vscode.window.tabGroups.all.flatMap((tabGroup) => tabGroup.tabs);
|
||||
return tabs.find((tab) =>
|
||||
(tab.input as any)?.viewType?.endsWith("continue.continueGUIView"),
|
||||
);
|
||||
}
|
||||
|
||||
type TelemetryCaptureParams = Parameters<typeof Telemetry.capture>;
|
||||
|
||||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ export function SelectedAssistantButton({
|
|||
return (
|
||||
<ListboxButton
|
||||
data-testid="assistant-select-button"
|
||||
className={`text-description border-none bg-transparent !py-1.5 hover:brightness-110 overflow-hidden ${isSidebar ? "w-full justify-start" : "gap-1.5"} ${buttonPadding}`}
|
||||
className={`text-description overflow-hidden border-none bg-transparent !py-1.5 hover:brightness-110 ${isSidebar ? "w-full justify-start" : "gap-1.5"} ${buttonPadding}`}
|
||||
style={buttonStyle}
|
||||
>
|
||||
<div
|
||||
className={`flex flex-row items-center ${isSidebar ? "w-full justify-between" : "gap-1.5"}`}
|
||||
>
|
||||
<div className="flex flex-row items-center gap-2 min-w-0 flex-1">
|
||||
<div className="flex min-w-0 flex-1 flex-row items-center gap-2">
|
||||
{selectedProfile === null ? (
|
||||
"Create your first agent"
|
||||
) : configLoading ? (
|
||||
|
|
@ -49,7 +49,7 @@ export function SelectedAssistantButton({
|
|||
<>
|
||||
<AssistantIcon assistant={selectedProfile} size={iconSize} />
|
||||
<span
|
||||
className={`select-none truncate ${isSidebar && "hidden md:block"}`}
|
||||
className={`select-none truncate text-xs ${isSidebar && "hidden md:block"}`}
|
||||
>
|
||||
{selectedProfile.title}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export function PageHeader({
|
|||
}: PageHeaderProps) {
|
||||
return (
|
||||
<div
|
||||
className={`border-description-muted sticky top-0 z-20 m-0 flex items-center justify-between border border-x-0 ${showBorder ? "border-b" : "border-b-0"} border-t-0 border-solid bg-inherit py-3.5`}
|
||||
className={`border-command-border sticky top-0 z-20 m-0 flex items-center justify-between border border-x-0 ${showBorder ? "border-b" : "border-b-0"} border-t-0 border-solid bg-inherit py-3.5`}
|
||||
>
|
||||
<div
|
||||
className="flex cursor-pointer items-center transition-colors duration-200 hover:brightness-125"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {
|
|||
InformationCircleIcon,
|
||||
} from "@heroicons/react/16/solid";
|
||||
import { cn } from "../../util/cn";
|
||||
import { varWithFallback } from "../../styles/theme";
|
||||
|
||||
type AlertTypes = "info" | "success" | "warning" | "error";
|
||||
type AlertSize = "sm" | "lg";
|
||||
|
|
@ -18,7 +19,6 @@ type AlertConfig = {
|
|||
[key in AlertTypes]: {
|
||||
Icon: any;
|
||||
iconColor: string;
|
||||
background: string;
|
||||
border: string;
|
||||
text: string;
|
||||
};
|
||||
|
|
@ -27,28 +27,24 @@ type AlertConfig = {
|
|||
const ALERT_CONFIGS: AlertConfig = {
|
||||
info: {
|
||||
Icon: InformationCircleIcon,
|
||||
background: "bg-blue-600/20",
|
||||
border: "border-blue-500",
|
||||
iconColor: "text-blue-500",
|
||||
border: "border-info",
|
||||
iconColor: "text-info",
|
||||
text: "text-foreground",
|
||||
},
|
||||
success: {
|
||||
Icon: CheckCircleIcon,
|
||||
background: "bg-green-600/20",
|
||||
border: "border-success",
|
||||
iconColor: "text-success",
|
||||
text: "text-foreground",
|
||||
},
|
||||
warning: {
|
||||
Icon: ExclamationTriangleIcon,
|
||||
background: "bg-yellow-600/20",
|
||||
border: "border-warning",
|
||||
iconColor: "text-warning",
|
||||
text: "text-foreground",
|
||||
},
|
||||
error: {
|
||||
Icon: ExclamationCircleIcon,
|
||||
background: "bg-red-600/20",
|
||||
border: "border-error",
|
||||
iconColor: "text-error",
|
||||
text: "text-foreground",
|
||||
|
|
@ -77,14 +73,24 @@ function Alert({
|
|||
children,
|
||||
...props
|
||||
}: AlertProps) {
|
||||
const { Icon, background, border, text, iconColor } = ALERT_CONFIGS[type];
|
||||
const { Icon, border, text, iconColor } = ALERT_CONFIGS[type];
|
||||
|
||||
const colorMap = {
|
||||
info: varWithFallback("info"),
|
||||
success: varWithFallback("success"),
|
||||
warning: varWithFallback("warning"),
|
||||
error: varWithFallback("error"),
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
`flex flex-row items-start ${background} border-[0.5px] ${border} border-solid shadow-sm ${alertSizes[size]}`,
|
||||
`flex flex-row items-start border-[0.5px] ${border} border-solid shadow-sm ${alertSizes[size]}`,
|
||||
className,
|
||||
)}
|
||||
style={{
|
||||
backgroundColor: `color-mix(in srgb, ${colorMap[type]} 20%, transparent)`,
|
||||
}}
|
||||
{...props}
|
||||
>
|
||||
<Icon className={`flex-shrink-0 ${iconColor} ${iconSizes[size]}`} />
|
||||
|
|
|
|||
|
|
@ -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<NumberInputProps> = ({
|
||||
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<HTMLInputElement>) => {
|
||||
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 (
|
||||
<div
|
||||
className={`border-command-border bg-vsc-input-background flex flex-row overflow-hidden rounded-md border border-solid ${disabled ? "cursor-not-allowed opacity-50" : ""}`}
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
value={inputValue}
|
||||
onChange={handleInputChange}
|
||||
onBlur={handleBlur}
|
||||
disabled={disabled}
|
||||
className="text-vsc-foreground max-w-9 border-none bg-inherit pr-1.5 text-right outline-none ring-0 focus:border-none focus:outline-none focus:ring-0 disabled:cursor-not-allowed"
|
||||
style={{
|
||||
appearance: "none",
|
||||
WebkitAppearance: "none",
|
||||
MozAppearance: "none",
|
||||
}}
|
||||
min={min}
|
||||
max={max}
|
||||
/>
|
||||
<div className="flex flex-col">
|
||||
<button
|
||||
style={{ fontSize: "9px" }}
|
||||
onClick={handleIncrement}
|
||||
disabled={disabled || value >= max}
|
||||
className="text-vsc-foreground m-0 mb-0.5 cursor-pointer border-none bg-inherit px-1.5 py-0 hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
>
|
||||
▲
|
||||
</button>
|
||||
<button
|
||||
style={{ fontSize: "9px" }}
|
||||
className="text-vsc-foreground m-0 mb-0.5 cursor-pointer border-none bg-inherit px-1.5 py-0 hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
onClick={handleDecrement}
|
||||
disabled={disabled || value <= min}
|
||||
>
|
||||
▼
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NumberInput;
|
||||
|
|
@ -68,7 +68,7 @@ const ContextStatus = () => {
|
|||
</div>
|
||||
}
|
||||
>
|
||||
<div className="border-description-muted relative h-[14px] w-[7px] rounded-[1px] border-[0.5px] border-solid md:h-[10px] md:w-[5px]">
|
||||
<div className="border-command-border relative h-[14px] w-[7px] rounded-[1px] border-[0.5px] border-solid md:h-[10px] md:w-[5px]">
|
||||
<div
|
||||
className={`transition-height absolute bottom-0 left-0 w-full duration-300 ease-in-out ${barColorClass}`}
|
||||
style={{ height: `${percent}%` }}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ const buttonSizes = {
|
|||
};
|
||||
|
||||
const iconButtonSizes = {
|
||||
sm: "h-3.5 w-3.5",
|
||||
sm: "h-4 w-4",
|
||||
lg: "h-5 w-5",
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ interface DividerProps {
|
|||
export function Divider({ className }: DividerProps) {
|
||||
return (
|
||||
<div
|
||||
className={`border-description-muted my-2 border-[0.5px] border-b border-solid opacity-20 ${className || ""}`}
|
||||
className={`border-command-border my-2 border-[0.5px] border-b border-solid opacity-20 ${className || ""}`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ interface EmptyStateProps {
|
|||
|
||||
export function EmptyState({ message }: EmptyStateProps) {
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center p-4">
|
||||
<div className="flex flex-col items-center justify-center p-1">
|
||||
<span className="text-description text-sm">{message}</span>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<ToolTip content={label} place="right" className="text-xs md:!hidden">
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ export function TabGroup({
|
|||
{tabs.map((tab) => (
|
||||
<TabButton
|
||||
key={tab.id}
|
||||
id={tab.id}
|
||||
label={tab.label}
|
||||
icon={tab.icon}
|
||||
isActive={activeTab === tab.id}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ export function Toggle({
|
|||
<div>
|
||||
<span>{title}</span>
|
||||
{subtitle && (
|
||||
<p className="mt-1 text-xs font-normal text-gray-500">{subtitle}</p>
|
||||
<p className="text-description my-1 text-xs font-normal">
|
||||
{subtitle}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -34,8 +34,12 @@ export function ConfigHeader({
|
|||
</div>
|
||||
{onAddClick && (
|
||||
<ToolTip content={addButtonTooltip}>
|
||||
<Button onClick={onAddClick} variant="icon">
|
||||
<PlusIcon className="h-3 w-3" />
|
||||
<Button
|
||||
onClick={onAddClick}
|
||||
variant="icon"
|
||||
size={isSmall ? "sm" : "lg"}
|
||||
>
|
||||
<PlusIcon className={isSmall ? "h-2.5 w-2.5" : "h-3 w-3"} />
|
||||
</Button>
|
||||
</ToolTip>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<Button
|
||||
variant="ghost"
|
||||
className={`${baseClasses} ${interactiveClasses} ${disabledClasses} !my-0 text-left`.trim()}
|
||||
className={cn(
|
||||
baseClasses,
|
||||
interactiveClasses,
|
||||
disabledClasses,
|
||||
"!my-0 text-left",
|
||||
className,
|
||||
)}
|
||||
onClick={handleClick}
|
||||
disabled={disabled}
|
||||
data-config-row
|
||||
|
|
@ -64,7 +72,10 @@ export function ConfigRow({
|
|||
}
|
||||
|
||||
return (
|
||||
<div className={`${baseClasses} ${disabledClasses}`.trim()} data-config-row>
|
||||
<div
|
||||
className={cn(baseClasses, disabledClasses, className)}
|
||||
data-config-row
|
||||
>
|
||||
<div className="flex flex-col">
|
||||
<span className="text-sm font-medium">{title}</span>
|
||||
<p className="mt-0.5 text-xs text-gray-500">{description}</p>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export function ModelRoleRow({
|
|||
<span className="text-base font-medium">{displayName}</span>
|
||||
{shortcut && shortcut}
|
||||
</div>
|
||||
<p className="text-description-muted mt-1 text-xs">{description}</p>
|
||||
<p className="text-description mt-1 text-xs">{description}</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex-1">
|
||||
|
|
@ -56,7 +56,7 @@ export function ModelRoleRow({
|
|||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => onConfigure(selectedModel)}
|
||||
className="text-description-muted hover:enabled:text-foreground my-0 h-6 w-6 p-0"
|
||||
className="text-description hover:enabled:text-foreground my-0 h-6 w-6 p-0"
|
||||
>
|
||||
<Cog6ToothIcon className="h-4 w-4 flex-shrink-0" />
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -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 ? (
|
||||
<ListboxButton
|
||||
onClick={() => 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"
|
||||
>
|
||||
<span className="line-clamp-1" style={{ fontSize: fontSize(-1) }}>
|
||||
Setup {displayName} model
|
||||
|
|
@ -81,7 +81,7 @@ const ModelRoleSelector = ({
|
|||
<>
|
||||
<ListboxButton
|
||||
disabled={models.length === 0}
|
||||
className="bg-input border-description-muted hover:bg-list-active hover:text-list-active-foreground w-full justify-between rounded border px-3 py-2"
|
||||
className="bg-input border-command-border hover:bg-list-active hover:text-list-active-foreground w-full justify-between rounded border px-2 py-1.5"
|
||||
>
|
||||
{models.length === 0 || noConfiguredModels ? (
|
||||
<span className="text-lightgray line-clamp-1 italic">
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ export function ToolPolicyItem(props: ToolPolicyItemProps) {
|
|||
>
|
||||
<div className="relative">
|
||||
<ListboxButton
|
||||
className={`border-description-muted h-7 w-full justify-between px-3 ${disabled ? "cursor-not-allowed opacity-50" : ""}`}
|
||||
className={`border-command-border h-7 w-full justify-between px-3 ${disabled ? "cursor-not-allowed opacity-50" : ""}`}
|
||||
data-testid={`tool-policy-item-${props.tool.function.name}`}
|
||||
data-tooltip-id={disabled ? disabledTooltipId : undefined}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<NumberInput
|
||||
value={props.value}
|
||||
onChange={props.onChange}
|
||||
min={props.min ?? 0}
|
||||
max={props.max ?? 100}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<div className="border-command-border bg-vsc-input-background focus-within:border-border-focus focus-within:ring-1 focus-within:ring-border-focus flex w-20 items-center rounded-md border border-solid">
|
||||
<input
|
||||
type="number"
|
||||
value={props.value}
|
||||
onChange={(e) => 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"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
case "select":
|
||||
|
|
@ -91,12 +95,12 @@ export function UserSetting(props: UserSettingProps) {
|
|||
onChange={props.onChange}
|
||||
disabled={disabled}
|
||||
>
|
||||
<ListboxButton className="justify-between px-3 py-2">
|
||||
<ListboxButton className="border-command-border w-20 !w-20 !flex-none justify-between px-2 py-1 !rounded-md">
|
||||
{props.options.find((opt) => opt.value === props.value)?.label ||
|
||||
props.value}
|
||||
<ChevronDownIcon className="h-4 w-4" />
|
||||
<ChevronDownIcon className="h-3 w-3" />
|
||||
</ListboxButton>
|
||||
<ListboxOptions className="min-w-0">
|
||||
<ListboxOptions className="!w-20 !min-w-0">
|
||||
{props.options.map((option) => (
|
||||
<ListboxOption key={option.value} value={option.value}>
|
||||
{option.label}
|
||||
|
|
@ -116,45 +120,54 @@ export function UserSetting(props: UserSettingProps) {
|
|||
}}
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<Input
|
||||
value={props.value}
|
||||
className={`max-w-[200px] ${
|
||||
<div
|
||||
className={`border-command-border bg-vsc-input-background focus-within:border-border-focus focus-within:ring-1 focus-within:ring-border-focus flex w-full flex-row overflow-hidden rounded-md border border-solid ${
|
||||
props.isDirty
|
||||
? !props.isValid
|
||||
? "outline-red-500"
|
||||
: "outline-green-500"
|
||||
? "outline outline-red-500"
|
||||
: "outline outline-green-500"
|
||||
: ""
|
||||
}`}
|
||||
onChange={(e) => props.onChange(e.target.value)}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<div className="flex h-full flex-col">
|
||||
{props.isDirty ? (
|
||||
<>
|
||||
} ${disabled ? "cursor-not-allowed opacity-50" : ""}`}
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
value={props.value}
|
||||
onChange={(e) => 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"
|
||||
/>
|
||||
</div>
|
||||
{props.isDirty && (
|
||||
<div className="flex flex-row items-center gap-1">
|
||||
<ToolTip content="Save">
|
||||
<div onClick={props.onSubmit} className="cursor-pointer">
|
||||
<CheckIcon className="h-4 w-4 text-green-500 hover:opacity-80" />
|
||||
</div>
|
||||
</ToolTip>
|
||||
<ToolTip content="Cancel">
|
||||
<div onClick={props.onCancel} className="cursor-pointer">
|
||||
<XMarkIcon className="h-4 w-4 text-red-500 hover:opacity-80" />
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<div>
|
||||
<CheckIcon className="text-vsc-foreground-muted h-4 w-4" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</ToolTip>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Input
|
||||
value={props.value}
|
||||
onChange={(e) => props.onChange(e.target.value)}
|
||||
className={props.className}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<div
|
||||
className={`border-command-border bg-vsc-input-background focus-within:border-border-focus focus-within:ring-1 focus-within:ring-border-focus flex w-full flex-row overflow-hidden rounded-md border border-solid ${disabled ? "cursor-not-allowed opacity-50" : ""}`}
|
||||
>
|
||||
<input
|
||||
type="text"
|
||||
value={props.value}
|
||||
onChange={(e) => 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"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
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 (
|
||||
<div className="flex flex-col gap-3">
|
||||
<div className="flex flex-col">
|
||||
<span className="text-sm font-medium">{title}</span>
|
||||
<div className="mt-0.5 text-xs text-gray-500">{description}</div>
|
||||
</div>
|
||||
{renderControl()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex items-start justify-between">
|
||||
<div className="flex flex-col">
|
||||
<div className="flex items-start justify-start gap-4">
|
||||
<div className="flex flex-col flex-1">
|
||||
<span className="text-sm font-medium">{title}</span>
|
||||
<div className="mt-0.5 text-xs text-gray-500">{description}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ function ConfigPage() {
|
|||
return (
|
||||
<div className="flex h-full flex-row overflow-hidden">
|
||||
{/* Vertical Sidebar - full height */}
|
||||
<div className="bg-vsc-background flex w-12 flex-shrink-0 flex-col border-0 md:w-36">
|
||||
<div className="border-r-border flex flex-1 flex-col overflow-y-auto border-b-0 border-l-0 border-r-2 border-t-0 border-solid p-2">
|
||||
<div className="bg-vsc-background flex w-12 flex-shrink-0 flex-col border-0 md:w-40">
|
||||
<div className="border-r-border flex flex-1 flex-col overflow-y-auto border-b-0 border-l-0 border-r-2 border-t-0 border-solid p-2 text-xs">
|
||||
{topTabSections.map((section, index) => (
|
||||
<React.Fragment key={section.id}>
|
||||
<TabGroup
|
||||
|
|
|
|||
|
|
@ -31,14 +31,14 @@ export function AgentsSection() {
|
|||
{profiles && profiles.length > 0 ? (
|
||||
profiles.map((profile, index) => (
|
||||
<div key={profile.id}>
|
||||
<div className="flex items-center justify-between py-1">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-baseline gap-3">
|
||||
<div className="flex h-6 w-6 flex-shrink-0 items-center justify-center">
|
||||
<AssistantIcon assistant={profile} />
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3
|
||||
className={`text-sm font-medium ${profile.errors && profile.errors.length > 0 ? "text-error" : ""}`}
|
||||
className={`my-2 text-sm font-medium ${profile.errors && profile.errors.length > 0 ? "text-error" : ""}`}
|
||||
>
|
||||
{profile.title}
|
||||
</h3>
|
||||
|
|
|
|||
|
|
@ -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() {
|
|||
/>
|
||||
|
||||
<Card>
|
||||
<div className="py-6">
|
||||
<div className="py-2">
|
||||
<DocsIndexingStatuses />
|
||||
</div>
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ function MCPServerCard({ server, serverFromYaml }: MCPServerStatusProps) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{isExpanded && (
|
||||
{isExpanded && server.status === "connected" && (
|
||||
<div className="mt-3 pl-7">
|
||||
{/* Tools, Prompts, Resources with counts */}
|
||||
<div className="mb-3 flex flex-row items-center gap-6">
|
||||
|
|
|
|||
|
|
@ -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() {
|
|||
<Card>
|
||||
{organizations.map((organization, index) => (
|
||||
<div key={organization.id}>
|
||||
<div className="flex items-center justify-between py-1">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="flex h-5 w-5 flex-shrink-0 items-center justify-center">
|
||||
{getOrgIcon(organization)}
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h3 className="text-sm font-medium">{organization.name}</h3>
|
||||
<h3 className="my-2 text-sm font-medium">
|
||||
{organization.name}
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -118,21 +118,21 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="toggle"
|
||||
title="Show Session Tabs"
|
||||
description="If on, displays tabs above the chat as an alternative way to organize and access your sessions."
|
||||
description=" displays tabs above the chat as an alternative way to organize and access your sessions."
|
||||
value={showSessionTabs}
|
||||
onChange={(value) => handleUpdate({ showSessionTabs: value })}
|
||||
/>
|
||||
<UserSetting
|
||||
type="toggle"
|
||||
title="Wrap Codeblocks"
|
||||
description="If on, wraps long lines in code blocks instead of showing horizontal scroll."
|
||||
description=" wraps long lines in code blocks instead of showing horizontal scroll."
|
||||
value={codeWrap}
|
||||
onChange={(value) => handleUpdate({ codeWrap: value })}
|
||||
/>
|
||||
<UserSetting
|
||||
type="toggle"
|
||||
title="Show Chat Scrollbar"
|
||||
description="If on, enables a scrollbar in the chat window."
|
||||
description=" enables a scrollbar in the chat window."
|
||||
value={showChatScrollbar}
|
||||
onChange={(value) =>
|
||||
handleUpdate({ showChatScrollbar: value })
|
||||
|
|
@ -141,14 +141,14 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="toggle"
|
||||
title="Text-to-Speech Output"
|
||||
description="If on, reads LLM responses aloud with TTS."
|
||||
description=" reads LLM responses aloud with TTS."
|
||||
value={readResponseTTS}
|
||||
onChange={(value) => handleUpdate({ readResponseTTS: value })}
|
||||
/>
|
||||
<UserSetting
|
||||
type="toggle"
|
||||
title="Enable Session Titles"
|
||||
description="If on, generates summary titles for each chat session after the first message, using the current Chat model."
|
||||
description=" generates summary titles for each chat session after the first message, using the current Chat model."
|
||||
value={!disableSessionTitles}
|
||||
onChange={(value) =>
|
||||
handleUpdate({ disableSessionTitles: !value })
|
||||
|
|
@ -166,7 +166,7 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="toggle"
|
||||
title="Auto-Accept Agent Edits"
|
||||
description="If on, diffs generated by the edit tool are automatically accepted and Agent proceeds with the next conversational turn."
|
||||
description=" diffs generated by the edit tool are automatically accepted and Agent proceeds with the next conversational turn."
|
||||
value={autoAcceptEditToolDiffs}
|
||||
onChange={(value) =>
|
||||
handleUpdate({ autoAcceptEditToolDiffs: value })
|
||||
|
|
@ -184,7 +184,7 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="toggle"
|
||||
title="Allow Anonymous Telemetry"
|
||||
description="If on, allows Continue to send anonymous telemetry."
|
||||
description=" allows Continue to send anonymous telemetry."
|
||||
value={allowAnonymousTelemetry}
|
||||
disabled={disableTelemetryToggle}
|
||||
onChange={(value) =>
|
||||
|
|
@ -261,7 +261,8 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="input"
|
||||
title="Disable autocomplete in files"
|
||||
description="List of comma-separated glob pattern to disable autocomplete in matching files. E.g., **/*.(txt,md)"
|
||||
description="List of comma-separated glob pattern to disable autocomplete in matching files."
|
||||
placeholder="**/*.(txt,md)"
|
||||
value={formDisableAutocomplete}
|
||||
onChange={setFormDisableAutocomplete}
|
||||
onSubmit={handleDisableAutocompleteSubmit}
|
||||
|
|
@ -288,7 +289,7 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="toggle"
|
||||
title="Add Current File by Default"
|
||||
description="If on, the currently open file is added as context in every new conversation."
|
||||
description=" the currently open file is added as context in every new conversation."
|
||||
value={useCurrentFileAsContext}
|
||||
onChange={(value) =>
|
||||
handleUpdate({ useCurrentFileAsContext: value })
|
||||
|
|
@ -297,7 +298,7 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="toggle"
|
||||
title="Enable experimental tools"
|
||||
description="If on, enables access to experimental tools that are still in development."
|
||||
description=" enables access to experimental tools that are still in development."
|
||||
value={enableExperimentalTools}
|
||||
onChange={(value) =>
|
||||
handleUpdate({ enableExperimentalTools: value })
|
||||
|
|
@ -306,7 +307,7 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="toggle"
|
||||
title="Only use system message tools"
|
||||
description="If on, Continue will not attempt to use native tool calling and will only use system message tools."
|
||||
description=" Continue will not attempt to use native tool calling and will only use system message tools."
|
||||
value={onlyUseSystemMessageTools}
|
||||
onChange={(value) =>
|
||||
handleUpdate({ onlyUseSystemMessageTools: value })
|
||||
|
|
@ -315,7 +316,7 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="toggle"
|
||||
title="@Codebase: use tool calling only"
|
||||
description="If on, @codebase context provider will only use tool calling for code retrieval."
|
||||
description=" @codebase context provider will only use tool calling for code retrieval."
|
||||
value={codebaseToolCallingOnly}
|
||||
onChange={(value) =>
|
||||
handleUpdate({ codebaseToolCallingOnly: value })
|
||||
|
|
@ -324,7 +325,7 @@ export function UserSettingsSection() {
|
|||
<UserSetting
|
||||
type="toggle"
|
||||
title="Stream after tool rejection"
|
||||
description="If on, streaming will continue after the tool call is rejected."
|
||||
description=" streaming will continue after the tool call is rejected."
|
||||
value={continueAfterToolRejection}
|
||||
onChange={(value) =>
|
||||
handleUpdate({ continueAfterToolRejection: value })
|
||||
|
|
|
|||
|
|
@ -116,6 +116,13 @@ export const THEME_COLORS = {
|
|||
vars: ["--vscode-badge-foreground"],
|
||||
default: "#ffffff", // white
|
||||
},
|
||||
info: {
|
||||
vars: [
|
||||
"--vscode-charts-blue",
|
||||
"--vscode-notebookStatusRunningIcon-foreground",
|
||||
],
|
||||
default: "#2196f3", // blue
|
||||
},
|
||||
success: {
|
||||
vars: [
|
||||
"--vscode-notebookStatusSuccessIcon-foreground",
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ module.exports = {
|
|||
DEFAULT: varWithFallback("badge-background"),
|
||||
foreground: varWithFallback("badge-foreground"),
|
||||
},
|
||||
info: varWithFallback("info"),
|
||||
success: varWithFallback("success"),
|
||||
warning: varWithFallback("warning"),
|
||||
error: varWithFallback("error"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue