zames_pro 2.29.12 → 2.29.14
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 +18 -5
- package/dist/config.js +10 -1
- package/dist/i18n.js +4 -0
- package/dist/input.js +7 -0
- package/package.json +1 -1
package/dist/browser.js
CHANGED
|
@@ -283,6 +283,10 @@ export class DeepSeekBrowser {
|
|
|
283
283
|
stabilityChecks;
|
|
284
284
|
stabilityDelayMs;
|
|
285
285
|
minSendIntervalMs;
|
|
286
|
+
// Extra pause added to minSendIntervalMs when Deep thinking is ON. Reasoning
|
|
287
|
+
// turns are longer, but they also add `chat/continue` clicks and truncation
|
|
288
|
+
// retries — more requests, so a small extra margin helps.
|
|
289
|
+
thinkingExtraMs;
|
|
286
290
|
rateLimitWaitMs;
|
|
287
291
|
maxRateLimitRetries;
|
|
288
292
|
maxServerBusyRetries;
|
|
@@ -374,7 +378,7 @@ export class DeepSeekBrowser {
|
|
|
374
378
|
// must be stripped (DeepSeek's CDN answers 403 to it); computed in the
|
|
375
379
|
// constructor, overridable by an explicit UA in the options/config.
|
|
376
380
|
userAgent;
|
|
377
|
-
constructor({ headless = false, debug = false, channel = 'chrome', answerTimeoutMs = 180000, askRetries = 3, stabilityChecks = 2, stabilityDelayMs = 400, minSendIntervalMs = 15000, rateLimitWaitMs = 300000, maxRateLimitRetries = 6, maxServerBusyRetries = 5, serverBusyWaitMs = 3000, maxIncompleteRetries = 4, incompleteWaitMs = 2000, autoContinue = true, deepThinking = false, webSearch = true, auth, locale, onAuthSave, userAgent, } = {}) {
|
|
381
|
+
constructor({ headless = false, debug = false, channel = 'chrome', answerTimeoutMs = 180000, askRetries = 3, stabilityChecks = 2, stabilityDelayMs = 400, minSendIntervalMs = 15000, thinkingExtraMs = 5000, rateLimitWaitMs = 300000, maxRateLimitRetries = 6, maxServerBusyRetries = 5, serverBusyWaitMs = 3000, maxIncompleteRetries = 4, incompleteWaitMs = 2000, autoContinue = true, deepThinking = false, webSearch = true, auth, locale, onAuthSave, userAgent, } = {}) {
|
|
378
382
|
this.headless = headless;
|
|
379
383
|
this.debug = debug;
|
|
380
384
|
this.channel = channel;
|
|
@@ -383,6 +387,7 @@ export class DeepSeekBrowser {
|
|
|
383
387
|
this.stabilityChecks = stabilityChecks;
|
|
384
388
|
this.stabilityDelayMs = stabilityDelayMs;
|
|
385
389
|
this.minSendIntervalMs = minSendIntervalMs;
|
|
390
|
+
this.thinkingExtraMs = thinkingExtraMs;
|
|
386
391
|
this.rateLimitWaitMs = rateLimitWaitMs;
|
|
387
392
|
this.maxRateLimitRetries = maxRateLimitRetries;
|
|
388
393
|
this.maxServerBusyRetries = maxServerBusyRetries;
|
|
@@ -1200,13 +1205,13 @@ export class DeepSeekBrowser {
|
|
|
1200
1205
|
catch { }
|
|
1201
1206
|
}
|
|
1202
1207
|
if (found) {
|
|
1203
|
-
// One Continue click per
|
|
1204
|
-
// hits the rate limit like a send, and a run that keeps getting
|
|
1208
|
+
// One Continue click per effective send interval: a `chat/continue`
|
|
1209
|
+
// request hits the rate limit like a send, and a run that keeps getting
|
|
1205
1210
|
// truncated could otherwise fire clicks back-to-back. The gap counts
|
|
1206
1211
|
// from the LATEST of the last send and the last Continue click.
|
|
1207
1212
|
const since = Math.max(this._lastSentAt, this._lastContinueAt);
|
|
1208
1213
|
if (since) {
|
|
1209
|
-
const gap = this.
|
|
1214
|
+
const gap = this.sendIntervalMs() - (Date.now() - since);
|
|
1210
1215
|
if (gap > 0) {
|
|
1211
1216
|
const aborted = await this._sleepInterruptible(gap, (leftMs) => {
|
|
1212
1217
|
if (this.onSendPause) {
|
|
@@ -1648,12 +1653,20 @@ export class DeepSeekBrowser {
|
|
|
1648
1653
|
// during this pause did nothing to the pause itself — the send was still
|
|
1649
1654
|
// delayed by the remaining seconds, and the stop request only took effect
|
|
1650
1655
|
// after the pause. This is the main "Esc does not cancel the pause" bug.
|
|
1656
|
+
// The effective minimum interval between two sends. When Deep thinking is on
|
|
1657
|
+
// we add `thinkingExtraMs` (default +5s): reasoning turns add extra requests
|
|
1658
|
+
// (`chat/continue` clicks, truncation retries), so a small margin reduces the
|
|
1659
|
+
// chance of hitting the rate limit. `deepThinking` is the DESIRED state read
|
|
1660
|
+
// from the config (set in the constructor / on /config change).
|
|
1661
|
+
sendIntervalMs() {
|
|
1662
|
+
return this.minSendIntervalMs + (this.deepThinking ? this.thinkingExtraMs : 0);
|
|
1663
|
+
}
|
|
1651
1664
|
async _waitForSendSlot(agent) {
|
|
1652
1665
|
if (!agent)
|
|
1653
1666
|
return;
|
|
1654
1667
|
if (!this._lastSentAt)
|
|
1655
1668
|
return;
|
|
1656
|
-
const gap = this.
|
|
1669
|
+
const gap = this.sendIntervalMs() - (Date.now() - this._lastSentAt);
|
|
1657
1670
|
if (gap <= 0)
|
|
1658
1671
|
return;
|
|
1659
1672
|
// Report the pause to the UI as an ANIMATED status (with the remaining
|
package/dist/config.js
CHANGED
|
@@ -40,7 +40,8 @@ export const DEFAULTS = {
|
|
|
40
40
|
askRetries: 3,
|
|
41
41
|
stabilityChecks: 2,
|
|
42
42
|
stabilityDelayMs: 400,
|
|
43
|
-
minSendIntervalMs:
|
|
43
|
+
minSendIntervalMs: 15000,
|
|
44
|
+
thinkingExtraMs: 5000,
|
|
44
45
|
rateLimitWaitMs: 300000,
|
|
45
46
|
maxRateLimitRetries: 6,
|
|
46
47
|
maxIncompleteRetries: 4,
|
|
@@ -218,6 +219,14 @@ export const CONFIG_SCHEMA = [
|
|
|
218
219
|
labelKey: 'cfg.f.browser_minSendIntervalMs',
|
|
219
220
|
groupKey: 'cfg.group.browser',
|
|
220
221
|
},
|
|
222
|
+
{
|
|
223
|
+
path: 'browser.thinkingExtraMs',
|
|
224
|
+
type: 'number',
|
|
225
|
+
min: 0,
|
|
226
|
+
max: 600000,
|
|
227
|
+
labelKey: 'cfg.f.browser_thinkingExtraMs',
|
|
228
|
+
groupKey: 'cfg.group.browser',
|
|
229
|
+
},
|
|
221
230
|
{
|
|
222
231
|
path: 'browser.rateLimitWaitMs',
|
|
223
232
|
type: 'number',
|
package/dist/i18n.js
CHANGED
|
@@ -874,6 +874,10 @@ const CATALOG = {
|
|
|
874
874
|
ru: 'Мин. пауза между отправками, мс',
|
|
875
875
|
en: 'Min pause between sends, ms',
|
|
876
876
|
},
|
|
877
|
+
'cfg.f.browser_thinkingExtraMs': {
|
|
878
|
+
ru: 'Доп. пауза в режиме размышления, мс',
|
|
879
|
+
en: 'Extra pause in thinking mode, ms',
|
|
880
|
+
},
|
|
877
881
|
'cfg.f.browser_rateLimitWaitMs': {
|
|
878
882
|
ru: 'Пауза при лимите частоты, мс',
|
|
879
883
|
en: 'Wait on rate limit, ms',
|
package/dist/input.js
CHANGED
|
@@ -977,6 +977,13 @@ export class LineEditor {
|
|
|
977
977
|
this.attachments.reset();
|
|
978
978
|
if (this.onSubmit)
|
|
979
979
|
this.onSubmit(text, attached);
|
|
980
|
+
// When a message is queued DURING a running task (`busy`), keep the
|
|
981
|
+
// "agent is working" indicator alive: `_stopDots()` above cleared the
|
|
982
|
+
// status, and nothing would restart it until the next send/tool — so the
|
|
983
|
+
// operator saw the spinner vanish and could not tell whether the agent
|
|
984
|
+
// was still working. Restart the animated status unless we are idle.
|
|
985
|
+
if (this.busy)
|
|
986
|
+
this._startThinking();
|
|
980
987
|
}
|
|
981
988
|
_insert(text) {
|
|
982
989
|
const chars = Array.from(this.buf);
|