diff --git a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx index cd16e8453..b04804964 100644 --- a/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx +++ b/gui/src/components/mainInput/Lump/sections/ModelsSection.tsx @@ -11,6 +11,7 @@ import { updateConfig, } from "../../../../redux/slices/configSlice"; import { isJetBrains } from "../../../../util"; +import { AddBlockButton } from "./AddBlockButton"; export function ModelsSection() { const { selectedProfile } = useAuth(); @@ -51,60 +52,63 @@ export function ModelsSection() { } return ( -
- handleChatModelSelection(model)} - /> - handleRoleUpdate("autocomplete", model)} - /> - {/* Jetbrains has a model selector inline */} - {!jetbrains && ( + <> +
handleRoleUpdate("edit", model)} + displayName="Chat" + description="Used in the chat interface" + models={config.modelsByRole.chat} + selectedModel={ + selectedChatModel + ? { + title: selectedChatModel.title, + provider: selectedChatModel.provider, + model: selectedChatModel.model, + } + : null + } + onSelect={(model) => handleChatModelSelection(model)} /> - )} - handleRoleUpdate("apply", model)} - /> - handleRoleUpdate("embed", model)} - /> - handleRoleUpdate("rerank", model)} - /> -
+ handleRoleUpdate("autocomplete", model)} + /> + {/* Jetbrains has a model selector inline */} + {!jetbrains && ( + handleRoleUpdate("edit", model)} + /> + )} + handleRoleUpdate("apply", model)} + /> + handleRoleUpdate("embed", model)} + /> + handleRoleUpdate("rerank", model)} + /> +
+ + ); } diff --git a/gui/src/components/mainInput/Lump/sections/docs/DocsIndexingStatus.tsx b/gui/src/components/mainInput/Lump/sections/docs/DocsIndexingStatus.tsx index 7badfbc2d..f2d79035c 100644 --- a/gui/src/components/mainInput/Lump/sections/docs/DocsIndexingStatus.tsx +++ b/gui/src/components/mainInput/Lump/sections/docs/DocsIndexingStatus.tsx @@ -138,6 +138,8 @@ function DocsIndexingStatus({ /> )} + + {["aborted", "complete", "failed"].includes( status?.status ?? "", ) && ( @@ -147,8 +149,6 @@ function DocsIndexingStatus({ /> )} - - {/* Removed StatusIndicator from here */} diff --git a/gui/src/pages/config/MCPServersPreview.tsx b/gui/src/pages/config/MCPServersPreview.tsx index 9404107d9..66ce07470 100644 --- a/gui/src/pages/config/MCPServersPreview.tsx +++ b/gui/src/pages/config/MCPServersPreview.tsx @@ -1,3 +1,4 @@ +import { ConfigYaml, parseConfigYaml } from "@continuedev/config-yaml"; import { ArrowPathIcon, CircleStackIcon, @@ -6,9 +7,11 @@ import { WrenchScrewdriverIcon, } from "@heroicons/react/24/outline"; import { MCPServerStatus } from "core"; -import { useContext } from "react"; +import { useContext, useMemo } from "react"; import { ToolTip } from "../../components/gui/Tooltip"; +import EditBlockButton from "../../components/mainInput/Lump/EditBlockButton"; import { AddBlockButton } from "../../components/mainInput/Lump/sections/AddBlockButton"; +import { useAuth } from "../../context/Auth"; import { IdeMessengerContext } from "../../context/IdeMessenger"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { updateConfig } from "../../redux/slices/configSlice"; @@ -16,8 +19,9 @@ import { fontSize } from "../../util"; interface MCPServerStatusProps { server: MCPServerStatus; + serverFromYaml?: NonNullable[number]; } -function MCPServerPreview({ server }: MCPServerStatusProps) { +function MCPServerPreview({ server, serverFromYaml }: MCPServerStatusProps) { const ideMessenger = useContext(IdeMessengerContext); const config = useAppSelector((store) => store.config.config); const dispatch = useAppDispatch(); @@ -124,6 +128,7 @@ function MCPServerPreview({ server }: MCPServerStatusProps) { {/* Refresh button */}
+
store.config.config.mcpServerStatuses, ); - const ideMessenger = useContext(IdeMessengerContext); + const { selectedProfile } = useAuth(); + + const mergedBlocks = useMemo(() => { + const parsed = selectedProfile?.rawYaml + ? parseConfigYaml(selectedProfile?.rawYaml ?? "") + : undefined; + return (servers ?? []).map((doc, index) => ({ + block: doc, + blockFromYaml: parsed?.mcpServers?.[index], + })); + }, [servers, selectedProfile]); return (
- {servers.map((server, idx) => ( - + {mergedBlocks.map(({ block, blockFromYaml }, idx) => ( + ))}