MCPcopy Create free account
hub / github.com/chhoumann/quickadd / stripUserScriptSecretRefsFromChoice

Function stripUserScriptSecretRefsFromChoice

src/utils/userScriptSecrets.ts:934–949  ·  view source on GitHub ↗
(
	choice: unknown,
	options?: UserScriptSecretSanitizerOptions,
)

Source from the content-addressed store, hash-verified

932}
933
934export function stripUserScriptSecretRefsFromChoice(
935 choice: unknown,
936 options?: UserScriptSecretSanitizerOptions,
937): void {
938 if (!isRecord(choice)) return;
939
940 if (choice.type === "Macro" && isRecord(choice.macro)) {
941 stripUserScriptSecretRefsFromCommands(choice.macro.commands, options);
942 }
943
944 if (choice.type === "Multi" && Array.isArray(choice.choices)) {
945 for (const child of choice.choices) {
946 stripUserScriptSecretRefsFromChoice(child, options);
947 }
948 }
949}

Callers 3

buildPackageFunction · 0.90
duplicateChoiceFunction · 0.90

Calls 2

isRecordFunction · 0.70

Tested by

no test coverage detected