dsh-client-auto-continue 0.10.2 → 0.11.1

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.
@@ -7,39 +7,194 @@
7
7
 
8
8
  const css = `
9
9
  .dshAcCard {
10
+ --dsh-ac-violet: #8b7cff;
11
+ --dsh-ac-cyan: #45cce5;
12
+ --dsh-ac-mint: #46d69d;
13
+ --dsh-ac-amber: #f1b95c;
14
+ isolation: isolate;
15
+ position: relative;
16
+ overflow: hidden;
10
17
  border: 1px solid var(--dsw-alias-border-l2);
11
18
  background: var(--dsw-alias-bg-layer-3);
12
- border-radius: 12px;
19
+ border-radius: 16px;
13
20
  list-style: none;
14
- transition: border-color .16s, background .16s;
21
+ box-shadow: 0 10px 34px rgb(0 0 0 / 8%);
22
+ transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
23
+ }
24
+ .dshAcCard::before {
25
+ content: "";
26
+ z-index: 2;
27
+ position: absolute;
28
+ inset: 0 0 auto;
29
+ height: 2px;
30
+ pointer-events: none;
31
+ opacity: .72;
32
+ background: linear-gradient(90deg, transparent 1%, var(--dsh-ac-violet) 22%, var(--dsh-ac-cyan) 52%, var(--dsh-ac-mint) 80%, transparent 99%);
33
+ }
34
+ .dshAcCard::after {
35
+ content: "";
36
+ z-index: -1;
37
+ position: absolute;
38
+ width: 190px;
39
+ height: 190px;
40
+ top: -104px;
41
+ left: -76px;
42
+ pointer-events: none;
43
+ border-radius: 999px;
44
+ background: radial-gradient(circle, rgb(139 124 255 / 14%) 0, transparent 68%);
45
+ }
46
+ .dshAcCard:hover {
47
+ border-color: color-mix(in srgb, var(--dsh-ac-violet) 48%, var(--dsw-alias-border-l2));
48
+ box-shadow: 0 14px 42px rgb(0 0 0 / 12%);
49
+ transform: translateY(-1px);
15
50
  }
16
- .dshAcCard:hover { border-color: var(--dsw-alias-label-dimmed); }
17
51
  .dshAcCardOpen {
18
52
  background: var(--dsw-alias-bg-layer-2);
19
- border-color: var(--dsw-alias-label-dimmed);
53
+ border-color: color-mix(in srgb, var(--dsh-ac-violet) 42%, var(--dsw-alias-border-l2));
54
+ box-shadow: 0 18px 54px rgb(0 0 0 / 14%);
55
+ transform: none;
56
+ }
57
+ .dshAcHeaderFrame {
58
+ align-items: stretch;
59
+ flex-direction: column;
60
+ display: flex;
20
61
  }
21
62
  .dshAcHeader {
22
63
  appearance: none;
23
- width: 100%;
64
+ min-width: 0;
65
+ flex: 1;
24
66
  font: inherit;
25
67
  color: inherit;
26
68
  text-align: left;
27
69
  cursor: pointer;
28
70
  background: none;
29
71
  border: 0;
30
- border-radius: 12px;
72
+ border-radius: 16px;
31
73
  align-items: center;
32
- gap: 12px;
33
- padding: 14px 16px;
74
+ gap: 14px;
75
+ padding: 18px 18px 12px;
34
76
  display: flex;
35
77
  }
36
- .dshAcHeader:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: -2px; }
37
- .dshAcHeadText { flex-direction: column; flex: 1; gap: 4px; min-width: 0; display: flex; }
38
- .dshAcName { color: var(--dsw-alias-label-primary); font-size: 15px; font-weight: 600; line-height: 1.4; }
39
- .dshAcDescription { color: var(--dsw-alias-label-tertiary); font-size: 13px; line-height: 1.5; }
40
- .dshAcChevron { color: var(--dsw-alias-label-tertiary); flex: none; transition: transform .16s; }
78
+ .dshAcHeader:focus-visible { outline: 2px solid var(--dsh-ac-violet); outline-offset: -3px; }
79
+ .dshAcRelayMark {
80
+ width: 54px;
81
+ height: 54px;
82
+ flex: none;
83
+ place-items: center;
84
+ display: grid;
85
+ color: var(--dsh-ac-cyan);
86
+ border: 1px solid color-mix(in srgb, var(--dsh-ac-violet) 42%, var(--dsw-alias-border-l2));
87
+ border-radius: 17px;
88
+ background: color-mix(in srgb, var(--dsw-alias-bg-layer-2) 84%, var(--dsh-ac-violet) 16%);
89
+ box-shadow: inset 0 0 0 1px rgb(255 255 255 / 4%), 0 8px 24px rgb(62 51 153 / 16%);
90
+ }
91
+ .dshAcRelayMark svg { width: 44px; height: 44px; overflow: visible; }
92
+ .dshAcRelayArc { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
93
+ .dshAcRelayArcEcho { opacity: .42; }
94
+ .dshAcRelayNode { stroke: var(--dsw-alias-bg-layer-3); stroke-width: 1.5; }
95
+ .dshAcRelayNodeStart { fill: var(--dsh-ac-amber); }
96
+ .dshAcRelayNodeEnd { fill: var(--dsh-ac-mint); }
97
+ .dshAcRelayPulse { fill: var(--dsh-ac-violet); opacity: .85; }
98
+ .dshAcCard:hover .dshAcRelayPulse, .dshAcCardOpen .dshAcRelayPulse {
99
+ animation: dshAcRelayTravel 1.8s cubic-bezier(.4, 0, .2, 1) infinite;
100
+ }
101
+ .dshAcHeadText { flex-direction: column; flex: 1; gap: 3px; min-width: 0; display: flex; }
102
+ .dshAcEyebrow {
103
+ color: color-mix(in srgb, var(--dsh-ac-violet) 76%, var(--dsw-alias-label-secondary));
104
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
105
+ font-size: 10px;
106
+ font-weight: 700;
107
+ line-height: 1.4;
108
+ letter-spacing: .12em;
109
+ text-transform: uppercase;
110
+ }
111
+ .dshAcName {
112
+ color: var(--dsw-alias-label-primary);
113
+ font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", sans-serif;
114
+ font-size: 18px;
115
+ font-weight: 680;
116
+ letter-spacing: -.015em;
117
+ line-height: 1.35;
118
+ }
119
+ .dshAcDescription { max-width: 660px; color: var(--dsw-alias-label-tertiary); font-size: 13px; line-height: 1.5; }
120
+ .dshAcJourney { flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 4px; display: flex; }
121
+ .dshAcJourneyStep {
122
+ align-items: center;
123
+ gap: 5px;
124
+ color: var(--dsw-alias-label-secondary);
125
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
126
+ font-size: 10px;
127
+ font-weight: 600;
128
+ line-height: 1.4;
129
+ letter-spacing: .02em;
130
+ display: inline-flex;
131
+ }
132
+ .dshAcJourneyDot { width: 5px; height: 5px; flex: none; border-radius: 999px; background: currentColor; box-shadow: 0 0 0 3px rgb(255 255 255 / 3%); }
133
+ .dshAcJourneyInterrupted .dshAcJourneyDot { color: var(--dsh-ac-amber); }
134
+ .dshAcJourneyGrace .dshAcJourneyDot { color: var(--dsh-ac-cyan); }
135
+ .dshAcJourneyContinue .dshAcJourneyDot { color: var(--dsh-ac-mint); }
136
+ .dshAcJourneyLine {
137
+ width: 25px;
138
+ height: 1px;
139
+ flex: none;
140
+ opacity: .7;
141
+ background: linear-gradient(90deg, var(--dsh-ac-violet), var(--dsh-ac-cyan), var(--dsh-ac-mint));
142
+ background-size: 220% 100%;
143
+ }
144
+ .dshAcCard:hover .dshAcJourneyLine, .dshAcCardOpen .dshAcJourneyLine { animation: dshAcSignalSweep 1.8s linear infinite; }
145
+ .dshAcChevron {
146
+ width: 30px;
147
+ height: 30px;
148
+ color: var(--dsw-alias-label-tertiary);
149
+ border: 1px solid var(--dsw-alias-border-l2);
150
+ border-radius: 999px;
151
+ flex: none;
152
+ place-items: center;
153
+ display: grid;
154
+ transition: color .18s ease, border-color .18s ease, transform .18s ease;
155
+ }
156
+ .dshAcChevron svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
157
+ .dshAcHeader:hover .dshAcChevron { color: var(--dsh-ac-violet); border-color: color-mix(in srgb, var(--dsh-ac-violet) 48%, var(--dsw-alias-border-l2)); }
41
158
  .dshAcChevronOpen { transform: rotate(180deg); }
42
- .dshAcBody { border-top: 1px solid var(--dsw-alias-border-l2); margin: 0 16px; padding-bottom: 8px; }
159
+ .dshAcGithub {
160
+ min-width: 0;
161
+ max-width: none;
162
+ align-self: stretch;
163
+ align-items: center;
164
+ gap: 10px;
165
+ margin: 0 18px 16px;
166
+ padding: 9px 11px;
167
+ color: var(--dsw-alias-label-primary);
168
+ text-decoration: none;
169
+ border: 1px solid var(--dsw-alias-border-l2);
170
+ border-radius: 13px;
171
+ background: color-mix(in srgb, var(--dsw-alias-bg-layer-2) 90%, var(--dsh-ac-violet) 10%);
172
+ display: flex;
173
+ transition: border-color .18s ease, background .18s ease, transform .18s ease;
174
+ }
175
+ .dshAcGithub:hover {
176
+ border-color: color-mix(in srgb, var(--dsh-ac-violet) 58%, var(--dsw-alias-border-l2));
177
+ background: color-mix(in srgb, var(--dsw-alias-bg-layer-2) 82%, var(--dsh-ac-violet) 18%);
178
+ transform: translateY(-1px);
179
+ }
180
+ .dshAcGithub:focus-visible { outline: 2px solid var(--dsh-ac-violet); outline-offset: 2px; }
181
+ .dshAcGithubIcon { width: 23px; height: 23px; flex: none; color: var(--dsw-alias-label-primary); }
182
+ .dshAcGithubIcon svg { width: 100%; height: 100%; fill: currentColor; }
183
+ .dshAcGithubText { min-width: 0; flex: 1; flex-direction: column; gap: 1px; display: flex; }
184
+ .dshAcGithubAction { font-size: 12px; font-weight: 680; line-height: 1.4; }
185
+ .dshAcGithubAction::before { content: "★"; color: var(--dsh-ac-amber); margin-right: 5px; }
186
+ .dshAcGithubSlug {
187
+ overflow: hidden;
188
+ color: var(--dsw-alias-label-tertiary);
189
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
190
+ font-size: 9.5px;
191
+ line-height: 1.4;
192
+ text-overflow: ellipsis;
193
+ white-space: nowrap;
194
+ }
195
+ .dshAcExternal { width: 15px; height: 15px; flex: none; color: var(--dsw-alias-label-tertiary); }
196
+ .dshAcExternal svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
197
+ .dshAcBody { border-top: 1px solid var(--dsw-alias-border-l2); margin: 0 18px 12px; padding: 4px 0 0; }
43
198
  .dshAcReadOnly { color: var(--dsw-alias-label-tertiary); margin: 12px 0 0; font-size: 12px; line-height: 1.5; }
44
199
  .dshAcPending {
45
200
  white-space: nowrap;
@@ -76,8 +231,53 @@ const css = `
76
231
  .dshAcSave { background: var(--dsw-alias-label-primary); color: var(--dsw-alias-bg-layer-3); }
77
232
  .dshAcDiscard:disabled, .dshAcSave:disabled { opacity: .4; cursor: default; }
78
233
  .dshAcDiscard:focus-visible, .dshAcSave:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }
79
- .dshAcField { flex-direction: column; gap: 6px; padding: 12px 0; display: flex; }
80
- .dshAcField + .dshAcField { border-top: 1px solid var(--dsw-alias-border-l2); }
234
+ .dshAcFormCanvas { flex-direction: column; gap: 14px; padding: 12px 0 8px; display: flex; }
235
+ .dshAcFormSection {
236
+ --dsh-ac-section: var(--dsh-ac-violet);
237
+ overflow: hidden;
238
+ border: 1px solid var(--dsw-alias-border-l2);
239
+ border-radius: 14px;
240
+ background: var(--dsw-alias-bg-layer-3);
241
+ background: color-mix(in srgb, var(--dsw-alias-bg-layer-3) 95%, var(--dsh-ac-section) 5%);
242
+ }
243
+ .dshAcFormSection-handoff { --dsh-ac-section: var(--dsh-ac-mint); }
244
+ .dshAcFormSection-safety { --dsh-ac-section: var(--dsh-ac-amber); }
245
+ .dshAcFormSection-recovery { --dsh-ac-section: var(--dsh-ac-cyan); }
246
+ .dshAcFormSection-loop { --dsh-ac-section: var(--dsh-ac-violet); }
247
+ .dshAcFormSection-live { --dsh-ac-section: color-mix(in srgb, var(--dsh-ac-violet) 60%, var(--dsh-ac-cyan)); }
248
+ .dshAcSectionHead {
249
+ align-items: center;
250
+ gap: 11px;
251
+ padding: 13px 14px 11px;
252
+ border-bottom: 1px solid var(--dsw-alias-border-l2);
253
+ display: flex;
254
+ }
255
+ .dshAcSectionSignal {
256
+ width: 4px;
257
+ height: 34px;
258
+ flex: none;
259
+ border-radius: 999px;
260
+ background: var(--dsh-ac-section);
261
+ box-shadow: 0 0 18px color-mix(in srgb, var(--dsh-ac-section) 55%, transparent);
262
+ }
263
+ .dshAcSectionCopy { min-width: 0; flex-direction: column; gap: 2px; display: flex; }
264
+ .dshAcSectionTitle {
265
+ color: var(--dsw-alias-label-primary);
266
+ font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", sans-serif;
267
+ font-size: 14px;
268
+ font-weight: 680;
269
+ line-height: 1.4;
270
+ }
271
+ .dshAcSectionDescription { color: var(--dsw-alias-label-tertiary); font-size: 11.5px; line-height: 1.45; }
272
+ .dshAcSectionGrid {
273
+ grid-template-columns: repeat(2, minmax(0, 1fr));
274
+ column-gap: 22px;
275
+ padding: 0 14px 4px;
276
+ display: grid;
277
+ }
278
+ .dshAcField { min-width: 0; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--dsw-alias-border-l2); display: flex; }
279
+ .dshAcSectionGrid > .dshAcField:first-child { border-top: 0; }
280
+ .dshAcFieldWide { grid-column: 1 / -1; }
81
281
  .dshAcHead { align-items: center; gap: 8px; display: flex; }
82
282
  .dshAcLabel { min-width: 0; color: var(--dsw-alias-label-primary); flex: 1; font-size: 13px; font-weight: 500; line-height: 1.5; }
83
283
  .dshAcBadges { align-items: center; gap: 8px; display: inline-flex; }
@@ -104,6 +304,8 @@ const css = `
104
304
  .dshAcReset:hover:not(:disabled) { color: var(--dsw-alias-label-primary); }
105
305
  .dshAcReset:disabled { cursor: default; }
106
306
  .dshAcInput {
307
+ box-sizing: border-box;
308
+ width: 100%;
107
309
  border: 1px solid var(--dsw-alias-border-l2);
108
310
  background: var(--dsw-alias-bg-layer-3);
109
311
  height: 34px;
@@ -119,6 +321,8 @@ const css = `
119
321
  .dshAcInputInvalid { border-color: var(--dsw-alias-label-error); }
120
322
  .dshAcTextArea { box-sizing: border-box; height: auto; min-height: 84px; padding: 8px 12px; resize: vertical; }
121
323
  .dshAcSelect {
324
+ box-sizing: border-box;
325
+ width: 100%;
122
326
  border: 1px solid var(--dsw-alias-border-l2);
123
327
  background: var(--dsw-alias-bg-layer-3);
124
328
  height: 34px;
@@ -133,7 +337,8 @@ const css = `
133
337
  .dshAcSelect:disabled { color: var(--dsw-alias-label-tertiary); cursor: default; }
134
338
  .dshAcInvalid { color: var(--dsw-alias-label-error); margin: 0; font-size: 12px; line-height: 1.5; }
135
339
  .dshAcHint { color: var(--dsw-alias-label-tertiary); margin: 0; font-size: 12px; line-height: 1.5; }
136
- .dshAcPanel { border-top: 1px solid var(--dsw-alias-border-l2); flex-direction: column; gap: 8px; padding: 12px 0; display: flex; }
340
+ .dshAcPanel { min-width: 0; flex-direction: column; gap: 8px; padding: 12px 0 14px; display: flex; }
341
+ .dshAcPanel + .dshAcPanel { border-left: 1px solid var(--dsw-alias-border-l2); padding-left: 20px; }
137
342
  .dshAcPanelHead { align-items: center; gap: 8px; display: flex; }
138
343
  .dshAcPanelTitle { color: var(--dsw-alias-label-primary); flex: 1; font-size: 13px; font-weight: 600; line-height: 1.5; }
139
344
  .dshAcStats { gap: 4px 16px; margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); display: grid; }
@@ -159,6 +364,43 @@ const css = `
159
364
  font-size: 12px;
160
365
  line-height: 1.5;
161
366
  }
367
+ @keyframes dshAcRelayTravel {
368
+ 0% { opacity: 0; transform: translate(-19px, 18px) scale(.7); }
369
+ 18% { opacity: 1; }
370
+ 82% { opacity: 1; }
371
+ 100% { opacity: 0; transform: translate(12px, 6px) scale(1.15); }
372
+ }
373
+ @keyframes dshAcSignalSweep {
374
+ from { background-position: 100% 0; }
375
+ to { background-position: -120% 0; }
376
+ }
377
+ @media (max-width: 820px) {
378
+ .dshAcSectionGrid { grid-template-columns: minmax(0, 1fr); }
379
+ .dshAcFieldWide { grid-column: auto; }
380
+ .dshAcPanel + .dshAcPanel {
381
+ border-top: 1px solid var(--dsw-alias-border-l2);
382
+ border-left: 0;
383
+ padding-left: 0;
384
+ }
385
+ }
386
+ @media (max-width: 560px) {
387
+ .dshAcHeader { align-items: flex-start; gap: 11px; padding: 15px 13px 10px; }
388
+ .dshAcRelayMark { width: 46px; height: 46px; border-radius: 14px; }
389
+ .dshAcRelayMark svg { width: 38px; height: 38px; }
390
+ .dshAcName { font-size: 16px; }
391
+ .dshAcDescription { font-size: 12px; }
392
+ .dshAcJourney { gap: 5px; }
393
+ .dshAcJourneyLine { width: 13px; }
394
+ .dshAcChevron { width: 27px; height: 27px; }
395
+ .dshAcPending { display: none; }
396
+ .dshAcGithub { margin: 0 13px 13px; }
397
+ .dshAcBody { margin-right: 13px; margin-left: 13px; }
398
+ }
399
+ @media (prefers-reduced-motion: reduce) {
400
+ .dshAcCard, .dshAcGithub, .dshAcChevron { transition: none; }
401
+ .dshAcCard:hover, .dshAcGithub:hover { transform: none; }
402
+ .dshAcRelayPulse, .dshAcJourneyLine { animation: none !important; }
403
+ }
162
404
  `;
163
405
 
164
406
  /** Inject the stylesheet once; a no-op outside a browser environment. */
package/src/index.ts CHANGED
@@ -11,11 +11,10 @@
11
11
  */
12
12
  import type { Context } from '@deepseek-ai/cordis';
13
13
  import z from '@deepseek-ai/schemastery';
14
- import { settingsNamespace } from '@deepseek-ai/dsh-settings';
14
+ import type { SettingsNamespace } from '@deepseek-ai/dsh-settings';
15
15
  import { AutoContinueRunner } from './host/engine.ts';
16
16
  import { resolveConfig, type AutoContinueSettings } from './shared/core.ts';
17
- // Type-only: pulls the `ctx.settings` Context augmentation from dsh-settings.
18
- import type {} from '@deepseek-ai/dsh-settings';
17
+ // The type-only settings import also pulls in the `ctx.settings` Context augmentation.
19
18
  // Type-only: pulls the `ctx.webServer` Context augmentation.
20
19
  import type {} from '@deepseek-ai/dsh-host-webserver';
21
20
  import type {} from '@deepseek-ai/dsh-agent';
@@ -23,6 +22,7 @@ import type {} from '@deepseek-ai/dsh-session';
23
22
 
24
23
  /** Settings namespace of the auto-continue plugin (lowercase kebab-case). */
25
24
  export const AUTO_CONTINUE_NS = 'auto-continue';
25
+ const SETTINGS_NS = AUTO_CONTINUE_NS as SettingsNamespace;
26
26
 
27
27
  /** Wire schema; blank localized text fields tell resolveConfig() to select the active locale's defaults. */
28
28
  export const AutoContinueSchema = z.object({
@@ -93,7 +93,7 @@ export const AutoContinueSchema = z.object({
93
93
  */
94
94
  export function apply(ctx: Context): void {
95
95
  ctx.inject(['settings'], (settingsCtx) => {
96
- settingsCtx.settings.register(settingsNamespace(AUTO_CONTINUE_NS), AutoContinueSchema, {
96
+ settingsCtx.settings.register(SETTINGS_NS, AutoContinueSchema, {
97
97
  applies: 'live',
98
98
  });
99
99
  });
@@ -108,7 +108,7 @@ export function apply(ctx: Context): void {
108
108
  // 回调重入时先清理旧引擎, 避免定时器与监听器叠加。
109
109
  if (runnerRef !== undefined) runnerRef.dispose();
110
110
  const runner = new AutoContinueRunner(engineCtx, () =>
111
- resolveConfig(engineCtx.settings.get(settingsNamespace(AUTO_CONTINUE_NS)) as AutoContinueSettings | undefined),
111
+ resolveConfig(engineCtx.settings.get(SETTINGS_NS) as AutoContinueSettings | undefined),
112
112
  );
113
113
  runnerRef = runner;
114
114