@rhizogrip/spore-cli 1.49.1 → 1.49.3
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/package.json +2 -2
- package/tui/index.js +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhizogrip/spore-cli",
|
|
3
|
-
"version": "1.49.
|
|
3
|
+
"version": "1.49.3",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Christophe Le Bars",
|
|
6
6
|
"email": "clb@toort.net"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"minimist": "^1.2.8"
|
|
55
55
|
},
|
|
56
56
|
"optionalDependencies": {
|
|
57
|
-
"@rhizogrip/spore": "1.49.
|
|
57
|
+
"@rhizogrip/spore": "1.49.3"
|
|
58
58
|
},
|
|
59
59
|
"license": "Apache-2.0"
|
|
60
60
|
}
|
package/tui/index.js
CHANGED
|
@@ -462,12 +462,14 @@ export async function runTui ({ ws, commands = [], renderTool = null, greeting =
|
|
|
462
462
|
try {
|
|
463
463
|
sent = send(state.ws, text, { replyTo: 'terminal' })
|
|
464
464
|
} catch (err) {
|
|
465
|
-
|
|
465
|
+
notice(errorText(err))
|
|
466
|
+
return false
|
|
466
467
|
}
|
|
467
468
|
editor.addToHistory(text)
|
|
468
469
|
notice(sent.started ? 'started a turn' : 'heard — the running turn reads it next')
|
|
469
470
|
reload()
|
|
470
471
|
view.scrollToEnd()
|
|
472
|
+
return true
|
|
471
473
|
}
|
|
472
474
|
|
|
473
475
|
const change = (act) => {
|
|
@@ -580,7 +582,9 @@ export async function runTui ({ ws, commands = [], renderTool = null, greeting =
|
|
|
580
582
|
editor.setText('')
|
|
581
583
|
const command = parseCommand(trimmed)
|
|
582
584
|
if (command) return run(command).catch(invalid)
|
|
583
|
-
say(trimmed.startsWith('//') ? trimmed.slice(1) : trimmed)
|
|
585
|
+
if (say(trimmed.startsWith('//') ? trimmed.slice(1) : trimmed)) return
|
|
586
|
+
editor.setText(trimmed)
|
|
587
|
+
editor.addToHistory(trimmed)
|
|
584
588
|
}
|
|
585
589
|
|
|
586
590
|
const twice = (key, first, then) => {
|