Add isEmpty() helpers across all modules with clearable state.
Seventh expansion pass: domain-specific isEmpty() after moduleSnapshot on every module that has clearAll(), using existing count/snapshot helpers (async variants for temporal, spatial, semantic-vector, and reactive-state indexes). Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -124,6 +124,11 @@ class HyperBareHeadlessUi extends EventEmitter {
|
||||
return this.snapshot()
|
||||
}
|
||||
|
||||
isEmpty () {
|
||||
const s = this.snapshot()
|
||||
return !s.pipeOpen && !s.ui
|
||||
}
|
||||
|
||||
sendToUiBatch (messages) {
|
||||
if (!Array.isArray(messages)) throw new Error('messages array required')
|
||||
return messages.map((m) => this.sendToUi(m.channel, m.payload))
|
||||
|
||||
Reference in New Issue
Block a user