picocode-core 0.9.131 → 0.9.132
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 +19 -0
package/package.json
CHANGED
package/src/controller.js
CHANGED
|
@@ -1005,6 +1005,23 @@ export function createController({ boot }) {
|
|
|
1005
1005
|
send(text)
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
|
+
// the worker and deliberation models are app-wide settings: they change
|
|
1009
|
+
// for every session in this process and persist to the config file
|
|
1010
|
+
async function setResearchModel(name) {
|
|
1011
|
+
if (name && !modelAvailable(name)) return flash(`${name} is not available`)
|
|
1012
|
+
boot.researchModel = name || null
|
|
1013
|
+
if (!boot.deliberationModel || boot.deliberationModel === name) boot.deliberationModel = name || null
|
|
1014
|
+
await writeConfig({ models: { researchWorker: name || null } })
|
|
1015
|
+
changed()
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
async function setDeliberationModel(name) {
|
|
1019
|
+
if (name && !modelAvailable(name)) return flash(`${name} is not available`)
|
|
1020
|
+
boot.deliberationModel = name || null
|
|
1021
|
+
await writeConfig({ models: { deliberation: name || null } })
|
|
1022
|
+
changed()
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1008
1025
|
function sendInit(args) {
|
|
1009
1026
|
send(initPrompt(args))
|
|
1010
1027
|
}
|
|
@@ -1266,6 +1283,8 @@ export function createController({ boot }) {
|
|
|
1266
1283
|
sendSkill,
|
|
1267
1284
|
sendCommand,
|
|
1268
1285
|
sendInit,
|
|
1286
|
+
setResearchModel,
|
|
1287
|
+
setDeliberationModel,
|
|
1269
1288
|
previewSteer,
|
|
1270
1289
|
applySteer,
|
|
1271
1290
|
rewind,
|