archondev 2.19.23 → 2.19.24
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/index.js +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4164,11 +4164,14 @@ async function handleSlashCommand(input) {
|
|
|
4164
4164
|
}
|
|
4165
4165
|
function prompt(question) {
|
|
4166
4166
|
return new Promise((resolve) => {
|
|
4167
|
+
const safeMode = isTerminalSafeMode();
|
|
4168
|
+
const promptPrefix = safeMode ? ">" : chalk5.cyan("?");
|
|
4167
4169
|
const rl = readline.createInterface({
|
|
4168
4170
|
input: process.stdin,
|
|
4169
|
-
output: process.stdout
|
|
4171
|
+
output: process.stdout,
|
|
4172
|
+
terminal: !safeMode
|
|
4170
4173
|
});
|
|
4171
|
-
rl.question(`${
|
|
4174
|
+
rl.question(`${promptPrefix} ${question}: `, (answer) => {
|
|
4172
4175
|
rl.close();
|
|
4173
4176
|
resolve(answer);
|
|
4174
4177
|
});
|
|
@@ -4176,9 +4179,12 @@ function prompt(question) {
|
|
|
4176
4179
|
}
|
|
4177
4180
|
function promptMultiline(question) {
|
|
4178
4181
|
return new Promise((resolve) => {
|
|
4182
|
+
const safeMode = isTerminalSafeMode();
|
|
4183
|
+
const promptPrefix = safeMode ? ">" : chalk5.cyan("?");
|
|
4179
4184
|
const rl = readline.createInterface({
|
|
4180
4185
|
input: process.stdin,
|
|
4181
|
-
output: process.stdout
|
|
4186
|
+
output: process.stdout,
|
|
4187
|
+
terminal: !safeMode
|
|
4182
4188
|
});
|
|
4183
4189
|
const lines = [];
|
|
4184
4190
|
rl.on("line", (line) => {
|
|
@@ -4195,7 +4201,7 @@ function promptMultiline(question) {
|
|
|
4195
4201
|
rl.on("close", () => {
|
|
4196
4202
|
resolve(lines.join("\n").trimEnd());
|
|
4197
4203
|
});
|
|
4198
|
-
rl.setPrompt(`${
|
|
4204
|
+
rl.setPrompt(`${promptPrefix} ${question} (multi-line: end with a single '.' line or Ctrl+D): `);
|
|
4199
4205
|
rl.prompt();
|
|
4200
4206
|
});
|
|
4201
4207
|
}
|