thinkpool-pair 0.7.124 → 0.7.125
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/bridge.mjs +10 -1
- package/package.json +1 -1
package/bridge.mjs
CHANGED
|
@@ -2073,7 +2073,16 @@ channel
|
|
|
2073
2073
|
}
|
|
2074
2074
|
const mm = text.match(/^\/model\b\s*(\S+)?/)
|
|
2075
2075
|
if (mm) {
|
|
2076
|
-
if (mm[1]) {
|
|
2076
|
+
if (mm[1]) {
|
|
2077
|
+
s.session.setModel(mm[1])
|
|
2078
|
+
// Reflect the switch in the announce IMMEDIATELY (before any turn). The SDK
|
|
2079
|
+
// only echoes the resolved full id on the next turn, and meta/ctx model go
|
|
2080
|
+
// stale until then, so without this the chip snapped back to the old model
|
|
2081
|
+
// when you left + returned to the tab. onEvent refines s.model to the full
|
|
2082
|
+
// id on the next turn; the announce carries it to every device meanwhile.
|
|
2083
|
+
s.model = mm[1]; announce()
|
|
2084
|
+
ctlLine(`switched model → ${mm[1]}`)
|
|
2085
|
+
}
|
|
2077
2086
|
else { ctlLine('use /model <name> to switch — e.g. opus, sonnet, haiku') }
|
|
2078
2087
|
return
|
|
2079
2088
|
}
|