Merge branch 'main' into fix/aikido-security-update-packages-12570536-5Ah8

This commit is contained in:
Saoud Rizwan
2025-12-21 18:59:29 -08:00
committed by GitHub
5 changed files with 53 additions and 48 deletions
+10
View File
@@ -809,6 +809,11 @@ export class McpHub {
} else if (this.configsRequireRestart(JSON.parse(currentConnection.server.config), config)) {
// Existing server with changed connection config (excludes Cline-specific settings)
try {
// Set status to "connecting" and notify webview before restart (same pattern as restartConnection)
currentConnection.server.status = "connecting"
currentConnection.server.error = ""
await this.notifyWebviewOfServerChanges()
if (config.type === "stdio") {
this.setupFileWatcher(name, config)
}
@@ -1027,6 +1032,11 @@ export class McpHub {
const connection = this.connections.find((conn) => conn.server.name === serverName)
if (connection) {
connection.server.disabled = disabled
// When enabling a server, set status to "connecting" so UI shows yellow indicator
if (!disabled) {
connection.server.status = "connecting"
connection.server.error = ""
}
}
const serverOrder = Object.keys(config.mcpServers || {})
@@ -120,6 +120,14 @@ export const ActionButtons: React.FC<ActionButtonsProps> = ({
behavior: "smooth",
})
disableAutoScrollRef.current = true
// Virtual rendering may not have all items rendered when at bottom,
// so scroll again after a delay to ensure we reach the true top
setTimeout(() => {
scrollBehavior.virtuosoRef.current?.scrollTo({
top: 0,
behavior: "smooth",
})
}, 300)
}
return (
@@ -146,7 +146,7 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
style={{
display: "flex",
alignItems: "center",
justifyContent: "flex-start",
justifyContent: "center",
}}>
<VSCodeButton
appearance="icon"
@@ -16,35 +16,6 @@ type HistoryViewProps = {
type SortOption = "newest" | "oldest" | "mostExpensive" | "mostTokens" | "mostRelevant"
// Tailwind-styled radio with custom icon support - works independently of VSCodeRadioGroup but looks the same
// Used for workspace and favorites filters
interface CustomFilterRadioProps {
checked: boolean
onChange: () => void
icon: string
label: string
}
const CustomFilterRadio = ({ checked, onChange, icon, label }: CustomFilterRadioProps) => {
return (
<div
className="flex items-center cursor-pointer py-[0.3em] px-0 mr-[10px] text-(--vscode-font-size) select-none"
onClick={onChange}>
<div
className={`w-[14px] h-[14px] rounded-full border border-(--vscode-checkbox-border) relative flex justify-center items-center mr-[6px] ${
checked ? "bg-(--vscode-checkbox-background)" : "bg-transparent"
}`}>
{checked && <div className="w-[6px] h-[6px] rounded-full bg-(--vscode-checkbox-foreground)" />}
</div>
<span className="flex items-center gap-[3px]">
<div className={`codicon codicon-${icon} text-(--vscode-button-background) text-base`} />
{label}
</span>
</div>
)
}
const HistoryView = ({ onDone }: HistoryViewProps) => {
const extensionStateContext = useExtensionState()
const { taskHistory, onRelinquishControl, environment } = extensionStateContext
@@ -363,24 +334,21 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
<VSCodeRadio disabled={!searchQuery} style={{ opacity: searchQuery ? 1 : 0.5 }} value="mostRelevant">
Most Relevant
</VSCodeRadio>
<CustomFilterRadio
<VSCodeRadio
checked={showCurrentWorkspaceOnly}
icon="workspace"
label="Workspace"
onChange={() => setShowCurrentWorkspaceOnly(!showCurrentWorkspaceOnly)}
/>
<CustomFilterRadio
checked={showFavoritesOnly}
icon="star-full"
label="Favorites"
onChange={() => setShowFavoritesOnly(!showFavoritesOnly)}
/>
onClick={() => setShowCurrentWorkspaceOnly(!showCurrentWorkspaceOnly)}>
<span className="flex items-center gap-[3px]">
<span className="codicon codicon-folder text-(--vscode-button-background)" />
Workspace
</span>
</VSCodeRadio>
<VSCodeRadio checked={showFavoritesOnly} onClick={() => setShowFavoritesOnly(!showFavoritesOnly)}>
<span className="flex items-center gap-[3px]">
<span className="codicon codicon-star-full text-(--vscode-button-background)" />
Favorites
</span>
</VSCodeRadio>
</VSCodeRadioGroup>
<div className="flex justify-end gap-2.5">
<VSCodeButton onClick={() => handleBatchHistorySelect(true)}>Select All</VSCodeButton>
<VSCodeButton onClick={() => handleBatchHistorySelect(false)}>Select None</VSCodeButton>
</div>
</div>
</div>
<div style={{ flexGrow: 1, overflowY: "auto", margin: 0 }}>
@@ -676,6 +644,14 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
padding: "10px 10px",
borderTop: "1px solid var(--vscode-panel-border)",
}}>
<div className="flex gap-2.5 mb-2.5">
<VSCodeButton appearance="secondary" onClick={() => handleBatchHistorySelect(true)} style={{ flex: 1 }}>
Select All
</VSCodeButton>
<VSCodeButton appearance="secondary" onClick={() => handleBatchHistorySelect(false)} style={{ flex: 1 }}>
Select None
</VSCodeButton>
</div>
{selectedItems.length > 0 ? (
<DangerButton
aria-label="Delete selected items"
@@ -167,7 +167,11 @@ const ServerRow = ({
return (
<div className="mb-2.5">
<div className="flex bg-code-block-background p-2 gap-4 items-center" onClick={handleRowClick}>
<div
className={cn("flex bg-code-block-background p-2 gap-4 items-center", {
"cursor-pointer": !server.error && isExpandable,
})}
onClick={handleRowClick}>
{!server.error && isExpandable && (
<span
className={cn("mr-2 codicon", {
@@ -207,7 +211,14 @@ const ServerRow = ({
</Button>
)}
{/* Toggle Switch */}
<Switch checked={!server.disabled} key={server.name} onClick={handleToggleMcpServer} />
<Switch
checked={!server.disabled}
key={server.name}
onClick={(e) => {
e.stopPropagation()
handleToggleMcpServer()
}}
/>
<div
className={cn("h-2 w-2 ml-0.5 rounded-full", {
"bg-success": server.status === "connected",