MCPcopy
hub / github.com/rpamis/comet / selectScope

Function selectScope

src/commands/init.ts:66–77  ·  view source on GitHub ↗
(options: InitOptions, lang: string)

Source from the content-addressed store, hash-verified

64].join('\n');
65
66async function selectScope(options: InitOptions, lang: string): Promise<InstallScope> {
67 if (options.scope) return options.scope;
68 if (options.yes) return 'project';
69
70 return select({
71 message: t(lang, 'installScope'),
72 choices: [
73 { name: t(lang, 'scopeProject'), value: 'project' as const },
74 { name: t(lang, 'scopeGlobal'), value: 'global' as const },
75 ],
76 });
77}
78
79async function selectLanguage(options: InitOptions): Promise<LanguageConfig> {
80 if (options.language) {

Callers 1

initCommandFunction · 0.85

Calls 1

tFunction · 0.85

Tested by

no test coverage detected