icoa-cli 2.19.90 → 2.19.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/repl.js +14 -16
- package/package.json +1 -1
package/dist/repl.js
CHANGED
|
@@ -179,25 +179,28 @@ function printSelectionMenu() {
|
|
|
179
179
|
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
|
-
// State 2: fully prepared.
|
|
182
|
+
// State 2: fully prepared. Exam entry is the primary CTA — list it FIRST
|
|
183
|
+
// and make the token format + origin obvious. Students landing here have
|
|
184
|
+
// already done demo; without a concrete example they stare at "<token>"
|
|
185
|
+
// and don't know what to type or where the token comes from.
|
|
183
186
|
const plural = stats.attempts === 1 ? 'attempt' : 'attempts';
|
|
184
187
|
console.log(chalk.green(' ✓ Demo completed ') + chalk.gray(`(${stats.attempts} ${plural})`));
|
|
185
188
|
console.log(chalk.green(' ✓ Environment ready'));
|
|
186
189
|
console.log(chalk.yellow(' → Enter your exam token to begin.'));
|
|
190
|
+
console.log(chalk.gray(' (10-char code from your organizer, starts with your country code like ') + chalk.cyan('UA') + chalk.gray(' — case-insensitive)'));
|
|
187
191
|
console.log();
|
|
188
192
|
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
193
|
+
console.log(chalk.bold.yellow(' exam <token>') + chalk.gray(' Enter exam (primary action — use your organizer-issued token)'));
|
|
194
|
+
console.log(chalk.gray(' format: ') + chalk.white('exam UAxxxxxxxx') + chalk.gray(' (2-letter country prefix + 8 chars)'));
|
|
195
|
+
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
196
|
+
console.log(chalk.gray(' Other commands:'));
|
|
189
197
|
console.log(chalk.white(' demo') + chalk.gray(` ${demoLine}`));
|
|
190
198
|
console.log(chalk.white(' exam setup') + chalk.gray(' Re-verify tool environment'));
|
|
191
|
-
console.log(chalk.bold.yellow(' exam <token>') + chalk.gray(' Enter exam with access token'));
|
|
192
199
|
console.log(chalk.white(' lang es') + chalk.gray(' Switch language (17 supported)'));
|
|
193
200
|
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
194
201
|
}
|
|
195
|
-
// Beginner-friendly safety net: make it obvious how to pause / exit / get help.
|
|
196
|
-
// This is the first place a new K-12 user lands, so the three escape hatches
|
|
197
|
-
// need to be visible without cluttering the main command list above.
|
|
198
202
|
console.log(chalk.gray(' ') +
|
|
199
203
|
chalk.gray('Tip: ') + chalk.cyan('help') + chalk.gray(' for commands · ') +
|
|
200
|
-
chalk.cyan('tutorial') + chalk.gray(' for 30-sec walkthrough · ') +
|
|
201
204
|
chalk.cyan('Ctrl+C') + chalk.gray(' pauses · ') +
|
|
202
205
|
chalk.cyan('quit') + chalk.gray(' closes'));
|
|
203
206
|
console.log();
|
|
@@ -227,12 +230,10 @@ export async function startRepl(program, resumeMode) {
|
|
|
227
230
|
// ─── Mode selection (every launch) ───
|
|
228
231
|
const { select: selectMode, confirm: confirmMode } = await import('@inquirer/prompts');
|
|
229
232
|
const savedMode = config.mode || '';
|
|
230
|
-
// T3-10: Mode labels clarified for K-12 newcomers who don't know the
|
|
231
|
-
// difference between "selection" and "olympiad" at first glance.
|
|
232
233
|
const modeChoices = [
|
|
233
|
-
{ name: ` ${chalk.bold('National Selection')} ${chalk.gray('
|
|
234
|
-
{ name: ` ${chalk.bold('International Olympiad')} ${chalk.gray('
|
|
235
|
-
{ name: ` ${chalk.bold('National/Regional Partner')} ${chalk.gray('
|
|
234
|
+
{ name: ` ${chalk.bold('National Selection')} ${chalk.gray('—')} ${chalk.gray('demo, exam (lightweight)')}`, value: 'selection' },
|
|
235
|
+
{ name: ` ${chalk.bold('International Olympiad')} ${chalk.gray('—')} ${chalk.gray('CTF × AI (~500MB, advanced)')}`, value: 'olympiad' },
|
|
236
|
+
{ name: ` ${chalk.bold('National/Regional Partner')} ${chalk.gray('—')} ${chalk.gray('organizer tools (tokens, competitions)')}`, value: 'organizer' },
|
|
236
237
|
{ name: ` ${chalk.gray('About ICOA')} ${chalk.gray('·')} ${chalk.gray('Info & contact')}`, value: 'about' },
|
|
237
238
|
];
|
|
238
239
|
console.log(chalk.gray(' Use ') + chalk.yellow('↑') + chalk.gray(' or ') + chalk.yellow('↓') + chalk.gray(' to select, ') + chalk.yellow('Enter') + chalk.gray(' to confirm.'));
|
|
@@ -426,9 +427,7 @@ export async function startRepl(program, resumeMode) {
|
|
|
426
427
|
console.log(chalk.white(' scoreboard') + chalk.gray(' Live rankings'));
|
|
427
428
|
console.log(chalk.white(' help') + chalk.gray(' Full command list'));
|
|
428
429
|
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
429
|
-
|
|
430
|
-
// same beginner escape-hatch hint so newcomers don't get stuck.
|
|
431
|
-
console.log(chalk.gray(' Tip: ') + chalk.cyan('help') + chalk.gray(' · ') + chalk.cyan('tutorial') + chalk.gray(' 30-sec tour · ') + chalk.cyan('Ctrl+C') + chalk.gray(' pauses · ') + chalk.cyan('quit') + chalk.gray(' closes'));
|
|
430
|
+
console.log(chalk.gray(' Tip: ') + chalk.cyan('help') + chalk.gray(' · ') + chalk.cyan('Ctrl+C') + chalk.gray(' pauses · ') + chalk.cyan('quit') + chalk.gray(' closes'));
|
|
432
431
|
console.log();
|
|
433
432
|
}
|
|
434
433
|
else if (activated) {
|
|
@@ -443,7 +442,7 @@ export async function startRepl(program, resumeMode) {
|
|
|
443
442
|
console.log(chalk.white(' Step 2 ') + chalk.bold.cyan('challenges') + chalk.gray(' Browse & solve challenges'));
|
|
444
443
|
console.log(chalk.white(' Step 3 ') + chalk.bold.cyan('hint') + chalk.gray(' Ask AI when stuck'));
|
|
445
444
|
console.log();
|
|
446
|
-
console.log(chalk.gray(' Also: ') + chalk.white('env') + chalk.gray(' check tools ') + chalk.white('help') + chalk.gray(' all commands
|
|
445
|
+
console.log(chalk.gray(' Also: ') + chalk.white('env') + chalk.gray(' check tools ') + chalk.white('help') + chalk.gray(' all commands'));
|
|
447
446
|
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
448
447
|
console.log(chalk.gray(' Tip: ') + chalk.cyan('Ctrl+C') + chalk.gray(' pauses · ') + chalk.cyan('exit') + chalk.gray(' → menu · ') + chalk.cyan('quit') + chalk.gray(' closes CLI'));
|
|
449
448
|
console.log();
|
|
@@ -461,7 +460,6 @@ export async function startRepl(program, resumeMode) {
|
|
|
461
460
|
console.log(chalk.white(' ref web') + chalk.gray(' Quick reference for Web'));
|
|
462
461
|
console.log(chalk.white(' env') + chalk.gray(' Check your tools'));
|
|
463
462
|
console.log(chalk.white(' help') + chalk.gray(' All available commands'));
|
|
464
|
-
console.log(chalk.white(' tutorial') + chalk.gray(' 30-second walkthrough for first-timers'));
|
|
465
463
|
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
466
464
|
console.log(chalk.gray(' Tip: ') + chalk.cyan('Ctrl+C') + chalk.gray(' pauses · ') + chalk.cyan('exit') + chalk.gray(' → menu · ') + chalk.cyan('quit') + chalk.gray(' closes CLI'));
|
|
467
465
|
console.log();
|