picocode-core 0.9.158 → 0.9.159
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 +6 -2
package/package.json
CHANGED
package/src/controller.js
CHANGED
|
@@ -361,8 +361,12 @@ export function createController({ boot }) {
|
|
|
361
361
|
)
|
|
362
362
|
})
|
|
363
363
|
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
// a note for a session that has not started yet waits for its first
|
|
365
|
+
// message; `ensure` starts the session now so the note is persisted and
|
|
366
|
+
// in view before the first turn, not after it
|
|
367
|
+
function noteSystem(text, { wake, agentId, ensure = false, sessionId = state.session?.id, sessionFile = state.session?.file } = {}) {
|
|
368
|
+
if (ensure && !state.session && !state.busy) ensureSession()
|
|
369
|
+
pendingSystemNotes.push({ text, wake, agentId, sessionId: sessionId ?? state.session?.id, sessionFile: sessionFile ?? state.session?.file })
|
|
366
370
|
flushSystemNotes()
|
|
367
371
|
}
|
|
368
372
|
|