picocode-core 0.9.121 → 0.9.122
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 +1 -1
- package/src/controller.js +4 -2
package/package.json
CHANGED
package/src/controller.js
CHANGED
|
@@ -773,14 +773,16 @@ export function createController({ boot }) {
|
|
|
773
773
|
let value
|
|
774
774
|
if (!input) {
|
|
775
775
|
value = values[(values.indexOf(state.derived.color) + 1) % values.length]
|
|
776
|
+
} else if (input.toLowerCase() === 'none') {
|
|
777
|
+
value = null
|
|
776
778
|
} else {
|
|
777
779
|
value = SESSION_COLORS[input.toLowerCase()] || (/^#[0-9a-fA-F]{6}$/.test(input) ? input : null)
|
|
778
|
-
if (!value) return flash(`usage: /color to cycle, or /color <${names.join('|')}|#hex>`)
|
|
780
|
+
if (!value) return flash(`usage: /color to cycle, /color none to clear, or /color <${names.join('|')}|#hex>`)
|
|
779
781
|
}
|
|
780
782
|
persist(makeEvent('color', { value }))
|
|
781
783
|
ensureSession()
|
|
782
784
|
reDerive()
|
|
783
|
-
flash(`session color: ${names[values.indexOf(value)] || value}`)
|
|
785
|
+
flash(value ? `session color: ${names[values.indexOf(value)] || value}` : 'session color cleared')
|
|
784
786
|
}
|
|
785
787
|
|
|
786
788
|
function clear() {
|