icoa-cli 2.19.76 → 2.19.77
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 +4 -1
- package/package.json +1 -1
package/dist/repl.js
CHANGED
|
@@ -755,8 +755,11 @@ export async function startRepl(program, resumeMode) {
|
|
|
755
755
|
const organizerCommands = ['join', 'exam', 'demo', 'retry', 'next', 'prev', 'logout', 'setup', 'lang', 'ref', 'ctf', 'mark', 'unmark', 'review', 'submit'];
|
|
756
756
|
// Selection mode allows shell commands prefixed with ! — contestants
|
|
757
757
|
// need !python3, !cat, !base64 etc. for practical questions (Q31-Q40).
|
|
758
|
+
// Also allow bare `python` / `python3` / `python3.12` since contestants
|
|
759
|
+
// naturally type that when they want interactive Python.
|
|
758
760
|
// BLOCKED_COMMANDS check downstream still rejects dangerous ones.
|
|
759
|
-
const
|
|
761
|
+
const isPythonCmd = /^python3?(\.\d+)?$/.test(cmd);
|
|
762
|
+
const isShellCommand = input.startsWith('!') || cmd.startsWith('!') || isPythonCmd;
|
|
760
763
|
if (mode === 'selection' && !isShellCommand && !selectionCommands.includes(cmd)) {
|
|
761
764
|
console.log(chalk.gray(' Not available in Selection mode.'));
|
|
762
765
|
if (examState) {
|