diff --git a/webview-ui/src/components/chat/CodeIndexPopover.tsx b/webview-ui/src/components/chat/CodeIndexPopover.tsx index 9d5f8c12a4..516bfc58fb 100644 --- a/webview-ui/src/components/chat/CodeIndexPopover.tsx +++ b/webview-ui/src/components/chat/CodeIndexPopover.tsx @@ -32,6 +32,7 @@ import { PopoverContent, PopoverTrigger, } from "@src/components/ui" +import { useRooPortal } from "@src/components/ui/hooks/useRooPortal" import type { EmbedderProvider } from "@roo/embeddingModels" import type { IndexingStatus } from "@roo/ExtensionMessage" @@ -284,6 +285,8 @@ export const CodeIndexPopover: React.FC = ({ return models ? Object.keys(models) : [] } + const portalContainer = useRooPortal("roo-portal") + return ( {children} @@ -294,7 +297,8 @@ export const CodeIndexPopover: React.FC = ({ side="bottom" sideOffset={5} collisionPadding={16} - avoidCollisions={true}> + avoidCollisions={true} + container={portalContainer}>

{t("settings:codeIndex.title")}

diff --git a/webview-ui/src/components/settings/ExperimentalSettings.tsx b/webview-ui/src/components/settings/ExperimentalSettings.tsx index f90c1b8591..958c7742fd 100644 --- a/webview-ui/src/components/settings/ExperimentalSettings.tsx +++ b/webview-ui/src/components/settings/ExperimentalSettings.tsx @@ -85,7 +85,15 @@ export const ExperimentalSettings = ({

setCachedStateField?.("codebaseIndexEnabled", e.target.checked)}> + onChange={(e: any) => { + const newEnabledState = e.target.checked + if (setCachedStateField && codebaseIndexConfig) { + setCachedStateField("codebaseIndexConfig", { + ...codebaseIndexConfig, + codebaseIndexEnabled: newEnabledState, + }) + } + }}> {t("settings:codeIndex.enableLabel")}
diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index bd227c246d..3ece8146af 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -320,8 +320,9 @@ const SettingsView = forwardRef(({ onDone, t vscode.postMessage({ type: "updateSupportPrompt", values: customSupportPrompts || {} }) vscode.postMessage({ type: "upsertApiConfiguration", text: currentApiConfigName, apiConfiguration }) vscode.postMessage({ type: "telemetrySetting", text: telemetrySetting }) - // Code index config is now handled separately in CodeIndexSettings - // vscode.postMessage({ type: "codebaseIndexConfig", values: codebaseIndexConfig }) + if (codebaseIndexConfig) { + vscode.postMessage({ type: "codebaseIndexEnabled", bool: codebaseIndexConfig.codebaseIndexEnabled }) + } vscode.postMessage({ type: "profileThresholds", values: profileThresholds }) setChangeDetected(false) }