refactor(plugin): remove AI slop and clean verbose comments

This commit is contained in:
YeonGyu-Kim
2026-04-03 21:42:14 +09:00
parent 6b431c5522
commit 66cc823ff3
6 changed files with 6 additions and 16 deletions
+5 -6
View File
@@ -6,6 +6,10 @@ import { log } from "../shared";
type McpEntry = Record<string, unknown>;
function isDisabledMcpEntry(value: unknown): value is McpEntry & { enabled: false } {
return typeof value === "object" && value !== null && (value as McpEntry).enabled === false;
}
function captureUserDisabledMcps(
userMcp: Record<string, unknown> | undefined
): Set<string> {
@@ -13,12 +17,7 @@ function captureUserDisabledMcps(
if (!userMcp) return disabled;
for (const [name, value] of Object.entries(userMcp)) {
if (
value &&
typeof value === "object" &&
"enabled" in value &&
(value as McpEntry).enabled === false
) {
if (isDisabledMcpEntry(value)) {
disabled.add(name);
}
}