zames_pro 2.28.1 → 2.29.0
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/dist/browser.js +8 -0
- package/dist/index.js +10 -1
- package/dist/input.js +16 -13
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -1051,6 +1051,14 @@ export class DeepSeekBrowser {
|
|
|
1051
1051
|
getToggleStatesSync() {
|
|
1052
1052
|
return this._toggles;
|
|
1053
1053
|
}
|
|
1054
|
+
// Update the cached toggle states (used by the status icons) without a send.
|
|
1055
|
+
// Called from /config so the icons change immediately.
|
|
1056
|
+
setToggleState(s) {
|
|
1057
|
+
if (typeof s.deepThinking === 'boolean')
|
|
1058
|
+
this._toggles.deepThinking = s.deepThinking;
|
|
1059
|
+
if (typeof s.webSearch === 'boolean')
|
|
1060
|
+
this._toggles.webSearch = s.webSearch;
|
|
1061
|
+
}
|
|
1054
1062
|
// The CURRENT state of the two DeepSeek toggles, read from the DOM
|
|
1055
1063
|
// (aria-pressed) so the status line reflects what is actually on, not what
|
|
1056
1064
|
// the config asked for. Falls back to the configured values when the buttons
|
package/dist/index.js
CHANGED
|
@@ -1407,13 +1407,22 @@ async function main() {
|
|
|
1407
1407
|
}
|
|
1408
1408
|
// Reflect browser toggles on the LIVE browser object. The browser is
|
|
1409
1409
|
// created once at startup, so without this a /config set browser.*
|
|
1410
|
-
// change would only apply after a restart.
|
|
1410
|
+
// change would only apply after a restart. We also update the cached
|
|
1411
|
+
// toggle states (_toggles) that the status icons read, and repaint the
|
|
1412
|
+
// editor, so the 🧠/🌐 icons change IMMEDIATELY (previously they only
|
|
1413
|
+
// updated after the next send, when _applyToggles() ran).
|
|
1411
1414
|
if (path === 'browser.deepThinking' || path === 'browser.webSearch') {
|
|
1412
1415
|
const b = browser;
|
|
1413
1416
|
if (path === 'browser.deepThinking')
|
|
1414
1417
|
b.deepThinking = !!value;
|
|
1415
1418
|
else
|
|
1416
1419
|
b.webSearch = !!value;
|
|
1420
|
+
b.setToggleState({
|
|
1421
|
+
deepThinking: b.deepThinking,
|
|
1422
|
+
webSearch: b.webSearch,
|
|
1423
|
+
});
|
|
1424
|
+
if (editor)
|
|
1425
|
+
editor.refreshStatus();
|
|
1417
1426
|
}
|
|
1418
1427
|
}
|
|
1419
1428
|
function configSetRaw(field, raw) {
|
package/dist/input.js
CHANGED
|
@@ -387,21 +387,19 @@ export class LineEditor {
|
|
|
387
387
|
return theme.success(ctx);
|
|
388
388
|
}
|
|
389
389
|
// Icons for the DeepSeek toggles: 🧠 "Deep thinking" and 🌐 "Smart search",
|
|
390
|
-
// shown before the context counter.
|
|
391
|
-
//
|
|
392
|
-
//
|
|
393
|
-
//
|
|
394
|
-
//
|
|
395
|
-
// The brackets are a reliable, color-independent cue that the toggle is off.
|
|
390
|
+
// shown before the context counter. Only the ENABLED toggle is shown, in
|
|
391
|
+
// green. A hidden icon means OFF — this does not rely on the terminal
|
|
392
|
+
// honoring the ANSI color (it ignores it for emoji), so there is no
|
|
393
|
+
// ambiguity. U+FE0E forces the monochrome TEXT presentation so the green is
|
|
394
|
+
// actually visible.
|
|
396
395
|
_toggleIcons() {
|
|
397
396
|
const TEXT = '\uFE0E';
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
return brain + ' ' + globe + ' ';
|
|
397
|
+
const parts = [];
|
|
398
|
+
if (this.thinkingEnabled)
|
|
399
|
+
parts.push(theme.toggleOn('🧠' + TEXT));
|
|
400
|
+
if (this.searchEnabled)
|
|
401
|
+
parts.push(theme.toggleOn('🌐' + TEXT));
|
|
402
|
+
return parts.length ? parts.join(' ') + ' ' : '';
|
|
405
403
|
}
|
|
406
404
|
// Read the OS clipboard for an image and insert its marker. Used when the
|
|
407
405
|
// terminal sends no usable paste data (Ctrl+V / right-click / empty paste).
|
|
@@ -722,6 +720,11 @@ export class LineEditor {
|
|
|
722
720
|
this.rendered = true;
|
|
723
721
|
this.cursorRowFromTop = top + lay.cursorRow;
|
|
724
722
|
}
|
|
723
|
+
// Public repaint hook: called when an external state that the status line
|
|
724
|
+
// reads (e.g. the toggle icons) changed, so it can be redrawn immediately.
|
|
725
|
+
refreshStatus() {
|
|
726
|
+
this._render();
|
|
727
|
+
}
|
|
725
728
|
_render() {
|
|
726
729
|
this._eraseBlock();
|
|
727
730
|
this._writeBlock();
|