dsh-client-auto-continue 0.12.2 → 0.13.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/README.md +18 -4
- package/README.zh.md +18 -4
- package/docs/screenshots/01-settings-section.png +0 -0
- package/docs/screenshots/01-settings-section.zh.png +0 -0
- package/docs/screenshots/02-settings-card.png +0 -0
- package/docs/screenshots/02-settings-card.zh.png +0 -0
- package/docs/screenshots/07-card-panels.png +0 -0
- package/docs/screenshots/07-card-panels.zh.png +0 -0
- package/docs/screenshots/08-composer-toggle.png +0 -0
- package/docs/screenshots/08-composer-toggle.zh.png +0 -0
- package/docs/screenshots/README.md +17 -12
- package/lib/client.js +314 -145
- package/lib/client.js.map +4 -4
- package/lib/index.js +4 -0
- package/lib/types/client/composer-toggle.d.ts +16 -0
- package/lib/types/client/index.d.ts +6 -0
- package/lib/types/client/locales.d.ts +6 -0
- package/lib/types/client/native-switch.d.ts +10 -0
- package/lib/types/client/settings-card.d.ts +10 -0
- package/lib/types/index.d.ts +8 -0
- package/lib/types/shared/core.d.ts +2 -0
- package/package.json +3 -3
- package/src/client/composer-toggle.tsx +34 -0
- package/src/client/index.ts +19 -0
- package/src/client/locales.ts +12 -0
- package/src/client/native-switch.tsx +33 -0
- package/src/client/settings-card.tsx +76 -2
- package/src/client/styles.ts +14 -0
- package/src/index.ts +2 -0
- package/src/shared/core.ts +4 -0
package/lib/client.js
CHANGED
|
@@ -76,6 +76,7 @@ var DEFAULT_CONFIG = {
|
|
|
76
76
|
backoffMaxMs: 3e5,
|
|
77
77
|
notify: false,
|
|
78
78
|
paused: false,
|
|
79
|
+
showComposerToggle: true,
|
|
79
80
|
loopGuard: true,
|
|
80
81
|
loopShortChars: 40,
|
|
81
82
|
loopWindowMs: 3e4,
|
|
@@ -108,6 +109,12 @@ var zh = {
|
|
|
108
109
|
"section.live.title": "现场状态",
|
|
109
110
|
"section.live.description": "看看今天接住了多少次,以及哪些会话还在暂停。",
|
|
110
111
|
"field.paused": "暂停自动继续",
|
|
112
|
+
"field.showComposerToggle": "在会话区显示自动继续开关",
|
|
113
|
+
"field.showComposerToggleHint": "默认显示。隐藏开关不会暂停自动继续;点击保存后生效。",
|
|
114
|
+
"composer.label": "自动继续",
|
|
115
|
+
"composer.scope": "控制当前配置下所有会话的自动继续,修改立即保存。",
|
|
116
|
+
"composer.saving": "正在保存自动继续设置…",
|
|
117
|
+
"composer.saveFailed": "保存失败,请重试",
|
|
111
118
|
"field.pausedHint": "全局暂停: 实时与扫描都不会再自动发送, 已排队的待发送也会取消。",
|
|
112
119
|
"field.continueText": "继续文本",
|
|
113
120
|
"field.continueTextHint": "中断后自动发送的消息内容。",
|
|
@@ -224,6 +231,12 @@ var en = {
|
|
|
224
231
|
"section.live.title": "Live signal",
|
|
225
232
|
"section.live.description": "See what the relay caught today and which sessions are still paused.",
|
|
226
233
|
"field.paused": "Pause auto-continue",
|
|
234
|
+
"field.showComposerToggle": "Show auto-continue switch in the composer",
|
|
235
|
+
"field.showComposerToggleHint": "Shown by default. Hiding the switch does not pause auto-continue. Click Save to apply.",
|
|
236
|
+
"composer.label": "Auto-continue",
|
|
237
|
+
"composer.scope": "Controls auto-continue for all sessions in this profile. Changes save immediately.",
|
|
238
|
+
"composer.saving": "Saving auto-continue setting…",
|
|
239
|
+
"composer.saveFailed": "Could not save. Try again.",
|
|
227
240
|
"field.pausedHint": "Globally pause: no live or scan auto-send fires, and queued pending sends are cancelled.",
|
|
228
241
|
"field.continueText": "Continue text",
|
|
229
242
|
"field.continueTextHint": "Message automatically sent after an interruption.",
|
|
@@ -323,6 +336,34 @@ var en = {
|
|
|
323
336
|
// src/client/settings-card.tsx
|
|
324
337
|
var import_react = require("react");
|
|
325
338
|
|
|
339
|
+
// src/client/native-switch.tsx
|
|
340
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
341
|
+
function legacySwitch(props) {
|
|
342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
343
|
+
"button",
|
|
344
|
+
{
|
|
345
|
+
type: "button",
|
|
346
|
+
role: "switch",
|
|
347
|
+
className: "dshAcSwitch",
|
|
348
|
+
"aria-checked": props.checked,
|
|
349
|
+
"aria-label": props.label,
|
|
350
|
+
disabled: props.disabled,
|
|
351
|
+
title: props.title,
|
|
352
|
+
onClick: () => props.onChange(!props.checked),
|
|
353
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {})
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
function resolveSwitch() {
|
|
358
|
+
try {
|
|
359
|
+
const { Switch } = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
360
|
+
if (typeof Switch === "function") return Switch;
|
|
361
|
+
} catch {
|
|
362
|
+
}
|
|
363
|
+
return legacySwitch;
|
|
364
|
+
}
|
|
365
|
+
var NativeSwitch = resolveSwitch();
|
|
366
|
+
|
|
326
367
|
// src/client/dsh-store-compat.ts
|
|
327
368
|
function resolveSnapshotStore() {
|
|
328
369
|
const current = ["@deepseek-ai/dsh-client", "-store"].join("");
|
|
@@ -657,6 +698,20 @@ var CardForm = class {
|
|
|
657
698
|
|
|
658
699
|
// src/client/styles.ts
|
|
659
700
|
var css = `
|
|
701
|
+
.dshAcComposer { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; flex: 0 0 auto; font: inherit; }
|
|
702
|
+
.dshAcComposerLabel { color: var(--dsw-alias-label-secondary); font-size: 12px; white-space: nowrap; }
|
|
703
|
+
.dshAcSwitchTarget { display: inline-flex; align-items: center; min-height: 32px; }
|
|
704
|
+
.dshAcSwitchTarget > button { position: relative; }
|
|
705
|
+
.dshAcSwitchTarget > button::before { content: ''; position: absolute; inset: -6px -3px; }
|
|
706
|
+
.dshAcComposerError { color: var(--dsw-alias-state-error-primary, var(--dsw-alias-label-secondary)); font-size: 12px; max-width: 160px; }
|
|
707
|
+
.dshAcComposerError:empty { display: none; }
|
|
708
|
+
.dshAcSwitch { position: relative; box-sizing: border-box; flex: none; width: 36px; height: 20px; padding: 2px; border: 0; border-radius: 999px; background: var(--dsw-alias-border-l3); cursor: pointer; }
|
|
709
|
+
.dshAcSwitch[aria-checked='true'] { background: var(--dsw-alias-brand-primary); }
|
|
710
|
+
.dshAcSwitch > span { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--dsw-alias-label-primary-foreground); }
|
|
711
|
+
.dshAcSwitch[aria-checked='true'] > span { transform: translateX(16px); }
|
|
712
|
+
.dshAcSwitch[aria-checked='false'] > span { background: var(--dsw-alias-switch-thumb, var(--dsw-alias-label-primary-foreground)); }
|
|
713
|
+
.dshAcSwitch:disabled { opacity: .5; cursor: default; }
|
|
714
|
+
.dshAcSwitch:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 2px; }
|
|
660
715
|
.dshAcCard {
|
|
661
716
|
--dsh-ac-violet: #8b7cff;
|
|
662
717
|
--dsh-ac-cyan: #45cce5;
|
|
@@ -1057,15 +1112,20 @@ function injectStyles() {
|
|
|
1057
1112
|
}
|
|
1058
1113
|
|
|
1059
1114
|
// src/client/settings-card.tsx
|
|
1060
|
-
var
|
|
1115
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1061
1116
|
injectStyles();
|
|
1062
1117
|
var AutoContinueSettingsCardController = class {
|
|
1063
1118
|
/**
|
|
1064
1119
|
* @param scope - the bound settings scope for the `auto-continue` namespace.
|
|
1065
1120
|
*/
|
|
1066
1121
|
constructor(scope) {
|
|
1122
|
+
this.scope = scope;
|
|
1123
|
+
this.composerSaving = false;
|
|
1124
|
+
this.composerFailed = false;
|
|
1125
|
+
this.disposed = false;
|
|
1067
1126
|
this.form = new CardForm(scope, [
|
|
1068
1127
|
booleanField("paused"),
|
|
1128
|
+
booleanField("showComposerToggle"),
|
|
1069
1129
|
textField("continueText"),
|
|
1070
1130
|
textField("continueTextMaxTokens"),
|
|
1071
1131
|
booleanField("resumeSilentTurns"),
|
|
@@ -1096,11 +1156,13 @@ var AutoContinueSettingsCardController = class {
|
|
|
1096
1156
|
textField("loopText")
|
|
1097
1157
|
]);
|
|
1098
1158
|
this.store = this.form.bind(() => this.projection(), createSnapshotStore);
|
|
1159
|
+
this.composer = this.form.bind(() => this.composerProjection(), createSnapshotStore);
|
|
1099
1160
|
}
|
|
1100
1161
|
projection() {
|
|
1101
1162
|
return {
|
|
1102
1163
|
...this.form.shell(),
|
|
1103
1164
|
paused: this.form.field("paused"),
|
|
1165
|
+
showComposerToggle: this.form.field("showComposerToggle"),
|
|
1104
1166
|
continueText: this.form.field("continueText"),
|
|
1105
1167
|
continueTextMaxTokens: this.form.field("continueTextMaxTokens"),
|
|
1106
1168
|
resumeSilentTurns: this.form.field("resumeSilentTurns"),
|
|
@@ -1138,51 +1200,80 @@ var AutoContinueSettingsCardController = class {
|
|
|
1138
1200
|
inject() {
|
|
1139
1201
|
return { hooks: { autoContinueSettingsCard: this.store }, ...this.form.actions() };
|
|
1140
1202
|
}
|
|
1203
|
+
injectComposer() {
|
|
1204
|
+
return { hooks: { autoContinueComposer: this.composer }, setEnabled: (enabled) => void this.setEnabled(enabled) };
|
|
1205
|
+
}
|
|
1206
|
+
composerProjection() {
|
|
1207
|
+
const snapshot = this.scope.getSnapshot();
|
|
1208
|
+
return {
|
|
1209
|
+
visible: snapshot.status === "ready" && (snapshot.value?.showComposerToggle ?? DEFAULT_CONFIG.showComposerToggle),
|
|
1210
|
+
enabled: !(snapshot.value?.paused ?? DEFAULT_CONFIG.paused),
|
|
1211
|
+
writable: snapshot.status === "ready" && snapshot.writable && snapshot.mode === "host",
|
|
1212
|
+
saving: this.composerSaving,
|
|
1213
|
+
failed: this.composerFailed
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
async setEnabled(enabled) {
|
|
1217
|
+
if (this.disposed || this.composerSaving || !this.composerProjection().writable) return;
|
|
1218
|
+
this.composerSaving = true;
|
|
1219
|
+
this.composerFailed = false;
|
|
1220
|
+
this.composer.set(this.composerProjection());
|
|
1221
|
+
try {
|
|
1222
|
+
const result = await this.scope.set("paused", !enabled);
|
|
1223
|
+
this.composerFailed = result === false || this.composerProjection().enabled !== enabled;
|
|
1224
|
+
} catch {
|
|
1225
|
+
this.composerFailed = true;
|
|
1226
|
+
} finally {
|
|
1227
|
+
this.composerSaving = false;
|
|
1228
|
+
if (!this.disposed) this.composer.set(this.composerProjection());
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1141
1231
|
/** Release this card's subscription to the provider-owned settings form. */
|
|
1142
1232
|
dispose() {
|
|
1233
|
+
this.disposed = true;
|
|
1143
1234
|
this.form.dispose();
|
|
1144
1235
|
}
|
|
1145
1236
|
};
|
|
1146
1237
|
function AutoContinueSettingsPage(props) {
|
|
1147
|
-
return /* @__PURE__ */ (0,
|
|
1238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AutoContinueSettingsCard, { ...props }) });
|
|
1148
1239
|
}
|
|
1149
1240
|
var REPOSITORY_URL = "https://github.com/HsiangNianian/dsh-auto-continue";
|
|
1150
1241
|
var REPOSITORY_SLUG = "HsiangNianian/dsh-auto-continue";
|
|
1151
1242
|
function RelayMark() {
|
|
1152
|
-
return /* @__PURE__ */ (0,
|
|
1153
|
-
/* @__PURE__ */ (0,
|
|
1154
|
-
/* @__PURE__ */ (0,
|
|
1155
|
-
/* @__PURE__ */ (0,
|
|
1156
|
-
/* @__PURE__ */ (0,
|
|
1157
|
-
/* @__PURE__ */ (0,
|
|
1243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { viewBox: "0 0 48 48", "aria-hidden": "true", focusable: "false", children: [
|
|
1244
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { className: "dshAcRelayArc", d: "M9 30c4-12 10-18 19-18 5 0 9 2 12 6" }),
|
|
1245
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { className: "dshAcRelayArc dshAcRelayArcEcho", d: "M8 35c6 3 12 3 17 0 5-3 8-8 15-9" }),
|
|
1246
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { className: "dshAcRelayNode dshAcRelayNodeStart", cx: "9", cy: "30", r: "3" }),
|
|
1247
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { className: "dshAcRelayNode dshAcRelayNodeEnd", cx: "40", cy: "18", r: "3" }),
|
|
1248
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { className: "dshAcRelayPulse", cx: "28", cy: "12", r: "2.5" })
|
|
1158
1249
|
] });
|
|
1159
1250
|
}
|
|
1160
1251
|
function ChevronMark() {
|
|
1161
|
-
return /* @__PURE__ */ (0,
|
|
1252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "m3.5 6 4.5 4 4.5-4" }) });
|
|
1162
1253
|
}
|
|
1163
1254
|
function GitHubMark() {
|
|
1164
|
-
return /* @__PURE__ */ (0,
|
|
1255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 2.4a9.8 9.8 0 0 0-3.1 19.1c.5.1.7-.2.7-.5v-1.9c-2.8.6-3.4-1.2-3.4-1.2-.5-1.1-1.1-1.4-1.1-1.4-.9-.6.1-.6.1-.6 1 0 1.5 1 1.5 1 .9 1.5 2.3 1.1 2.9.8.1-.6.4-1.1.6-1.3-2.2-.3-4.6-1.1-4.6-4.9 0-1.1.4-2 1-2.7-.1-.3-.4-1.3.1-2.7 0 0 .8-.3 2.8 1a9.5 9.5 0 0 1 5 0c1.9-1.3 2.8-1 2.8-1 .5 1.4.2 2.4.1 2.7.6.7 1 1.6 1 2.7 0 3.8-2.3 4.6-4.6 4.9.4.3.7.9.7 1.8V21c0 .3.2.6.7.5A9.8 9.8 0 0 0 12 2.4Z" }) });
|
|
1165
1256
|
}
|
|
1166
1257
|
function ExternalMark() {
|
|
1167
|
-
return /* @__PURE__ */ (0,
|
|
1168
|
-
/* @__PURE__ */ (0,
|
|
1169
|
-
/* @__PURE__ */ (0,
|
|
1258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", focusable: "false", children: [
|
|
1259
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 3h7v7M13 3 7 9" }),
|
|
1260
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M11 9v3a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h3" })
|
|
1170
1261
|
] });
|
|
1171
1262
|
}
|
|
1172
1263
|
function RelayJourney(props) {
|
|
1173
|
-
return /* @__PURE__ */ (0,
|
|
1174
|
-
/* @__PURE__ */ (0,
|
|
1175
|
-
/* @__PURE__ */ (0,
|
|
1264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcJourney", children: [
|
|
1265
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcJourneyStep dshAcJourneyInterrupted", children: [
|
|
1266
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcJourneyDot", "aria-hidden": "true" }),
|
|
1176
1267
|
props.t("flow.interrupted")
|
|
1177
1268
|
] }),
|
|
1178
|
-
/* @__PURE__ */ (0,
|
|
1179
|
-
/* @__PURE__ */ (0,
|
|
1180
|
-
/* @__PURE__ */ (0,
|
|
1269
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcJourneyLine", "aria-hidden": "true" }),
|
|
1270
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcJourneyStep dshAcJourneyGrace", children: [
|
|
1271
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcJourneyDot", "aria-hidden": "true" }),
|
|
1181
1272
|
props.t("flow.grace")
|
|
1182
1273
|
] }),
|
|
1183
|
-
/* @__PURE__ */ (0,
|
|
1184
|
-
/* @__PURE__ */ (0,
|
|
1185
|
-
/* @__PURE__ */ (0,
|
|
1274
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcJourneyLine", "aria-hidden": "true" }),
|
|
1275
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcJourneyStep dshAcJourneyContinue", children: [
|
|
1276
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcJourneyDot", "aria-hidden": "true" }),
|
|
1186
1277
|
props.t("flow.continue")
|
|
1187
1278
|
] })
|
|
1188
1279
|
] });
|
|
@@ -1193,9 +1284,9 @@ function SettingsCard(props) {
|
|
|
1193
1284
|
if (!state2.available) return null;
|
|
1194
1285
|
const title = props.t(props.titleKey);
|
|
1195
1286
|
const blocked = !state2.dirty || state2.invalid || state2.saving;
|
|
1196
|
-
return /* @__PURE__ */ (0,
|
|
1197
|
-
/* @__PURE__ */ (0,
|
|
1198
|
-
/* @__PURE__ */ (0,
|
|
1287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("li", { className: open ? "dshAcCard dshAcCardOpen" : "dshAcCard", children: [
|
|
1288
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcHeaderFrame", children: [
|
|
1289
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1199
1290
|
"button",
|
|
1200
1291
|
{
|
|
1201
1292
|
type: "button",
|
|
@@ -1205,18 +1296,18 @@ function SettingsCard(props) {
|
|
|
1205
1296
|
title: props.t(props.descriptionKey),
|
|
1206
1297
|
onClick: () => setOpen(!open),
|
|
1207
1298
|
children: [
|
|
1208
|
-
/* @__PURE__ */ (0,
|
|
1209
|
-
/* @__PURE__ */ (0,
|
|
1210
|
-
/* @__PURE__ */ (0,
|
|
1211
|
-
/* @__PURE__ */ (0,
|
|
1212
|
-
/* @__PURE__ */ (0,
|
|
1299
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcRelayMark", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RelayMark, {}) }),
|
|
1300
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcHeadText", children: [
|
|
1301
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcName", children: title }),
|
|
1302
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcDescription", children: props.t(props.descriptionKey) }),
|
|
1303
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RelayJourney, { t: props.t })
|
|
1213
1304
|
] }),
|
|
1214
|
-
state2.dirty ? /* @__PURE__ */ (0,
|
|
1215
|
-
/* @__PURE__ */ (0,
|
|
1305
|
+
state2.dirty ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcPending", title: props.t("chrome.unsaved"), children: props.t("chrome.unsaved") }) : null,
|
|
1306
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: open ? "dshAcChevron dshAcChevronOpen" : "dshAcChevron", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ChevronMark, {}) })
|
|
1216
1307
|
]
|
|
1217
1308
|
}
|
|
1218
1309
|
),
|
|
1219
|
-
/* @__PURE__ */ (0,
|
|
1310
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1220
1311
|
"a",
|
|
1221
1312
|
{
|
|
1222
1313
|
className: "dshAcGithub",
|
|
@@ -1225,22 +1316,22 @@ function SettingsCard(props) {
|
|
|
1225
1316
|
rel: "noreferrer",
|
|
1226
1317
|
"aria-label": props.t("repo.aria"),
|
|
1227
1318
|
children: [
|
|
1228
|
-
/* @__PURE__ */ (0,
|
|
1229
|
-
/* @__PURE__ */ (0,
|
|
1230
|
-
/* @__PURE__ */ (0,
|
|
1231
|
-
/* @__PURE__ */ (0,
|
|
1319
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcGithubIcon", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(GitHubMark, {}) }),
|
|
1320
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcGithubText", children: [
|
|
1321
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcGithubAction", children: props.t("repo.star") }),
|
|
1322
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcGithubSlug", children: REPOSITORY_SLUG })
|
|
1232
1323
|
] }),
|
|
1233
|
-
/* @__PURE__ */ (0,
|
|
1324
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcExternal", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ExternalMark, {}) })
|
|
1234
1325
|
]
|
|
1235
1326
|
}
|
|
1236
1327
|
)
|
|
1237
1328
|
] }),
|
|
1238
|
-
open ? /* @__PURE__ */ (0,
|
|
1239
|
-
!state2.writable ? /* @__PURE__ */ (0,
|
|
1329
|
+
open ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcBody", children: [
|
|
1330
|
+
!state2.writable ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dshAcReadOnly", role: "status", children: props.t("chrome.readOnly") }) : null,
|
|
1240
1331
|
props.children,
|
|
1241
|
-
/* @__PURE__ */ (0,
|
|
1242
|
-
state2.failed ? /* @__PURE__ */ (0,
|
|
1243
|
-
/* @__PURE__ */ (0,
|
|
1332
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcFooter", children: [
|
|
1333
|
+
state2.failed ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dshAcFailed", role: "status", children: props.t("chrome.saveFailed") }) : null,
|
|
1334
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1244
1335
|
"button",
|
|
1245
1336
|
{
|
|
1246
1337
|
type: "button",
|
|
@@ -1250,22 +1341,22 @@ function SettingsCard(props) {
|
|
|
1250
1341
|
children: props.t("chrome.discard")
|
|
1251
1342
|
}
|
|
1252
1343
|
),
|
|
1253
|
-
/* @__PURE__ */ (0,
|
|
1344
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", className: "dshAcSave", disabled: blocked, onClick: props.onSave, children: props.t(!state2.saving ? "chrome.save" : "chrome.saving") })
|
|
1254
1345
|
] })
|
|
1255
1346
|
] }) : null
|
|
1256
1347
|
] });
|
|
1257
1348
|
}
|
|
1258
1349
|
function ValueField(props) {
|
|
1259
1350
|
const className = props.invalid ? "dshAcInput dshAcInputInvalid" : "dshAcInput";
|
|
1260
|
-
return /* @__PURE__ */ (0,
|
|
1261
|
-
/* @__PURE__ */ (0,
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1263
|
-
props.overridden ? /* @__PURE__ */ (0,
|
|
1264
|
-
/* @__PURE__ */ (0,
|
|
1265
|
-
/* @__PURE__ */ (0,
|
|
1351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: props.wide === true ? "dshAcField dshAcFieldWide" : "dshAcField", children: [
|
|
1352
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcHead", children: [
|
|
1353
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: "dshAcLabel", htmlFor: props.id, children: props.label }),
|
|
1354
|
+
props.overridden ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcBadges", children: [
|
|
1355
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcBadge", children: props.t("chrome.overridden") }),
|
|
1356
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", className: "dshAcReset", disabled: props.disabled, onClick: props.onReset, children: props.t("chrome.reset") })
|
|
1266
1357
|
] }) : null
|
|
1267
1358
|
] }),
|
|
1268
|
-
props.multiline === true ? /* @__PURE__ */ (0,
|
|
1359
|
+
props.multiline === true ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1269
1360
|
"textarea",
|
|
1270
1361
|
{
|
|
1271
1362
|
id: props.id,
|
|
@@ -1277,7 +1368,7 @@ function ValueField(props) {
|
|
|
1277
1368
|
rows: 4,
|
|
1278
1369
|
onChange: (event) => props.onEdit(event.target.value)
|
|
1279
1370
|
}
|
|
1280
|
-
) : /* @__PURE__ */ (0,
|
|
1371
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1281
1372
|
"input",
|
|
1282
1373
|
{
|
|
1283
1374
|
id: props.id,
|
|
@@ -1291,19 +1382,19 @@ function ValueField(props) {
|
|
|
1291
1382
|
onChange: (event) => props.onEdit(event.target.value)
|
|
1292
1383
|
}
|
|
1293
1384
|
),
|
|
1294
|
-
/* @__PURE__ */ (0,
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: props.invalid ? "dshAcInvalid" : "dshAcHint", children: props.invalid ? props.t("chrome.invalidNumber") : props.hint })
|
|
1295
1386
|
] });
|
|
1296
1387
|
}
|
|
1297
1388
|
function BooleanField(props) {
|
|
1298
|
-
return /* @__PURE__ */ (0,
|
|
1299
|
-
/* @__PURE__ */ (0,
|
|
1300
|
-
/* @__PURE__ */ (0,
|
|
1301
|
-
props.overridden ? /* @__PURE__ */ (0,
|
|
1302
|
-
/* @__PURE__ */ (0,
|
|
1303
|
-
/* @__PURE__ */ (0,
|
|
1389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: props.wide === true ? "dshAcField dshAcFieldWide" : "dshAcField", children: [
|
|
1390
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcHead", children: [
|
|
1391
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: "dshAcLabel", htmlFor: props.id, children: props.label }),
|
|
1392
|
+
props.overridden ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcBadges", children: [
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcBadge", children: props.t("chrome.overridden") }),
|
|
1394
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", className: "dshAcReset", disabled: props.disabled, onClick: props.onReset, children: props.t("chrome.reset") })
|
|
1304
1395
|
] }) : null
|
|
1305
1396
|
] }),
|
|
1306
|
-
/* @__PURE__ */ (0,
|
|
1397
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1307
1398
|
"select",
|
|
1308
1399
|
{
|
|
1309
1400
|
id: props.id,
|
|
@@ -1312,25 +1403,57 @@ function BooleanField(props) {
|
|
|
1312
1403
|
disabled: props.disabled,
|
|
1313
1404
|
onChange: (event) => props.onEdit(event.target.value),
|
|
1314
1405
|
children: [
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1317
|
-
/* @__PURE__ */ (0,
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "", children: props.t("chrome.inherit") }),
|
|
1407
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "true", children: props.t("chrome.on") }),
|
|
1408
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("option", { value: "false", children: props.t("chrome.off") })
|
|
1318
1409
|
]
|
|
1319
1410
|
}
|
|
1320
1411
|
),
|
|
1321
|
-
/* @__PURE__ */ (0,
|
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dshAcHint", children: props.hint })
|
|
1413
|
+
] });
|
|
1414
|
+
}
|
|
1415
|
+
function ComposerVisibilityField(props) {
|
|
1416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcField dshAcFieldWide", children: [
|
|
1417
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcHead", children: [
|
|
1418
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcLabel", children: props.label }),
|
|
1419
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcBadges", children: [
|
|
1420
|
+
props.overridden ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
1421
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcBadge", children: props.t("chrome.overridden") }),
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1423
|
+
"button",
|
|
1424
|
+
{
|
|
1425
|
+
type: "button",
|
|
1426
|
+
className: "dshAcReset",
|
|
1427
|
+
disabled: props.disabled,
|
|
1428
|
+
onClick: props.onReset,
|
|
1429
|
+
children: props.t("chrome.reset")
|
|
1430
|
+
}
|
|
1431
|
+
)
|
|
1432
|
+
] }) : null,
|
|
1433
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcSwitchTarget", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1434
|
+
NativeSwitch,
|
|
1435
|
+
{
|
|
1436
|
+
checked: props.text === "" ? DEFAULT_CONFIG.showComposerToggle : props.text === "true",
|
|
1437
|
+
onChange: (checked) => props.onEdit(String(checked)),
|
|
1438
|
+
label: props.label,
|
|
1439
|
+
disabled: props.disabled
|
|
1440
|
+
}
|
|
1441
|
+
) })
|
|
1442
|
+
] })
|
|
1443
|
+
] }),
|
|
1444
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dshAcHint", children: props.hint })
|
|
1322
1445
|
] });
|
|
1323
1446
|
}
|
|
1324
1447
|
function SettingsSection(props) {
|
|
1325
|
-
return /* @__PURE__ */ (0,
|
|
1326
|
-
/* @__PURE__ */ (0,
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1328
|
-
/* @__PURE__ */ (0,
|
|
1329
|
-
/* @__PURE__ */ (0,
|
|
1330
|
-
/* @__PURE__ */ (0,
|
|
1448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: `dshAcFormSection dshAcFormSection-${props.tone}`, children: [
|
|
1449
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: "dshAcSectionHead", children: [
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcSectionSignal", "aria-hidden": "true" }),
|
|
1451
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcSectionCopy", children: [
|
|
1452
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcSectionTitle", children: props.t(props.titleKey) }),
|
|
1453
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcSectionDescription", children: props.t(props.descriptionKey) })
|
|
1331
1454
|
] })
|
|
1332
1455
|
] }),
|
|
1333
|
-
/* @__PURE__ */ (0,
|
|
1456
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dshAcSectionGrid", children: props.children })
|
|
1334
1457
|
] });
|
|
1335
1458
|
}
|
|
1336
1459
|
function LivePanels(props) {
|
|
@@ -1348,11 +1471,11 @@ function LivePanels(props) {
|
|
|
1348
1471
|
const hasStats = stats.sent + stats.skipped + stats.recovered + stats.failed + stats.gaveUp + stats.looped > 0;
|
|
1349
1472
|
const codes = Object.entries(stats.byCode).sort((a, b) => b[1] - a[1]).slice(0, 5);
|
|
1350
1473
|
const paused = pausedSessions();
|
|
1351
|
-
return /* @__PURE__ */ (0,
|
|
1352
|
-
/* @__PURE__ */ (0,
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1355
|
-
hasStats ? /* @__PURE__ */ (0,
|
|
1474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
1475
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "dshAcPanel", children: [
|
|
1476
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcPanelHead", children: [
|
|
1477
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcPanelTitle", children: t("stats.title") }),
|
|
1478
|
+
hasStats ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1356
1479
|
"button",
|
|
1357
1480
|
{
|
|
1358
1481
|
type: "button",
|
|
@@ -1365,39 +1488,39 @@ function LivePanels(props) {
|
|
|
1365
1488
|
}
|
|
1366
1489
|
) : null
|
|
1367
1490
|
] }),
|
|
1368
|
-
!hasStats ? /* @__PURE__ */ (0,
|
|
1369
|
-
/* @__PURE__ */ (0,
|
|
1370
|
-
/* @__PURE__ */ (0,
|
|
1371
|
-
/* @__PURE__ */ (0,
|
|
1372
|
-
/* @__PURE__ */ (0,
|
|
1491
|
+
!hasStats ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dshAcHint", children: t("stats.empty") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
1492
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("dl", { className: "dshAcStats", children: [
|
|
1493
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
1494
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { children: t("stats.sent") }),
|
|
1495
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: stats.sent })
|
|
1373
1496
|
] }),
|
|
1374
|
-
/* @__PURE__ */ (0,
|
|
1375
|
-
/* @__PURE__ */ (0,
|
|
1376
|
-
/* @__PURE__ */ (0,
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
1498
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { children: t("stats.recovered") }),
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: stats.recovered })
|
|
1377
1500
|
] }),
|
|
1378
|
-
/* @__PURE__ */ (0,
|
|
1379
|
-
/* @__PURE__ */ (0,
|
|
1380
|
-
/* @__PURE__ */ (0,
|
|
1501
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
1502
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { children: t("stats.failed") }),
|
|
1503
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: stats.failed })
|
|
1381
1504
|
] }),
|
|
1382
|
-
/* @__PURE__ */ (0,
|
|
1383
|
-
/* @__PURE__ */ (0,
|
|
1384
|
-
/* @__PURE__ */ (0,
|
|
1505
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
1506
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { children: t("stats.skipped") }),
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: stats.skipped })
|
|
1385
1508
|
] }),
|
|
1386
|
-
/* @__PURE__ */ (0,
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1388
|
-
/* @__PURE__ */ (0,
|
|
1509
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
1510
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { children: t("stats.gaveUp") }),
|
|
1511
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: stats.gaveUp })
|
|
1389
1512
|
] }),
|
|
1390
|
-
/* @__PURE__ */ (0,
|
|
1391
|
-
/* @__PURE__ */ (0,
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1513
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { children: t("stats.looped") }),
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: stats.looped })
|
|
1393
1516
|
] })
|
|
1394
1517
|
] }),
|
|
1395
|
-
codes.length > 0 ? /* @__PURE__ */ (0,
|
|
1396
|
-
/* @__PURE__ */ (0,
|
|
1518
|
+
codes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcCodes", children: [
|
|
1519
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcHint", children: [
|
|
1397
1520
|
t("stats.byCode"),
|
|
1398
1521
|
":"
|
|
1399
1522
|
] }),
|
|
1400
|
-
codes.map(([code, count]) => /* @__PURE__ */ (0,
|
|
1523
|
+
codes.map(([code, count]) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcCode", children: [
|
|
1401
1524
|
code,
|
|
1402
1525
|
" ×",
|
|
1403
1526
|
count
|
|
@@ -1405,10 +1528,10 @@ function LivePanels(props) {
|
|
|
1405
1528
|
] }) : null
|
|
1406
1529
|
] })
|
|
1407
1530
|
] }),
|
|
1408
|
-
/* @__PURE__ */ (0,
|
|
1409
|
-
/* @__PURE__ */ (0,
|
|
1410
|
-
/* @__PURE__ */ (0,
|
|
1411
|
-
paused.length > 0 ? /* @__PURE__ */ (0,
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "dshAcPanel", children: [
|
|
1532
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcPanelHead", children: [
|
|
1533
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dshAcPanelTitle", children: t("pause.title") }),
|
|
1534
|
+
paused.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1412
1535
|
"button",
|
|
1413
1536
|
{
|
|
1414
1537
|
type: "button",
|
|
@@ -1421,17 +1544,17 @@ function LivePanels(props) {
|
|
|
1421
1544
|
}
|
|
1422
1545
|
) : null
|
|
1423
1546
|
] }),
|
|
1424
|
-
paused.length === 0 ? /* @__PURE__ */ (0,
|
|
1425
|
-
/* @__PURE__ */ (0,
|
|
1547
|
+
paused.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dshAcHint", children: t("pause.none") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "dshAcPauseList", children: paused.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("li", { children: [
|
|
1548
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcPauseId", children: [
|
|
1426
1549
|
item.sessionId.slice(0, 8),
|
|
1427
1550
|
"…"
|
|
1428
1551
|
] }),
|
|
1429
|
-
/* @__PURE__ */ (0,
|
|
1552
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dshAcHint", children: [
|
|
1430
1553
|
Math.max(1, Math.ceil((item.until - Date.now()) / 6e4)),
|
|
1431
1554
|
" ",
|
|
1432
1555
|
t("pause.minutes")
|
|
1433
1556
|
] }),
|
|
1434
|
-
/* @__PURE__ */ (0,
|
|
1557
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1435
1558
|
"button",
|
|
1436
1559
|
{
|
|
1437
1560
|
type: "button",
|
|
@@ -1452,7 +1575,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1452
1575
|
const state2 = props.useAutoContinueSettingsCard((snapshot) => snapshot);
|
|
1453
1576
|
const disabled = !state2.writable;
|
|
1454
1577
|
const shared = { t, disabled };
|
|
1455
|
-
return /* @__PURE__ */ (0,
|
|
1578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1456
1579
|
SettingsCard,
|
|
1457
1580
|
{
|
|
1458
1581
|
t,
|
|
@@ -1461,8 +1584,8 @@ function AutoContinueSettingsCard(props) {
|
|
|
1461
1584
|
state: state2,
|
|
1462
1585
|
onSave: props.save,
|
|
1463
1586
|
onDiscard: props.discard,
|
|
1464
|
-
children: /* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dshAcFormCanvas", children: [
|
|
1588
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1466
1589
|
SettingsSection,
|
|
1467
1590
|
{
|
|
1468
1591
|
t,
|
|
@@ -1470,7 +1593,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1470
1593
|
descriptionKey: "section.handoff.description",
|
|
1471
1594
|
tone: "handoff",
|
|
1472
1595
|
children: [
|
|
1473
|
-
/* @__PURE__ */ (0,
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1474
1597
|
BooleanField,
|
|
1475
1598
|
{
|
|
1476
1599
|
wide: true,
|
|
@@ -1483,7 +1606,19 @@ function AutoContinueSettingsCard(props) {
|
|
|
1483
1606
|
onReset: () => props.resetField("paused")
|
|
1484
1607
|
}
|
|
1485
1608
|
),
|
|
1486
|
-
/* @__PURE__ */ (0,
|
|
1609
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1610
|
+
ComposerVisibilityField,
|
|
1611
|
+
{
|
|
1612
|
+
id: "auto-continue-show-composer-toggle",
|
|
1613
|
+
label: t("field.showComposerToggle"),
|
|
1614
|
+
hint: t("field.showComposerToggleHint"),
|
|
1615
|
+
...shared,
|
|
1616
|
+
...state2.showComposerToggle,
|
|
1617
|
+
onEdit: (text) => props.edit("showComposerToggle", text),
|
|
1618
|
+
onReset: () => props.resetField("showComposerToggle")
|
|
1619
|
+
}
|
|
1620
|
+
),
|
|
1621
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1487
1622
|
ValueField,
|
|
1488
1623
|
{
|
|
1489
1624
|
id: "auto-continue-continue-text",
|
|
@@ -1496,7 +1631,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1496
1631
|
onReset: () => props.resetField("continueText")
|
|
1497
1632
|
}
|
|
1498
1633
|
),
|
|
1499
|
-
/* @__PURE__ */ (0,
|
|
1634
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1500
1635
|
ValueField,
|
|
1501
1636
|
{
|
|
1502
1637
|
id: "auto-continue-continue-text-max-tokens",
|
|
@@ -1509,7 +1644,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1509
1644
|
onReset: () => props.resetField("continueTextMaxTokens")
|
|
1510
1645
|
}
|
|
1511
1646
|
),
|
|
1512
|
-
/* @__PURE__ */ (0,
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1513
1648
|
BooleanField,
|
|
1514
1649
|
{
|
|
1515
1650
|
wide: true,
|
|
@@ -1522,7 +1657,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1522
1657
|
onReset: () => props.resetField("resumeSilentTurns")
|
|
1523
1658
|
}
|
|
1524
1659
|
),
|
|
1525
|
-
/* @__PURE__ */ (0,
|
|
1660
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1526
1661
|
ValueField,
|
|
1527
1662
|
{
|
|
1528
1663
|
wide: true,
|
|
@@ -1539,7 +1674,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1539
1674
|
]
|
|
1540
1675
|
}
|
|
1541
1676
|
),
|
|
1542
|
-
/* @__PURE__ */ (0,
|
|
1677
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1543
1678
|
SettingsSection,
|
|
1544
1679
|
{
|
|
1545
1680
|
t,
|
|
@@ -1547,7 +1682,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1547
1682
|
descriptionKey: "section.autoloop.description",
|
|
1548
1683
|
tone: "autoloop",
|
|
1549
1684
|
children: [
|
|
1550
|
-
/* @__PURE__ */ (0,
|
|
1685
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1551
1686
|
BooleanField,
|
|
1552
1687
|
{
|
|
1553
1688
|
wide: true,
|
|
@@ -1560,7 +1695,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1560
1695
|
onReset: () => props.resetField("resumeCompletedTurns")
|
|
1561
1696
|
}
|
|
1562
1697
|
),
|
|
1563
|
-
/* @__PURE__ */ (0,
|
|
1698
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1564
1699
|
ValueField,
|
|
1565
1700
|
{
|
|
1566
1701
|
wide: true,
|
|
@@ -1577,7 +1712,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1577
1712
|
]
|
|
1578
1713
|
}
|
|
1579
1714
|
),
|
|
1580
|
-
/* @__PURE__ */ (0,
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1581
1716
|
SettingsSection,
|
|
1582
1717
|
{
|
|
1583
1718
|
t,
|
|
@@ -1585,7 +1720,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1585
1720
|
descriptionKey: "section.safety.description",
|
|
1586
1721
|
tone: "safety",
|
|
1587
1722
|
children: [
|
|
1588
|
-
/* @__PURE__ */ (0,
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1589
1724
|
BooleanField,
|
|
1590
1725
|
{
|
|
1591
1726
|
wide: true,
|
|
@@ -1598,7 +1733,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1598
1733
|
onReset: () => props.resetField("guardTools")
|
|
1599
1734
|
}
|
|
1600
1735
|
),
|
|
1601
|
-
/* @__PURE__ */ (0,
|
|
1736
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1602
1737
|
ValueField,
|
|
1603
1738
|
{
|
|
1604
1739
|
wide: true,
|
|
@@ -1612,7 +1747,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1612
1747
|
onReset: () => props.resetField("guardPendingText")
|
|
1613
1748
|
}
|
|
1614
1749
|
),
|
|
1615
|
-
/* @__PURE__ */ (0,
|
|
1750
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1616
1751
|
ValueField,
|
|
1617
1752
|
{
|
|
1618
1753
|
wide: true,
|
|
@@ -1626,7 +1761,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1626
1761
|
onReset: () => props.resetField("guardDoneText")
|
|
1627
1762
|
}
|
|
1628
1763
|
),
|
|
1629
|
-
/* @__PURE__ */ (0,
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1630
1765
|
ValueField,
|
|
1631
1766
|
{
|
|
1632
1767
|
id: "auto-continue-grace-ms",
|
|
@@ -1639,7 +1774,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1639
1774
|
onReset: () => props.resetField("graceMs")
|
|
1640
1775
|
}
|
|
1641
1776
|
),
|
|
1642
|
-
/* @__PURE__ */ (0,
|
|
1777
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1643
1778
|
ValueField,
|
|
1644
1779
|
{
|
|
1645
1780
|
id: "auto-continue-cooldown-ms",
|
|
@@ -1652,7 +1787,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1652
1787
|
onReset: () => props.resetField("cooldownMs")
|
|
1653
1788
|
}
|
|
1654
1789
|
),
|
|
1655
|
-
/* @__PURE__ */ (0,
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1656
1791
|
ValueField,
|
|
1657
1792
|
{
|
|
1658
1793
|
id: "auto-continue-max-consecutive",
|
|
@@ -1668,7 +1803,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1668
1803
|
]
|
|
1669
1804
|
}
|
|
1670
1805
|
),
|
|
1671
|
-
/* @__PURE__ */ (0,
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1672
1807
|
SettingsSection,
|
|
1673
1808
|
{
|
|
1674
1809
|
t,
|
|
@@ -1676,7 +1811,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1676
1811
|
descriptionKey: "section.recovery.description",
|
|
1677
1812
|
tone: "recovery",
|
|
1678
1813
|
children: [
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1814
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1680
1815
|
BooleanField,
|
|
1681
1816
|
{
|
|
1682
1817
|
id: "auto-continue-scan-on-boot",
|
|
@@ -1688,7 +1823,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1688
1823
|
onReset: () => props.resetField("scanOnBoot")
|
|
1689
1824
|
}
|
|
1690
1825
|
),
|
|
1691
|
-
/* @__PURE__ */ (0,
|
|
1826
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1692
1827
|
BooleanField,
|
|
1693
1828
|
{
|
|
1694
1829
|
id: "auto-continue-classify",
|
|
@@ -1700,7 +1835,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1700
1835
|
onReset: () => props.resetField("classify")
|
|
1701
1836
|
}
|
|
1702
1837
|
),
|
|
1703
|
-
/* @__PURE__ */ (0,
|
|
1838
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1704
1839
|
ValueField,
|
|
1705
1840
|
{
|
|
1706
1841
|
id: "auto-continue-scan-limit",
|
|
@@ -1713,7 +1848,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1713
1848
|
onReset: () => props.resetField("scanLimit")
|
|
1714
1849
|
}
|
|
1715
1850
|
),
|
|
1716
|
-
/* @__PURE__ */ (0,
|
|
1851
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1717
1852
|
ValueField,
|
|
1718
1853
|
{
|
|
1719
1854
|
id: "auto-continue-fresh-ms",
|
|
@@ -1726,7 +1861,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1726
1861
|
onReset: () => props.resetField("freshMs")
|
|
1727
1862
|
}
|
|
1728
1863
|
),
|
|
1729
|
-
/* @__PURE__ */ (0,
|
|
1864
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1730
1865
|
ValueField,
|
|
1731
1866
|
{
|
|
1732
1867
|
wide: true,
|
|
@@ -1741,7 +1876,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1741
1876
|
onReset: () => props.resetField("retryableErrorPatterns")
|
|
1742
1877
|
}
|
|
1743
1878
|
),
|
|
1744
|
-
/* @__PURE__ */ (0,
|
|
1879
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1745
1880
|
ValueField,
|
|
1746
1881
|
{
|
|
1747
1882
|
id: "auto-continue-backoff-factor",
|
|
@@ -1754,7 +1889,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1754
1889
|
onReset: () => props.resetField("backoffFactor")
|
|
1755
1890
|
}
|
|
1756
1891
|
),
|
|
1757
|
-
/* @__PURE__ */ (0,
|
|
1892
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1758
1893
|
ValueField,
|
|
1759
1894
|
{
|
|
1760
1895
|
id: "auto-continue-backoff-max",
|
|
@@ -1767,7 +1902,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1767
1902
|
onReset: () => props.resetField("backoffMaxMs")
|
|
1768
1903
|
}
|
|
1769
1904
|
),
|
|
1770
|
-
/* @__PURE__ */ (0,
|
|
1905
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1771
1906
|
BooleanField,
|
|
1772
1907
|
{
|
|
1773
1908
|
id: "auto-continue-notify",
|
|
@@ -1779,7 +1914,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1779
1914
|
onReset: () => props.resetField("notify")
|
|
1780
1915
|
}
|
|
1781
1916
|
),
|
|
1782
|
-
/* @__PURE__ */ (0,
|
|
1917
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1783
1918
|
BooleanField,
|
|
1784
1919
|
{
|
|
1785
1920
|
id: "auto-continue-verbose",
|
|
@@ -1794,7 +1929,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1794
1929
|
]
|
|
1795
1930
|
}
|
|
1796
1931
|
),
|
|
1797
|
-
/* @__PURE__ */ (0,
|
|
1932
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1798
1933
|
SettingsSection,
|
|
1799
1934
|
{
|
|
1800
1935
|
t,
|
|
@@ -1802,7 +1937,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1802
1937
|
descriptionKey: "section.loop.description",
|
|
1803
1938
|
tone: "loop",
|
|
1804
1939
|
children: [
|
|
1805
|
-
/* @__PURE__ */ (0,
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1806
1941
|
BooleanField,
|
|
1807
1942
|
{
|
|
1808
1943
|
wide: true,
|
|
@@ -1815,7 +1950,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1815
1950
|
onReset: () => props.resetField("loopGuard")
|
|
1816
1951
|
}
|
|
1817
1952
|
),
|
|
1818
|
-
/* @__PURE__ */ (0,
|
|
1953
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1819
1954
|
ValueField,
|
|
1820
1955
|
{
|
|
1821
1956
|
id: "auto-continue-loop-short-chars",
|
|
@@ -1828,7 +1963,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1828
1963
|
onReset: () => props.resetField("loopShortChars")
|
|
1829
1964
|
}
|
|
1830
1965
|
),
|
|
1831
|
-
/* @__PURE__ */ (0,
|
|
1966
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1832
1967
|
ValueField,
|
|
1833
1968
|
{
|
|
1834
1969
|
id: "auto-continue-loop-window-ms",
|
|
@@ -1841,7 +1976,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1841
1976
|
onReset: () => props.resetField("loopWindowMs")
|
|
1842
1977
|
}
|
|
1843
1978
|
),
|
|
1844
|
-
/* @__PURE__ */ (0,
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1845
1980
|
ValueField,
|
|
1846
1981
|
{
|
|
1847
1982
|
id: "auto-continue-loop-short-count",
|
|
@@ -1854,7 +1989,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1854
1989
|
onReset: () => props.resetField("loopShortCount")
|
|
1855
1990
|
}
|
|
1856
1991
|
),
|
|
1857
|
-
/* @__PURE__ */ (0,
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1858
1993
|
ValueField,
|
|
1859
1994
|
{
|
|
1860
1995
|
id: "auto-continue-loop-repeat-text",
|
|
@@ -1867,7 +2002,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1867
2002
|
onReset: () => props.resetField("loopRepeatText")
|
|
1868
2003
|
}
|
|
1869
2004
|
),
|
|
1870
|
-
/* @__PURE__ */ (0,
|
|
2005
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1871
2006
|
ValueField,
|
|
1872
2007
|
{
|
|
1873
2008
|
id: "auto-continue-loop-tool-repeat",
|
|
@@ -1880,7 +2015,7 @@ function AutoContinueSettingsCard(props) {
|
|
|
1880
2015
|
onReset: () => props.resetField("loopToolRepeat")
|
|
1881
2016
|
}
|
|
1882
2017
|
),
|
|
1883
|
-
/* @__PURE__ */ (0,
|
|
2018
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1884
2019
|
ValueField,
|
|
1885
2020
|
{
|
|
1886
2021
|
wide: true,
|
|
@@ -1897,14 +2032,14 @@ function AutoContinueSettingsCard(props) {
|
|
|
1897
2032
|
]
|
|
1898
2033
|
}
|
|
1899
2034
|
),
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
2035
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1901
2036
|
SettingsSection,
|
|
1902
2037
|
{
|
|
1903
2038
|
t,
|
|
1904
2039
|
titleKey: "section.live.title",
|
|
1905
2040
|
descriptionKey: "section.live.description",
|
|
1906
2041
|
tone: "live",
|
|
1907
|
-
children: /* @__PURE__ */ (0,
|
|
2042
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LivePanels, { t })
|
|
1908
2043
|
}
|
|
1909
2044
|
)
|
|
1910
2045
|
] })
|
|
@@ -1912,6 +2047,28 @@ function AutoContinueSettingsCard(props) {
|
|
|
1912
2047
|
);
|
|
1913
2048
|
}
|
|
1914
2049
|
|
|
2050
|
+
// src/client/composer-toggle.tsx
|
|
2051
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
2052
|
+
function AutoContinueComposerToggle(props) {
|
|
2053
|
+
const state2 = props.useAutoContinueComposer((snapshot) => snapshot);
|
|
2054
|
+
if (!state2.visible) return null;
|
|
2055
|
+
const title = props.t(!state2.writable ? "chrome.readOnly" : state2.saving ? "composer.saving" : "composer.scope");
|
|
2056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dshAcComposer", title, children: [
|
|
2057
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dshAcComposerLabel", children: props.t("composer.label") }),
|
|
2058
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dshAcSwitchTarget", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2059
|
+
NativeSwitch,
|
|
2060
|
+
{
|
|
2061
|
+
checked: state2.enabled,
|
|
2062
|
+
onChange: props.setEnabled,
|
|
2063
|
+
disabled: !state2.writable || state2.saving,
|
|
2064
|
+
label: props.t("composer.label"),
|
|
2065
|
+
title
|
|
2066
|
+
}
|
|
2067
|
+
) }),
|
|
2068
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dshAcComposerError", role: "status", children: state2.failed ? props.t("composer.saveFailed") : null })
|
|
2069
|
+
] });
|
|
2070
|
+
}
|
|
2071
|
+
|
|
1915
2072
|
// src/client/index.ts
|
|
1916
2073
|
var NS = "auto-continue";
|
|
1917
2074
|
var SETTINGS_NS = "auto-continue";
|
|
@@ -1949,6 +2106,18 @@ function mountSettings(ctx, scope) {
|
|
|
1949
2106
|
syncLocale();
|
|
1950
2107
|
const controller = new AutoContinueSettingsCardController(scope);
|
|
1951
2108
|
ctx.effect(() => () => controller.dispose(), "auto-continue: settings form");
|
|
2109
|
+
ctx.slots.inject(
|
|
2110
|
+
"conversation.input.left",
|
|
2111
|
+
() => ctx.slots.register(
|
|
2112
|
+
{
|
|
2113
|
+
name: "conversation.input.left",
|
|
2114
|
+
id: "auto-continue",
|
|
2115
|
+
locale: NS,
|
|
2116
|
+
inject: () => controller.injectComposer()
|
|
2117
|
+
},
|
|
2118
|
+
AutoContinueComposerToggle
|
|
2119
|
+
)
|
|
2120
|
+
);
|
|
1952
2121
|
ctx.slots.inject(
|
|
1953
2122
|
"settings.plugin.item",
|
|
1954
2123
|
() => ctx.slots.register(
|