icoa-cli 2.13.3 → 2.13.4

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.
@@ -1,5 +1,6 @@
1
1
  import chalk from 'chalk';
2
2
  import { getConfig, saveConfig } from '../lib/config.js';
3
+ import { getExamState } from '../lib/exam-state.js';
3
4
  import { logCommand } from '../lib/logger.js';
4
5
  import { printSuccess, printError, printInfo } from '../lib/ui.js';
5
6
  import { SUPPORTED_LANGUAGES } from '../types/index.js';
@@ -48,5 +49,13 @@ export function registerLangCommand(program) {
48
49
  }
49
50
  saveConfig({ language: code });
50
51
  printSuccess(`Language set to: ${LANG_NAMES[code] || code}`);
52
+ // If exam in progress, show current question to resume
53
+ const state = getExamState();
54
+ if (state) {
55
+ const currentQ = state._lastQ || 1;
56
+ console.log();
57
+ console.log(chalk.gray(` Exam in progress — resuming Q${currentQ}:`));
58
+ console.log(chalk.white(` Type: exam q ${currentQ}`));
59
+ }
51
60
  });
52
61
  }
package/dist/repl.js CHANGED
@@ -417,7 +417,14 @@ export async function startRepl(program, resumeMode) {
417
417
  const selectionCommands = ['exam', 'demo', 'next', 'prev', 'setup', 'lang', 'ref'];
418
418
  const organizerCommands = ['join', 'exam', 'demo', 'next', 'prev', 'logout', 'setup', 'lang', 'ref', 'ctf'];
419
419
  if (mode === 'selection' && !selectionCommands.includes(cmd)) {
420
- console.log(chalk.gray(' Not available in Selection mode. Switch via: setup'));
420
+ console.log(chalk.gray(' Not available in Selection mode.'));
421
+ if (examState) {
422
+ const currentQ = examState._lastQ || 1;
423
+ console.log(chalk.white(` Resume exam: exam q ${currentQ}`) + chalk.gray(' · ') + chalk.white('A/B/C/D') + chalk.gray(' to answer'));
424
+ }
425
+ else {
426
+ console.log(chalk.gray(' Try: demo · setup to switch mode'));
427
+ }
421
428
  console.log();
422
429
  rl.prompt();
423
430
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.13.3",
3
+ "version": "2.13.4",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {