dsh-client-auto-continue 0.11.9 → 0.12.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/lib/client.js CHANGED
@@ -41,6 +41,7 @@ var LOCALIZED_TEXT_DEFAULTS = {
41
41
  continueText: "继续",
42
42
  continueTextMaxTokens: "继续",
43
43
  continueTextSilent: "继续。你上一轮只输出了内部推理, 既没有回复也没有调用工具, 用户什么都没看到。每一轮都要以工具调用或可见回复结束。",
44
+ continueTextLoop: "继续",
44
45
  guardPendingText: "(上一步工具「{tool}」可能未完成, 先确认状态再继续, 不要重复执行)",
45
46
  guardDoneText: "(上一步工具「{tool}」已完成, 结果: {result}; 不要重复执行, 直接继续)",
46
47
  loopText: "(检测到你可能陷入循环, 请停止重复刚才的动作, 换一种方式继续)"
@@ -49,6 +50,7 @@ var LOCALIZED_TEXT_DEFAULTS = {
49
50
  continueText: "Continue",
50
51
  continueTextMaxTokens: "Continue",
51
52
  continueTextSilent: "Continue. Your previous turn ended with internal reasoning only, with no message and no tool call, so nothing reached the user. Always finish a turn with a tool call or a visible answer.",
53
+ continueTextLoop: "Continue",
52
54
  guardPendingText: '(The previous tool "{tool}" may not have completed. Check its state before continuing and do not run it again.)',
53
55
  guardDoneText: '(The previous tool "{tool}" completed successfully. Result: {result}; do not run it again. Continue from there.)',
54
56
  loopText: "(You may be stuck in a loop. Stop repeating the last action and continue with a different approach.)"
@@ -58,6 +60,8 @@ var DEFAULT_CONFIG = {
58
60
  locale: "zh",
59
61
  ...LOCALIZED_TEXT_DEFAULTS.zh,
60
62
  resumeSilentTurns: true,
63
+ resumeCompletedTurns: false,
64
+ continueTextLoop: "",
61
65
  guardTools: true,
62
66
  graceMs: 3e3,
63
67
  cooldownMs: 2e4,
@@ -93,6 +97,8 @@ var zh = {
93
97
  "repo.aria": "打开 dsh-auto-continue 的 GitHub 开源地址并点 Star",
94
98
  "section.handoff.title": "接力方式",
95
99
  "section.handoff.description": "决定中断后说什么,以及什么时候暂时停手。",
100
+ "section.autoloop.title": "自主循环",
101
+ "section.autoloop.description": "每个回合结束后自动把对话交还给 Agent,直到手动停止。",
96
102
  "section.safety.title": "安全节奏",
97
103
  "section.safety.description": "先确认上一步,再控制等待与连续续跑的边界。",
98
104
  "section.recovery.title": "恢复雷达",
@@ -111,6 +117,11 @@ var zh = {
111
117
  "default.continueTextMaxTokens": LOCALIZED_TEXT_DEFAULTS.zh.continueTextMaxTokens,
112
118
  "field.resumeSilentTurns": "续跑无输出回合",
113
119
  "field.resumeSilentTurnsHint": "已观察到模型活动但没有可见输出时续跑;不把空回合、图片或扩展内容误判为静默,冷却与连续上限照常生效。",
120
+ "field.resumeCompletedTurns": "自主循环(每个回合后都续跑)",
121
+ "field.resumeCompletedTurnsHint": "每个正常完成的回合结束后立即把对话交还给 Agent,无限循环直到你手动停止或发送消息。连续失败上限只对失败生效,成功的回合不计入。",
122
+ "field.continueTextLoop": "自主循环的继续文本",
123
+ "field.continueTextLoopHint": "自主循环每次续跑时发送的文本。",
124
+ "default.continueTextLoop": LOCALIZED_TEXT_DEFAULTS.zh.continueTextLoop,
114
125
  "field.continueTextSilent": "无输出回合的继续文本",
115
126
  "field.continueTextSilentHint": "回合只输出推理就结束时自动发送的文本, 支持与继续文本相同的占位符。",
116
127
  "default.continueTextSilent": LOCALIZED_TEXT_DEFAULTS.zh.continueTextSilent,
@@ -202,6 +213,8 @@ var en = {
202
213
  "repo.aria": "Open the dsh-auto-continue repository on GitHub and star it",
203
214
  "section.handoff.title": "The handoff",
204
215
  "section.handoff.description": "Choose what gets sent after an interruption and when the relay should stand down.",
216
+ "section.autoloop.title": "Autonomous loop",
217
+ "section.autoloop.description": "Hand the thread back after every completed turn until manually stopped.",
205
218
  "section.safety.title": "Safety rhythm",
206
219
  "section.safety.description": "Confirm the previous step, then set the boundaries for waiting and repeated resumes.",
207
220
  "section.recovery.title": "Recovery radar",
@@ -220,6 +233,11 @@ var en = {
220
233
  "default.continueTextMaxTokens": LOCALIZED_TEXT_DEFAULTS.en.continueTextMaxTokens,
221
234
  "field.resumeSilentTurns": "Resume silent turns",
222
235
  "field.resumeSilentTurnsHint": "Resume observed model activity without visible output. No-op turns, images and extension blocks are not treated as silent; cooldown and retry limits still apply.",
236
+ "field.resumeCompletedTurns": "Autonomous loop (continue after every turn)",
237
+ "field.resumeCompletedTurnsHint": "Hand the thread back to the agent after every completed turn, looping until you press stop or send a message. The consecutive-failure cap only throttles failures; successful turns never count.",
238
+ "field.continueTextLoop": "Continue text (autonomous loop)",
239
+ "field.continueTextLoopHint": "Text sent on each autonomous-loop continuation.",
240
+ "default.continueTextLoop": LOCALIZED_TEXT_DEFAULTS.en.continueTextLoop,
223
241
  "field.continueTextSilent": "Continue text (silent turn)",
224
242
  "field.continueTextSilentHint": "Text sent when a turn ends with reasoning only; same placeholders as the continue text.",
225
243
  "default.continueTextSilent": LOCALIZED_TEXT_DEFAULTS.en.continueTextSilent,
@@ -641,6 +659,7 @@ var css = `
641
659
  --dsh-ac-violet: #8b7cff;
642
660
  --dsh-ac-cyan: #45cce5;
643
661
  --dsh-ac-mint: #46d69d;
662
+ --dsh-ac-red: #e5484d;
644
663
  --dsh-ac-amber: #f1b95c;
645
664
  isolation: isolate;
646
665
  position: relative;
@@ -863,6 +882,7 @@ var css = `
863
882
  background: color-mix(in srgb, var(--dsw-alias-bg-layer-3) 95%, var(--dsh-ac-section) 5%);
864
883
  }
865
884
  .dshAcFormSection-handoff { --dsh-ac-section: var(--dsh-ac-mint); }
885
+ .dshAcFormSection-autoloop { --dsh-ac-section: var(--dsh-ac-red); }
866
886
  .dshAcFormSection-safety { --dsh-ac-section: var(--dsh-ac-amber); }
867
887
  .dshAcFormSection-recovery { --dsh-ac-section: var(--dsh-ac-cyan); }
868
888
  .dshAcFormSection-loop { --dsh-ac-section: var(--dsh-ac-violet); }
@@ -1047,6 +1067,8 @@ var AutoContinueSettingsCardController = class {
1047
1067
  textField("continueText"),
1048
1068
  textField("continueTextMaxTokens"),
1049
1069
  booleanField("resumeSilentTurns"),
1070
+ booleanField("resumeCompletedTurns"),
1071
+ textField("continueTextLoop"),
1050
1072
  textField("continueTextSilent"),
1051
1073
  booleanField("guardTools"),
1052
1074
  textField("guardPendingText"),
@@ -1080,6 +1102,8 @@ var AutoContinueSettingsCardController = class {
1080
1102
  continueText: this.form.field("continueText"),
1081
1103
  continueTextMaxTokens: this.form.field("continueTextMaxTokens"),
1082
1104
  resumeSilentTurns: this.form.field("resumeSilentTurns"),
1105
+ resumeCompletedTurns: this.form.field("resumeCompletedTurns"),
1106
+ continueTextLoop: this.form.field("continueTextLoop"),
1083
1107
  continueTextSilent: this.form.field("continueTextSilent"),
1084
1108
  guardTools: this.form.field("guardTools"),
1085
1109
  guardPendingText: this.form.field("guardPendingText"),
@@ -1513,6 +1537,44 @@ function AutoContinueSettingsCard(props) {
1513
1537
  ]
1514
1538
  }
1515
1539
  ),
1540
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1541
+ SettingsSection,
1542
+ {
1543
+ t,
1544
+ titleKey: "section.autoloop.title",
1545
+ descriptionKey: "section.autoloop.description",
1546
+ tone: "autoloop",
1547
+ children: [
1548
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1549
+ BooleanField,
1550
+ {
1551
+ wide: true,
1552
+ id: "auto-continue-resume-completed-turns",
1553
+ label: t("field.resumeCompletedTurns"),
1554
+ hint: t("field.resumeCompletedTurnsHint"),
1555
+ ...shared,
1556
+ ...state2.resumeCompletedTurns,
1557
+ onEdit: (text) => props.edit("resumeCompletedTurns", text),
1558
+ onReset: () => props.resetField("resumeCompletedTurns")
1559
+ }
1560
+ ),
1561
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1562
+ ValueField,
1563
+ {
1564
+ wide: true,
1565
+ id: "auto-continue-continue-text-loop",
1566
+ label: t("field.continueTextLoop"),
1567
+ hint: t("field.continueTextLoopHint"),
1568
+ ...shared,
1569
+ ...state2.continueTextLoop,
1570
+ onEdit: (text) => props.edit("continueTextLoop", text),
1571
+ placeholder: t("default.continueTextLoop"),
1572
+ onReset: () => props.resetField("continueTextLoop")
1573
+ }
1574
+ )
1575
+ ]
1576
+ }
1577
+ ),
1516
1578
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
1517
1579
  SettingsSection,
1518
1580
  {