mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Appease Ellipsis
This commit is contained in:
@@ -1,18 +1,23 @@
|
|||||||
import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
|
import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"
|
||||||
|
import { FormEvent } from "react"
|
||||||
import { useExtensionState } from "../../context/ExtensionStateContext"
|
import { useExtensionState } from "../../context/ExtensionStateContext"
|
||||||
import { vscode } from "../../utils/vscode"
|
import { vscode } from "../../utils/vscode"
|
||||||
|
|
||||||
const McpEnabledToggle = () => {
|
const McpEnabledToggle = () => {
|
||||||
const { mcpEnabled, setMcpEnabled } = useExtensionState()
|
const { mcpEnabled, setMcpEnabled } = useExtensionState()
|
||||||
|
|
||||||
|
const handleChange = (e: Event | FormEvent<HTMLElement>) => {
|
||||||
|
const target = ('target' in e ? e.target : null) as HTMLInputElement | null
|
||||||
|
if (!target) return
|
||||||
|
setMcpEnabled(target.checked)
|
||||||
|
vscode.postMessage({ type: "mcpEnabled", bool: target.checked })
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ marginBottom: "20px" }}>
|
<div style={{ marginBottom: "20px" }}>
|
||||||
<VSCodeCheckbox
|
<VSCodeCheckbox
|
||||||
checked={mcpEnabled}
|
checked={mcpEnabled}
|
||||||
onChange={(e: any) => {
|
onChange={handleChange}>
|
||||||
setMcpEnabled(e.target.checked)
|
|
||||||
vscode.postMessage({ type: "mcpEnabled", bool: e.target.checked })
|
|
||||||
}}>
|
|
||||||
<span style={{ fontWeight: "500" }}>Enable MCP Servers</span>
|
<span style={{ fontWeight: "500" }}>Enable MCP Servers</span>
|
||||||
</VSCodeCheckbox>
|
</VSCodeCheckbox>
|
||||||
<p style={{
|
<p style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user