MCPcopy
hub / github.com/upstash/context7 / promptModes

Function promptModes

packages/cli/src/commands/remove.ts:127–146  ·  view source on GitHub ↗
(modes: UninstallMode[])

Source from the content-addressed store, hash-verified

125}
126
127async function promptModes(modes: UninstallMode[]): Promise<UninstallMode[] | null> {
128 const choices = modes.map((mode) => ({
129 name: MODE_LABELS[mode],
130 value: mode,
131 }));
132
133 try {
134 return await checkboxWithHover(
135 {
136 message: "Which Context7 setup modes do you want to remove?",
137 choices,
138 loop: false,
139 theme: CHECKBOX_THEME,
140 },
141 { getName: (mode: UninstallMode) => MODE_LABELS[mode] }
142 );
143 } catch {
144 return null;
145 }
146}
147
148async function resolveAgents(options: UninstallOptions, scope: Scope): Promise<SetupAgent[]> {
149 const explicit = getSelectedAgents(options);

Callers 1

resolveModesFunction · 0.85

Calls 1

checkboxWithHoverFunction · 0.85

Tested by

no test coverage detected