onManualConfigClick && onManualConfigClick()}>
diff --git a/webview-ui/src/components/kilocode/rules/RuleRow.tsx b/webview-ui/src/components/kilocode/rules/RuleRow.tsx
index 115ff4c84a..e3e58fbc18 100644
--- a/webview-ui/src/components/kilocode/rules/RuleRow.tsx
+++ b/webview-ui/src/components/kilocode/rules/RuleRow.tsx
@@ -24,7 +24,7 @@ const RuleRow: React.FC<{
return (
& {
- ghostServiceSettings: GhostServiceSettings
- setCachedStateField: SetCachedStateField<"ghostServiceSettings">
-}
-
-export const GhostServiceSettingsView = ({
- ghostServiceSettings,
- setCachedStateField,
- className,
- ...props
-}: GhostServiceSettingsViewProps) => {
- const { t } = useAppTranslation()
- const { enableAutoTrigger, enableQuickInlineTaskKeybinding, enableSmartInlineTaskKeybinding } =
- ghostServiceSettings || {}
- const keybindings = useKeybindings(["axon-code.addToContextAndFocus", "axon-code.ghost.generateSuggestions"])
-
- const onEnableAutoTriggerChange = (newValue: boolean) => {
- setCachedStateField("ghostServiceSettings", {
- ...ghostServiceSettings,
- enableAutoTrigger: newValue,
- })
- }
-
- const onEnableQuickInlineTaskKeybindingChange = (newValue: boolean) => {
- setCachedStateField("ghostServiceSettings", {
- ...ghostServiceSettings,
- enableQuickInlineTaskKeybinding: newValue,
- })
- }
-
- const onEnableSmartInlineTaskKeybindingChange = (newValue: boolean) => {
- setCachedStateField("ghostServiceSettings", {
- ...ghostServiceSettings,
- enableSmartInlineTaskKeybinding: newValue,
- })
- }
-
- const openGlobalKeybindings = (filter?: string) => {
- vscode.postMessage({ type: "openGlobalKeybindings", text: filter })
- }
-
- return (
-
-
-
-
-
{t("kilocode:ghost.title")}
-
-
-
-
-
-
-
-
-
{t("kilocode:ghost.settings.triggers")}
-
-
-
-
-
- {t("kilocode:ghost.settings.enableAutoTrigger.label")}
-
-
-
-
-
-
-
-
-
- {t("kilocode:ghost.settings.enableQuickInlineTaskKeybinding.label", {
- keybinding: keybindings["axon-code.addToContextAndFocus"],
- })}
-
-
-
- openGlobalKeybindings("axon-code.addToContextAndFocus")}
- className="text-[var(--vscode-list-highlightForeground)] hover:underline cursor-pointer">
- ),
- }}
- />
-
-
-
-
-
- {t("kilocode:ghost.settings.enableSmartInlineTaskKeybinding.label", {
- keybinding: keybindings["axon-code.ghost.generateSuggestions"],
- })}
-
-
-
- openGlobalKeybindings("axon-code.ghost.generateSuggestions")}
- className="text-[var(--vscode-list-highlightForeground)] hover:underline cursor-pointer">
- ),
- }}
- />
-
-
- {/*
-
-
-
-
{t("kilocode:ghost.settings.model")}
-
-
*/}
-
- {/*
-
- {provider && model ? (
- <>
-
- {t("kilocode:ghost.settings.provider")}:{" "}
- {provider}
-
-
- {t("kilocode:ghost.settings.model")}:{" "}
- {model}
-
- >
- ) : (
-
- {t("kilocode:ghost.settings.noModelConfigured")}
-
- )}
-
-
*/}
-
-
-
- )
-}
diff --git a/webview-ui/src/components/kilocode/settings/__tests__/GhostServiceSettings.spec.tsx b/webview-ui/src/components/kilocode/settings/__tests__/GhostServiceSettings.spec.tsx
deleted file mode 100644
index 5036b32d25..0000000000
--- a/webview-ui/src/components/kilocode/settings/__tests__/GhostServiceSettings.spec.tsx
+++ /dev/null
@@ -1,247 +0,0 @@
-import { render, screen, fireEvent } from "@testing-library/react"
-import { describe, expect, it, vi, beforeEach } from "vitest"
-import { GhostServiceSettingsView } from "../GhostServiceSettings"
-import { GhostServiceSettings } from "@roo-code/types"
-import React from "react"
-
-// Mock react-i18next
-vi.mock("react-i18next", () => ({
- Trans: ({ i18nKey, children }: any) => {i18nKey || children},
- useTranslation: () => ({
- t: (key: string) => key,
- }),
- initReactI18next: {
- type: "3rdParty",
- init: () => {},
- },
-}))
-
-vi.mock("@/i18n/TranslationContext", () => ({
- useAppTranslation: () => ({
- t: (key: string) => key,
- }),
- TranslationProvider: ({ children }: any) => {children}
,
-}))
-
-// Mock lucide-react icons
-vi.mock("lucide-react", () => ({
- Bot: ({ className }: any) => Bot Icon,
- Zap: ({ className }: any) => Zap Icon,
-}))
-
-// Mock cn utility
-vi.mock("@/lib/utils", () => ({
- cn: (...classes: any[]) => classes.filter(Boolean).join(" "),
-}))
-
-// Mock the vscode module
-vi.mock("@/utils/vscode", () => ({
- vscode: {
- postMessage: vi.fn(),
- },
-}))
-
-// Mock ControlledCheckbox
-vi.mock("../../common/ControlledCheckbox", () => ({
- ControlledCheckbox: ({ children, checked, onChange }: any) => (
-
- ),
-}))
-
-// Mock the UI components
-vi.mock("@src/components/ui", () => ({
- Slider: ({ value, onValueChange, disabled }: any) => (
- onValueChange?.([parseInt(e.target.value)])}
- disabled={disabled}
- />
- ),
-}))
-
-// Mock the settings components
-vi.mock("../../settings/SectionHeader", () => ({
- SectionHeader: ({ children }: any) => {children}
,
-}))
-
-vi.mock("../../settings/Section", () => ({
- Section: ({ children }: any) => {children}
,
-}))
-
-const defaultGhostServiceSettings: GhostServiceSettings = {
- enableAutoTrigger: false,
- enableQuickInlineTaskKeybinding: false,
- enableSmartInlineTaskKeybinding: false,
- provider: "openrouter",
- model: "openai/gpt-4o-mini",
-}
-
-const renderComponent = (props = {}) => {
- const defaultProps = {
- ghostServiceSettings: defaultGhostServiceSettings,
- setCachedStateField: vi.fn(),
- ...props,
- }
-
- return render()
-}
-
-describe("GhostServiceSettingsView", () => {
- beforeEach(() => {
- vi.clearAllMocks()
- })
-
- it("renders the component without errors", () => {
- expect(() => renderComponent()).not.toThrow()
- })
-
- it("renders basic component structure", () => {
- renderComponent()
-
- // Verify basic structure is present
- expect(document.querySelector(".flex.flex-col")).toBeInTheDocument()
-
- // Verify checkboxes are rendered
- const checkboxes = screen.getAllByRole("checkbox")
- expect(checkboxes.length).toBeGreaterThan(0)
- })
-
- it("renders basic trigger settings", () => {
- renderComponent()
-
- // Check that trigger settings are visible
- expect(screen.getByText(/kilocode:ghost.settings.triggers/)).toBeInTheDocument()
- expect(screen.getByText(/kilocode:ghost.settings.enableAutoTrigger.label/)).toBeInTheDocument()
- })
-
- it("toggles auto trigger checkbox correctly", () => {
- const setCachedStateField = vi.fn()
- renderComponent({ setCachedStateField })
-
- // Find and click the auto trigger checkbox
- const checkbox = screen
- .getByText(/kilocode:ghost.settings.enableAutoTrigger.label/)
- .closest("label")
- ?.querySelector("input[type='checkbox']")
-
- if (checkbox) {
- fireEvent.click(checkbox)
- }
-
- expect(setCachedStateField).toHaveBeenCalledWith(
- "ghostServiceSettings",
- expect.objectContaining({
- enableAutoTrigger: true,
- }),
- )
- })
-
- it("toggles quick inline task keybinding checkbox correctly", () => {
- const setCachedStateField = vi.fn()
- renderComponent({ setCachedStateField })
-
- // Find and click the quick inline task keybinding checkbox
- const checkbox = screen
- .getByText(/kilocode:ghost.settings.enableQuickInlineTaskKeybinding.label/)
- .closest("label")
- ?.querySelector("input[type='checkbox']")
-
- if (checkbox) {
- fireEvent.click(checkbox)
- }
-
- expect(setCachedStateField).toHaveBeenCalledWith(
- "ghostServiceSettings",
- expect.objectContaining({
- enableQuickInlineTaskKeybinding: true,
- }),
- )
- })
-
- it("toggles smart inline task keybinding checkbox correctly", () => {
- const setCachedStateField = vi.fn()
- renderComponent({ setCachedStateField })
-
- // Find and click the smart inline task keybinding checkbox
- const checkbox = screen
- .getByText(/kilocode:ghost.settings.enableSmartInlineTaskKeybinding.label/)
- .closest("label")
- ?.querySelector("input[type='checkbox']")
-
- if (checkbox) {
- fireEvent.click(checkbox)
- }
-
- expect(setCachedStateField).toHaveBeenCalledWith(
- "ghostServiceSettings",
- expect.objectContaining({
- enableSmartInlineTaskKeybinding: true,
- }),
- )
- })
-
- it("renders Trans components with proper structure", () => {
- renderComponent()
-
- // Look for the description divs that should contain the Trans components
- const descriptionDivs = document.querySelectorAll(".text-vscode-descriptionForeground.text-sm")
-
- // We should have multiple description divs for the different settings
- expect(descriptionDivs.length).toBeGreaterThan(2)
- })
-
- it("displays provider and model information when available", () => {
- renderComponent({
- ghostServiceSettings: {
- ...defaultGhostServiceSettings,
- provider: "openrouter",
- model: "openai/gpt-4o-mini",
- },
- })
-
- expect(screen.getByText(/kilocode:ghost.settings.provider/)).toBeInTheDocument()
- expect(screen.getByText(/openrouter/)).toBeInTheDocument()
- expect(screen.getAllByText(/kilocode:ghost.settings.model/).length).toBeGreaterThan(0)
- expect(screen.getByText(/openai\/gpt-4o-mini/)).toBeInTheDocument()
- })
-
- it("displays error message when provider and model are not configured", () => {
- renderComponent({
- ghostServiceSettings: {
- ...defaultGhostServiceSettings,
- provider: undefined,
- model: undefined,
- },
- })
-
- expect(screen.getByText(/kilocode:ghost.settings.noModelConfigured/)).toBeInTheDocument()
- })
-
- it("displays error message when only provider is missing", () => {
- renderComponent({
- ghostServiceSettings: {
- ...defaultGhostServiceSettings,
- provider: undefined,
- model: "openai/gpt-4o-mini",
- },
- })
-
- expect(screen.getByText(/kilocode:ghost.settings.noModelConfigured/)).toBeInTheDocument()
- })
-
- it("displays error message when only model is missing", () => {
- renderComponent({
- ghostServiceSettings: {
- ...defaultGhostServiceSettings,
- provider: "openrouter",
- model: undefined,
- },
- })
-
- expect(screen.getByText(/kilocode:ghost.settings.noModelConfigured/)).toBeInTheDocument()
- })
-})
diff --git a/webview-ui/src/components/kilocode/settings/providers/KiloCode.tsx b/webview-ui/src/components/kilocode/settings/providers/KiloCode.tsx
index 88c7fef0c4..ffacabc5c1 100644
--- a/webview-ui/src/components/kilocode/settings/providers/KiloCode.tsx
+++ b/webview-ui/src/components/kilocode/settings/providers/KiloCode.tsx
@@ -182,9 +182,7 @@ export const KiloCode = ({
)}
{/* Manage plan button */}
-
+
Manage/Upgrade plan
diff --git a/webview-ui/src/components/mcp/McpView.tsx b/webview-ui/src/components/mcp/McpView.tsx
index 37fe0c27e7..b5c21a5dbc 100644
--- a/webview-ui/src/components/mcp/McpView.tsx
+++ b/webview-ui/src/components/mcp/McpView.tsx
@@ -1,5 +1,3 @@
-import React, { useState } from "react"
-import { Trans } from "react-i18next"
import {
VSCodeButton,
VSCodeCheckbox,
@@ -8,29 +6,29 @@ import {
VSCodePanelTab,
VSCodePanelView,
} from "@vscode/webview-ui-toolkit/react"
+import React, { useState } from "react"
+import { Trans } from "react-i18next"
import { McpServer } from "@roo/mcp"
-import { vscode } from "@src/utils/vscode"
-import { useExtensionState } from "@src/context/ExtensionStateContext"
-import { useAppTranslation } from "@src/i18n/TranslationContext"
import {
- Button,
Dialog,
DialogContent,
- DialogHeader,
- DialogTitle,
DialogDescription,
DialogFooter,
+ DialogHeader,
+ DialogTitle,
ToggleSwitch,
- // StandardTooltip, // kilocode_change: not used
} from "@src/components/ui"
+import { useExtensionState } from "@src/context/ExtensionStateContext"
+import { useAppTranslation } from "@src/i18n/TranslationContext"
import { buildDocLink } from "@src/utils/docLinks"
+import { vscode } from "@src/utils/vscode"
import { Tab, TabContent, TabHeader } from "../common/Tab"
-import McpToolRow from "./McpToolRow"
import McpResourceRow from "./McpResourceRow"
+import McpToolRow from "./McpToolRow"
// import McpEnabledToggle from "./McpEnabledToggle" // kilocode_change not used
import { McpErrorRow } from "./McpErrorRow"
@@ -56,7 +54,9 @@ const McpView = ({ onDone, hideHeader = false }: McpViewProps) => {
{/* kilocode_change: display header conditionally */}
{t("mcp:title")}
-
+
+ {t("mcp:done")}
+
@@ -133,33 +133,33 @@ const McpView = ({ onDone, hideHeader = false }: McpViewProps) => {
gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
gap: "10px",
}}>
-
-
-
+
{/* kilocode_change
@@ -562,12 +560,12 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM
- setShowDeleteConfirm(false)}>
+ setShowDeleteConfirm(false)}>
{t("mcp:deleteDialog.cancel")}
-
-
+
+
{t("mcp:deleteDialog.delete")}
-
+
diff --git a/webview-ui/src/components/memories/MemoriesView.tsx b/webview-ui/src/components/memories/MemoriesView.tsx
index db2b9b02c2..15ee9db392 100644
--- a/webview-ui/src/components/memories/MemoriesView.tsx
+++ b/webview-ui/src/components/memories/MemoriesView.tsx
@@ -1,5 +1,5 @@
import React, { memo, useState, useEffect } from "react"
-import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
+import { VSCodeButton, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import { Button } from "@/components/ui"
import { useAppTranslation } from "@/i18n/TranslationContext"
import { Tab, TabHeader, TabContent } from "../common/Tab"
@@ -86,7 +86,9 @@ const MemoriesView = ({ onDone }: MemoriesViewProps) => {
{t("memories:title")}
- {t("memories:done")}
+
+ {t("memories:done")}
+
(({ onDone, t
currentApiConfigName,
// listApiConfigMeta,
uriScheme,
- kiloCodeWrapperProperties, // kilocode_change
settingsImportedAt,
} = extensionState
@@ -587,7 +584,6 @@ const SettingsView = forwardRef(({ onDone, t
{ id: "browser", icon: SquareMousePointer },
// { id: "checkpoints", icon: MapPinCheck },
// { id: "display", icon: Monitor }, // kilocode_change
- ...(kiloCodeWrapperProperties?.kiloCodeWrapped ? [] : [{ id: "ghost" as const, icon: Bot }]), // kilocode_change
{ id: "notifications", icon: Bell },
// { id: "contextManagement", icon: Database },
{ id: "terminal", icon: SquareTerminal },
@@ -598,7 +594,7 @@ const SettingsView = forwardRef(({ onDone, t
{ id: "mcp", icon: Server },
{ id: "about", icon: Info },
],
- [kiloCodeWrapperProperties?.kiloCodeWrapped], // kilocode_change
+ [], // kilocode_change
)
// Update target section logic to set active tab
useEffect(() => {
@@ -655,14 +651,14 @@ const SettingsView = forwardRef(({ onDone, t
? t("settings:header.saveButtonTooltip")
: t("settings:header.nothingChangedTooltip")
}>
-
{t("settings:common.save")}
-
+
checkUnsaveChanges(onDone)}>
@@ -705,9 +701,7 @@ const SettingsView = forwardRef(({ onDone, t
{id === "mcp"
? t(`kilocode:settings.sections.mcp`)
- : id === "ghost"
- ? t(`kilocode:ghost.title`)
- : t(`settings:sections.${id}`)}
+ : t(`settings:sections.${id}`)}
@@ -726,9 +720,7 @@ const SettingsView = forwardRef(({ onDone, t
{id === "mcp"
? t(`kilocode:settings.sections.mcp`)
- : id === "ghost"
- ? t(`kilocode:ghost.title`)
- : t(`settings:sections.${id}`)}
+ : t(`settings:sections.${id}`)}
@@ -854,12 +846,6 @@ const SettingsView = forwardRef(({ onDone, t
setCachedStateField={setCachedStateField}
/>
)} */}
- {activeTab === "ghost" && (
-
- )}
{/* kilocode_change end display section */}
{/* Notifications Section */}
diff --git a/webview-ui/src/components/ui/button.tsx b/webview-ui/src/components/ui/button.tsx
index 6cdc61b491..36b0f10523 100644
--- a/webview-ui/src/components/ui/button.tsx
+++ b/webview-ui/src/components/ui/button.tsx
@@ -5,7 +5,7 @@ import * as React from "react"
import { cn } from "@/lib/utils"
const buttonVariants = cva(
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xs text-base font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer active:opacity-80 border border-[var(--color-matterai-border)] outline-none rounded-md",
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap text-base font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer active:opacity-80 border border-[var(--color-matterai-border)] outline-none rounded-md",
{
variants: {
variant: {
@@ -14,7 +14,7 @@ const buttonVariants = cva(
outline:
"border border-vscode-input-border bg-transparent hover:bg-accent hover:text-accent-foreground",
secondary:
- "border border-vscode-input-border bg-secondary text-secondary-foreground hover:bg-secondary/80",
+ "border border-vscode-input-border bg-secondary text-secondary-foreground hover:bg-secondary/80 rounded-md",
ghost: "hover:bg-accent hover:text-accent-foreground border-none",
link: "text-primary underline-offset-4 hover:underline",
combobox:
diff --git a/webview-ui/src/index.css b/webview-ui/src/index.css
index 78f5b0388c..273133e137 100644
--- a/webview-ui/src/index.css
+++ b/webview-ui/src/index.css
@@ -23,6 +23,36 @@
@plugin "tailwindcss-animate";
+@layer components {
+ /* VSCodeButton Global Overrides */
+ vscode-button[appearance="primary"],
+ vscode-button[appearance="primary"]::part(control),
+ vscode-button[appearance="primary"]:hover,
+ vscode-button[appearance="primary"]:hover::part(control) {
+ color: var(--vscode-button-foreground) !important;
+ border-radius: 6px !important;
+ border: none !important;
+ background: var(--vscode-button-background) !important;
+ }
+
+ vscode-button[appearance="icon"]::part(control) {
+ color: var(--vscode-button-secondaryForeground) !important;
+ background: var(--vscode-button-secondaryBackground) !important;
+ }
+
+ vscode-button[appearance="secondary"],
+ vscode-button[appearance="secondary"]::part(control) {
+ border-radius: 6px !important;
+ color: var(--vscode-button-secondaryForeground) !important;
+ border: 0.5px solid var(--vscode-button-border) !important;
+ background: var(--vscode-button-secondaryBackground) !important;
+ }
+
+ vscode-button[appearance="secondary"]:hover::part(control) {
+ background: var(--vscode-button-secondaryHoverBackground) !important;
+ }
+}
+
@theme {
--font-display: var(--vscode-font-family);
@@ -133,7 +163,7 @@
--color-vscode-widget-border: var(--vscode-widget-border);
--color-vscode-widget-shadow: var(--vscode-widget-shadow);
- --color-vscode-textLink-foreground: var(--vscode-textLink-foreground);
+ --color-vscode-textLink-foreground: var(--vscode-tfextLink-foreground);
--color-vscode-textCodeBlock-background: var(--vscode-textCodeBlock-background);
@@ -215,7 +245,7 @@
/* Code Block Styles */
pre,
code {
- background-color: var(--vscode-input-background) !important;
+ background-color: var(--vscode-editor-background) !important;
padding-left: 0.1rem;
padding-right: 0.1rem;
}
@@ -498,28 +528,6 @@ vscode-text-field::part(input) {
min-height: 16px;
}
-vscode-button {
- border-radius: 0.5rem;
- border: 1px solid var(--vscode-input-border);
- background-color: var(--vscode-input-background);
- max-width: fit-content;
-}
-
-/**
- * VSCodeButton Global Overrides
- *
- * To override default classes for all VSCodeButton components globally,
- * add CSS rules here targeting the vscode-button web component.
- *
- * Example:
-
- *
- * Or use CSS custom properties to override specific parts:
- * vscode-button::part(control) {
- * /* your styles here *\/
- * }
- */
-
/**
* @shadcn/ui Overrides / Hacks
*/