@webskill/chatbot 0.3.0 → 0.4.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/index.js CHANGED
@@ -6,11 +6,11 @@ import { t as yaml } from "./yaml-C888tCbJ.js";
6
6
  import { t as json } from "./json-BOcU6nei.js";
7
7
  import { t as typescript } from "./typescript-DAau_Qyl.js";
8
8
  import { t as jsx$1 } from "./jsx-D2Jv0wvt.js";
9
- import { BEHAVIOR_RECORDS_KEY, DEFAULT_USER_PROFILE_LIMITS, EventBus, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FullDisclosureRouter, SerializingMemoryStore, SkillDiscovery, USER_PROFILE_KEY, WebSkillError, WebSkillRuntime, applyUserProfileImport, assertRemoteUrlAllowed, diffUserProfile, exportUserProfile, isUnsupportedRunSnapshot, messageOf, parseUserProfileExport, readBehaviorRecords, readUserProfile, refineUserProfile, summarizeToolCalls, textParts } from "@webskill/sdk";
9
+ import { BEHAVIOR_RECORDS_KEY, DEFAULT_LOOP_LIMITS, DEFAULT_USER_PROFILE_LIMITS, EventBus, FsArtifactStore, FsMemoryStore, FsRunSnapshotStore, FsRunTraceStore, FsSessionStore, FullDisclosureRouter, SerializingMemoryStore, SkillDiscovery, USER_PROFILE_KEY, WebSkillError, WebSkillRuntime, applyUserProfileImport, assertRemoteUrlAllowed, diffUserProfile, exportUserProfile, isUnsupportedRunSnapshot, messageOf, parseUserProfileExport, readBehaviorRecords, readUserProfile, refineUserProfile, summarizeToolCalls, textParts } from "@webskill/sdk";
10
10
  import { BrowserWorkerScriptExecutor, checkDictationAvailability, compressImageToBudget, createEncryptedMemoryStore, createLlmClient, deleteMemoryEncryptionKey, openMemoryEncryptionKey, probeChromeBuiltinAvailability, startDictation } from "@webskill/sdk/browser";
11
11
  import { JsonRenderSpecSurface, NativeSpecSurface, OpenUiSpecSurface, ReactBridgeState, SpecInteractionChannel, UiSurfaceList, UiSurfaceSnapshotList, probeJsonRenderAvailability } from "@webskill/sdk/ui-react";
12
12
  import { A2UI_SPEC_FORM_PATH, collectFormScopes, createUiCatalogToolSource, fromA2uiSpecAction, fromA2uiSurfaceAction, interactionToFormModel, interactionToUiSpec, loadOpenUiPeers, loadWebSkillLitCatalog, renderMiniChart, shapeInteractionValue, toA2uiSpecMessages, toA2uiSurfaceAction, toVercelToolInvocation, uiCatalog } from "@webskill/sdk/ui";
13
- import { TodoStore, createDelegationToolSource, createPagePerceptionToolSource, createSkillGenerationToolSource, createTodoToolSource, withDelegationOrigin } from "@webskill/sdk/agent";
13
+ import { TodoStore, createDelegationToolSource, createPageActionToolSource, createPagePerceptionToolSource, createSkillGenerationToolSource, createTodoToolSource, withDelegationOrigin } from "@webskill/sdk/agent";
14
14
  import * as React$1 from "react";
15
15
  import React, { Children, Component, Fragment, createContext, createElement, forwardRef, isValidElement, memo, useCallback, useContext, useDeferredValue, useEffect, useEffectEvent, useId, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
16
16
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -192,7 +192,7 @@ const createLucideIcon = (iconName, iconNode) => {
192
192
  * This source code is licensed under the ISC license.
193
193
  * See the LICENSE file in the root directory of this source tree.
194
194
  */
195
- const __iconNode$47 = [
195
+ const __iconNode$43 = [
196
196
  ["rect", {
197
197
  width: "20",
198
198
  height: "5",
@@ -218,7 +218,7 @@ const __iconNode$47 = [
218
218
  key: "192myk"
219
219
  }]
220
220
  ];
221
- const ArchiveRestore = createLucideIcon("archive-restore", __iconNode$47);
221
+ const ArchiveRestore = createLucideIcon("archive-restore", __iconNode$43);
222
222
 
223
223
  //#endregion
224
224
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/archive.mjs
@@ -228,7 +228,7 @@ const ArchiveRestore = createLucideIcon("archive-restore", __iconNode$47);
228
228
  * This source code is licensed under the ISC license.
229
229
  * See the LICENSE file in the root directory of this source tree.
230
230
  */
231
- const __iconNode$46 = [
231
+ const __iconNode$42 = [
232
232
  ["rect", {
233
233
  width: "20",
234
234
  height: "5",
@@ -246,7 +246,7 @@ const __iconNode$46 = [
246
246
  key: "a56b0p"
247
247
  }]
248
248
  ];
249
- const Archive = createLucideIcon("archive", __iconNode$46);
249
+ const Archive = createLucideIcon("archive", __iconNode$42);
250
250
 
251
251
  //#endregion
252
252
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/arrow-up.mjs
@@ -256,14 +256,14 @@ const Archive = createLucideIcon("archive", __iconNode$46);
256
256
  * This source code is licensed under the ISC license.
257
257
  * See the LICENSE file in the root directory of this source tree.
258
258
  */
259
- const __iconNode$45 = [["path", {
259
+ const __iconNode$41 = [["path", {
260
260
  d: "m5 12 7-7 7 7",
261
261
  key: "hav0vg"
262
262
  }], ["path", {
263
263
  d: "M12 19V5",
264
264
  key: "x0mq9r"
265
265
  }]];
266
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$45);
266
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$41);
267
267
 
268
268
  //#endregion
269
269
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/bot.mjs
@@ -273,7 +273,7 @@ const ArrowUp = createLucideIcon("arrow-up", __iconNode$45);
273
273
  * This source code is licensed under the ISC license.
274
274
  * See the LICENSE file in the root directory of this source tree.
275
275
  */
276
- const __iconNode$44 = [
276
+ const __iconNode$40 = [
277
277
  ["path", {
278
278
  d: "M12 8V4H8",
279
279
  key: "hb8ula"
@@ -303,7 +303,7 @@ const __iconNode$44 = [
303
303
  key: "rq6x2g"
304
304
  }]
305
305
  ];
306
- const Bot = createLucideIcon("bot", __iconNode$44);
306
+ const Bot = createLucideIcon("bot", __iconNode$40);
307
307
 
308
308
  //#endregion
309
309
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/boxes.mjs
@@ -313,7 +313,7 @@ const Bot = createLucideIcon("bot", __iconNode$44);
313
313
  * This source code is licensed under the ISC license.
314
314
  * See the LICENSE file in the root directory of this source tree.
315
315
  */
316
- const __iconNode$43 = [
316
+ const __iconNode$39 = [
317
317
  ["path", {
318
318
  d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",
319
319
  key: "lc1i9w"
@@ -363,7 +363,7 @@ const __iconNode$43 = [
363
363
  key: "1io7kd"
364
364
  }]
365
365
  ];
366
- const Boxes = createLucideIcon("boxes", __iconNode$43);
366
+ const Boxes = createLucideIcon("boxes", __iconNode$39);
367
367
 
368
368
  //#endregion
369
369
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/check.mjs
@@ -373,11 +373,11 @@ const Boxes = createLucideIcon("boxes", __iconNode$43);
373
373
  * This source code is licensed under the ISC license.
374
374
  * See the LICENSE file in the root directory of this source tree.
375
375
  */
376
- const __iconNode$42 = [["path", {
376
+ const __iconNode$38 = [["path", {
377
377
  d: "M20 6 9 17l-5-5",
378
378
  key: "1gmf2c"
379
379
  }]];
380
- const Check = createLucideIcon("check", __iconNode$42);
380
+ const Check = createLucideIcon("check", __iconNode$38);
381
381
 
382
382
  //#endregion
383
383
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/chevron-down.mjs
@@ -387,11 +387,11 @@ const Check = createLucideIcon("check", __iconNode$42);
387
387
  * This source code is licensed under the ISC license.
388
388
  * See the LICENSE file in the root directory of this source tree.
389
389
  */
390
- const __iconNode$41 = [["path", {
390
+ const __iconNode$37 = [["path", {
391
391
  d: "m6 9 6 6 6-6",
392
392
  key: "qrunsl"
393
393
  }]];
394
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$41);
394
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$37);
395
395
 
396
396
  //#endregion
397
397
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/circle-check.mjs
@@ -401,7 +401,7 @@ const ChevronDown = createLucideIcon("chevron-down", __iconNode$41);
401
401
  * This source code is licensed under the ISC license.
402
402
  * See the LICENSE file in the root directory of this source tree.
403
403
  */
404
- const __iconNode$40 = [["circle", {
404
+ const __iconNode$36 = [["circle", {
405
405
  cx: "12",
406
406
  cy: "12",
407
407
  r: "10",
@@ -410,33 +410,7 @@ const __iconNode$40 = [["circle", {
410
410
  d: "m9 12 2 2 4-4",
411
411
  key: "dzmm74"
412
412
  }]];
413
- const CircleCheck = createLucideIcon("circle-check", __iconNode$40);
414
-
415
- //#endregion
416
- //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/circle-question-mark.mjs
417
- /**
418
- * @license lucide-react v1.27.0 - ISC
419
- *
420
- * This source code is licensed under the ISC license.
421
- * See the LICENSE file in the root directory of this source tree.
422
- */
423
- const __iconNode$39 = [
424
- ["circle", {
425
- cx: "12",
426
- cy: "12",
427
- r: "10",
428
- key: "1mglay"
429
- }],
430
- ["path", {
431
- d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",
432
- key: "1u773s"
433
- }],
434
- ["path", {
435
- d: "M12 17h.01",
436
- key: "p32p05"
437
- }]
438
- ];
439
- const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$39);
413
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$36);
440
414
 
441
415
  //#endregion
442
416
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/circle-x.mjs
@@ -446,7 +420,7 @@ const CircleQuestionMark = createLucideIcon("circle-question-mark", __iconNode$3
446
420
  * This source code is licensed under the ISC license.
447
421
  * See the LICENSE file in the root directory of this source tree.
448
422
  */
449
- const __iconNode$38 = [
423
+ const __iconNode$35 = [
450
424
  ["circle", {
451
425
  cx: "12",
452
426
  cy: "12",
@@ -462,48 +436,7 @@ const __iconNode$38 = [
462
436
  key: "z0biqf"
463
437
  }]
464
438
  ];
465
- const CircleX = createLucideIcon("circle-x", __iconNode$38);
466
-
467
- //#endregion
468
- //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/clipboard-list.mjs
469
- /**
470
- * @license lucide-react v1.27.0 - ISC
471
- *
472
- * This source code is licensed under the ISC license.
473
- * See the LICENSE file in the root directory of this source tree.
474
- */
475
- const __iconNode$37 = [
476
- ["rect", {
477
- width: "8",
478
- height: "4",
479
- x: "8",
480
- y: "2",
481
- rx: "1",
482
- ry: "1",
483
- key: "tgr4d6"
484
- }],
485
- ["path", {
486
- d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
487
- key: "116196"
488
- }],
489
- ["path", {
490
- d: "M12 11h4",
491
- key: "1jrz19"
492
- }],
493
- ["path", {
494
- d: "M12 16h4",
495
- key: "n85exb"
496
- }],
497
- ["path", {
498
- d: "M8 11h.01",
499
- key: "1dfujw"
500
- }],
501
- ["path", {
502
- d: "M8 16h.01",
503
- key: "18s6g9"
504
- }]
505
- ];
506
- const ClipboardList = createLucideIcon("clipboard-list", __iconNode$37);
439
+ const CircleX = createLucideIcon("circle-x", __iconNode$35);
507
440
 
508
441
  //#endregion
509
442
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/copy.mjs
@@ -513,7 +446,7 @@ const ClipboardList = createLucideIcon("clipboard-list", __iconNode$37);
513
446
  * This source code is licensed under the ISC license.
514
447
  * See the LICENSE file in the root directory of this source tree.
515
448
  */
516
- const __iconNode$36 = [["rect", {
449
+ const __iconNode$34 = [["rect", {
517
450
  width: "14",
518
451
  height: "14",
519
452
  x: "8",
@@ -525,7 +458,7 @@ const __iconNode$36 = [["rect", {
525
458
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
526
459
  key: "zix9uf"
527
460
  }]];
528
- const Copy = createLucideIcon("copy", __iconNode$36);
461
+ const Copy = createLucideIcon("copy", __iconNode$34);
529
462
 
530
463
  //#endregion
531
464
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/download.mjs
@@ -535,7 +468,7 @@ const Copy = createLucideIcon("copy", __iconNode$36);
535
468
  * This source code is licensed under the ISC license.
536
469
  * See the LICENSE file in the root directory of this source tree.
537
470
  */
538
- const __iconNode$35 = [
471
+ const __iconNode$33 = [
539
472
  ["path", {
540
473
  d: "M12 15V3",
541
474
  key: "m9g1x1"
@@ -549,7 +482,7 @@ const __iconNode$35 = [
549
482
  key: "brsn70"
550
483
  }]
551
484
  ];
552
- const Download = createLucideIcon("download", __iconNode$35);
485
+ const Download = createLucideIcon("download", __iconNode$33);
553
486
 
554
487
  //#endregion
555
488
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/ellipsis.mjs
@@ -559,7 +492,7 @@ const Download = createLucideIcon("download", __iconNode$35);
559
492
  * This source code is licensed under the ISC license.
560
493
  * See the LICENSE file in the root directory of this source tree.
561
494
  */
562
- const __iconNode$34 = [
495
+ const __iconNode$32 = [
563
496
  ["circle", {
564
497
  cx: "12",
565
498
  cy: "12",
@@ -579,7 +512,7 @@ const __iconNode$34 = [
579
512
  key: "1pcz8c"
580
513
  }]
581
514
  ];
582
- const Ellipsis = createLucideIcon("ellipsis", __iconNode$34);
515
+ const Ellipsis = createLucideIcon("ellipsis", __iconNode$32);
583
516
 
584
517
  //#endregion
585
518
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/external-link.mjs
@@ -589,7 +522,7 @@ const Ellipsis = createLucideIcon("ellipsis", __iconNode$34);
589
522
  * This source code is licensed under the ISC license.
590
523
  * See the LICENSE file in the root directory of this source tree.
591
524
  */
592
- const __iconNode$33 = [
525
+ const __iconNode$31 = [
593
526
  ["path", {
594
527
  d: "M15 3h6v6",
595
528
  key: "1q9fwt"
@@ -603,7 +536,7 @@ const __iconNode$33 = [
603
536
  key: "a6xqqp"
604
537
  }]
605
538
  ];
606
- const ExternalLink = createLucideIcon("external-link", __iconNode$33);
539
+ const ExternalLink = createLucideIcon("external-link", __iconNode$31);
607
540
 
608
541
  //#endregion
609
542
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/eye.mjs
@@ -613,7 +546,7 @@ const ExternalLink = createLucideIcon("external-link", __iconNode$33);
613
546
  * This source code is licensed under the ISC license.
614
547
  * See the LICENSE file in the root directory of this source tree.
615
548
  */
616
- const __iconNode$32 = [["path", {
549
+ const __iconNode$30 = [["path", {
617
550
  d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
618
551
  key: "1nclc0"
619
552
  }], ["circle", {
@@ -622,7 +555,7 @@ const __iconNode$32 = [["path", {
622
555
  r: "3",
623
556
  key: "1v7zrd"
624
557
  }]];
625
- const Eye = createLucideIcon("eye", __iconNode$32);
558
+ const Eye = createLucideIcon("eye", __iconNode$30);
626
559
 
627
560
  //#endregion
628
561
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/file.mjs
@@ -632,14 +565,14 @@ const Eye = createLucideIcon("eye", __iconNode$32);
632
565
  * This source code is licensed under the ISC license.
633
566
  * See the LICENSE file in the root directory of this source tree.
634
567
  */
635
- const __iconNode$31 = [["path", {
568
+ const __iconNode$29 = [["path", {
636
569
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
637
570
  key: "1oefj6"
638
571
  }], ["path", {
639
572
  d: "M14 2v5a1 1 0 0 0 1 1h5",
640
573
  key: "wfsgrz"
641
574
  }]];
642
- const File = createLucideIcon("file", __iconNode$31);
575
+ const File = createLucideIcon("file", __iconNode$29);
643
576
 
644
577
  //#endregion
645
578
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/hourglass.mjs
@@ -649,7 +582,7 @@ const File = createLucideIcon("file", __iconNode$31);
649
582
  * This source code is licensed under the ISC license.
650
583
  * See the LICENSE file in the root directory of this source tree.
651
584
  */
652
- const __iconNode$30 = [
585
+ const __iconNode$28 = [
653
586
  ["path", {
654
587
  d: "M5 22h14",
655
588
  key: "ehvnwv"
@@ -667,7 +600,7 @@ const __iconNode$30 = [
667
600
  key: "1vvvr6"
668
601
  }]
669
602
  ];
670
- const Hourglass = createLucideIcon("hourglass", __iconNode$30);
603
+ const Hourglass = createLucideIcon("hourglass", __iconNode$28);
671
604
 
672
605
  //#endregion
673
606
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/images.mjs
@@ -677,7 +610,7 @@ const Hourglass = createLucideIcon("hourglass", __iconNode$30);
677
610
  * This source code is licensed under the ISC license.
678
611
  * See the LICENSE file in the root directory of this source tree.
679
612
  */
680
- const __iconNode$29 = [
613
+ const __iconNode$27 = [
681
614
  ["path", {
682
615
  d: "m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",
683
616
  key: "9kzy35"
@@ -702,39 +635,7 @@ const __iconNode$29 = [
702
635
  key: "1gvhby"
703
636
  }]
704
637
  ];
705
- const Images = createLucideIcon("images", __iconNode$29);
706
-
707
- //#endregion
708
- //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/list-checks.mjs
709
- /**
710
- * @license lucide-react v1.27.0 - ISC
711
- *
712
- * This source code is licensed under the ISC license.
713
- * See the LICENSE file in the root directory of this source tree.
714
- */
715
- const __iconNode$28 = [
716
- ["path", {
717
- d: "M13 5h8",
718
- key: "a7qcls"
719
- }],
720
- ["path", {
721
- d: "M13 12h8",
722
- key: "h98zly"
723
- }],
724
- ["path", {
725
- d: "M13 19h8",
726
- key: "c3s6r1"
727
- }],
728
- ["path", {
729
- d: "m3 17 2 2 4-4",
730
- key: "1jhpwq"
731
- }],
732
- ["path", {
733
- d: "m3 7 2 2 4-4",
734
- key: "1obspn"
735
- }]
736
- ];
737
- const ListChecks = createLucideIcon("list-checks", __iconNode$28);
638
+ const Images = createLucideIcon("images", __iconNode$27);
738
639
 
739
640
  //#endregion
740
641
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/loader-circle.mjs
@@ -744,11 +645,11 @@ const ListChecks = createLucideIcon("list-checks", __iconNode$28);
744
645
  * This source code is licensed under the ISC license.
745
646
  * See the LICENSE file in the root directory of this source tree.
746
647
  */
747
- const __iconNode$27 = [["path", {
648
+ const __iconNode$26 = [["path", {
748
649
  d: "M21 12a9 9 0 1 1-6.219-8.56",
749
650
  key: "13zald"
750
651
  }]];
751
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$27);
652
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$26);
752
653
 
753
654
  //#endregion
754
655
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/menu.mjs
@@ -758,7 +659,7 @@ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$27);
758
659
  * This source code is licensed under the ISC license.
759
660
  * See the LICENSE file in the root directory of this source tree.
760
661
  */
761
- const __iconNode$26 = [
662
+ const __iconNode$25 = [
762
663
  ["path", {
763
664
  d: "M4 5h16",
764
665
  key: "1tepv9"
@@ -772,31 +673,7 @@ const __iconNode$26 = [
772
673
  key: "1djgab"
773
674
  }]
774
675
  ];
775
- const Menu$1 = createLucideIcon("menu", __iconNode$26);
776
-
777
- //#endregion
778
- //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/message-circle-question-mark.mjs
779
- /**
780
- * @license lucide-react v1.27.0 - ISC
781
- *
782
- * This source code is licensed under the ISC license.
783
- * See the LICENSE file in the root directory of this source tree.
784
- */
785
- const __iconNode$25 = [
786
- ["path", {
787
- d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
788
- key: "1sd12s"
789
- }],
790
- ["path", {
791
- d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",
792
- key: "1u773s"
793
- }],
794
- ["path", {
795
- d: "M12 17h.01",
796
- key: "p32p05"
797
- }]
798
- ];
799
- const MessageCircleQuestionMark = createLucideIcon("message-circle-question-mark", __iconNode$25);
676
+ const Menu$1 = createLucideIcon("menu", __iconNode$25);
800
677
 
801
678
  //#endregion
802
679
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/mic.mjs
@@ -875,7 +752,7 @@ const __iconNode$22 = [["path", {
875
752
  const Moon = createLucideIcon("moon", __iconNode$22);
876
753
 
877
754
  //#endregion
878
- //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/panel-right-open.mjs
755
+ //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/octagon-x.mjs
879
756
  /**
880
757
  * @license lucide-react v1.27.0 - ISC
881
758
  *
@@ -883,6 +760,30 @@ const Moon = createLucideIcon("moon", __iconNode$22);
883
760
  * See the LICENSE file in the root directory of this source tree.
884
761
  */
885
762
  const __iconNode$21 = [
763
+ ["path", {
764
+ d: "m15 9-6 6",
765
+ key: "1uzhvr"
766
+ }],
767
+ ["path", {
768
+ d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",
769
+ key: "2d38gg"
770
+ }],
771
+ ["path", {
772
+ d: "m9 9 6 6",
773
+ key: "z0biqf"
774
+ }]
775
+ ];
776
+ const OctagonX = createLucideIcon("octagon-x", __iconNode$21);
777
+
778
+ //#endregion
779
+ //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/panel-right-open.mjs
780
+ /**
781
+ * @license lucide-react v1.27.0 - ISC
782
+ *
783
+ * This source code is licensed under the ISC license.
784
+ * See the LICENSE file in the root directory of this source tree.
785
+ */
786
+ const __iconNode$20 = [
886
787
  ["rect", {
887
788
  width: "18",
888
789
  height: "18",
@@ -900,7 +801,7 @@ const __iconNode$21 = [
900
801
  key: "1pgupc"
901
802
  }]
902
803
  ];
903
- const PanelRightOpen = createLucideIcon("panel-right-open", __iconNode$21);
804
+ const PanelRightOpen = createLucideIcon("panel-right-open", __iconNode$20);
904
805
 
905
806
  //#endregion
906
807
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/paperclip.mjs
@@ -910,11 +811,11 @@ const PanelRightOpen = createLucideIcon("panel-right-open", __iconNode$21);
910
811
  * This source code is licensed under the ISC license.
911
812
  * See the LICENSE file in the root directory of this source tree.
912
813
  */
913
- const __iconNode$20 = [["path", {
814
+ const __iconNode$19 = [["path", {
914
815
  d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",
915
816
  key: "1miecu"
916
817
  }]];
917
- const Paperclip = createLucideIcon("paperclip", __iconNode$20);
818
+ const Paperclip = createLucideIcon("paperclip", __iconNode$19);
918
819
 
919
820
  //#endregion
920
821
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/pencil.mjs
@@ -924,14 +825,14 @@ const Paperclip = createLucideIcon("paperclip", __iconNode$20);
924
825
  * This source code is licensed under the ISC license.
925
826
  * See the LICENSE file in the root directory of this source tree.
926
827
  */
927
- const __iconNode$19 = [["path", {
828
+ const __iconNode$18 = [["path", {
928
829
  d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
929
830
  key: "1a8usu"
930
831
  }], ["path", {
931
832
  d: "m15 5 4 4",
932
833
  key: "1mk7zo"
933
834
  }]];
934
- const Pencil = createLucideIcon("pencil", __iconNode$19);
835
+ const Pencil = createLucideIcon("pencil", __iconNode$18);
935
836
 
936
837
  //#endregion
937
838
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/play.mjs
@@ -941,11 +842,11 @@ const Pencil = createLucideIcon("pencil", __iconNode$19);
941
842
  * This source code is licensed under the ISC license.
942
843
  * See the LICENSE file in the root directory of this source tree.
943
844
  */
944
- const __iconNode$18 = [["path", {
845
+ const __iconNode$17 = [["path", {
945
846
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
946
847
  key: "10ikf1"
947
848
  }]];
948
- const Play = createLucideIcon("play", __iconNode$18);
849
+ const Play = createLucideIcon("play", __iconNode$17);
949
850
 
950
851
  //#endregion
951
852
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/plug-zap.mjs
@@ -955,7 +856,7 @@ const Play = createLucideIcon("play", __iconNode$18);
955
856
  * This source code is licensed under the ISC license.
956
857
  * See the LICENSE file in the root directory of this source tree.
957
858
  */
958
- const __iconNode$17 = [
859
+ const __iconNode$16 = [
959
860
  ["path", {
960
861
  d: "M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",
961
862
  key: "goz73y"
@@ -977,7 +878,7 @@ const __iconNode$17 = [
977
878
  key: "16psg9"
978
879
  }]
979
880
  ];
980
- const PlugZap = createLucideIcon("plug-zap", __iconNode$17);
881
+ const PlugZap = createLucideIcon("plug-zap", __iconNode$16);
981
882
 
982
883
  //#endregion
983
884
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/plus.mjs
@@ -987,14 +888,14 @@ const PlugZap = createLucideIcon("plug-zap", __iconNode$17);
987
888
  * This source code is licensed under the ISC license.
988
889
  * See the LICENSE file in the root directory of this source tree.
989
890
  */
990
- const __iconNode$16 = [["path", {
891
+ const __iconNode$15 = [["path", {
991
892
  d: "M5 12h14",
992
893
  key: "1ays0h"
993
894
  }], ["path", {
994
895
  d: "M12 5v14",
995
896
  key: "s699le"
996
897
  }]];
997
- const Plus = createLucideIcon("plus", __iconNode$16);
898
+ const Plus = createLucideIcon("plus", __iconNode$15);
998
899
 
999
900
  //#endregion
1000
901
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/rotate-ccw-clock.mjs
@@ -1004,7 +905,7 @@ const Plus = createLucideIcon("plus", __iconNode$16);
1004
905
  * This source code is licensed under the ISC license.
1005
906
  * See the LICENSE file in the root directory of this source tree.
1006
907
  */
1007
- const __iconNode$15 = [
908
+ const __iconNode$14 = [
1008
909
  ["path", {
1009
910
  d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
1010
911
  key: "1357e3"
@@ -1018,7 +919,7 @@ const __iconNode$15 = [
1018
919
  key: "1fdv2h"
1019
920
  }]
1020
921
  ];
1021
- const RotateCcwClock = createLucideIcon("rotate-ccw-clock", __iconNode$15);
922
+ const RotateCcwClock = createLucideIcon("rotate-ccw-clock", __iconNode$14);
1022
923
 
1023
924
  //#endregion
1024
925
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/rotate-ccw.mjs
@@ -1028,14 +929,14 @@ const RotateCcwClock = createLucideIcon("rotate-ccw-clock", __iconNode$15);
1028
929
  * This source code is licensed under the ISC license.
1029
930
  * See the LICENSE file in the root directory of this source tree.
1030
931
  */
1031
- const __iconNode$14 = [["path", {
932
+ const __iconNode$13 = [["path", {
1032
933
  d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
1033
934
  key: "1357e3"
1034
935
  }], ["path", {
1035
936
  d: "M3 3v5h5",
1036
937
  key: "1xhq8a"
1037
938
  }]];
1038
- const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$14);
939
+ const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$13);
1039
940
 
1040
941
  //#endregion
1041
942
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/search.mjs
@@ -1045,7 +946,7 @@ const RotateCcw = createLucideIcon("rotate-ccw", __iconNode$14);
1045
946
  * This source code is licensed under the ISC license.
1046
947
  * See the LICENSE file in the root directory of this source tree.
1047
948
  */
1048
- const __iconNode$13 = [["path", {
949
+ const __iconNode$12 = [["path", {
1049
950
  d: "m21 21-4.34-4.34",
1050
951
  key: "14j7rj"
1051
952
  }], ["circle", {
@@ -1054,7 +955,7 @@ const __iconNode$13 = [["path", {
1054
955
  r: "8",
1055
956
  key: "4ej97u"
1056
957
  }]];
1057
- const Search = createLucideIcon("search", __iconNode$13);
958
+ const Search = createLucideIcon("search", __iconNode$12);
1058
959
 
1059
960
  //#endregion
1060
961
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/settings.mjs
@@ -1064,7 +965,7 @@ const Search = createLucideIcon("search", __iconNode$13);
1064
965
  * This source code is licensed under the ISC license.
1065
966
  * See the LICENSE file in the root directory of this source tree.
1066
967
  */
1067
- const __iconNode$12 = [["path", {
968
+ const __iconNode$11 = [["path", {
1068
969
  d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
1069
970
  key: "1i5ecw"
1070
971
  }], ["circle", {
@@ -1073,31 +974,7 @@ const __iconNode$12 = [["path", {
1073
974
  r: "3",
1074
975
  key: "1v7zrd"
1075
976
  }]];
1076
- const Settings = createLucideIcon("settings", __iconNode$12);
1077
-
1078
- //#endregion
1079
- //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/shield-alert.mjs
1080
- /**
1081
- * @license lucide-react v1.27.0 - ISC
1082
- *
1083
- * This source code is licensed under the ISC license.
1084
- * See the LICENSE file in the root directory of this source tree.
1085
- */
1086
- const __iconNode$11 = [
1087
- ["path", {
1088
- d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
1089
- key: "oel41y"
1090
- }],
1091
- ["path", {
1092
- d: "M12 8v4",
1093
- key: "1got3b"
1094
- }],
1095
- ["path", {
1096
- d: "M12 16h.01",
1097
- key: "1drbdi"
1098
- }]
1099
- ];
1100
- const ShieldAlert = createLucideIcon("shield-alert", __iconNode$11);
977
+ const Settings = createLucideIcon("settings", __iconNode$11);
1101
978
 
1102
979
  //#endregion
1103
980
  //#region ../../node_modules/.pnpm/lucide-react@1.27.0_react@19.2.8/node_modules/lucide-react/dist/esm/icons/shield-check.mjs
@@ -1389,13 +1266,13 @@ const X = createLucideIcon("x", __iconNode);
1389
1266
 
1390
1267
  //#endregion
1391
1268
  //#region ../ui-kit/src/components/Button.tsx
1392
- const variantClasses = {
1269
+ const variantClasses$1 = {
1393
1270
  primary: "bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80 shadow-sm disabled:opacity-50",
1394
1271
  secondary: "bg-surface text-ink border border-border hover:bg-subtle dark:bg-subtle dark:hover:bg-surface",
1395
1272
  ghost: "text-muted hover:bg-subtle hover:text-ink",
1396
1273
  danger: "bg-destructive text-destructive-foreground hover:bg-destructive/90 shadow-sm disabled:opacity-60"
1397
1274
  };
1398
- const sizeClasses$1 = {
1275
+ const sizeClasses$2 = {
1399
1276
  sm: "h-7 px-2.5 text-xs gap-1.5 rounded-md",
1400
1277
  md: "h-9 px-3.5 text-sm gap-2 rounded-lg"
1401
1278
  };
@@ -1403,7 +1280,7 @@ function Button({ variant = "primary", size = "md", loading = false, icon, disab
1403
1280
  return /* @__PURE__ */ jsxs("button", {
1404
1281
  type,
1405
1282
  disabled: disabled || loading,
1406
- className: `inline-flex cursor-pointer items-center justify-center font-medium transition-colors select-none disabled:cursor-not-allowed ${variantClasses[variant]} ${sizeClasses$1[size]} ${className}`,
1283
+ className: `inline-flex cursor-pointer items-center justify-center font-medium transition-colors select-none disabled:cursor-not-allowed ${variantClasses$1[variant]} ${sizeClasses$2[size]} ${className}`,
1407
1284
  ...rest,
1408
1285
  children: [loading ? /* @__PURE__ */ jsx(LoaderCircle, {
1409
1286
  className: "size-4 animate-spin",
@@ -1412,14 +1289,86 @@ function Button({ variant = "primary", size = "md", loading = false, icon, disab
1412
1289
  });
1413
1290
  }
1414
1291
 
1292
+ //#endregion
1293
+ //#region ../ui-kit/src/components/IconButton.tsx
1294
+ const variantClasses = {
1295
+ ghost: "text-muted hover:bg-subtle hover:text-ink",
1296
+ secondary: "border border-border bg-surface text-ink hover:bg-subtle",
1297
+ danger: "text-destructive hover:bg-destructive-soft"
1298
+ };
1299
+ const sizeClasses$1 = {
1300
+ sm: "size-7",
1301
+ md: "size-9"
1302
+ };
1303
+ /**
1304
+ * Accessible icon-only command button with a native hover label.
1305
+ *
1306
+ * 基类锁定 `rounded`(className 覆盖不生效):与 `Button` 的圆角体系一致。
1307
+ */
1308
+ function IconButton({ label, children, variant = "ghost", size = "md", className = "", type = "button", ...props }) {
1309
+ return /* @__PURE__ */ jsx("button", {
1310
+ type,
1311
+ "aria-label": label,
1312
+ title: label,
1313
+ className: `inline-flex cursor-pointer items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 ${variantClasses[variant]} ${sizeClasses$1[size]} ${className}`,
1314
+ ...props,
1315
+ children
1316
+ });
1317
+ }
1318
+
1319
+ //#endregion
1320
+ //#region ../ui-kit/src/components/CopyButton.tsx
1321
+ /**
1322
+ * 全仓唯一一份复制到剪贴板的状态机(S12)。
1323
+ * `copied` 为真时忽略重复点击,`resetDelayMs` 后自动复位。
1324
+ */
1325
+ function useCopyToClipboard(resetDelayMs = 2e3) {
1326
+ const [copied, setCopied] = useState(false);
1327
+ return {
1328
+ copied,
1329
+ copy: useCallback((value) => {
1330
+ if (copied || value === "") return;
1331
+ navigator.clipboard.writeText(value).then(() => {
1332
+ setCopied(true);
1333
+ setTimeout(() => setCopied(false), resetDelayMs);
1334
+ });
1335
+ }, [copied, resetDelayMs])
1336
+ };
1337
+ }
1338
+ /** 图标形态的复制按钮,复制成功后短暂显示已复制态。 */
1339
+ function CopyButton({ value, label, copiedLabel, className = "" }) {
1340
+ const { copied, copy } = useCopyToClipboard();
1341
+ return /* @__PURE__ */ jsx(IconButton, {
1342
+ label: copied ? copiedLabel : label,
1343
+ size: "sm",
1344
+ className,
1345
+ onClick: () => {
1346
+ copy(value);
1347
+ },
1348
+ children: copied ? /* @__PURE__ */ jsx(Check, {
1349
+ className: "size-3.5",
1350
+ "aria-hidden": true
1351
+ }) : /* @__PURE__ */ jsx(Copy, {
1352
+ className: "size-3.5",
1353
+ "aria-hidden": true
1354
+ })
1355
+ });
1356
+ }
1357
+
1415
1358
  //#endregion
1416
1359
  //#region ../ui-kit/src/components/Input.tsx
1417
- /** Source-owned input with a consistent form-control and validation surface. */
1360
+ /**
1361
+ * Source-owned input with a consistent form-control and validation surface.
1362
+ *
1363
+ * 宽/高/内边距的默认值在 `.webskill-input`(components 层),消费方的 `w-*` / `h-*` / `px-*` 能确定性地压过它;
1364
+ * 写在基类里则同层同特异性,全仓已有 8 个文件因此静默失效。
1365
+ * 基类锁定 `rounded`(className 覆盖不生效):表单控件圆角体系统一。
1366
+ */
1418
1367
  function Input({ className = "", invalid = false, type = "text", "aria-invalid": ariaInvalid, ...props }) {
1419
1368
  return /* @__PURE__ */ jsx("input", {
1420
1369
  type,
1421
1370
  "aria-invalid": invalid ? true : ariaInvalid,
1422
- className: `h-9 w-full rounded-md border bg-surface px-3 text-sm text-ink shadow-xs outline-none transition-colors placeholder:text-muted disabled:cursor-not-allowed disabled:opacity-50 ${invalid ? "border-destructive focus-visible:ring-destructive/20" : "border-input focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20"} ${className}`,
1371
+ className: `webskill-input rounded-md border bg-surface text-sm text-ink shadow-xs outline-none transition-colors placeholder:text-muted disabled:cursor-not-allowed disabled:opacity-50 ${invalid ? "border-destructive focus-visible:ring-destructive/20" : "border-input focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20"} ${className}`,
1423
1372
  ...props
1424
1373
  });
1425
1374
  }
@@ -2294,7 +2243,11 @@ __name$18(getState$2, "getState");
2294
2243
 
2295
2244
  //#endregion
2296
2245
  //#region ../ui-kit/src/components/Switch.tsx
2297
- /** Source-owned shadcn-style switch backed by Radix keyboard semantics. */
2246
+ /**
2247
+ * Source-owned shadcn-style switch backed by Radix keyboard semantics.
2248
+ *
2249
+ * 基类锁定 `w` `h` `p` `rounded`(className 覆盖不生效):轨道与滑块尺寸互相计算,任改一项即错位。
2250
+ */
2298
2251
  function Switch({ className = "", label, ...props }) {
2299
2252
  const control = /* @__PURE__ */ jsx(Switch$1, {
2300
2253
  className: `inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full bg-border p-0.5 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary ${className}`,
@@ -7122,6 +7075,7 @@ function ThemeScope({ theme, className = "", children, ref, ...props }) {
7122
7075
  //#endregion
7123
7076
  //#region ../ui-kit/src/components/DropdownMenu.tsx
7124
7077
  const DropdownMenu = Root2;
7078
+ /** 基类锁定 `h` `p` `rounded`(className 覆盖不生效):触发器与 `Button` 保持同高。 */
7125
7079
  function DropdownMenuTrigger({ children, className = "", asChild, ...props }) {
7126
7080
  const triggerClass = asChild ? className : `inline-flex h-9 items-center justify-center rounded-md border border-border bg-surface px-3 text-sm font-medium text-ink shadow-xs outline-none transition-colors hover:bg-subtle focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20 ${className}`;
7127
7081
  return /* @__PURE__ */ jsx(Trigger$1, {
@@ -7131,6 +7085,7 @@ function DropdownMenuTrigger({ children, className = "", asChild, ...props }) {
7131
7085
  children
7132
7086
  });
7133
7087
  }
7088
+ /** 基类锁定 `p` `rounded`(className 覆盖不生效):菜单项几何。 */
7134
7089
  function DropdownMenuItem({ children, className = "", ...props }) {
7135
7090
  return /* @__PURE__ */ jsx(Item2, {
7136
7091
  className: `flex cursor-pointer items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[highlighted]:bg-subtle data-[disabled]:pointer-events-none data-[disabled]:opacity-50 ${className}`,
@@ -7138,17 +7093,22 @@ function DropdownMenuItem({ children, className = "", ...props }) {
7138
7093
  children
7139
7094
  });
7140
7095
  }
7096
+ /**
7097
+ * 浮层宽度下限默认值在 `.webskill-dropdown-content`(components 层),消费方的 `min-w-*` 能确定性地压过它。
7098
+ * 基类锁定 `p` `rounded` `z`(className 覆盖不生效):`z-50` 属 ui-kit 的整体层级契约,逐个覆盖会让层级关系变成运气。
7099
+ */
7141
7100
  function DropdownMenuContent({ children, className = "", sideOffset = 6, ...props }) {
7142
7101
  return /* @__PURE__ */ jsx(Portal2, {
7143
7102
  container: usePortalContainer(),
7144
7103
  children: /* @__PURE__ */ jsx(Content2$1, {
7145
7104
  sideOffset,
7146
- className: `z-50 min-w-40 rounded-md border border-border bg-surface p-1 text-sm text-ink shadow-pop outline-none ${className}`,
7105
+ className: `webskill-dropdown-content z-50 rounded-md border border-border bg-surface p-1 text-sm text-ink shadow-pop outline-none ${className}`,
7147
7106
  ...props,
7148
7107
  children
7149
7108
  })
7150
7109
  });
7151
7110
  }
7111
+ /** 基类锁定 `p` `rounded`(className 覆盖不生效):左内边距与勾选标记位置耦合。 */
7152
7112
  function DropdownMenuCheckboxItem({ children, className = "", ...props }) {
7153
7113
  return /* @__PURE__ */ jsxs(CheckboxItem2, {
7154
7114
  className: `relative flex cursor-pointer items-center rounded-sm py-1.5 pr-2 pl-7 text-sm outline-none transition-colors data-[highlighted]:bg-subtle data-[disabled]:pointer-events-none data-[disabled]:opacity-50 ${className}`,
@@ -7428,19 +7388,44 @@ var Root$1 = VisuallyHidden;
7428
7388
  //#endregion
7429
7389
  //#region ../ui-kit/src/components/Sheet.tsx
7430
7390
  const Sheet = Dialog$1;
7431
- /** Source-owned shadcn-style Sheet backed by Radix Dialog for focus management. */
7432
- function SheetContent({ children, className = "", side = "right", title, ...props }) {
7391
+ /** 尺寸档位 宽度值。档位之外的宽度传 `className`(优先级见本文件头部)。 */
7392
+ const SHEET_WIDTHS = {
7393
+ sm: "min(22rem, calc(100vw - 2rem))",
7394
+ md: "min(32rem, calc(100vw - 2rem))",
7395
+ lg: "min(44rem, calc(100vw - 2rem))"
7396
+ };
7397
+ /**
7398
+ * Source-owned shadcn-style Sheet backed by Radix Dialog for focus management.
7399
+ *
7400
+ * 宽度三档定序,不存在平局:
7401
+ * `size`(行内变量)> `className` 的 `w-*`(utilities 层)> 默认值(components 层)。
7402
+ * 基类里**不得**再出现 `w-` 工具类——那会与消费方的宽度类同层同特异性,
7403
+ * 胜负只看产物顺序,而产物顺序不是消费方能控制的。
7404
+ *
7405
+ * 基类锁定 `z`(className 覆盖不生效):浮层层级是 ui-kit 的整体契约。
7406
+ */
7407
+ function SheetContent({ children, className = "", side = "right", title, size, style, ...props }) {
7433
7408
  const positionClass = side === "left" ? "inset-y-0 left-0 border-r" : "inset-y-0 right-0 border-l";
7409
+ const gutterClass = side === "left" ? "left-full" : "right-full";
7434
7410
  return /* @__PURE__ */ jsxs(DialogPortal, {
7435
7411
  container: usePortalContainer(),
7436
7412
  children: [/* @__PURE__ */ jsx(DialogOverlay, { className: "fixed inset-0 z-50 bg-ink/35 backdrop-blur-[1px]" }), /* @__PURE__ */ jsxs(DialogContent, {
7437
- className: `fixed z-50 flex w-[min(22rem,calc(100vw-2rem))] flex-col bg-surface text-ink shadow-pop outline-none ${positionClass} ${className}`,
7413
+ className: `webskill-sheet-content fixed z-50 flex flex-col bg-surface text-ink shadow-pop outline-none ${positionClass} ${className}`,
7414
+ style: size === void 0 ? style : {
7415
+ ...style,
7416
+ "--webskill-sheet-width": SHEET_WIDTHS[size]
7417
+ },
7438
7418
  ...props,
7439
7419
  children: [
7440
7420
  /* @__PURE__ */ jsx(DialogTitle, {
7441
7421
  className: "sr-only",
7442
7422
  children: title
7443
7423
  }),
7424
+ /* @__PURE__ */ jsx(DialogClose, {
7425
+ "aria-label": "Dismiss panel",
7426
+ tabIndex: -1,
7427
+ className: `absolute inset-y-0 w-screen cursor-default ${gutterClass}`
7428
+ }),
7444
7429
  children,
7445
7430
  /* @__PURE__ */ jsx(DialogClose, {
7446
7431
  "aria-label": "Close panel",
@@ -7457,15 +7442,27 @@ function SheetContent({ children, className = "", side = "right", title, ...prop
7457
7442
 
7458
7443
  //#endregion
7459
7444
  //#region ../ui-kit/src/components/Dialog.tsx
7460
- /** Source-owned shadcn-style dialog backed by Radix focus trap and dismiss behavior. */
7461
- function Dialog({ open, onClose, title, description, footer, hideCloseButton = false, className = "", children }) {
7445
+ const DIALOG_WIDTHS = {
7446
+ sm: "min(100% - 2rem, 24rem)",
7447
+ md: "min(100% - 2rem, 32rem)",
7448
+ lg: "min(100% - 2rem, 44rem)"
7449
+ };
7450
+ /**
7451
+ * Source-owned shadcn-style dialog backed by Radix focus trap and dismiss behavior.
7452
+ *
7453
+ * 宽度机制同 `SheetContent`。
7454
+ * 基类锁定 `h` `rounded` `z`(className 覆盖不生效):
7455
+ * `max-h` 是视口上限,圆角与层级属 ui-kit 的整体契约。
7456
+ */
7457
+ function Dialog({ open, onClose, title, description, footer, hideCloseButton = false, className = "", size, children }) {
7462
7458
  return /* @__PURE__ */ jsx(Dialog$1, {
7463
7459
  open,
7464
7460
  onOpenChange: (nextOpen) => !nextOpen && onClose(),
7465
7461
  children: /* @__PURE__ */ jsxs(DialogPortal, {
7466
7462
  container: usePortalContainer(),
7467
7463
  children: [/* @__PURE__ */ jsx(DialogOverlay, { className: "fixed inset-0 z-50 bg-foreground/45" }), /* @__PURE__ */ jsxs(DialogContent, {
7468
- className: `fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[min(100%-2rem,32rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-card border border-border bg-surface shadow-pop outline-none ${className}`,
7464
+ className: `webskill-dialog-content fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-card border border-border bg-surface shadow-pop outline-none ${className}`,
7465
+ ...size !== void 0 ? { style: { "--webskill-dialog-width": DIALOG_WIDTHS[size] } } : {},
7469
7466
  children: [
7470
7467
  /* @__PURE__ */ jsxs("div", {
7471
7468
  className: "flex items-start justify-between gap-4 border-b border-border px-5 py-4",
@@ -11058,6 +11055,7 @@ const toneClasses = {
11058
11055
  info: "bg-info-soft text-info",
11059
11056
  danger: "bg-destructive-soft text-destructive"
11060
11057
  };
11058
+ /** 基类锁定 `p` `rounded`(className 覆盖不生效):药丸形状是组件身份,要换形状请换组件。 */
11061
11059
  function Badge({ tone = "neutral", className = "", children, ...rest }) {
11062
11060
  return /* @__PURE__ */ jsx("span", {
11063
11061
  className: `inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium ${toneClasses[tone]} ${className}`,
@@ -11565,7 +11563,11 @@ var Arrow2 = TooltipArrow;
11565
11563
 
11566
11564
  //#endregion
11567
11565
  //#region ../ui-kit/src/components/Tooltip.tsx
11568
- /** Source-owned shadcn-style tooltip backed by Radix hover and focus behavior. */
11566
+ /**
11567
+ * Source-owned shadcn-style tooltip backed by Radix hover and focus behavior.
11568
+ *
11569
+ * 基类锁定 `p` `rounded` `z`(className 覆盖不生效):气泡几何固定,层级同上。
11570
+ */
11569
11571
  function Tooltip({ content, side = "top", className = "", hidden = false, children }) {
11570
11572
  const container = usePortalContainer();
11571
11573
  if (hidden) return /* @__PURE__ */ jsx(Fragment$1, { children });
@@ -11779,7 +11781,7 @@ function SettingsPanel({ sections, activeId, onActiveChange, variant = "sidebar"
11779
11781
  "data-settings-content": active?.id ?? "",
11780
11782
  className: cn("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto", variant === "sidebar" && "p-4"),
11781
11783
  children: active?.render()
11782
- });
11784
+ }, active?.id ?? "");
11783
11785
  if (variant === "content-only") return /* @__PURE__ */ jsx("div", {
11784
11786
  className: cn("flex min-h-0 flex-col", className),
11785
11787
  children: content
@@ -11839,6 +11841,39 @@ function Select({ options, value, onChange, placeholder, disabled = false, id, l
11839
11841
  });
11840
11842
  }
11841
11843
 
11844
+ //#endregion
11845
+ //#region ../ui-kit/src/components/SearchInput.tsx
11846
+ function SearchInput({ value, onChange, placeholder = "Search…", id, className = "", clearLabel = "Clear search" }) {
11847
+ return /* @__PURE__ */ jsxs("span", {
11848
+ className: `relative inline-flex items-center ${className}`,
11849
+ children: [
11850
+ /* @__PURE__ */ jsx(Search, {
11851
+ className: "pointer-events-none absolute left-2.5 size-4 text-muted",
11852
+ "aria-hidden": true
11853
+ }),
11854
+ /* @__PURE__ */ jsx("input", {
11855
+ id,
11856
+ type: "search",
11857
+ role: "searchbox",
11858
+ value,
11859
+ placeholder,
11860
+ onChange: (event) => onChange(event.target.value),
11861
+ className: "h-9 w-full rounded-lg border border-border bg-surface pr-8 pl-8 text-sm text-ink transition-colors placeholder:text-muted hover:border-ring [&::-webkit-search-cancel-button]:hidden"
11862
+ }),
11863
+ value !== "" && /* @__PURE__ */ jsx("button", {
11864
+ type: "button",
11865
+ "aria-label": clearLabel,
11866
+ onClick: () => onChange(""),
11867
+ className: "absolute right-2 cursor-pointer rounded-md p-0.5 text-muted transition-colors hover:text-ink",
11868
+ children: /* @__PURE__ */ jsx(X, {
11869
+ className: "size-3.5",
11870
+ "aria-hidden": true
11871
+ })
11872
+ })
11873
+ ]
11874
+ });
11875
+ }
11876
+
11842
11877
  //#endregion
11843
11878
  //#region ../ui-kit/src/components/DescriptionText.tsx
11844
11879
  function DescriptionText({ title, description, learnMoreHref, className = "" }) {
@@ -28602,570 +28637,6 @@ function defaultUrlTransform(value) {
28602
28637
  return "";
28603
28638
  }
28604
28639
 
28605
- //#endregion
28606
- //#region ../../node_modules/.pnpm/react-syntax-highlighter@16.1.1_react@19.2.8/node_modules/react-syntax-highlighter/dist/esm/styles/prism/one-dark.js
28607
- var one_dark_default = {
28608
- "code[class*=\"language-\"]": {
28609
- "background": "hsl(220, 13%, 18%)",
28610
- "color": "hsl(220, 14%, 71%)",
28611
- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",
28612
- "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",
28613
- "direction": "ltr",
28614
- "textAlign": "left",
28615
- "whiteSpace": "pre",
28616
- "wordSpacing": "normal",
28617
- "wordBreak": "normal",
28618
- "lineHeight": "1.5",
28619
- "MozTabSize": "2",
28620
- "OTabSize": "2",
28621
- "tabSize": "2",
28622
- "WebkitHyphens": "none",
28623
- "MozHyphens": "none",
28624
- "msHyphens": "none",
28625
- "hyphens": "none"
28626
- },
28627
- "pre[class*=\"language-\"]": {
28628
- "background": "hsl(220, 13%, 18%)",
28629
- "color": "hsl(220, 14%, 71%)",
28630
- "textShadow": "0 1px rgba(0, 0, 0, 0.3)",
28631
- "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",
28632
- "direction": "ltr",
28633
- "textAlign": "left",
28634
- "whiteSpace": "pre",
28635
- "wordSpacing": "normal",
28636
- "wordBreak": "normal",
28637
- "lineHeight": "1.5",
28638
- "MozTabSize": "2",
28639
- "OTabSize": "2",
28640
- "tabSize": "2",
28641
- "WebkitHyphens": "none",
28642
- "MozHyphens": "none",
28643
- "msHyphens": "none",
28644
- "hyphens": "none",
28645
- "padding": "1em",
28646
- "margin": "0.5em 0",
28647
- "overflow": "auto",
28648
- "borderRadius": "0.3em"
28649
- },
28650
- "code[class*=\"language-\"]::-moz-selection": {
28651
- "background": "hsl(220, 13%, 28%)",
28652
- "color": "inherit",
28653
- "textShadow": "none"
28654
- },
28655
- "code[class*=\"language-\"] *::-moz-selection": {
28656
- "background": "hsl(220, 13%, 28%)",
28657
- "color": "inherit",
28658
- "textShadow": "none"
28659
- },
28660
- "pre[class*=\"language-\"] *::-moz-selection": {
28661
- "background": "hsl(220, 13%, 28%)",
28662
- "color": "inherit",
28663
- "textShadow": "none"
28664
- },
28665
- "code[class*=\"language-\"]::selection": {
28666
- "background": "hsl(220, 13%, 28%)",
28667
- "color": "inherit",
28668
- "textShadow": "none"
28669
- },
28670
- "code[class*=\"language-\"] *::selection": {
28671
- "background": "hsl(220, 13%, 28%)",
28672
- "color": "inherit",
28673
- "textShadow": "none"
28674
- },
28675
- "pre[class*=\"language-\"] *::selection": {
28676
- "background": "hsl(220, 13%, 28%)",
28677
- "color": "inherit",
28678
- "textShadow": "none"
28679
- },
28680
- ":not(pre) > code[class*=\"language-\"]": {
28681
- "padding": "0.2em 0.3em",
28682
- "borderRadius": "0.3em",
28683
- "whiteSpace": "normal"
28684
- },
28685
- "comment": {
28686
- "color": "hsl(220, 10%, 40%)",
28687
- "fontStyle": "italic"
28688
- },
28689
- "prolog": { "color": "hsl(220, 10%, 40%)" },
28690
- "cdata": { "color": "hsl(220, 10%, 40%)" },
28691
- "doctype": { "color": "hsl(220, 14%, 71%)" },
28692
- "punctuation": { "color": "hsl(220, 14%, 71%)" },
28693
- "entity": {
28694
- "color": "hsl(220, 14%, 71%)",
28695
- "cursor": "help"
28696
- },
28697
- "attr-name": { "color": "hsl(29, 54%, 61%)" },
28698
- "class-name": { "color": "hsl(29, 54%, 61%)" },
28699
- "boolean": { "color": "hsl(29, 54%, 61%)" },
28700
- "constant": { "color": "hsl(29, 54%, 61%)" },
28701
- "number": { "color": "hsl(29, 54%, 61%)" },
28702
- "atrule": { "color": "hsl(29, 54%, 61%)" },
28703
- "keyword": { "color": "hsl(286, 60%, 67%)" },
28704
- "property": { "color": "hsl(355, 65%, 65%)" },
28705
- "tag": { "color": "hsl(355, 65%, 65%)" },
28706
- "symbol": { "color": "hsl(355, 65%, 65%)" },
28707
- "deleted": { "color": "hsl(355, 65%, 65%)" },
28708
- "important": { "color": "hsl(355, 65%, 65%)" },
28709
- "selector": { "color": "hsl(95, 38%, 62%)" },
28710
- "string": { "color": "hsl(95, 38%, 62%)" },
28711
- "char": { "color": "hsl(95, 38%, 62%)" },
28712
- "builtin": { "color": "hsl(95, 38%, 62%)" },
28713
- "inserted": { "color": "hsl(95, 38%, 62%)" },
28714
- "regex": { "color": "hsl(95, 38%, 62%)" },
28715
- "attr-value": { "color": "hsl(95, 38%, 62%)" },
28716
- "attr-value > .token.punctuation": { "color": "hsl(95, 38%, 62%)" },
28717
- "variable": { "color": "hsl(207, 82%, 66%)" },
28718
- "operator": { "color": "hsl(207, 82%, 66%)" },
28719
- "function": { "color": "hsl(207, 82%, 66%)" },
28720
- "url": { "color": "hsl(187, 47%, 55%)" },
28721
- "attr-value > .token.punctuation.attr-equals": { "color": "hsl(220, 14%, 71%)" },
28722
- "special-attr > .token.attr-value > .token.value.css": { "color": "hsl(220, 14%, 71%)" },
28723
- ".language-css .token.selector": { "color": "hsl(355, 65%, 65%)" },
28724
- ".language-css .token.property": { "color": "hsl(220, 14%, 71%)" },
28725
- ".language-css .token.function": { "color": "hsl(187, 47%, 55%)" },
28726
- ".language-css .token.url > .token.function": { "color": "hsl(187, 47%, 55%)" },
28727
- ".language-css .token.url > .token.string.url": { "color": "hsl(95, 38%, 62%)" },
28728
- ".language-css .token.important": { "color": "hsl(286, 60%, 67%)" },
28729
- ".language-css .token.atrule .token.rule": { "color": "hsl(286, 60%, 67%)" },
28730
- ".language-javascript .token.operator": { "color": "hsl(286, 60%, 67%)" },
28731
- ".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation": { "color": "hsl(5, 48%, 51%)" },
28732
- ".language-json .token.operator": { "color": "hsl(220, 14%, 71%)" },
28733
- ".language-json .token.null.keyword": { "color": "hsl(29, 54%, 61%)" },
28734
- ".language-markdown .token.url": { "color": "hsl(220, 14%, 71%)" },
28735
- ".language-markdown .token.url > .token.operator": { "color": "hsl(220, 14%, 71%)" },
28736
- ".language-markdown .token.url-reference.url > .token.string": { "color": "hsl(220, 14%, 71%)" },
28737
- ".language-markdown .token.url > .token.content": { "color": "hsl(207, 82%, 66%)" },
28738
- ".language-markdown .token.url > .token.url": { "color": "hsl(187, 47%, 55%)" },
28739
- ".language-markdown .token.url-reference.url": { "color": "hsl(187, 47%, 55%)" },
28740
- ".language-markdown .token.blockquote.punctuation": {
28741
- "color": "hsl(220, 10%, 40%)",
28742
- "fontStyle": "italic"
28743
- },
28744
- ".language-markdown .token.hr.punctuation": {
28745
- "color": "hsl(220, 10%, 40%)",
28746
- "fontStyle": "italic"
28747
- },
28748
- ".language-markdown .token.code-snippet": { "color": "hsl(95, 38%, 62%)" },
28749
- ".language-markdown .token.bold .token.content": { "color": "hsl(29, 54%, 61%)" },
28750
- ".language-markdown .token.italic .token.content": { "color": "hsl(286, 60%, 67%)" },
28751
- ".language-markdown .token.strike .token.content": { "color": "hsl(355, 65%, 65%)" },
28752
- ".language-markdown .token.strike .token.punctuation": { "color": "hsl(355, 65%, 65%)" },
28753
- ".language-markdown .token.list.punctuation": { "color": "hsl(355, 65%, 65%)" },
28754
- ".language-markdown .token.title.important > .token.punctuation": { "color": "hsl(355, 65%, 65%)" },
28755
- "bold": { "fontWeight": "bold" },
28756
- "italic": { "fontStyle": "italic" },
28757
- "namespace": { "Opacity": "0.8" },
28758
- "token.tab:not(:empty):before": {
28759
- "color": "hsla(220, 14%, 71%, 0.15)",
28760
- "textShadow": "none"
28761
- },
28762
- "token.cr:before": {
28763
- "color": "hsla(220, 14%, 71%, 0.15)",
28764
- "textShadow": "none"
28765
- },
28766
- "token.lf:before": {
28767
- "color": "hsla(220, 14%, 71%, 0.15)",
28768
- "textShadow": "none"
28769
- },
28770
- "token.space:before": {
28771
- "color": "hsla(220, 14%, 71%, 0.15)",
28772
- "textShadow": "none"
28773
- },
28774
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item": { "marginRight": "0.4em" },
28775
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button": {
28776
- "background": "hsl(220, 13%, 26%)",
28777
- "color": "hsl(220, 9%, 55%)",
28778
- "padding": "0.1em 0.4em",
28779
- "borderRadius": "0.3em"
28780
- },
28781
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a": {
28782
- "background": "hsl(220, 13%, 26%)",
28783
- "color": "hsl(220, 9%, 55%)",
28784
- "padding": "0.1em 0.4em",
28785
- "borderRadius": "0.3em"
28786
- },
28787
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span": {
28788
- "background": "hsl(220, 13%, 26%)",
28789
- "color": "hsl(220, 9%, 55%)",
28790
- "padding": "0.1em 0.4em",
28791
- "borderRadius": "0.3em"
28792
- },
28793
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover": {
28794
- "background": "hsl(220, 13%, 28%)",
28795
- "color": "hsl(220, 14%, 71%)"
28796
- },
28797
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus": {
28798
- "background": "hsl(220, 13%, 28%)",
28799
- "color": "hsl(220, 14%, 71%)"
28800
- },
28801
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover": {
28802
- "background": "hsl(220, 13%, 28%)",
28803
- "color": "hsl(220, 14%, 71%)"
28804
- },
28805
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus": {
28806
- "background": "hsl(220, 13%, 28%)",
28807
- "color": "hsl(220, 14%, 71%)"
28808
- },
28809
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover": {
28810
- "background": "hsl(220, 13%, 28%)",
28811
- "color": "hsl(220, 14%, 71%)"
28812
- },
28813
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus": {
28814
- "background": "hsl(220, 13%, 28%)",
28815
- "color": "hsl(220, 14%, 71%)"
28816
- },
28817
- ".line-highlight.line-highlight": { "background": "hsla(220, 100%, 80%, 0.04)" },
28818
- ".line-highlight.line-highlight:before": {
28819
- "background": "hsl(220, 13%, 26%)",
28820
- "color": "hsl(220, 14%, 71%)",
28821
- "padding": "0.1em 0.6em",
28822
- "borderRadius": "0.3em",
28823
- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
28824
- },
28825
- ".line-highlight.line-highlight[data-end]:after": {
28826
- "background": "hsl(220, 13%, 26%)",
28827
- "color": "hsl(220, 14%, 71%)",
28828
- "padding": "0.1em 0.6em",
28829
- "borderRadius": "0.3em",
28830
- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
28831
- },
28832
- "pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before": { "backgroundColor": "hsla(220, 100%, 80%, 0.04)" },
28833
- ".line-numbers.line-numbers .line-numbers-rows": { "borderRightColor": "hsla(220, 14%, 71%, 0.15)" },
28834
- ".command-line .command-line-prompt": { "borderRightColor": "hsla(220, 14%, 71%, 0.15)" },
28835
- ".line-numbers .line-numbers-rows > span:before": { "color": "hsl(220, 14%, 45%)" },
28836
- ".command-line .command-line-prompt > span:before": { "color": "hsl(220, 14%, 45%)" },
28837
- ".rainbow-braces .token.token.punctuation.brace-level-1": { "color": "hsl(355, 65%, 65%)" },
28838
- ".rainbow-braces .token.token.punctuation.brace-level-5": { "color": "hsl(355, 65%, 65%)" },
28839
- ".rainbow-braces .token.token.punctuation.brace-level-9": { "color": "hsl(355, 65%, 65%)" },
28840
- ".rainbow-braces .token.token.punctuation.brace-level-2": { "color": "hsl(95, 38%, 62%)" },
28841
- ".rainbow-braces .token.token.punctuation.brace-level-6": { "color": "hsl(95, 38%, 62%)" },
28842
- ".rainbow-braces .token.token.punctuation.brace-level-10": { "color": "hsl(95, 38%, 62%)" },
28843
- ".rainbow-braces .token.token.punctuation.brace-level-3": { "color": "hsl(207, 82%, 66%)" },
28844
- ".rainbow-braces .token.token.punctuation.brace-level-7": { "color": "hsl(207, 82%, 66%)" },
28845
- ".rainbow-braces .token.token.punctuation.brace-level-11": { "color": "hsl(207, 82%, 66%)" },
28846
- ".rainbow-braces .token.token.punctuation.brace-level-4": { "color": "hsl(286, 60%, 67%)" },
28847
- ".rainbow-braces .token.token.punctuation.brace-level-8": { "color": "hsl(286, 60%, 67%)" },
28848
- ".rainbow-braces .token.token.punctuation.brace-level-12": { "color": "hsl(286, 60%, 67%)" },
28849
- "pre.diff-highlight > code .token.token.deleted:not(.prefix)": { "backgroundColor": "hsla(353, 100%, 66%, 0.15)" },
28850
- "pre > code.diff-highlight .token.token.deleted:not(.prefix)": { "backgroundColor": "hsla(353, 100%, 66%, 0.15)" },
28851
- "pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
28852
- "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
28853
- "pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
28854
- "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
28855
- "pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
28856
- "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
28857
- "pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
28858
- "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
28859
- "pre.diff-highlight > code .token.token.inserted:not(.prefix)": { "backgroundColor": "hsla(137, 100%, 55%, 0.15)" },
28860
- "pre > code.diff-highlight .token.token.inserted:not(.prefix)": { "backgroundColor": "hsla(137, 100%, 55%, 0.15)" },
28861
- "pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
28862
- "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
28863
- "pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
28864
- "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
28865
- "pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
28866
- "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
28867
- "pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
28868
- "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
28869
- ".prism-previewer.prism-previewer:before": { "borderColor": "hsl(224, 13%, 17%)" },
28870
- ".prism-previewer-gradient.prism-previewer-gradient div": {
28871
- "borderColor": "hsl(224, 13%, 17%)",
28872
- "borderRadius": "0.3em"
28873
- },
28874
- ".prism-previewer-color.prism-previewer-color:before": { "borderRadius": "0.3em" },
28875
- ".prism-previewer-easing.prism-previewer-easing:before": { "borderRadius": "0.3em" },
28876
- ".prism-previewer.prism-previewer:after": { "borderTopColor": "hsl(224, 13%, 17%)" },
28877
- ".prism-previewer-flipped.prism-previewer-flipped.after": { "borderBottomColor": "hsl(224, 13%, 17%)" },
28878
- ".prism-previewer-angle.prism-previewer-angle:before": { "background": "hsl(219, 13%, 22%)" },
28879
- ".prism-previewer-time.prism-previewer-time:before": { "background": "hsl(219, 13%, 22%)" },
28880
- ".prism-previewer-easing.prism-previewer-easing": { "background": "hsl(219, 13%, 22%)" },
28881
- ".prism-previewer-angle.prism-previewer-angle circle": {
28882
- "stroke": "hsl(220, 14%, 71%)",
28883
- "strokeOpacity": "1"
28884
- },
28885
- ".prism-previewer-time.prism-previewer-time circle": {
28886
- "stroke": "hsl(220, 14%, 71%)",
28887
- "strokeOpacity": "1"
28888
- },
28889
- ".prism-previewer-easing.prism-previewer-easing circle": {
28890
- "stroke": "hsl(220, 14%, 71%)",
28891
- "fill": "transparent"
28892
- },
28893
- ".prism-previewer-easing.prism-previewer-easing path": { "stroke": "hsl(220, 14%, 71%)" },
28894
- ".prism-previewer-easing.prism-previewer-easing line": { "stroke": "hsl(220, 14%, 71%)" }
28895
- };
28896
-
28897
- //#endregion
28898
- //#region ../../node_modules/.pnpm/react-syntax-highlighter@16.1.1_react@19.2.8/node_modules/react-syntax-highlighter/dist/esm/styles/prism/one-light.js
28899
- var one_light_default = {
28900
- "code[class*=\"language-\"]": {
28901
- "background": "hsl(230, 1%, 98%)",
28902
- "color": "hsl(230, 8%, 24%)",
28903
- "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",
28904
- "direction": "ltr",
28905
- "textAlign": "left",
28906
- "whiteSpace": "pre",
28907
- "wordSpacing": "normal",
28908
- "wordBreak": "normal",
28909
- "lineHeight": "1.5",
28910
- "MozTabSize": "2",
28911
- "OTabSize": "2",
28912
- "tabSize": "2",
28913
- "WebkitHyphens": "none",
28914
- "MozHyphens": "none",
28915
- "msHyphens": "none",
28916
- "hyphens": "none"
28917
- },
28918
- "pre[class*=\"language-\"]": {
28919
- "background": "hsl(230, 1%, 98%)",
28920
- "color": "hsl(230, 8%, 24%)",
28921
- "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",
28922
- "direction": "ltr",
28923
- "textAlign": "left",
28924
- "whiteSpace": "pre",
28925
- "wordSpacing": "normal",
28926
- "wordBreak": "normal",
28927
- "lineHeight": "1.5",
28928
- "MozTabSize": "2",
28929
- "OTabSize": "2",
28930
- "tabSize": "2",
28931
- "WebkitHyphens": "none",
28932
- "MozHyphens": "none",
28933
- "msHyphens": "none",
28934
- "hyphens": "none",
28935
- "padding": "1em",
28936
- "margin": "0.5em 0",
28937
- "overflow": "auto",
28938
- "borderRadius": "0.3em"
28939
- },
28940
- "code[class*=\"language-\"]::-moz-selection": {
28941
- "background": "hsl(230, 1%, 90%)",
28942
- "color": "inherit"
28943
- },
28944
- "code[class*=\"language-\"] *::-moz-selection": {
28945
- "background": "hsl(230, 1%, 90%)",
28946
- "color": "inherit"
28947
- },
28948
- "pre[class*=\"language-\"] *::-moz-selection": {
28949
- "background": "hsl(230, 1%, 90%)",
28950
- "color": "inherit"
28951
- },
28952
- "code[class*=\"language-\"]::selection": {
28953
- "background": "hsl(230, 1%, 90%)",
28954
- "color": "inherit"
28955
- },
28956
- "code[class*=\"language-\"] *::selection": {
28957
- "background": "hsl(230, 1%, 90%)",
28958
- "color": "inherit"
28959
- },
28960
- "pre[class*=\"language-\"] *::selection": {
28961
- "background": "hsl(230, 1%, 90%)",
28962
- "color": "inherit"
28963
- },
28964
- ":not(pre) > code[class*=\"language-\"]": {
28965
- "padding": "0.2em 0.3em",
28966
- "borderRadius": "0.3em",
28967
- "whiteSpace": "normal"
28968
- },
28969
- "comment": {
28970
- "color": "hsl(230, 4%, 64%)",
28971
- "fontStyle": "italic"
28972
- },
28973
- "prolog": { "color": "hsl(230, 4%, 64%)" },
28974
- "cdata": { "color": "hsl(230, 4%, 64%)" },
28975
- "doctype": { "color": "hsl(230, 8%, 24%)" },
28976
- "punctuation": { "color": "hsl(230, 8%, 24%)" },
28977
- "entity": {
28978
- "color": "hsl(230, 8%, 24%)",
28979
- "cursor": "help"
28980
- },
28981
- "attr-name": { "color": "hsl(35, 99%, 36%)" },
28982
- "class-name": { "color": "hsl(35, 99%, 36%)" },
28983
- "boolean": { "color": "hsl(35, 99%, 36%)" },
28984
- "constant": { "color": "hsl(35, 99%, 36%)" },
28985
- "number": { "color": "hsl(35, 99%, 36%)" },
28986
- "atrule": { "color": "hsl(35, 99%, 36%)" },
28987
- "keyword": { "color": "hsl(301, 63%, 40%)" },
28988
- "property": { "color": "hsl(5, 74%, 59%)" },
28989
- "tag": { "color": "hsl(5, 74%, 59%)" },
28990
- "symbol": { "color": "hsl(5, 74%, 59%)" },
28991
- "deleted": { "color": "hsl(5, 74%, 59%)" },
28992
- "important": { "color": "hsl(5, 74%, 59%)" },
28993
- "selector": { "color": "hsl(119, 34%, 47%)" },
28994
- "string": { "color": "hsl(119, 34%, 47%)" },
28995
- "char": { "color": "hsl(119, 34%, 47%)" },
28996
- "builtin": { "color": "hsl(119, 34%, 47%)" },
28997
- "inserted": { "color": "hsl(119, 34%, 47%)" },
28998
- "regex": { "color": "hsl(119, 34%, 47%)" },
28999
- "attr-value": { "color": "hsl(119, 34%, 47%)" },
29000
- "attr-value > .token.punctuation": { "color": "hsl(119, 34%, 47%)" },
29001
- "variable": { "color": "hsl(221, 87%, 60%)" },
29002
- "operator": { "color": "hsl(221, 87%, 60%)" },
29003
- "function": { "color": "hsl(221, 87%, 60%)" },
29004
- "url": { "color": "hsl(198, 99%, 37%)" },
29005
- "attr-value > .token.punctuation.attr-equals": { "color": "hsl(230, 8%, 24%)" },
29006
- "special-attr > .token.attr-value > .token.value.css": { "color": "hsl(230, 8%, 24%)" },
29007
- ".language-css .token.selector": { "color": "hsl(5, 74%, 59%)" },
29008
- ".language-css .token.property": { "color": "hsl(230, 8%, 24%)" },
29009
- ".language-css .token.function": { "color": "hsl(198, 99%, 37%)" },
29010
- ".language-css .token.url > .token.function": { "color": "hsl(198, 99%, 37%)" },
29011
- ".language-css .token.url > .token.string.url": { "color": "hsl(119, 34%, 47%)" },
29012
- ".language-css .token.important": { "color": "hsl(301, 63%, 40%)" },
29013
- ".language-css .token.atrule .token.rule": { "color": "hsl(301, 63%, 40%)" },
29014
- ".language-javascript .token.operator": { "color": "hsl(301, 63%, 40%)" },
29015
- ".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation": { "color": "hsl(344, 84%, 43%)" },
29016
- ".language-json .token.operator": { "color": "hsl(230, 8%, 24%)" },
29017
- ".language-json .token.null.keyword": { "color": "hsl(35, 99%, 36%)" },
29018
- ".language-markdown .token.url": { "color": "hsl(230, 8%, 24%)" },
29019
- ".language-markdown .token.url > .token.operator": { "color": "hsl(230, 8%, 24%)" },
29020
- ".language-markdown .token.url-reference.url > .token.string": { "color": "hsl(230, 8%, 24%)" },
29021
- ".language-markdown .token.url > .token.content": { "color": "hsl(221, 87%, 60%)" },
29022
- ".language-markdown .token.url > .token.url": { "color": "hsl(198, 99%, 37%)" },
29023
- ".language-markdown .token.url-reference.url": { "color": "hsl(198, 99%, 37%)" },
29024
- ".language-markdown .token.blockquote.punctuation": {
29025
- "color": "hsl(230, 4%, 64%)",
29026
- "fontStyle": "italic"
29027
- },
29028
- ".language-markdown .token.hr.punctuation": {
29029
- "color": "hsl(230, 4%, 64%)",
29030
- "fontStyle": "italic"
29031
- },
29032
- ".language-markdown .token.code-snippet": { "color": "hsl(119, 34%, 47%)" },
29033
- ".language-markdown .token.bold .token.content": { "color": "hsl(35, 99%, 36%)" },
29034
- ".language-markdown .token.italic .token.content": { "color": "hsl(301, 63%, 40%)" },
29035
- ".language-markdown .token.strike .token.content": { "color": "hsl(5, 74%, 59%)" },
29036
- ".language-markdown .token.strike .token.punctuation": { "color": "hsl(5, 74%, 59%)" },
29037
- ".language-markdown .token.list.punctuation": { "color": "hsl(5, 74%, 59%)" },
29038
- ".language-markdown .token.title.important > .token.punctuation": { "color": "hsl(5, 74%, 59%)" },
29039
- "bold": { "fontWeight": "bold" },
29040
- "italic": { "fontStyle": "italic" },
29041
- "namespace": { "Opacity": "0.8" },
29042
- "token.tab:not(:empty):before": { "color": "hsla(230, 8%, 24%, 0.2)" },
29043
- "token.cr:before": { "color": "hsla(230, 8%, 24%, 0.2)" },
29044
- "token.lf:before": { "color": "hsla(230, 8%, 24%, 0.2)" },
29045
- "token.space:before": { "color": "hsla(230, 8%, 24%, 0.2)" },
29046
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item": { "marginRight": "0.4em" },
29047
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button": {
29048
- "background": "hsl(230, 1%, 90%)",
29049
- "color": "hsl(230, 6%, 44%)",
29050
- "padding": "0.1em 0.4em",
29051
- "borderRadius": "0.3em"
29052
- },
29053
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a": {
29054
- "background": "hsl(230, 1%, 90%)",
29055
- "color": "hsl(230, 6%, 44%)",
29056
- "padding": "0.1em 0.4em",
29057
- "borderRadius": "0.3em"
29058
- },
29059
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span": {
29060
- "background": "hsl(230, 1%, 90%)",
29061
- "color": "hsl(230, 6%, 44%)",
29062
- "padding": "0.1em 0.4em",
29063
- "borderRadius": "0.3em"
29064
- },
29065
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover": {
29066
- "background": "hsl(230, 1%, 78%)",
29067
- "color": "hsl(230, 8%, 24%)"
29068
- },
29069
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus": {
29070
- "background": "hsl(230, 1%, 78%)",
29071
- "color": "hsl(230, 8%, 24%)"
29072
- },
29073
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover": {
29074
- "background": "hsl(230, 1%, 78%)",
29075
- "color": "hsl(230, 8%, 24%)"
29076
- },
29077
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus": {
29078
- "background": "hsl(230, 1%, 78%)",
29079
- "color": "hsl(230, 8%, 24%)"
29080
- },
29081
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover": {
29082
- "background": "hsl(230, 1%, 78%)",
29083
- "color": "hsl(230, 8%, 24%)"
29084
- },
29085
- "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus": {
29086
- "background": "hsl(230, 1%, 78%)",
29087
- "color": "hsl(230, 8%, 24%)"
29088
- },
29089
- ".line-highlight.line-highlight": { "background": "hsla(230, 8%, 24%, 0.05)" },
29090
- ".line-highlight.line-highlight:before": {
29091
- "background": "hsl(230, 1%, 90%)",
29092
- "color": "hsl(230, 8%, 24%)",
29093
- "padding": "0.1em 0.6em",
29094
- "borderRadius": "0.3em",
29095
- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
29096
- },
29097
- ".line-highlight.line-highlight[data-end]:after": {
29098
- "background": "hsl(230, 1%, 90%)",
29099
- "color": "hsl(230, 8%, 24%)",
29100
- "padding": "0.1em 0.6em",
29101
- "borderRadius": "0.3em",
29102
- "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
29103
- },
29104
- "pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before": { "backgroundColor": "hsla(230, 8%, 24%, 0.05)" },
29105
- ".line-numbers.line-numbers .line-numbers-rows": { "borderRightColor": "hsla(230, 8%, 24%, 0.2)" },
29106
- ".command-line .command-line-prompt": { "borderRightColor": "hsla(230, 8%, 24%, 0.2)" },
29107
- ".line-numbers .line-numbers-rows > span:before": { "color": "hsl(230, 1%, 62%)" },
29108
- ".command-line .command-line-prompt > span:before": { "color": "hsl(230, 1%, 62%)" },
29109
- ".rainbow-braces .token.token.punctuation.brace-level-1": { "color": "hsl(5, 74%, 59%)" },
29110
- ".rainbow-braces .token.token.punctuation.brace-level-5": { "color": "hsl(5, 74%, 59%)" },
29111
- ".rainbow-braces .token.token.punctuation.brace-level-9": { "color": "hsl(5, 74%, 59%)" },
29112
- ".rainbow-braces .token.token.punctuation.brace-level-2": { "color": "hsl(119, 34%, 47%)" },
29113
- ".rainbow-braces .token.token.punctuation.brace-level-6": { "color": "hsl(119, 34%, 47%)" },
29114
- ".rainbow-braces .token.token.punctuation.brace-level-10": { "color": "hsl(119, 34%, 47%)" },
29115
- ".rainbow-braces .token.token.punctuation.brace-level-3": { "color": "hsl(221, 87%, 60%)" },
29116
- ".rainbow-braces .token.token.punctuation.brace-level-7": { "color": "hsl(221, 87%, 60%)" },
29117
- ".rainbow-braces .token.token.punctuation.brace-level-11": { "color": "hsl(221, 87%, 60%)" },
29118
- ".rainbow-braces .token.token.punctuation.brace-level-4": { "color": "hsl(301, 63%, 40%)" },
29119
- ".rainbow-braces .token.token.punctuation.brace-level-8": { "color": "hsl(301, 63%, 40%)" },
29120
- ".rainbow-braces .token.token.punctuation.brace-level-12": { "color": "hsl(301, 63%, 40%)" },
29121
- "pre.diff-highlight > code .token.token.deleted:not(.prefix)": { "backgroundColor": "hsla(353, 100%, 66%, 0.15)" },
29122
- "pre > code.diff-highlight .token.token.deleted:not(.prefix)": { "backgroundColor": "hsla(353, 100%, 66%, 0.15)" },
29123
- "pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
29124
- "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
29125
- "pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
29126
- "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
29127
- "pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
29128
- "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
29129
- "pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
29130
- "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
29131
- "pre.diff-highlight > code .token.token.inserted:not(.prefix)": { "backgroundColor": "hsla(137, 100%, 55%, 0.15)" },
29132
- "pre > code.diff-highlight .token.token.inserted:not(.prefix)": { "backgroundColor": "hsla(137, 100%, 55%, 0.15)" },
29133
- "pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
29134
- "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
29135
- "pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
29136
- "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
29137
- "pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
29138
- "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
29139
- "pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
29140
- "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
29141
- ".prism-previewer.prism-previewer:before": { "borderColor": "hsl(0, 0, 95%)" },
29142
- ".prism-previewer-gradient.prism-previewer-gradient div": {
29143
- "borderColor": "hsl(0, 0, 95%)",
29144
- "borderRadius": "0.3em"
29145
- },
29146
- ".prism-previewer-color.prism-previewer-color:before": { "borderRadius": "0.3em" },
29147
- ".prism-previewer-easing.prism-previewer-easing:before": { "borderRadius": "0.3em" },
29148
- ".prism-previewer.prism-previewer:after": { "borderTopColor": "hsl(0, 0, 95%)" },
29149
- ".prism-previewer-flipped.prism-previewer-flipped.after": { "borderBottomColor": "hsl(0, 0, 95%)" },
29150
- ".prism-previewer-angle.prism-previewer-angle:before": { "background": "hsl(0, 0%, 100%)" },
29151
- ".prism-previewer-time.prism-previewer-time:before": { "background": "hsl(0, 0%, 100%)" },
29152
- ".prism-previewer-easing.prism-previewer-easing": { "background": "hsl(0, 0%, 100%)" },
29153
- ".prism-previewer-angle.prism-previewer-angle circle": {
29154
- "stroke": "hsl(230, 8%, 24%)",
29155
- "strokeOpacity": "1"
29156
- },
29157
- ".prism-previewer-time.prism-previewer-time circle": {
29158
- "stroke": "hsl(230, 8%, 24%)",
29159
- "strokeOpacity": "1"
29160
- },
29161
- ".prism-previewer-easing.prism-previewer-easing circle": {
29162
- "stroke": "hsl(230, 8%, 24%)",
29163
- "fill": "transparent"
29164
- },
29165
- ".prism-previewer-easing.prism-previewer-easing path": { "stroke": "hsl(230, 8%, 24%)" },
29166
- ".prism-previewer-easing.prism-previewer-easing line": { "stroke": "hsl(230, 8%, 24%)" }
29167
- };
29168
-
29169
28640
  //#endregion
29170
28641
  //#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
29171
28642
  function _objectWithoutPropertiesLoose(r, e) {
@@ -33542,8 +33013,8 @@ var light_async_default = async_syntax_highlighter_default({
33542
33013
  //#endregion
33543
33014
  //#region ../../node_modules/.pnpm/react-syntax-highlighter@16.1.1_react@19.2.8/node_modules/react-syntax-highlighter/dist/esm/light.js
33544
33015
  var import_core = /* @__PURE__ */ __toESM(require_core());
33545
- var SyntaxHighlighter$2 = highlight_default(import_core.default, {});
33546
- SyntaxHighlighter$2.registerLanguage = import_core.registerLanguage;
33016
+ var SyntaxHighlighter$1 = highlight_default(import_core.default, {});
33017
+ SyntaxHighlighter$1.registerLanguage = import_core.registerLanguage;
33547
33018
 
33548
33019
  //#endregion
33549
33020
  //#region ../../node_modules/.pnpm/react-syntax-highlighter@16.1.1_react@19.2.8/node_modules/react-syntax-highlighter/dist/esm/async-languages/prism.js
@@ -36977,11 +36448,11 @@ function attributes(record) {
36977
36448
 
36978
36449
  //#endregion
36979
36450
  //#region ../../node_modules/.pnpm/react-syntax-highlighter@16.1.1_react@19.2.8/node_modules/react-syntax-highlighter/dist/esm/prism-light.js
36980
- var SyntaxHighlighter$1 = highlight_default(refractor, {});
36981
- SyntaxHighlighter$1.registerLanguage = function(_, language) {
36451
+ var SyntaxHighlighter = highlight_default(refractor, {});
36452
+ SyntaxHighlighter.registerLanguage = function(_, language) {
36982
36453
  return refractor.register(language);
36983
36454
  };
36984
- SyntaxHighlighter$1.alias = function(name, aliases) {
36455
+ SyntaxHighlighter.alias = function(name, aliases) {
36985
36456
  return refractor.alias(name, aliases);
36986
36457
  };
36987
36458
 
@@ -37364,7 +36835,7 @@ const languages = {
37364
36835
  markdown: markdown_default,
37365
36836
  yaml: yaml_default
37366
36837
  };
37367
- for (const [name, language] of Object.entries(languages)) SyntaxHighlighter$1.registerLanguage(name, language);
36838
+ for (const [name, language] of Object.entries(languages)) SyntaxHighlighter.registerLanguage(name, language);
37368
36839
  const languageAliases = {
37369
36840
  ts: "typescript",
37370
36841
  js: "javascript",
@@ -37380,6 +36851,578 @@ function resolveLanguage(raw) {
37380
36851
  return languageAliases[raw];
37381
36852
  }
37382
36853
 
36854
+ //#endregion
36855
+ //#region ../../node_modules/.pnpm/react-syntax-highlighter@16.1.1_react@19.2.8/node_modules/react-syntax-highlighter/dist/esm/styles/prism/one-dark.js
36856
+ var one_dark_default = {
36857
+ "code[class*=\"language-\"]": {
36858
+ "background": "hsl(220, 13%, 18%)",
36859
+ "color": "hsl(220, 14%, 71%)",
36860
+ "textShadow": "0 1px rgba(0, 0, 0, 0.3)",
36861
+ "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",
36862
+ "direction": "ltr",
36863
+ "textAlign": "left",
36864
+ "whiteSpace": "pre",
36865
+ "wordSpacing": "normal",
36866
+ "wordBreak": "normal",
36867
+ "lineHeight": "1.5",
36868
+ "MozTabSize": "2",
36869
+ "OTabSize": "2",
36870
+ "tabSize": "2",
36871
+ "WebkitHyphens": "none",
36872
+ "MozHyphens": "none",
36873
+ "msHyphens": "none",
36874
+ "hyphens": "none"
36875
+ },
36876
+ "pre[class*=\"language-\"]": {
36877
+ "background": "hsl(220, 13%, 18%)",
36878
+ "color": "hsl(220, 14%, 71%)",
36879
+ "textShadow": "0 1px rgba(0, 0, 0, 0.3)",
36880
+ "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",
36881
+ "direction": "ltr",
36882
+ "textAlign": "left",
36883
+ "whiteSpace": "pre",
36884
+ "wordSpacing": "normal",
36885
+ "wordBreak": "normal",
36886
+ "lineHeight": "1.5",
36887
+ "MozTabSize": "2",
36888
+ "OTabSize": "2",
36889
+ "tabSize": "2",
36890
+ "WebkitHyphens": "none",
36891
+ "MozHyphens": "none",
36892
+ "msHyphens": "none",
36893
+ "hyphens": "none",
36894
+ "padding": "1em",
36895
+ "margin": "0.5em 0",
36896
+ "overflow": "auto",
36897
+ "borderRadius": "0.3em"
36898
+ },
36899
+ "code[class*=\"language-\"]::-moz-selection": {
36900
+ "background": "hsl(220, 13%, 28%)",
36901
+ "color": "inherit",
36902
+ "textShadow": "none"
36903
+ },
36904
+ "code[class*=\"language-\"] *::-moz-selection": {
36905
+ "background": "hsl(220, 13%, 28%)",
36906
+ "color": "inherit",
36907
+ "textShadow": "none"
36908
+ },
36909
+ "pre[class*=\"language-\"] *::-moz-selection": {
36910
+ "background": "hsl(220, 13%, 28%)",
36911
+ "color": "inherit",
36912
+ "textShadow": "none"
36913
+ },
36914
+ "code[class*=\"language-\"]::selection": {
36915
+ "background": "hsl(220, 13%, 28%)",
36916
+ "color": "inherit",
36917
+ "textShadow": "none"
36918
+ },
36919
+ "code[class*=\"language-\"] *::selection": {
36920
+ "background": "hsl(220, 13%, 28%)",
36921
+ "color": "inherit",
36922
+ "textShadow": "none"
36923
+ },
36924
+ "pre[class*=\"language-\"] *::selection": {
36925
+ "background": "hsl(220, 13%, 28%)",
36926
+ "color": "inherit",
36927
+ "textShadow": "none"
36928
+ },
36929
+ ":not(pre) > code[class*=\"language-\"]": {
36930
+ "padding": "0.2em 0.3em",
36931
+ "borderRadius": "0.3em",
36932
+ "whiteSpace": "normal"
36933
+ },
36934
+ "comment": {
36935
+ "color": "hsl(220, 10%, 40%)",
36936
+ "fontStyle": "italic"
36937
+ },
36938
+ "prolog": { "color": "hsl(220, 10%, 40%)" },
36939
+ "cdata": { "color": "hsl(220, 10%, 40%)" },
36940
+ "doctype": { "color": "hsl(220, 14%, 71%)" },
36941
+ "punctuation": { "color": "hsl(220, 14%, 71%)" },
36942
+ "entity": {
36943
+ "color": "hsl(220, 14%, 71%)",
36944
+ "cursor": "help"
36945
+ },
36946
+ "attr-name": { "color": "hsl(29, 54%, 61%)" },
36947
+ "class-name": { "color": "hsl(29, 54%, 61%)" },
36948
+ "boolean": { "color": "hsl(29, 54%, 61%)" },
36949
+ "constant": { "color": "hsl(29, 54%, 61%)" },
36950
+ "number": { "color": "hsl(29, 54%, 61%)" },
36951
+ "atrule": { "color": "hsl(29, 54%, 61%)" },
36952
+ "keyword": { "color": "hsl(286, 60%, 67%)" },
36953
+ "property": { "color": "hsl(355, 65%, 65%)" },
36954
+ "tag": { "color": "hsl(355, 65%, 65%)" },
36955
+ "symbol": { "color": "hsl(355, 65%, 65%)" },
36956
+ "deleted": { "color": "hsl(355, 65%, 65%)" },
36957
+ "important": { "color": "hsl(355, 65%, 65%)" },
36958
+ "selector": { "color": "hsl(95, 38%, 62%)" },
36959
+ "string": { "color": "hsl(95, 38%, 62%)" },
36960
+ "char": { "color": "hsl(95, 38%, 62%)" },
36961
+ "builtin": { "color": "hsl(95, 38%, 62%)" },
36962
+ "inserted": { "color": "hsl(95, 38%, 62%)" },
36963
+ "regex": { "color": "hsl(95, 38%, 62%)" },
36964
+ "attr-value": { "color": "hsl(95, 38%, 62%)" },
36965
+ "attr-value > .token.punctuation": { "color": "hsl(95, 38%, 62%)" },
36966
+ "variable": { "color": "hsl(207, 82%, 66%)" },
36967
+ "operator": { "color": "hsl(207, 82%, 66%)" },
36968
+ "function": { "color": "hsl(207, 82%, 66%)" },
36969
+ "url": { "color": "hsl(187, 47%, 55%)" },
36970
+ "attr-value > .token.punctuation.attr-equals": { "color": "hsl(220, 14%, 71%)" },
36971
+ "special-attr > .token.attr-value > .token.value.css": { "color": "hsl(220, 14%, 71%)" },
36972
+ ".language-css .token.selector": { "color": "hsl(355, 65%, 65%)" },
36973
+ ".language-css .token.property": { "color": "hsl(220, 14%, 71%)" },
36974
+ ".language-css .token.function": { "color": "hsl(187, 47%, 55%)" },
36975
+ ".language-css .token.url > .token.function": { "color": "hsl(187, 47%, 55%)" },
36976
+ ".language-css .token.url > .token.string.url": { "color": "hsl(95, 38%, 62%)" },
36977
+ ".language-css .token.important": { "color": "hsl(286, 60%, 67%)" },
36978
+ ".language-css .token.atrule .token.rule": { "color": "hsl(286, 60%, 67%)" },
36979
+ ".language-javascript .token.operator": { "color": "hsl(286, 60%, 67%)" },
36980
+ ".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation": { "color": "hsl(5, 48%, 51%)" },
36981
+ ".language-json .token.operator": { "color": "hsl(220, 14%, 71%)" },
36982
+ ".language-json .token.null.keyword": { "color": "hsl(29, 54%, 61%)" },
36983
+ ".language-markdown .token.url": { "color": "hsl(220, 14%, 71%)" },
36984
+ ".language-markdown .token.url > .token.operator": { "color": "hsl(220, 14%, 71%)" },
36985
+ ".language-markdown .token.url-reference.url > .token.string": { "color": "hsl(220, 14%, 71%)" },
36986
+ ".language-markdown .token.url > .token.content": { "color": "hsl(207, 82%, 66%)" },
36987
+ ".language-markdown .token.url > .token.url": { "color": "hsl(187, 47%, 55%)" },
36988
+ ".language-markdown .token.url-reference.url": { "color": "hsl(187, 47%, 55%)" },
36989
+ ".language-markdown .token.blockquote.punctuation": {
36990
+ "color": "hsl(220, 10%, 40%)",
36991
+ "fontStyle": "italic"
36992
+ },
36993
+ ".language-markdown .token.hr.punctuation": {
36994
+ "color": "hsl(220, 10%, 40%)",
36995
+ "fontStyle": "italic"
36996
+ },
36997
+ ".language-markdown .token.code-snippet": { "color": "hsl(95, 38%, 62%)" },
36998
+ ".language-markdown .token.bold .token.content": { "color": "hsl(29, 54%, 61%)" },
36999
+ ".language-markdown .token.italic .token.content": { "color": "hsl(286, 60%, 67%)" },
37000
+ ".language-markdown .token.strike .token.content": { "color": "hsl(355, 65%, 65%)" },
37001
+ ".language-markdown .token.strike .token.punctuation": { "color": "hsl(355, 65%, 65%)" },
37002
+ ".language-markdown .token.list.punctuation": { "color": "hsl(355, 65%, 65%)" },
37003
+ ".language-markdown .token.title.important > .token.punctuation": { "color": "hsl(355, 65%, 65%)" },
37004
+ "bold": { "fontWeight": "bold" },
37005
+ "italic": { "fontStyle": "italic" },
37006
+ "namespace": { "Opacity": "0.8" },
37007
+ "token.tab:not(:empty):before": {
37008
+ "color": "hsla(220, 14%, 71%, 0.15)",
37009
+ "textShadow": "none"
37010
+ },
37011
+ "token.cr:before": {
37012
+ "color": "hsla(220, 14%, 71%, 0.15)",
37013
+ "textShadow": "none"
37014
+ },
37015
+ "token.lf:before": {
37016
+ "color": "hsla(220, 14%, 71%, 0.15)",
37017
+ "textShadow": "none"
37018
+ },
37019
+ "token.space:before": {
37020
+ "color": "hsla(220, 14%, 71%, 0.15)",
37021
+ "textShadow": "none"
37022
+ },
37023
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item": { "marginRight": "0.4em" },
37024
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button": {
37025
+ "background": "hsl(220, 13%, 26%)",
37026
+ "color": "hsl(220, 9%, 55%)",
37027
+ "padding": "0.1em 0.4em",
37028
+ "borderRadius": "0.3em"
37029
+ },
37030
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a": {
37031
+ "background": "hsl(220, 13%, 26%)",
37032
+ "color": "hsl(220, 9%, 55%)",
37033
+ "padding": "0.1em 0.4em",
37034
+ "borderRadius": "0.3em"
37035
+ },
37036
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span": {
37037
+ "background": "hsl(220, 13%, 26%)",
37038
+ "color": "hsl(220, 9%, 55%)",
37039
+ "padding": "0.1em 0.4em",
37040
+ "borderRadius": "0.3em"
37041
+ },
37042
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover": {
37043
+ "background": "hsl(220, 13%, 28%)",
37044
+ "color": "hsl(220, 14%, 71%)"
37045
+ },
37046
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus": {
37047
+ "background": "hsl(220, 13%, 28%)",
37048
+ "color": "hsl(220, 14%, 71%)"
37049
+ },
37050
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover": {
37051
+ "background": "hsl(220, 13%, 28%)",
37052
+ "color": "hsl(220, 14%, 71%)"
37053
+ },
37054
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus": {
37055
+ "background": "hsl(220, 13%, 28%)",
37056
+ "color": "hsl(220, 14%, 71%)"
37057
+ },
37058
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover": {
37059
+ "background": "hsl(220, 13%, 28%)",
37060
+ "color": "hsl(220, 14%, 71%)"
37061
+ },
37062
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus": {
37063
+ "background": "hsl(220, 13%, 28%)",
37064
+ "color": "hsl(220, 14%, 71%)"
37065
+ },
37066
+ ".line-highlight.line-highlight": { "background": "hsla(220, 100%, 80%, 0.04)" },
37067
+ ".line-highlight.line-highlight:before": {
37068
+ "background": "hsl(220, 13%, 26%)",
37069
+ "color": "hsl(220, 14%, 71%)",
37070
+ "padding": "0.1em 0.6em",
37071
+ "borderRadius": "0.3em",
37072
+ "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
37073
+ },
37074
+ ".line-highlight.line-highlight[data-end]:after": {
37075
+ "background": "hsl(220, 13%, 26%)",
37076
+ "color": "hsl(220, 14%, 71%)",
37077
+ "padding": "0.1em 0.6em",
37078
+ "borderRadius": "0.3em",
37079
+ "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
37080
+ },
37081
+ "pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before": { "backgroundColor": "hsla(220, 100%, 80%, 0.04)" },
37082
+ ".line-numbers.line-numbers .line-numbers-rows": { "borderRightColor": "hsla(220, 14%, 71%, 0.15)" },
37083
+ ".command-line .command-line-prompt": { "borderRightColor": "hsla(220, 14%, 71%, 0.15)" },
37084
+ ".line-numbers .line-numbers-rows > span:before": { "color": "hsl(220, 14%, 45%)" },
37085
+ ".command-line .command-line-prompt > span:before": { "color": "hsl(220, 14%, 45%)" },
37086
+ ".rainbow-braces .token.token.punctuation.brace-level-1": { "color": "hsl(355, 65%, 65%)" },
37087
+ ".rainbow-braces .token.token.punctuation.brace-level-5": { "color": "hsl(355, 65%, 65%)" },
37088
+ ".rainbow-braces .token.token.punctuation.brace-level-9": { "color": "hsl(355, 65%, 65%)" },
37089
+ ".rainbow-braces .token.token.punctuation.brace-level-2": { "color": "hsl(95, 38%, 62%)" },
37090
+ ".rainbow-braces .token.token.punctuation.brace-level-6": { "color": "hsl(95, 38%, 62%)" },
37091
+ ".rainbow-braces .token.token.punctuation.brace-level-10": { "color": "hsl(95, 38%, 62%)" },
37092
+ ".rainbow-braces .token.token.punctuation.brace-level-3": { "color": "hsl(207, 82%, 66%)" },
37093
+ ".rainbow-braces .token.token.punctuation.brace-level-7": { "color": "hsl(207, 82%, 66%)" },
37094
+ ".rainbow-braces .token.token.punctuation.brace-level-11": { "color": "hsl(207, 82%, 66%)" },
37095
+ ".rainbow-braces .token.token.punctuation.brace-level-4": { "color": "hsl(286, 60%, 67%)" },
37096
+ ".rainbow-braces .token.token.punctuation.brace-level-8": { "color": "hsl(286, 60%, 67%)" },
37097
+ ".rainbow-braces .token.token.punctuation.brace-level-12": { "color": "hsl(286, 60%, 67%)" },
37098
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix)": { "backgroundColor": "hsla(353, 100%, 66%, 0.15)" },
37099
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix)": { "backgroundColor": "hsla(353, 100%, 66%, 0.15)" },
37100
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37101
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37102
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37103
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37104
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37105
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37106
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37107
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37108
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix)": { "backgroundColor": "hsla(137, 100%, 55%, 0.15)" },
37109
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix)": { "backgroundColor": "hsla(137, 100%, 55%, 0.15)" },
37110
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37111
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37112
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37113
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37114
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37115
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37116
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37117
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37118
+ ".prism-previewer.prism-previewer:before": { "borderColor": "hsl(224, 13%, 17%)" },
37119
+ ".prism-previewer-gradient.prism-previewer-gradient div": {
37120
+ "borderColor": "hsl(224, 13%, 17%)",
37121
+ "borderRadius": "0.3em"
37122
+ },
37123
+ ".prism-previewer-color.prism-previewer-color:before": { "borderRadius": "0.3em" },
37124
+ ".prism-previewer-easing.prism-previewer-easing:before": { "borderRadius": "0.3em" },
37125
+ ".prism-previewer.prism-previewer:after": { "borderTopColor": "hsl(224, 13%, 17%)" },
37126
+ ".prism-previewer-flipped.prism-previewer-flipped.after": { "borderBottomColor": "hsl(224, 13%, 17%)" },
37127
+ ".prism-previewer-angle.prism-previewer-angle:before": { "background": "hsl(219, 13%, 22%)" },
37128
+ ".prism-previewer-time.prism-previewer-time:before": { "background": "hsl(219, 13%, 22%)" },
37129
+ ".prism-previewer-easing.prism-previewer-easing": { "background": "hsl(219, 13%, 22%)" },
37130
+ ".prism-previewer-angle.prism-previewer-angle circle": {
37131
+ "stroke": "hsl(220, 14%, 71%)",
37132
+ "strokeOpacity": "1"
37133
+ },
37134
+ ".prism-previewer-time.prism-previewer-time circle": {
37135
+ "stroke": "hsl(220, 14%, 71%)",
37136
+ "strokeOpacity": "1"
37137
+ },
37138
+ ".prism-previewer-easing.prism-previewer-easing circle": {
37139
+ "stroke": "hsl(220, 14%, 71%)",
37140
+ "fill": "transparent"
37141
+ },
37142
+ ".prism-previewer-easing.prism-previewer-easing path": { "stroke": "hsl(220, 14%, 71%)" },
37143
+ ".prism-previewer-easing.prism-previewer-easing line": { "stroke": "hsl(220, 14%, 71%)" }
37144
+ };
37145
+
37146
+ //#endregion
37147
+ //#region ../../node_modules/.pnpm/react-syntax-highlighter@16.1.1_react@19.2.8/node_modules/react-syntax-highlighter/dist/esm/styles/prism/one-light.js
37148
+ var one_light_default = {
37149
+ "code[class*=\"language-\"]": {
37150
+ "background": "hsl(230, 1%, 98%)",
37151
+ "color": "hsl(230, 8%, 24%)",
37152
+ "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",
37153
+ "direction": "ltr",
37154
+ "textAlign": "left",
37155
+ "whiteSpace": "pre",
37156
+ "wordSpacing": "normal",
37157
+ "wordBreak": "normal",
37158
+ "lineHeight": "1.5",
37159
+ "MozTabSize": "2",
37160
+ "OTabSize": "2",
37161
+ "tabSize": "2",
37162
+ "WebkitHyphens": "none",
37163
+ "MozHyphens": "none",
37164
+ "msHyphens": "none",
37165
+ "hyphens": "none"
37166
+ },
37167
+ "pre[class*=\"language-\"]": {
37168
+ "background": "hsl(230, 1%, 98%)",
37169
+ "color": "hsl(230, 8%, 24%)",
37170
+ "fontFamily": "\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace",
37171
+ "direction": "ltr",
37172
+ "textAlign": "left",
37173
+ "whiteSpace": "pre",
37174
+ "wordSpacing": "normal",
37175
+ "wordBreak": "normal",
37176
+ "lineHeight": "1.5",
37177
+ "MozTabSize": "2",
37178
+ "OTabSize": "2",
37179
+ "tabSize": "2",
37180
+ "WebkitHyphens": "none",
37181
+ "MozHyphens": "none",
37182
+ "msHyphens": "none",
37183
+ "hyphens": "none",
37184
+ "padding": "1em",
37185
+ "margin": "0.5em 0",
37186
+ "overflow": "auto",
37187
+ "borderRadius": "0.3em"
37188
+ },
37189
+ "code[class*=\"language-\"]::-moz-selection": {
37190
+ "background": "hsl(230, 1%, 90%)",
37191
+ "color": "inherit"
37192
+ },
37193
+ "code[class*=\"language-\"] *::-moz-selection": {
37194
+ "background": "hsl(230, 1%, 90%)",
37195
+ "color": "inherit"
37196
+ },
37197
+ "pre[class*=\"language-\"] *::-moz-selection": {
37198
+ "background": "hsl(230, 1%, 90%)",
37199
+ "color": "inherit"
37200
+ },
37201
+ "code[class*=\"language-\"]::selection": {
37202
+ "background": "hsl(230, 1%, 90%)",
37203
+ "color": "inherit"
37204
+ },
37205
+ "code[class*=\"language-\"] *::selection": {
37206
+ "background": "hsl(230, 1%, 90%)",
37207
+ "color": "inherit"
37208
+ },
37209
+ "pre[class*=\"language-\"] *::selection": {
37210
+ "background": "hsl(230, 1%, 90%)",
37211
+ "color": "inherit"
37212
+ },
37213
+ ":not(pre) > code[class*=\"language-\"]": {
37214
+ "padding": "0.2em 0.3em",
37215
+ "borderRadius": "0.3em",
37216
+ "whiteSpace": "normal"
37217
+ },
37218
+ "comment": {
37219
+ "color": "hsl(230, 4%, 64%)",
37220
+ "fontStyle": "italic"
37221
+ },
37222
+ "prolog": { "color": "hsl(230, 4%, 64%)" },
37223
+ "cdata": { "color": "hsl(230, 4%, 64%)" },
37224
+ "doctype": { "color": "hsl(230, 8%, 24%)" },
37225
+ "punctuation": { "color": "hsl(230, 8%, 24%)" },
37226
+ "entity": {
37227
+ "color": "hsl(230, 8%, 24%)",
37228
+ "cursor": "help"
37229
+ },
37230
+ "attr-name": { "color": "hsl(35, 99%, 36%)" },
37231
+ "class-name": { "color": "hsl(35, 99%, 36%)" },
37232
+ "boolean": { "color": "hsl(35, 99%, 36%)" },
37233
+ "constant": { "color": "hsl(35, 99%, 36%)" },
37234
+ "number": { "color": "hsl(35, 99%, 36%)" },
37235
+ "atrule": { "color": "hsl(35, 99%, 36%)" },
37236
+ "keyword": { "color": "hsl(301, 63%, 40%)" },
37237
+ "property": { "color": "hsl(5, 74%, 59%)" },
37238
+ "tag": { "color": "hsl(5, 74%, 59%)" },
37239
+ "symbol": { "color": "hsl(5, 74%, 59%)" },
37240
+ "deleted": { "color": "hsl(5, 74%, 59%)" },
37241
+ "important": { "color": "hsl(5, 74%, 59%)" },
37242
+ "selector": { "color": "hsl(119, 34%, 47%)" },
37243
+ "string": { "color": "hsl(119, 34%, 47%)" },
37244
+ "char": { "color": "hsl(119, 34%, 47%)" },
37245
+ "builtin": { "color": "hsl(119, 34%, 47%)" },
37246
+ "inserted": { "color": "hsl(119, 34%, 47%)" },
37247
+ "regex": { "color": "hsl(119, 34%, 47%)" },
37248
+ "attr-value": { "color": "hsl(119, 34%, 47%)" },
37249
+ "attr-value > .token.punctuation": { "color": "hsl(119, 34%, 47%)" },
37250
+ "variable": { "color": "hsl(221, 87%, 60%)" },
37251
+ "operator": { "color": "hsl(221, 87%, 60%)" },
37252
+ "function": { "color": "hsl(221, 87%, 60%)" },
37253
+ "url": { "color": "hsl(198, 99%, 37%)" },
37254
+ "attr-value > .token.punctuation.attr-equals": { "color": "hsl(230, 8%, 24%)" },
37255
+ "special-attr > .token.attr-value > .token.value.css": { "color": "hsl(230, 8%, 24%)" },
37256
+ ".language-css .token.selector": { "color": "hsl(5, 74%, 59%)" },
37257
+ ".language-css .token.property": { "color": "hsl(230, 8%, 24%)" },
37258
+ ".language-css .token.function": { "color": "hsl(198, 99%, 37%)" },
37259
+ ".language-css .token.url > .token.function": { "color": "hsl(198, 99%, 37%)" },
37260
+ ".language-css .token.url > .token.string.url": { "color": "hsl(119, 34%, 47%)" },
37261
+ ".language-css .token.important": { "color": "hsl(301, 63%, 40%)" },
37262
+ ".language-css .token.atrule .token.rule": { "color": "hsl(301, 63%, 40%)" },
37263
+ ".language-javascript .token.operator": { "color": "hsl(301, 63%, 40%)" },
37264
+ ".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation": { "color": "hsl(344, 84%, 43%)" },
37265
+ ".language-json .token.operator": { "color": "hsl(230, 8%, 24%)" },
37266
+ ".language-json .token.null.keyword": { "color": "hsl(35, 99%, 36%)" },
37267
+ ".language-markdown .token.url": { "color": "hsl(230, 8%, 24%)" },
37268
+ ".language-markdown .token.url > .token.operator": { "color": "hsl(230, 8%, 24%)" },
37269
+ ".language-markdown .token.url-reference.url > .token.string": { "color": "hsl(230, 8%, 24%)" },
37270
+ ".language-markdown .token.url > .token.content": { "color": "hsl(221, 87%, 60%)" },
37271
+ ".language-markdown .token.url > .token.url": { "color": "hsl(198, 99%, 37%)" },
37272
+ ".language-markdown .token.url-reference.url": { "color": "hsl(198, 99%, 37%)" },
37273
+ ".language-markdown .token.blockquote.punctuation": {
37274
+ "color": "hsl(230, 4%, 64%)",
37275
+ "fontStyle": "italic"
37276
+ },
37277
+ ".language-markdown .token.hr.punctuation": {
37278
+ "color": "hsl(230, 4%, 64%)",
37279
+ "fontStyle": "italic"
37280
+ },
37281
+ ".language-markdown .token.code-snippet": { "color": "hsl(119, 34%, 47%)" },
37282
+ ".language-markdown .token.bold .token.content": { "color": "hsl(35, 99%, 36%)" },
37283
+ ".language-markdown .token.italic .token.content": { "color": "hsl(301, 63%, 40%)" },
37284
+ ".language-markdown .token.strike .token.content": { "color": "hsl(5, 74%, 59%)" },
37285
+ ".language-markdown .token.strike .token.punctuation": { "color": "hsl(5, 74%, 59%)" },
37286
+ ".language-markdown .token.list.punctuation": { "color": "hsl(5, 74%, 59%)" },
37287
+ ".language-markdown .token.title.important > .token.punctuation": { "color": "hsl(5, 74%, 59%)" },
37288
+ "bold": { "fontWeight": "bold" },
37289
+ "italic": { "fontStyle": "italic" },
37290
+ "namespace": { "Opacity": "0.8" },
37291
+ "token.tab:not(:empty):before": { "color": "hsla(230, 8%, 24%, 0.2)" },
37292
+ "token.cr:before": { "color": "hsla(230, 8%, 24%, 0.2)" },
37293
+ "token.lf:before": { "color": "hsla(230, 8%, 24%, 0.2)" },
37294
+ "token.space:before": { "color": "hsla(230, 8%, 24%, 0.2)" },
37295
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item": { "marginRight": "0.4em" },
37296
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button": {
37297
+ "background": "hsl(230, 1%, 90%)",
37298
+ "color": "hsl(230, 6%, 44%)",
37299
+ "padding": "0.1em 0.4em",
37300
+ "borderRadius": "0.3em"
37301
+ },
37302
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a": {
37303
+ "background": "hsl(230, 1%, 90%)",
37304
+ "color": "hsl(230, 6%, 44%)",
37305
+ "padding": "0.1em 0.4em",
37306
+ "borderRadius": "0.3em"
37307
+ },
37308
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span": {
37309
+ "background": "hsl(230, 1%, 90%)",
37310
+ "color": "hsl(230, 6%, 44%)",
37311
+ "padding": "0.1em 0.4em",
37312
+ "borderRadius": "0.3em"
37313
+ },
37314
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover": {
37315
+ "background": "hsl(230, 1%, 78%)",
37316
+ "color": "hsl(230, 8%, 24%)"
37317
+ },
37318
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus": {
37319
+ "background": "hsl(230, 1%, 78%)",
37320
+ "color": "hsl(230, 8%, 24%)"
37321
+ },
37322
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover": {
37323
+ "background": "hsl(230, 1%, 78%)",
37324
+ "color": "hsl(230, 8%, 24%)"
37325
+ },
37326
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus": {
37327
+ "background": "hsl(230, 1%, 78%)",
37328
+ "color": "hsl(230, 8%, 24%)"
37329
+ },
37330
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover": {
37331
+ "background": "hsl(230, 1%, 78%)",
37332
+ "color": "hsl(230, 8%, 24%)"
37333
+ },
37334
+ "div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus": {
37335
+ "background": "hsl(230, 1%, 78%)",
37336
+ "color": "hsl(230, 8%, 24%)"
37337
+ },
37338
+ ".line-highlight.line-highlight": { "background": "hsla(230, 8%, 24%, 0.05)" },
37339
+ ".line-highlight.line-highlight:before": {
37340
+ "background": "hsl(230, 1%, 90%)",
37341
+ "color": "hsl(230, 8%, 24%)",
37342
+ "padding": "0.1em 0.6em",
37343
+ "borderRadius": "0.3em",
37344
+ "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
37345
+ },
37346
+ ".line-highlight.line-highlight[data-end]:after": {
37347
+ "background": "hsl(230, 1%, 90%)",
37348
+ "color": "hsl(230, 8%, 24%)",
37349
+ "padding": "0.1em 0.6em",
37350
+ "borderRadius": "0.3em",
37351
+ "boxShadow": "0 2px 0 0 rgba(0, 0, 0, 0.2)"
37352
+ },
37353
+ "pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before": { "backgroundColor": "hsla(230, 8%, 24%, 0.05)" },
37354
+ ".line-numbers.line-numbers .line-numbers-rows": { "borderRightColor": "hsla(230, 8%, 24%, 0.2)" },
37355
+ ".command-line .command-line-prompt": { "borderRightColor": "hsla(230, 8%, 24%, 0.2)" },
37356
+ ".line-numbers .line-numbers-rows > span:before": { "color": "hsl(230, 1%, 62%)" },
37357
+ ".command-line .command-line-prompt > span:before": { "color": "hsl(230, 1%, 62%)" },
37358
+ ".rainbow-braces .token.token.punctuation.brace-level-1": { "color": "hsl(5, 74%, 59%)" },
37359
+ ".rainbow-braces .token.token.punctuation.brace-level-5": { "color": "hsl(5, 74%, 59%)" },
37360
+ ".rainbow-braces .token.token.punctuation.brace-level-9": { "color": "hsl(5, 74%, 59%)" },
37361
+ ".rainbow-braces .token.token.punctuation.brace-level-2": { "color": "hsl(119, 34%, 47%)" },
37362
+ ".rainbow-braces .token.token.punctuation.brace-level-6": { "color": "hsl(119, 34%, 47%)" },
37363
+ ".rainbow-braces .token.token.punctuation.brace-level-10": { "color": "hsl(119, 34%, 47%)" },
37364
+ ".rainbow-braces .token.token.punctuation.brace-level-3": { "color": "hsl(221, 87%, 60%)" },
37365
+ ".rainbow-braces .token.token.punctuation.brace-level-7": { "color": "hsl(221, 87%, 60%)" },
37366
+ ".rainbow-braces .token.token.punctuation.brace-level-11": { "color": "hsl(221, 87%, 60%)" },
37367
+ ".rainbow-braces .token.token.punctuation.brace-level-4": { "color": "hsl(301, 63%, 40%)" },
37368
+ ".rainbow-braces .token.token.punctuation.brace-level-8": { "color": "hsl(301, 63%, 40%)" },
37369
+ ".rainbow-braces .token.token.punctuation.brace-level-12": { "color": "hsl(301, 63%, 40%)" },
37370
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix)": { "backgroundColor": "hsla(353, 100%, 66%, 0.15)" },
37371
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix)": { "backgroundColor": "hsla(353, 100%, 66%, 0.15)" },
37372
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37373
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37374
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37375
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37376
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37377
+ "pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37378
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37379
+ "pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection": { "backgroundColor": "hsla(353, 95%, 66%, 0.25)" },
37380
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix)": { "backgroundColor": "hsla(137, 100%, 55%, 0.15)" },
37381
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix)": { "backgroundColor": "hsla(137, 100%, 55%, 0.15)" },
37382
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37383
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37384
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37385
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37386
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37387
+ "pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37388
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37389
+ "pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection": { "backgroundColor": "hsla(135, 73%, 55%, 0.25)" },
37390
+ ".prism-previewer.prism-previewer:before": { "borderColor": "hsl(0, 0, 95%)" },
37391
+ ".prism-previewer-gradient.prism-previewer-gradient div": {
37392
+ "borderColor": "hsl(0, 0, 95%)",
37393
+ "borderRadius": "0.3em"
37394
+ },
37395
+ ".prism-previewer-color.prism-previewer-color:before": { "borderRadius": "0.3em" },
37396
+ ".prism-previewer-easing.prism-previewer-easing:before": { "borderRadius": "0.3em" },
37397
+ ".prism-previewer.prism-previewer:after": { "borderTopColor": "hsl(0, 0, 95%)" },
37398
+ ".prism-previewer-flipped.prism-previewer-flipped.after": { "borderBottomColor": "hsl(0, 0, 95%)" },
37399
+ ".prism-previewer-angle.prism-previewer-angle:before": { "background": "hsl(0, 0%, 100%)" },
37400
+ ".prism-previewer-time.prism-previewer-time:before": { "background": "hsl(0, 0%, 100%)" },
37401
+ ".prism-previewer-easing.prism-previewer-easing": { "background": "hsl(0, 0%, 100%)" },
37402
+ ".prism-previewer-angle.prism-previewer-angle circle": {
37403
+ "stroke": "hsl(230, 8%, 24%)",
37404
+ "strokeOpacity": "1"
37405
+ },
37406
+ ".prism-previewer-time.prism-previewer-time circle": {
37407
+ "stroke": "hsl(230, 8%, 24%)",
37408
+ "strokeOpacity": "1"
37409
+ },
37410
+ ".prism-previewer-easing.prism-previewer-easing circle": {
37411
+ "stroke": "hsl(230, 8%, 24%)",
37412
+ "fill": "transparent"
37413
+ },
37414
+ ".prism-previewer-easing.prism-previewer-easing path": { "stroke": "hsl(230, 8%, 24%)" },
37415
+ ".prism-previewer-easing.prism-previewer-easing line": { "stroke": "hsl(230, 8%, 24%)" }
37416
+ };
37417
+
37418
+ //#endregion
37419
+ //#region ../ui-kit/src/markdown/prismTheme.ts
37420
+ /** 全站唯一的代码高亮主题对。引用相等是验收判据(AC-19.8),不导出到包外。 */
37421
+ const PRISM_THEME = {
37422
+ dark: one_dark_default,
37423
+ light: one_light_default
37424
+ };
37425
+
37383
37426
  //#endregion
37384
37427
  //#region ../ui-kit/src/markdown/Markdown.tsx
37385
37428
  function CodeBlock({ node: _node, className, children, ...rest }) {
@@ -37391,8 +37434,8 @@ function CodeBlock({ node: _node, className, children, ...rest }) {
37391
37434
  children: [/* @__PURE__ */ jsx("div", {
37392
37435
  className: "border-b border-border bg-subtle px-3 py-1.5 font-mono text-xs text-muted",
37393
37436
  children: language
37394
- }), /* @__PURE__ */ jsx(SyntaxHighlighter$1, {
37395
- style: dark ? one_dark_default : one_light_default,
37437
+ }), /* @__PURE__ */ jsx(SyntaxHighlighter, {
37438
+ style: PRISM_THEME[dark ? "dark" : "light"],
37396
37439
  language,
37397
37440
  PreTag: "div",
37398
37441
  customStyle: {
@@ -42604,84 +42647,24 @@ const makeMakeSyntaxHighlighter = (SyntaxHighlighter) => (config) => {
42604
42647
  //#endregion
42605
42648
  //#region ../../node_modules/.pnpm/@assistant-ui+react-syntax-highlighter@0.14.4_@assistant-ui+react-markdown@0.14.8_@assi_6e5f40e7cc0ca11c7a2afbff74f3745a/node_modules/@assistant-ui/react-syntax-highlighter/dist/react-syntax-highlighter-light.js
42606
42649
  const makePrismAsyncLightSyntaxHighlighter = makeMakeSyntaxHighlighter(prism_async_light_default);
42607
- const makePrismLightSyntaxHighlighter = makeMakeSyntaxHighlighter(SyntaxHighlighter$1);
42608
- const makeLightSyntaxHighlighter = makeMakeSyntaxHighlighter(SyntaxHighlighter$2);
42650
+ const makePrismLightSyntaxHighlighter = makeMakeSyntaxHighlighter(SyntaxHighlighter);
42651
+ const makeLightSyntaxHighlighter = makeMakeSyntaxHighlighter(SyntaxHighlighter$1);
42609
42652
  const makeLightAsyncSyntaxHighlighter = makeMakeSyntaxHighlighter(light_async_default);
42610
42653
 
42611
42654
  //#endregion
42612
42655
  //#region ../ui-kit/src/components/assistant/markdown-text.tsx
42613
- const SyntaxHighlighter = makePrismLightSyntaxHighlighter({
42614
- style: {
42615
- "code[class*=\"language-\"]": {
42616
- color: "var(--color-ink)",
42617
- background: "transparent"
42618
- },
42619
- "pre[class*=\"language-\"]": {
42620
- color: "var(--color-ink)",
42656
+ /** 高亮器按主题构造:`makePrismLightSyntaxHighlighter` style 是静态的,只能在这里分叉 */
42657
+ function makeHighlighter(dark) {
42658
+ return makePrismLightSyntaxHighlighter({
42659
+ style: PRISM_THEME[dark ? "dark" : "light"],
42660
+ customStyle: {
42661
+ margin: 0,
42662
+ padding: "0.75rem 1rem",
42663
+ fontSize: "0.8125rem",
42621
42664
  background: "transparent"
42622
42665
  },
42623
- comment: {
42624
- color: "var(--color-muted)",
42625
- fontStyle: "italic"
42626
- },
42627
- prolog: { color: "var(--color-muted)" },
42628
- doctype: { color: "var(--color-muted)" },
42629
- cdata: { color: "var(--color-muted)" },
42630
- punctuation: { color: "var(--color-muted)" },
42631
- operator: { color: "var(--color-muted)" },
42632
- keyword: {
42633
- color: "var(--color-ink)",
42634
- fontWeight: 600
42635
- },
42636
- "attr-name": {
42637
- color: "var(--color-ink)",
42638
- fontWeight: 600
42639
- },
42640
- selector: {
42641
- color: "var(--color-ink)",
42642
- fontWeight: 600
42643
- },
42644
- tag: {
42645
- color: "var(--color-ink)",
42646
- fontWeight: 600
42647
- },
42648
- function: {
42649
- color: "var(--color-ink)",
42650
- fontWeight: 600
42651
- },
42652
- "class-name": {
42653
- color: "var(--color-ink)",
42654
- fontWeight: 600
42655
- },
42656
- string: { color: "var(--color-ink)" },
42657
- char: { color: "var(--color-ink)" },
42658
- "attr-value": { color: "var(--color-ink)" },
42659
- number: { color: "var(--color-ink)" },
42660
- boolean: { color: "var(--color-ink)" },
42661
- regex: { color: "var(--color-ink)" },
42662
- inserted: { color: "var(--color-success)" },
42663
- deleted: { color: "var(--color-destructive)" }
42664
- },
42665
- customStyle: {
42666
- margin: 0,
42667
- padding: "0.75rem 1rem",
42668
- fontSize: "0.8125rem",
42669
- background: "transparent"
42670
- },
42671
- codeTagProps: { className: "font-mono" }
42672
- });
42673
- function useCopyToClipboard(resetDelayMs = 2e3) {
42674
- const [copied, setCopied] = useState(false);
42675
- return {
42676
- copied,
42677
- copy: useCallback((value) => {
42678
- if (copied || value === "") return;
42679
- navigator.clipboard.writeText(value).then(() => {
42680
- setCopied(true);
42681
- setTimeout(() => setCopied(false), resetDelayMs);
42682
- });
42683
- }, [copied, resetDelayMs])
42684
- };
42666
+ codeTagProps: { className: "font-mono" }
42667
+ });
42685
42668
  }
42686
42669
  const CodeHeader = ({ language, code }) => {
42687
42670
  const { copied, copy } = useCopyToClipboard();
@@ -42705,24 +42688,38 @@ const CodeHeader = ({ language, code }) => {
42705
42688
  })]
42706
42689
  });
42707
42690
  };
42708
- const defaultComponents = memoizeMarkdownComponents({
42709
- SyntaxHighlighter,
42710
- CodeHeader,
42711
- pre: ({ className, ...props }) => /* @__PURE__ */ jsx("pre", {
42712
- className: cn("overflow-x-auto rounded-b-lg border border-border bg-card", className),
42713
- ...props
42714
- })
42691
+ const preComponent = ({ className, ...props }) => /* @__PURE__ */ jsx("pre", {
42692
+ className: cn("overflow-x-auto rounded-b-lg border border-border bg-card", className),
42693
+ ...props
42715
42694
  });
42695
+ const markdownComponents = {
42696
+ light: memoizeMarkdownComponents({
42697
+ SyntaxHighlighter: makeHighlighter(false),
42698
+ CodeHeader,
42699
+ pre: preComponent
42700
+ }),
42701
+ dark: memoizeMarkdownComponents({
42702
+ SyntaxHighlighter: makeHighlighter(true),
42703
+ CodeHeader,
42704
+ pre: preComponent
42705
+ })
42706
+ };
42716
42707
  /**
42717
42708
  * 流式 Markdown:消费当前 text part 的增量文本,边流边成形(标题/列表/表格/代码块),
42718
42709
  * 终态与流式期是同一个组件、同一份数据,因此 run 结束时不重排。
42719
42710
  */
42720
42711
  const MarkdownText = memo(function MarkdownText({ className }) {
42721
- return /* @__PURE__ */ jsx(MarkdownTextPrimitive, {
42722
- remarkPlugins: [remarkGfm],
42723
- className: cn("aui-md", className),
42724
- components: defaultComponents,
42725
- defer: true
42712
+ const [dark, themeRef] = useDarkAncestor();
42713
+ const components = useMemo(() => markdownComponents[dark ? "dark" : "light"], [dark]);
42714
+ return /* @__PURE__ */ jsx("div", {
42715
+ ref: themeRef,
42716
+ className: "contents",
42717
+ children: /* @__PURE__ */ jsx(MarkdownTextPrimitive, {
42718
+ remarkPlugins: [remarkGfm],
42719
+ className: cn("aui-md", className),
42720
+ components,
42721
+ defer: true
42722
+ })
42726
42723
  });
42727
42724
  });
42728
42725
 
@@ -42754,6 +42751,22 @@ const fadeInUp = {
42754
42751
  }
42755
42752
  };
42756
42753
 
42754
+ //#endregion
42755
+ //#region ../runtime/src/engine/limits.ts
42756
+ /**
42757
+ * Agent loop 的运行上限默认值。**全仓唯一来源**(S8)。
42758
+ *
42759
+ * 在 0.7.0 之前这三个数字在 `AgentLoop` 的构造与 ui-kit 的 `defaultRuntimeConfig()`
42760
+ * 里各写了一遍。两份值今天恰好相等,所以不出事;一旦其中一处被改,
42761
+ * 「恢复默认值」会恢复到 agent loop 根本不用的值——验收绿、行为错。
42762
+ * @stable
42763
+ */
42764
+ const DEFAULT_LOOP_LIMITS$1 = {
42765
+ maxTurns: 10,
42766
+ totalTimeoutMs: 12e4,
42767
+ toolTimeoutMs: 3e4
42768
+ };
42769
+
42757
42770
  //#endregion
42758
42771
  //#region ../ui-kit/src/runtime-config/types.ts
42759
42772
  /**
@@ -42775,13 +42788,11 @@ const RUNTIME_RENDERER_IDS = [
42775
42788
  "openui",
42776
42789
  "vercel"
42777
42790
  ];
42778
- /** SDK 默认值(AgentLoop 10/120s/30s/100KB、interaction user/required/300s、deny-all 等) */
42791
+ /** SDK 默认值(三个运行上限取自 `DEFAULT_LOOP_LIMITS`;interaction user/required/300s、deny-all 等) */
42779
42792
  function defaultRuntimeConfig() {
42780
42793
  return {
42781
42794
  loop: {
42782
- maxTurns: 10,
42783
- totalTimeoutMs: 12e4,
42784
- toolTimeoutMs: 3e4,
42795
+ ...DEFAULT_LOOP_LIMITS$1,
42785
42796
  toolResultMaxBytes: 1e5,
42786
42797
  maxHistoryMessages: 100
42787
42798
  },
@@ -43195,6 +43206,34 @@ function dismissAutoEntry(config, entryId) {
43195
43206
  return [...config.dismissedAutoEntries, entryId];
43196
43207
  }
43197
43208
 
43209
+ //#endregion
43210
+ //#region ../ui-kit/src/theme/statusTone.ts
43211
+ /**
43212
+ * 运行状态串 → 语义色档位。键是 run / 生命周期两侧共用的状态串,
43213
+ * 未列出的状态一律 `neutral`(未开始 / 未知),不猜。
43214
+ */
43215
+ const RUN_STATUS_TONE = {
43216
+ completed: "success",
43217
+ failed: "destructive",
43218
+ cancelled: "warning",
43219
+ running: "info"
43220
+ };
43221
+ /** 运行状态串 → 语义色档位;`RUN_STATUS_TONE` 的唯一读取入口。 */
43222
+ function runStatusTone(status) {
43223
+ return RUN_STATUS_TONE[status] ?? "neutral";
43224
+ }
43225
+ /**
43226
+ * 语义色档位 → 主题变量名。需要直接上色(而非套 `StatusBadge`)的地方消费它,
43227
+ * 取值是变量名而不是色值,暗色由主题作用域负责翻转。
43228
+ */
43229
+ const STATUS_TONE_VAR = {
43230
+ neutral: "--color-border",
43231
+ info: "--color-info",
43232
+ success: "--color-success",
43233
+ warning: "--color-warning",
43234
+ destructive: "--color-destructive"
43235
+ };
43236
+
43198
43237
  //#endregion
43199
43238
  //#region ../ui-kit/src/runtime-config/useAppearance.ts
43200
43239
  /**
@@ -43410,6 +43449,9 @@ var CompositeUiBridge = class {
43410
43449
  onTextDelta(runId, delta) {
43411
43450
  return this.#deps.reactBridge.onTextDelta(runId, delta);
43412
43451
  }
43452
+ onSkillCandidate(runId, candidate) {
43453
+ this.#deps.onSkillCandidate?.(runId, candidate);
43454
+ }
43413
43455
  /** 本档能否自行渲染交互(能力表允许且未粘性降级) */
43414
43456
  #inTier(renderer) {
43415
43457
  return renderer !== "native" && this.#capabilities[renderer].interaction && !this.#downgraded;
@@ -43766,6 +43808,8 @@ var ChatEngine = class {
43766
43808
  #profileKey;
43767
43809
  /** 本 run 内的页面感知记录(写进 assistant 消息,供历史回看) */
43768
43810
  #runPerceptions = /* @__PURE__ */ new Map();
43811
+ /** 本 run 提交的技能候选(FR-24.1);数组而非单值——一轮里可以生成不止一个 */
43812
+ #runCandidates = /* @__PURE__ */ new Map();
43769
43813
  /** 本 run 的归并后相位(FR-17.7:重载后仍能还原「运行细节」) */
43770
43814
  #runPhases = /* @__PURE__ */ new Map();
43771
43815
  /**
@@ -43806,6 +43850,9 @@ var ChatEngine = class {
43806
43850
  onResolved: (request, response) => {
43807
43851
  this.#flushAssistantMessage(request, response);
43808
43852
  },
43853
+ onSkillCandidate: (runId, candidate) => {
43854
+ this.#runCandidates.set(runId, [...this.#runCandidates.get(runId) ?? [], candidate]);
43855
+ },
43809
43856
  emit: (event) => this.#emit(event)
43810
43857
  });
43811
43858
  this.#todoStore.subscribe(() => {
@@ -43975,7 +44022,7 @@ var ChatEngine = class {
43975
44022
  async retry(messageId) {
43976
44023
  const sessionId = this.#currentSessionId;
43977
44024
  const message = (sessionId ? await this.#sessions.get(sessionId) : void 0)?.messages.find((m) => m.id === messageId);
43978
- if (!sessionId || !message || message.role !== "user") throw new WebSkillError("VALIDATION_FAILED", `Cannot retry message "${messageId}": no matching user message in the active session`);
44025
+ if (!sessionId || !message || message.role !== "user" || message.text === void 0) throw new WebSkillError("VALIDATION_FAILED", `Cannot retry message "${messageId}": no matching user message in the active session`);
43979
44026
  await this.send(message.text);
43980
44027
  }
43981
44028
  /**
@@ -44363,13 +44410,13 @@ var ChatEngine = class {
44363
44410
  * 父 run 的剩余预算(FR-11.4):子 agent 拿到的额度不得超过它。
44364
44411
  * 轮次与耗时从生命周期事件推算——`AgentLoop` 不对外暴露内部计数,
44365
44412
  * 而 `execute`/`turn` 事件本来就是它逐轮发出来的,够用且不需要改 runtime。
44366
- * 默认值与 `AgentLoop` 保持一致(maxTurns 10 / totalTimeoutMs 120s)。
44413
+ * 默认值取 `DEFAULT_LOOP_LIMITS`,与 `AgentLoop` 是同一份(0.7.0 FR-21.1)。
44367
44414
  */
44368
44415
  #parentBudget(loopConfig) {
44369
44416
  const elapsed = this.#runStartedMs > 0 ? Date.now() - this.#runStartedMs : 0;
44370
44417
  return {
44371
- remainingTurns: Math.max(0, (loopConfig.maxTurns ?? 10) - this.#runTurn),
44372
- remainingTimeoutMs: Math.max(0, (loopConfig.totalTimeoutMs ?? 12e4) - elapsed)
44418
+ remainingTurns: Math.max(0, (loopConfig.maxTurns ?? DEFAULT_LOOP_LIMITS.maxTurns) - this.#runTurn),
44419
+ remainingTimeoutMs: Math.max(0, (loopConfig.totalTimeoutMs ?? DEFAULT_LOOP_LIMITS.totalTimeoutMs) - elapsed)
44373
44420
  };
44374
44421
  }
44375
44422
  /**
@@ -44431,7 +44478,8 @@ var ChatEngine = class {
44431
44478
  maxImages: live?.multimodal.maxImagesPerMessage ?? 0
44432
44479
  };
44433
44480
  }
44434
- })] : []
44481
+ })] : [],
44482
+ ...this.#adapter.pageActions ? [createPageActionToolSource({ policy: this.#adapter.pageActions })] : []
44435
44483
  ];
44436
44484
  const deps = {
44437
44485
  fs,
@@ -44541,17 +44589,19 @@ var ChatEngine = class {
44541
44589
  const run = result.run;
44542
44590
  const status = run.status === "completed" || run.status === "cancelled" ? run.status : "failed";
44543
44591
  const toolCalls = summarizeToolCalls(run);
44544
- const latest = this.bridge.latestResult;
44545
- const blocks = latest && latest.runId === run.id ? latest.blocks.filter((block) => block.type !== "markdown" || block.text.trim() !== result.output.trim()) : void 0;
44546
44592
  const flushed = this.#flushed.get(run.id);
44593
+ const text = (this.bridge.streamingRunId === run.id ? this.bridge.streamingText : "").slice(flushed?.text ?? 0);
44594
+ const latest = this.bridge.latestResult;
44595
+ const blocks = latest && latest.runId === run.id ? latest.blocks.filter((_, index) => index !== latest.outputBlockIndex) : void 0;
44547
44596
  const surfaces = this.bridge.surfaceSnapshots.filter((snapshot) => snapshot.runId === run.id && !flushed?.surfaces.has(snapshot.id));
44548
44597
  const todos = this.#runTodos.get(run.id);
44549
44598
  const perceptions = this.#runPerceptions.get(run.id);
44599
+ const candidates = this.#runCandidates.get(run.id);
44550
44600
  const phases = (this.#runPhases.get(run.id) ?? []).slice(flushed?.phases ?? 0);
44551
44601
  const assistantMessage = {
44552
44602
  id: newId("msg"),
44553
44603
  role: "assistant",
44554
- text: result.output,
44604
+ ...text !== "" ? { text } : {},
44555
44605
  ts: (/* @__PURE__ */ new Date()).toISOString(),
44556
44606
  runId: run.id,
44557
44607
  activeSkillNames: run.activeSkillNames,
@@ -44559,6 +44609,7 @@ var ChatEngine = class {
44559
44609
  ...surfaces.length > 0 ? { surfaces } : {},
44560
44610
  ...todos && todos.length > 0 ? { todos } : {},
44561
44611
  ...perceptions && perceptions.length > 0 ? { perceptions } : {},
44612
+ ...candidates && candidates.length > 0 ? { candidates } : {},
44562
44613
  ...phases.length > 0 ? { phases } : {},
44563
44614
  ...toolCalls.length > 0 ? { toolCalls } : {},
44564
44615
  ...this.#activeModelId !== void 0 ? { model: this.#activeModelId } : {}
@@ -44580,6 +44631,7 @@ var ChatEngine = class {
44580
44631
  this.#runSkills.delete(run.id);
44581
44632
  this.#runTodos.delete(run.id);
44582
44633
  this.#runPerceptions.delete(run.id);
44634
+ this.#runCandidates.delete(run.id);
44583
44635
  this.#runPhases.delete(run.id);
44584
44636
  this.#flushed.delete(run.id);
44585
44637
  }
@@ -44686,6 +44738,7 @@ const chatbotDictionary = defineDictionary({
44686
44738
  "session.title": "Sessions",
44687
44739
  "session.new": "New chat",
44688
44740
  "session.searchPlaceholder": "Search sessions…",
44741
+ "session.searchClear": "Clear search",
44689
44742
  "session.empty": "No conversations yet.",
44690
44743
  "session.missingRoot": "Session storage is not initialised yet ({root}). The first message creates it.",
44691
44744
  "session.skipped": "These session files could not be read and were skipped: {files}",
@@ -44726,6 +44779,13 @@ const chatbotDictionary = defineDictionary({
44726
44779
  "message.delete": "Delete message",
44727
44780
  "message.viewTrace": "View trace",
44728
44781
  "message.skillsUsed": "Skills used in this run",
44782
+ "message.edit": "Edit message",
44783
+ "message.editSend": "Send",
44784
+ "message.editCancel": "Cancel",
44785
+ "capability.tools.on": "Tools",
44786
+ "capability.tools.off": "No tools",
44787
+ "capability.images.on": "Images",
44788
+ "capability.images.off": "No images",
44729
44789
  "tool.summary.one": "{count} tool call",
44730
44790
  "tool.summary.other": "{count} tool calls",
44731
44791
  "tool.status.running": "Running",
@@ -44744,6 +44804,13 @@ const chatbotDictionary = defineDictionary({
44744
44804
  "cot.reasoning": "Reasoning",
44745
44805
  "cot.working": "Working…",
44746
44806
  "trace.title": "Run steps",
44807
+ "trace.runId": "Run ID",
44808
+ "trace.runId.copy": "Copy run ID",
44809
+ "trace.runId.copied": "Run ID copied",
44810
+ "candidate.submitted": "\"{name}\" was submitted for review. It cannot be used until a reviewer approves and publishes it.",
44811
+ "candidate.id.copy": "Copy candidate ID",
44812
+ "candidate.id.copied": "Candidate ID copied",
44813
+ "candidate.review": "Go to review",
44747
44814
  "trace.skill": "Skill activated: {name}",
44748
44815
  "perception.reading": "Reading page content (scope: {scope})",
44749
44816
  "perception.excluded": "Excluded: {scope}",
@@ -44756,6 +44823,14 @@ const chatbotDictionary = defineDictionary({
44756
44823
  "trace.phase.interact": "Interact",
44757
44824
  "trace.phase.complete": "Complete",
44758
44825
  "trace.phase.fail": "Failed",
44826
+ "run.terminated.userCancelled": "Run cancelled by you",
44827
+ "run.terminated.maxTurns": "Run stopped after reaching the turn limit",
44828
+ "run.terminated.timeout": "Run stopped after reaching the time limit",
44829
+ "run.terminated.llmError": "Run stopped because the model request failed",
44830
+ "run.terminated.interactionTimeout": "Run stopped because the form was not submitted in time",
44831
+ "run.terminated.hookError": "Run stopped because a lifecycle hook failed",
44832
+ "run.terminated.toolResolutionExhausted": "Run stopped after too many calls to unknown tools",
44833
+ "run.terminated.unknown": "Run did not finish",
44759
44834
  "todo.title": "Task list",
44760
44835
  "todo.progress": "{done}/{total}",
44761
44836
  "todo.status.pending": "Pending",
@@ -44774,6 +44849,12 @@ const chatbotDictionary = defineDictionary({
44774
44849
  "interaction.authorize.description": "This skill requests a capability. Review what it wants to do, then allow or deny the request. Denying cancels the run step that asked.",
44775
44850
  "interaction.authorize.capability": "Requested capability",
44776
44851
  "interaction.authorize.details": "Request details",
44852
+ "interaction.pageAction.click": "Allow the assistant to click “{target}”?",
44853
+ "interaction.pageAction.fill": "Allow the assistant to fill “{target}” with:",
44854
+ "interaction.pageAction.submit": "Allow the assistant to submit “{target}”?",
44855
+ "interaction.pageAction.role.click": "this control",
44856
+ "interaction.pageAction.role.fill": "this field",
44857
+ "interaction.pageAction.role.submit": "this form",
44777
44858
  "interaction.origin": "From: {label}",
44778
44859
  "interaction.submitted": "Submitted",
44779
44860
  "interaction.submit": "Submit",
@@ -44813,7 +44894,6 @@ const chatbotDictionary = defineDictionary({
44813
44894
  "composer.attachment.compressed": "Compressed {from} → {to}",
44814
44895
  "composer.model": "Model",
44815
44896
  "composer.model.demo": "Demo model",
44816
- "composer.plainChatOnly": "This model can only chat: skills, generative UI and tools are unavailable.",
44817
44897
  "composer.menu": "More input options",
44818
44898
  "composer.pageCapture": "Read the page view",
44819
44899
  "composer.pageCapture.disabled.setting": "page image capture is off in Settings → Multimodal",
@@ -44886,11 +44966,19 @@ const chatbotDictionary = defineDictionary({
44886
44966
  "settings.agent.todo": "Task list",
44887
44967
  "settings.agent.todoNote": "Lets the model split a multi-step request into a checklist and report progress.",
44888
44968
  "settings.agent.generativeUi": "Generative UI",
44889
- "settings.agent.generativeUiNote": "Lets the model answer with forms, tables and charts. Off by default: the component catalogue adds ~14 KB per request.",
44969
+ "settings.agent.generativeUiNote": "Lets the model start a screen on its own, picking the components and layout. Off by default: the component catalogue adds ~14 KB per request.",
44970
+ "settings.agent.generativeUiUnaffected": "Turning this off does not hide skill-provided screens, interaction cards, or built-in result blocks.",
44890
44971
  "settings.agent.skillGeneration": "Skill generation",
44891
44972
  "settings.agent.skillGenerationNote": "Lets the model turn a reusable procedure from this conversation into a skill candidate. You confirm each one, and a reviewer approves it before anyone can use it.",
44892
44973
  "settings.agent.delegation": "Delegate sub-tasks",
44893
44974
  "settings.agent.delegationNote": "Lets the agent hand a sub-task to a separate run with its own budget, then continue from its summary. Off by default: one request can become several runs.",
44975
+ "settings.agent.limits": "Run limits",
44976
+ "settings.agent.limitsNote": "A run stops as soon as any of these is reached, and changes apply to the next run. Times are in seconds; the turn limit counts model-and-tool round trips. Raising them lets harder tasks finish, costs more, and makes a stuck run take longer to fail.",
44977
+ "settings.agent.totalTimeout": "Total run time",
44978
+ "settings.agent.maxTurns": "Turn limit",
44979
+ "settings.agent.toolTimeout": "Single tool call",
44980
+ "settings.agent.limits.invalid": "Enter a whole number greater than zero.",
44981
+ "settings.agent.limits.reset": "Restore defaults",
44894
44982
  "settings.privacy.enabled": "Learn from how you answer",
44895
44983
  "settings.privacy.enabledRisk": "Off by default. Your answers to skill forms become a profile sent to the model on later turns.",
44896
44984
  "settings.privacy.encrypted": "Encrypt stored records",
@@ -44947,6 +45035,9 @@ const chatbotDictionary = defineDictionary({
44947
45035
  "error.suggestion.RUN_INTERACTION_TIMEOUT": "Timed out waiting for your input.",
44948
45036
  "error.suggestion.RUN_MAX_TURNS_EXCEEDED": "The run reached its turn limit.",
44949
45037
  "error.suggestion.TOOL_RESOLUTION_EXHAUSTED": "The model kept calling tools that do not exist. Check that the skill actually ships the scripts it describes.",
45038
+ "error.limit.totalTimeoutMs": "Run stopped: the total run time limit ({value}s) was reached. Adjust it in Settings › Agent.",
45039
+ "error.limit.maxTurns": "Run stopped: the turn limit of {value} was reached. Adjust it in Settings › Agent.",
45040
+ "error.openSettings": "Open settings",
44950
45041
  "error.dismiss": "Dismiss"
44951
45042
  },
44952
45043
  zh: {
@@ -44959,6 +45050,7 @@ const chatbotDictionary = defineDictionary({
44959
45050
  "session.title": "会话",
44960
45051
  "session.new": "新建会话",
44961
45052
  "session.searchPlaceholder": "搜索会话…",
45053
+ "session.searchClear": "清除搜索",
44962
45054
  "session.empty": "暂无会话。",
44963
45055
  "session.missingRoot": "会话存储还没初始化({root}),发出第一条消息就会创建。",
44964
45056
  "session.skipped": "以下会话文件读不动,已跳过:{files}",
@@ -44995,10 +45087,17 @@ const chatbotDictionary = defineDictionary({
44995
45087
  "welcome.prompt.4": "解释一下 WebSkill 如何安全地运行技能脚本",
44996
45088
  "message.copy": "复制",
44997
45089
  "message.copied": "已复制",
45090
+ "message.edit": "编辑消息",
45091
+ "message.editSend": "发送",
45092
+ "message.editCancel": "取消",
44998
45093
  "message.retry": "重试",
44999
45094
  "message.delete": "删除消息",
45000
- "message.viewTrace": "查看 trace",
45095
+ "message.viewTrace": "查看追溯",
45001
45096
  "message.skillsUsed": "本轮运行使用的技能",
45097
+ "capability.tools.on": "可用工具",
45098
+ "capability.tools.off": "无工具",
45099
+ "capability.images.on": "可传图片",
45100
+ "capability.images.off": "不可传图片",
45002
45101
  "tool.summary.one": "{count} 次工具调用",
45003
45102
  "tool.summary.other": "{count} 次工具调用",
45004
45103
  "tool.status.running": "运行中",
@@ -45017,6 +45116,13 @@ const chatbotDictionary = defineDictionary({
45017
45116
  "cot.reasoning": "推理过程",
45018
45117
  "cot.working": "执行中…",
45019
45118
  "trace.title": "运行步进",
45119
+ "trace.runId": "运行 id",
45120
+ "trace.runId.copy": "复制运行 id",
45121
+ "trace.runId.copied": "运行 id 已复制",
45122
+ "candidate.submitted": "「{name}」已提交待审。审批并发布后才能使用。",
45123
+ "candidate.id.copy": "复制候选 id",
45124
+ "candidate.id.copied": "候选 id 已复制",
45125
+ "candidate.review": "去审批",
45020
45126
  "trace.skill": "已激活技能:{name}",
45021
45127
  "perception.reading": "正在读取页面内容(区域:{scope})",
45022
45128
  "perception.excluded": "已排除:{scope}",
@@ -45029,6 +45135,14 @@ const chatbotDictionary = defineDictionary({
45029
45135
  "trace.phase.interact": "交互",
45030
45136
  "trace.phase.complete": "完成",
45031
45137
  "trace.phase.fail": "失败",
45138
+ "run.terminated.userCancelled": "运行已被你中止",
45139
+ "run.terminated.maxTurns": "达到轮次上限,运行已停止",
45140
+ "run.terminated.timeout": "达到时长上限,运行已停止",
45141
+ "run.terminated.llmError": "模型请求失败,运行已停止",
45142
+ "run.terminated.interactionTimeout": "表单未及时提交,运行已停止",
45143
+ "run.terminated.hookError": "生命周期钩子失败,运行已停止",
45144
+ "run.terminated.toolResolutionExhausted": "多次调用不存在的工具,运行已停止",
45145
+ "run.terminated.unknown": "运行未正常结束",
45032
45146
  "todo.title": "任务清单",
45033
45147
  "todo.progress": "{done}/{total}",
45034
45148
  "todo.status.pending": "待开始",
@@ -45047,6 +45161,12 @@ const chatbotDictionary = defineDictionary({
45047
45161
  "interaction.authorize.description": "该技能正在请求一项能力授权。请确认它要做什么,然后允许或拒绝。拒绝会取消发起请求的这一步运行。",
45048
45162
  "interaction.authorize.capability": "请求的能力",
45049
45163
  "interaction.authorize.details": "请求详情",
45164
+ "interaction.pageAction.click": "允许助手点击「{target}」吗?",
45165
+ "interaction.pageAction.fill": "允许助手在「{target}」中填入:",
45166
+ "interaction.pageAction.submit": "允许助手提交「{target}」吗?",
45167
+ "interaction.pageAction.role.click": "这个控件",
45168
+ "interaction.pageAction.role.fill": "这个输入框",
45169
+ "interaction.pageAction.role.submit": "这个表单",
45050
45170
  "interaction.origin": "来自:{label}",
45051
45171
  "interaction.submitted": "已提交",
45052
45172
  "interaction.submit": "提交",
@@ -45086,7 +45206,6 @@ const chatbotDictionary = defineDictionary({
45086
45206
  "composer.attachment.compressed": "已压缩 {from} → {to}",
45087
45207
  "composer.model": "模型",
45088
45208
  "composer.model.demo": "演示模型",
45089
- "composer.plainChatOnly": "当前模型只能对话:技能、生成式 UI 与工具均不可用。",
45090
45209
  "composer.menu": "更多输入选项",
45091
45210
  "composer.pageCapture": "读取页面画面",
45092
45211
  "composer.pageCapture.disabled.setting": "页面图像抓取已在「设置 → 多模态」中关闭",
@@ -45113,7 +45232,7 @@ const chatbotDictionary = defineDictionary({
45113
45232
  "settings.model.removeConfirmDescription": "该条目的端点与密钥会从本浏览器删除,已有会话不受影响。",
45114
45233
  "settings.model.isDefault": "已是默认项",
45115
45234
  "settings.model.title": "模型",
45116
- "settings.model.description": "可以配置多个模型并指定默认项,在输入区随时切换。未配置任何模型时由内置演示模型应答,回复为 Mock 文本,并标注为 Demo model。",
45235
+ "settings.model.description": "可以配置多个模型并指定默认项,在输入区随时切换。未配置任何模型时由内置演示模型应答,回复为演示文本,并标注为演示模型。",
45117
45236
  "settings.model.empty": "还没有配置任何模型。",
45118
45237
  "settings.model.add": "添加模型",
45119
45238
  "settings.model.edit": "编辑",
@@ -45150,8 +45269,8 @@ const chatbotDictionary = defineDictionary({
45150
45269
  "settings.unavailable": "端点不可达",
45151
45270
  "settings.streamingSupported": "支持流式",
45152
45271
  "settings.nonStreamingFallback": "支持非流式回退",
45153
- "settings.demoBadge": "Demo model",
45154
- "settings.demoNote": "未配置端点,回复来自内置 Mock 模型——在下方连接端点即可真实对话。",
45272
+ "settings.demoBadge": "演示模型",
45273
+ "settings.demoNote": "未配置端点,回复来自内置演示模型——在下方连接端点即可真实对话。",
45155
45274
  "settings.save": "保存",
45156
45275
  "settings.clear": "清除",
45157
45276
  "settings.agent.title": "Agent 能力",
@@ -45159,11 +45278,19 @@ const chatbotDictionary = defineDictionary({
45159
45278
  "settings.agent.todo": "待办清单",
45160
45279
  "settings.agent.todoNote": "允许模型把多步骤任务拆成清单,并在执行中回报进度。",
45161
45280
  "settings.agent.generativeUi": "生成式 UI",
45162
- "settings.agent.generativeUiNote": "允许模型用表单、表格与图表作答。默认关闭:组件目录会给每次请求增加约 14 KB。",
45281
+ "settings.agent.generativeUiNote": "允许模型自行发起界面,自选组件与布局。默认关闭:组件目录会给每次请求增加约 14 KB。",
45282
+ "settings.agent.generativeUiUnaffected": "关掉它不会隐藏技能自带的界面、交互卡,以及内建的结果块。",
45163
45283
  "settings.agent.skillGeneration": "技能自动生成",
45164
45284
  "settings.agent.skillGenerationNote": "允许模型把本次对话里可复用的做法整理成技能候选。每个候选都需你当场确认,且经审核通过后才能被使用。",
45165
45285
  "settings.agent.delegation": "委派子任务",
45166
45286
  "settings.agent.delegationNote": "允许 Agent 把子任务交给一次独立运行(有自己的预算),拿到结论后再继续。默认关闭:一句话可能展开成多次运行。",
45287
+ "settings.agent.limits": "运行上限",
45288
+ "settings.agent.limitsNote": "任一项达到就停止本次运行,修改在下一次对话生效。时长单位是秒,轮数数的是模型与工具的往返次数。调大能让更难的任务跑完,代价是更贵,真卡住时也要等更久才失败。",
45289
+ "settings.agent.totalTimeout": "单次运行总时长",
45290
+ "settings.agent.maxTurns": "往返轮数上限",
45291
+ "settings.agent.toolTimeout": "单个工具调用",
45292
+ "settings.agent.limits.invalid": "请填写大于零的整数。",
45293
+ "settings.agent.limits.reset": "恢复默认值",
45167
45294
  "settings.privacy.enabled": "从你的回答里学习",
45168
45295
  "settings.privacy.enabledRisk": "默认关闭。开启后,你在技能表单里的回答会成为画像,后续对话会发给模型。",
45169
45296
  "settings.privacy.encrypted": "加密存储",
@@ -45210,7 +45337,7 @@ const chatbotDictionary = defineDictionary({
45210
45337
  "settings.voice.langFollow": "跟随界面语言",
45211
45338
  "vercel.preview.title": "Vercel AI SDK 数据契约",
45212
45339
  "vercel.preview.badge": "预览",
45213
- "vercel.preview.description": "这是接入 Vercel AI SDK 时的数据契约——payload 预览,非完整运行时。交互以 JSON 而非表单呈现;点击取消结束本次交互。",
45340
+ "vercel.preview.description": "这是接入 Vercel AI SDK 时的数据契约——请求数据预览,非完整运行时。交互以 JSON 而非表单呈现;点击取消结束本次交互。",
45214
45341
  "surface.legacy.placeholder": "旧版本生成的界面已不再渲染。",
45215
45342
  "error.title": "出错了",
45216
45343
  "error.suggestion": "关闭后重试。展开上方的运行步骤可以看到它停在哪一步。",
@@ -45220,6 +45347,9 @@ const chatbotDictionary = defineDictionary({
45220
45347
  "error.suggestion.RUN_INTERACTION_TIMEOUT": "等待你填写超时。",
45221
45348
  "error.suggestion.RUN_MAX_TURNS_EXCEEDED": "本次运行达到了轮数上限。",
45222
45349
  "error.suggestion.TOOL_RESOLUTION_EXHAUSTED": "模型反复调用不存在的工具。请确认该技能真的带了它描述的那些脚本。",
45350
+ "error.limit.totalTimeoutMs": "运行已停止:达到总时长上限({value} 秒)。可在「设置 › Agent」中调整。",
45351
+ "error.limit.maxTurns": "运行已停止:达到往返轮数上限({value} 轮)。可在「设置 › Agent」中调整。",
45352
+ "error.openSettings": "打开设置",
45223
45353
  "error.dismiss": "关闭"
45224
45354
  }
45225
45355
  });
@@ -45517,6 +45647,14 @@ const SKILL_PART = "webskill.skill";
45517
45647
  const PERCEPTION_PART = "webskill.perception";
45518
45648
  /** 已结束的交互(FR-17.8):提交后表单留在消息里,不被后续内容改写 */
45519
45649
  const INTERACTION_PART = "webskill.interaction";
45650
+ /**
45651
+ * 非正常终态提示(中止/失败,FR-20.5)。
45652
+ * 它**不能**归到思维链分组:那个容器在 run 结束后自动折叠,且折叠时子树从 DOM 卸载,
45653
+ * 提示放进去等于没有提示(裁决 D-9)。
45654
+ */
45655
+ const TERMINATION_PART = "webskill.termination";
45656
+ /** 已提交的技能候选(FR-24.1);数据直接来自 `$skillCandidate` 载荷 */
45657
+ const SKILL_CANDIDATE_PART = "webskill.skillCandidate";
45520
45658
  function parseArgs(args) {
45521
45659
  if (args === void 0 || args === "") return {};
45522
45660
  try {
@@ -45526,13 +45664,22 @@ function parseArgs(args) {
45526
45664
  return {};
45527
45665
  }
45528
45666
  }
45529
- function lifecyclePart(step) {
45667
+ /**
45668
+ * 相位 → 步骤状态。`endedAt` 只能说明「有没有结束时间」,表达不了失败,
45669
+ * 也区分不了「最后一段还没回填」与「正在进行」(FR-19.2)。
45670
+ */
45671
+ function lifecycleStatus(phases, index, settled) {
45672
+ if (phases[index]?.phase === "fail") return "failed";
45673
+ return index < phases.length - 1 || settled ? "completed" : "running";
45674
+ }
45675
+ function lifecyclePart(step, status) {
45530
45676
  return {
45531
45677
  type: "data",
45532
45678
  name: LIFECYCLE_PART,
45533
45679
  data: {
45534
45680
  phase: step.phase,
45535
45681
  at: step.at,
45682
+ status,
45536
45683
  ...step.endedAt !== void 0 ? { endedAt: step.endedAt } : {},
45537
45684
  ...step.note !== void 0 ? { note: step.note } : {}
45538
45685
  }
@@ -45560,6 +45707,16 @@ function perceptionPart(record) {
45560
45707
  }
45561
45708
  };
45562
45709
  }
45710
+ function skillCandidatePart(candidate) {
45711
+ return {
45712
+ type: "data",
45713
+ name: SKILL_CANDIDATE_PART,
45714
+ data: {
45715
+ id: candidate.id,
45716
+ name: candidate.name
45717
+ }
45718
+ };
45719
+ }
45563
45720
  function interactionPart(record) {
45564
45721
  return {
45565
45722
  type: "data",
@@ -45615,7 +45772,7 @@ function userMessage(message) {
45615
45772
  createdAt: new Date(message.ts),
45616
45773
  content: [{
45617
45774
  type: "text",
45618
- text: message.text
45775
+ text: message.text ?? ""
45619
45776
  }],
45620
45777
  attachments: (message.attachments ?? []).map((attachment) => ({
45621
45778
  id: attachment.id,
@@ -45634,17 +45791,32 @@ function userMessage(message) {
45634
45791
  */
45635
45792
  function assembleAssistantParts(source) {
45636
45793
  return [
45637
- ...source.phases.map(lifecyclePart),
45794
+ ...source.phases.map((step, index) => lifecyclePart(step, lifecycleStatus(source.phases, index, source.settled))),
45638
45795
  ...source.skills.map(skillPart),
45639
45796
  ...source.perceptions.map(perceptionPart),
45640
45797
  ...source.tools,
45641
- {
45798
+ ...source.text !== void 0 && source.text !== "" ? [{
45642
45799
  type: "text",
45643
45800
  text: source.text
45644
- },
45645
- ...source.interactions.map(interactionPart)
45801
+ }] : [],
45802
+ ...source.interactions.map(interactionPart),
45803
+ ...source.candidates.map(skillCandidatePart),
45804
+ ...terminationParts(source.phases)
45646
45805
  ];
45647
45806
  }
45807
+ /**
45808
+ * 从相位序列里取非正常终态:`fail` 相位的 note 就是 `RunTerminationReason`
45809
+ * (`phaseNote` 对 `fail` 相位返回 `event.data.reason`)。正常完成不提示。
45810
+ */
45811
+ function terminationParts(phases) {
45812
+ const last = phases.at(-1);
45813
+ if (last?.phase !== "fail") return [];
45814
+ return [{
45815
+ type: "data",
45816
+ name: TERMINATION_PART,
45817
+ data: { ...last.note !== void 0 ? { reason: last.note } : {} }
45818
+ }];
45819
+ }
45648
45820
  function assistantMessage(message) {
45649
45821
  const content = assembleAssistantParts({
45650
45822
  phases: message.phases ?? [],
@@ -45652,7 +45824,9 @@ function assistantMessage(message) {
45652
45824
  perceptions: message.perceptions ?? [],
45653
45825
  tools: (message.toolCalls ?? []).map(persistedToolPart),
45654
45826
  text: message.text,
45655
- interactions: message.interactions ?? []
45827
+ interactions: message.interactions ?? [],
45828
+ candidates: message.candidates ?? [],
45829
+ settled: true
45656
45830
  });
45657
45831
  return {
45658
45832
  id: message.id,
@@ -45693,7 +45867,9 @@ function liveMessage(live) {
45693
45867
  perceptions: live.perceptions,
45694
45868
  tools: live.tools.map(liveToolPart),
45695
45869
  text: live.text,
45696
- interactions: []
45870
+ interactions: [],
45871
+ candidates: [],
45872
+ settled: false
45697
45873
  });
45698
45874
  return {
45699
45875
  id: liveMessageId(live.runId),
@@ -45950,18 +46126,12 @@ function AssistantUiSessionList({ className = "", onNavigate, hasEarlier = false
45950
46126
  })
45951
46127
  })]
45952
46128
  }),
45953
- /* @__PURE__ */ jsxs("label", {
45954
- className: "m-3 flex items-center gap-2 rounded-md border border-input bg-background px-2.5 py-2 text-muted focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/20",
45955
- children: [/* @__PURE__ */ jsx(Search, {
45956
- className: "size-3.5 shrink-0",
45957
- "aria-hidden": true
45958
- }), /* @__PURE__ */ jsx("input", {
45959
- "aria-label": t("session.searchPlaceholder"),
45960
- value: query,
45961
- onChange: (event) => setQuery(event.target.value),
45962
- placeholder: t("session.searchPlaceholder"),
45963
- className: "min-w-0 flex-1 bg-transparent text-sm text-ink outline-none placeholder:text-muted"
45964
- })]
46129
+ /* @__PURE__ */ jsx(SearchInput, {
46130
+ value: query,
46131
+ onChange: setQuery,
46132
+ placeholder: t("session.searchPlaceholder"),
46133
+ clearLabel: t("session.searchClear"),
46134
+ className: "m-3 min-w-0"
45965
46135
  }),
45966
46136
  /* @__PURE__ */ jsxs("div", {
45967
46137
  className: "min-h-0 flex-1 overflow-y-auto px-2 pb-3",
@@ -46284,11 +46454,11 @@ function AttachmentMeta({ info }) {
46284
46454
  className: "flex shrink-0 items-center gap-1",
46285
46455
  children: [/* @__PURE__ */ jsx("span", {
46286
46456
  "data-testid": "composer-attachment-kind",
46287
- className: "rounded-sm bg-subtle px-1 py-0.5 text-[10px] uppercase",
46457
+ className: "rounded-sm bg-subtle px-1 py-0.5 text-xs uppercase",
46288
46458
  children: t(`composer.attachment.kind.${info.kind}`)
46289
46459
  }), /* @__PURE__ */ jsx("span", {
46290
46460
  "data-testid": "composer-attachment-size",
46291
- className: "text-[10px]",
46461
+ className: "text-xs",
46292
46462
  children: info.originalSize !== void 0 ? t("composer.attachment.compressed", {
46293
46463
  from: formatBytes(info.originalSize),
46294
46464
  to: formatBytes(info.size)
@@ -46503,7 +46673,7 @@ function PerceptionNotice({ data }) {
46503
46673
  const imageFailures = readCount(data, "imageFailures") ?? 0;
46504
46674
  return /* @__PURE__ */ jsxs("p", {
46505
46675
  "data-testid": "perception-notice",
46506
- className: "my-1 flex flex-wrap items-center gap-2 rounded-md border border-border bg-card px-2 py-1 text-[11px] text-muted",
46676
+ className: "my-1 flex flex-wrap items-center gap-2 rounded-md border border-border bg-card px-2 py-1 text-xs text-muted",
46507
46677
  children: [
46508
46678
  /* @__PURE__ */ jsx(Eye, {
46509
46679
  className: "size-3 shrink-0",
@@ -46530,14 +46700,17 @@ function PerceptionNotice({ data }) {
46530
46700
 
46531
46701
  //#endregion
46532
46702
  //#region src/react/interactionLabels.ts
46703
+ /** 交互类型 → 标题字典键。徽章与声明树共用,避免两处各写一份映射。 */
46704
+ function interactionTitleKey(request) {
46705
+ return request.type === "file-pick" ? "interaction.filePick.title" : `interaction.${request.type}.title`;
46706
+ }
46533
46707
  /**
46534
46708
  * 交互卡的界面文案:生成器(`@webskill/ui`)与语言无关,本地化由持有字典的宿主注入。
46535
46709
  * 四档共用本函数,切换渲染档不会让同一个请求出现两套文案。
46536
46710
  */
46537
46711
  function interactionLabels(request, t) {
46538
- const titleKey = request.type === "file-pick" ? "interaction.filePick.title" : `interaction.${request.type}.title`;
46539
46712
  return {
46540
- title: request.type === "form" && request.title ? request.title : t(titleKey),
46713
+ title: request.type === "form" && request.title ? request.title : t(interactionTitleKey(request)),
46541
46714
  submitLabel: t(request.type === "authorize" ? "interaction.allow" : request.type === "confirm" ? "interaction.confirm" : "interaction.submit"),
46542
46715
  cancelLabel: t(request.type === "authorize" ? "interaction.deny" : "interaction.cancel")
46543
46716
  };
@@ -46582,21 +46755,29 @@ function withSubmittedValues(node, values, scalarUsed) {
46582
46755
  */
46583
46756
  function SubmittedInteraction({ surfaceId, request, submittedValues }) {
46584
46757
  const t = useT();
46585
- const spec = interactionToUiSpec(request, interactionLabels(request, t));
46758
+ const spec = interactionToUiSpec(request, {
46759
+ ...interactionLabels(request, t),
46760
+ title: request.type === "form" && request.title ? request.title : ""
46761
+ });
46586
46762
  const filled = submittedValues === void 0 ? spec : withSubmittedValues(spec, submittedValues, { done: false });
46587
46763
  return /* @__PURE__ */ jsxs("div", {
46588
46764
  "data-testid": "interaction-submitted",
46589
46765
  className: "rounded-card border border-border bg-surface shadow-card",
46590
- children: [/* @__PURE__ */ jsx("div", {
46591
- className: "px-4 pt-3",
46592
- children: /* @__PURE__ */ jsx(Badge, {
46766
+ children: [/* @__PURE__ */ jsxs("div", {
46767
+ className: "flex flex-wrap items-center gap-2 px-4 pt-3",
46768
+ children: [/* @__PURE__ */ jsx(Badge, {
46769
+ tone: "info",
46770
+ "data-testid": "interaction-kind",
46771
+ children: t(interactionTitleKey(request))
46772
+ }), /* @__PURE__ */ jsx(Badge, {
46593
46773
  tone: "success",
46594
46774
  children: t("interaction.submitted")
46595
- })
46775
+ })]
46596
46776
  }), /* @__PURE__ */ jsx("fieldset", {
46597
46777
  disabled: true,
46598
46778
  className: "px-4 py-4",
46599
46779
  children: /* @__PURE__ */ jsx(NativeSpecSurface, {
46780
+ shell: "none",
46600
46781
  surfaceId,
46601
46782
  spec: filled,
46602
46783
  actions: [],
@@ -46621,22 +46802,21 @@ const isRunning = (status) => status.type === "running";
46621
46802
  function formatDuration(ms) {
46622
46803
  return ms < 1e3 ? `${Math.round(ms)} ms` : `${(ms / 1e3).toFixed(1)} s`;
46623
46804
  }
46624
- /** 思维链外层:运行中自动展开,结束自动折叠;用户手动切换后不再被自动接管 */
46805
+ /** 思维链外层:运行中自动展开,**整条消息**结束才自动折叠;用户手动切换后不再被自动接管 */
46625
46806
  function ChainOfThought({ status, children }) {
46626
46807
  const t = useT();
46627
- const running = isRunning(status);
46628
- const [open, setOpen] = useState(running);
46808
+ const messageRunning = useAuiState((s) => s.message.status?.type === "running");
46809
+ const running = isRunning(status) || messageRunning;
46810
+ const [manual, setManual] = useState(false);
46629
46811
  const [pinned, setPinned] = useState(false);
46630
- useEffect(() => {
46631
- if (!pinned) setOpen(running);
46632
- }, [running, pinned]);
46812
+ const open = pinned ? manual : running;
46633
46813
  const elapsed = useAuiState((s) => s.message.metadata?.timing)?.totalStreamTime;
46634
46814
  const label = running ? t("cot.thinking") : elapsed !== void 0 ? t("cot.thought", { duration: formatDuration(elapsed) }) : t("cot.summary");
46635
46815
  return /* @__PURE__ */ jsxs(Collapsible, {
46636
46816
  open,
46637
46817
  onOpenChange: (next) => {
46638
46818
  setPinned(true);
46639
- setOpen(next);
46819
+ setManual(next);
46640
46820
  },
46641
46821
  "data-slot": "aui_chain-of-thought",
46642
46822
  className: "overflow-hidden rounded-lg border border-border bg-card",
@@ -46662,11 +46842,45 @@ function ChainOfThought({ status, children }) {
46662
46842
  })]
46663
46843
  });
46664
46844
  }
46845
+ /**
46846
+ * 运行细节区的 runId 行(FR-18.8)。
46847
+ * 0.7.0 之前 runId 只存在于消息元数据里、界面上一个字都不露,用户报障时无从引用。
46848
+ * 入参故意收成 `unknown`:历史消息没有这个字段,取不到就整行不渲染。
46849
+ * @internal
46850
+ */
46851
+ function TraceRunId({ runId }) {
46852
+ const t = useT();
46853
+ if (typeof runId !== "string" || runId === "") return null;
46854
+ return /* @__PURE__ */ jsxs("div", {
46855
+ className: "flex items-center gap-1.5 font-mono text-xs text-muted",
46856
+ "data-testid": "trace-run-id",
46857
+ children: [
46858
+ /* @__PURE__ */ jsx("span", {
46859
+ className: "min-w-20 text-ink",
46860
+ children: t("trace.runId")
46861
+ }),
46862
+ /* @__PURE__ */ jsx("span", {
46863
+ className: "truncate",
46864
+ children: runId
46865
+ }),
46866
+ /* @__PURE__ */ jsx(CopyButton, {
46867
+ className: "ms-auto",
46868
+ value: runId,
46869
+ label: t("trace.runId.copy"),
46870
+ copiedLabel: t("trace.runId.copied")
46871
+ })
46872
+ ]
46873
+ });
46874
+ }
46665
46875
  function TraceSteps({ children }) {
46666
- return /* @__PURE__ */ jsx("ol", {
46667
- "aria-label": useT()("trace.title"),
46876
+ const t = useT();
46877
+ return /* @__PURE__ */ jsxs("div", {
46668
46878
  className: "flex flex-col gap-1",
46669
- children
46879
+ children: [/* @__PURE__ */ jsx(TraceRunId, { runId: useAuiState((s) => s.message.metadata?.custom?.["runId"]) }), /* @__PURE__ */ jsx("ol", {
46880
+ "aria-label": t("trace.title"),
46881
+ className: "flex flex-col gap-1",
46882
+ children
46883
+ })]
46670
46884
  });
46671
46885
  }
46672
46886
  const PHASE_KEY = {
@@ -46681,7 +46895,7 @@ function readString(source, key) {
46681
46895
  const value = source?.[key];
46682
46896
  return typeof value === "string" ? value : void 0;
46683
46897
  }
46684
- /** 生命周期步进行:耗时由 endedAt−at 得出,缺一不显示(不编造) */
46898
+ /** 生命周期步进行:耗时由 endedAt−at 得出,缺一不显示(不编造)。导出仅供本包单测直接渲染。 */
46685
46899
  function LifecycleStep({ data }) {
46686
46900
  const t = useT();
46687
46901
  const phase = typeof data["phase"] === "string" ? data["phase"] : void 0;
@@ -46692,12 +46906,16 @@ function LifecycleStep({ data }) {
46692
46906
  const duration = at !== void 0 && endedAt !== void 0 ? formatDuration(endedAt - at) : void 0;
46693
46907
  const note = readString(data, "note");
46694
46908
  const label = t(key);
46909
+ const status = readString(data, "status");
46910
+ const tone = status !== void 0 ? runStatusTone(status) : endedAt === void 0 ? "info" : "neutral";
46695
46911
  return /* @__PURE__ */ jsxs("li", {
46696
46912
  "aria-label": duration ? `${label}, ${duration}` : label,
46697
- className: "flex items-center gap-2 font-mono text-[11px] text-muted",
46913
+ className: "flex items-center gap-2 font-mono text-xs text-muted",
46698
46914
  children: [
46699
46915
  /* @__PURE__ */ jsx("span", {
46700
- className: `size-1.5 shrink-0 rounded-full ${endedAt === void 0 ? "bg-info" : "bg-border"}`,
46916
+ className: "size-1.5 shrink-0 rounded-full",
46917
+ style: { backgroundColor: `var(${STATUS_TONE_VAR[tone]})` },
46918
+ "data-webskill-step-tone": tone,
46701
46919
  "aria-hidden": true
46702
46920
  }),
46703
46921
  /* @__PURE__ */ jsx("span", {
@@ -46721,7 +46939,7 @@ function SkillActivation({ data }) {
46721
46939
  if (!name) return null;
46722
46940
  return /* @__PURE__ */ jsxs("li", {
46723
46941
  "aria-label": t("trace.skill", { name }),
46724
- className: "flex items-center gap-2 text-[11px] text-muted",
46942
+ className: "flex items-center gap-2 text-xs text-muted",
46725
46943
  children: [/* @__PURE__ */ jsx(Sparkles, {
46726
46944
  className: "size-3 shrink-0",
46727
46945
  "aria-hidden": true
@@ -46731,13 +46949,40 @@ function SkillActivation({ data }) {
46731
46949
  })]
46732
46950
  });
46733
46951
  }
46952
+ /** `RunTerminationReason` → 文案键;`final-answer` 是正常终态,不会走到这里 */
46953
+ const TERMINATION_KEY = {
46954
+ "user-cancelled": "run.terminated.userCancelled",
46955
+ "max-turns": "run.terminated.maxTurns",
46956
+ timeout: "run.terminated.timeout",
46957
+ "llm-error": "run.terminated.llmError",
46958
+ "interaction-timeout": "run.terminated.interactionTimeout",
46959
+ "hook-error": "run.terminated.hookError",
46960
+ "tool-resolution-exhausted": "run.terminated.toolResolutionExhausted"
46961
+ };
46962
+ /**
46963
+ * 非正常终态提示(FR-20.5)。停在消息顶层,不进思维链分组——
46964
+ * 那个容器在 run 结束后自动折叠且折叠时从 DOM 卸载,提示放进去等于没提示(裁决 D-9)。
46965
+ */
46966
+ function TerminationNotice({ data }) {
46967
+ const t = useT();
46968
+ const reason = readString(data, "reason");
46969
+ const key = reason !== void 0 && reason in TERMINATION_KEY ? TERMINATION_KEY[reason] : "run.terminated.unknown";
46970
+ return /* @__PURE__ */ jsxs("p", {
46971
+ "data-webskill-termination": reason ?? "unknown",
46972
+ className: "flex items-center gap-2 text-xs text-danger",
46973
+ children: [/* @__PURE__ */ jsx(OctagonX, {
46974
+ className: "size-3.5 shrink-0",
46975
+ "aria-hidden": true
46976
+ }), /* @__PURE__ */ jsx("span", { children: t(key) })]
46977
+ });
46978
+ }
46734
46979
  function ToolGroup({ count, running, children }) {
46735
46980
  const t = useT();
46736
46981
  return /* @__PURE__ */ jsxs("div", {
46737
46982
  "data-slot": "aui_tool-group",
46738
46983
  className: "mt-2 flex flex-col gap-1",
46739
46984
  children: [/* @__PURE__ */ jsxs("p", {
46740
- className: "flex items-center gap-2 text-[11px] text-muted",
46985
+ className: "flex items-center gap-2 text-xs text-muted",
46741
46986
  children: [
46742
46987
  /* @__PURE__ */ jsx(Wrench, {
46743
46988
  className: "size-3",
@@ -46788,7 +47033,7 @@ function ToolRow({ part }) {
46788
47033
  type: "button",
46789
47034
  "aria-expanded": open,
46790
47035
  onClick: () => setOpen((prev) => !prev),
46791
- className: "flex w-full items-center gap-2 px-2 py-1.5 text-left text-[11px] text-muted transition-colors hover:bg-accent",
47036
+ className: "flex w-full items-center gap-2 px-2 py-1.5 text-left text-xs text-muted transition-colors hover:bg-accent",
46792
47037
  children: [
46793
47038
  status === "running" ? /* @__PURE__ */ jsx(Spinner, {
46794
47039
  size: "sm",
@@ -46809,7 +47054,7 @@ function ToolRow({ part }) {
46809
47054
  }),
46810
47055
  status === "denied" ? /* @__PURE__ */ jsx("span", {
46811
47056
  "data-testid": "tool-denied",
46812
- className: "shrink-0 text-[11px] text-warning",
47057
+ className: "shrink-0 text-xs text-warning",
46813
47058
  children: t("tool.status.denied")
46814
47059
  }) : null,
46815
47060
  /* @__PURE__ */ jsx("span", {
@@ -46824,17 +47069,17 @@ function ToolRow({ part }) {
46824
47069
  }), open && (part.argsText !== "" || errorMessage !== void 0) ? /* @__PURE__ */ jsxs("div", {
46825
47070
  className: "border-t border-border px-2 py-1.5",
46826
47071
  children: [errorMessage !== void 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
46827
- className: "text-[11px] text-muted",
47072
+ className: "text-xs text-muted",
46828
47073
  children: t(errorCode !== void 0 ? ERROR_TITLE_KEYS[errorCode] ?? "tool.failed.reason" : "tool.failed.reason")
46829
47074
  }), /* @__PURE__ */ jsx("p", {
46830
47075
  "data-testid": "tool-error-reason",
46831
- className: "text-[11px] break-words text-ink",
47076
+ className: "text-xs break-words text-ink",
46832
47077
  children: errorMessage
46833
47078
  })] }) : null, part.argsText !== "" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
46834
- className: "text-[11px] text-muted",
47079
+ className: "text-xs text-muted",
46835
47080
  children: t("tool.args")
46836
47081
  }), /* @__PURE__ */ jsx("pre", {
46837
- className: "overflow-x-auto font-mono text-[11px] text-ink",
47082
+ className: "overflow-x-auto font-mono text-xs text-ink",
46838
47083
  children: part.argsText
46839
47084
  })] }) : null]
46840
47085
  }) : null]
@@ -46845,7 +47090,7 @@ function ReasoningGroup({ children }) {
46845
47090
  "data-slot": "aui_reasoning",
46846
47091
  className: "mt-2 flex flex-col gap-1",
46847
47092
  children: [/* @__PURE__ */ jsx("p", {
46848
- className: "text-[11px] text-muted",
47093
+ className: "text-xs text-muted",
46849
47094
  children: useT()("cot.reasoning")
46850
47095
  }), children]
46851
47096
  });
@@ -46874,10 +47119,51 @@ function PersistedInteraction({ data }) {
46874
47119
  });
46875
47120
  }
46876
47121
  /**
47122
+ * 已提交候选的交接卡(FR-24.1)。名称与 id 全部来自 `$skillCandidate` 载荷,
47123
+ * 一个字都不从模型复述的正文里解析。导出仅供本包单测直接渲染。
47124
+ * @internal
47125
+ */
47126
+ function SkillCandidateCard({ data, onOpenCandidate }) {
47127
+ const t = useT();
47128
+ const id = readString(data, "id");
47129
+ const name = readString(data, "name");
47130
+ if (id === void 0 || name === void 0) return null;
47131
+ return /* @__PURE__ */ jsxs("div", {
47132
+ "data-testid": "skill-candidate-card",
47133
+ className: "flex flex-col gap-2 rounded-lg border border-border bg-card p-3",
47134
+ children: [
47135
+ /* @__PURE__ */ jsx("p", {
47136
+ className: "text-sm text-ink",
47137
+ children: t("candidate.submitted", { name })
47138
+ }),
47139
+ /* @__PURE__ */ jsxs("div", {
47140
+ className: "flex items-center gap-1.5 font-mono text-xs text-muted",
47141
+ children: [/* @__PURE__ */ jsx("span", {
47142
+ "data-testid": "skill-candidate-id",
47143
+ className: "truncate",
47144
+ children: id
47145
+ }), /* @__PURE__ */ jsx(CopyButton, {
47146
+ className: "ms-auto",
47147
+ value: id,
47148
+ label: t("candidate.id.copy"),
47149
+ copiedLabel: t("candidate.id.copied")
47150
+ })]
47151
+ }),
47152
+ onOpenCandidate ? /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, {
47153
+ size: "sm",
47154
+ variant: "secondary",
47155
+ "data-testid": "skill-candidate-review",
47156
+ onClick: () => onOpenCandidate(id),
47157
+ children: t("candidate.review")
47158
+ }) }) : null
47159
+ ]
47160
+ });
47161
+ }
47162
+ /**
46877
47163
  * assistant 消息正文:思维链(生命周期步进 + 工具 + reasoning)与 Markdown 正文
46878
47164
  * 全部走同一套 part,流式与终态共用(06/07/08 号文档)。
46879
47165
  */
46880
- function WebSkillMessageParts() {
47166
+ function WebSkillMessageParts({ onOpenCandidate } = {}) {
46881
47167
  return /* @__PURE__ */ jsx(MessagePrimitive.GroupedParts, {
46882
47168
  groupBy: webskillGroupBy,
46883
47169
  indicator: "no-text",
@@ -46896,7 +47182,7 @@ function WebSkillMessageParts() {
46896
47182
  case "group-reasoning": return /* @__PURE__ */ jsx(ReasoningGroup, { children });
46897
47183
  case "text": return /* @__PURE__ */ jsx(MarkdownText, {});
46898
47184
  case "reasoning": return /* @__PURE__ */ jsx("p", {
46899
- className: "whitespace-pre-wrap text-[11px] text-muted",
47185
+ className: "whitespace-pre-wrap text-xs text-muted",
46900
47186
  children: part.text
46901
47187
  });
46902
47188
  case "tool-call": return part.toolUI ?? /* @__PURE__ */ jsx(ToolRow, { part });
@@ -46906,6 +47192,11 @@ function WebSkillMessageParts() {
46906
47192
  if (part.name === "webskill.skill") return /* @__PURE__ */ jsx(SkillActivation, { data: part.data });
46907
47193
  if (part.name === "webskill.perception") return /* @__PURE__ */ jsx(PerceptionNotice, { data: part.data });
46908
47194
  if (part.name === "webskill.interaction") return /* @__PURE__ */ jsx(PersistedInteraction, { data: part.data });
47195
+ if (part.name === "webskill.termination") return /* @__PURE__ */ jsx(TerminationNotice, { data: part.data });
47196
+ if (part.name === "webskill.skillCandidate") return /* @__PURE__ */ jsx(SkillCandidateCard, {
47197
+ data: part.data,
47198
+ ...onOpenCandidate ? { onOpenCandidate } : {}
47199
+ });
46909
47200
  return null;
46910
47201
  case "indicator": return /* @__PURE__ */ jsx(WorkingIndicator, {});
46911
47202
  default: return null;
@@ -46954,7 +47245,7 @@ function TodoRow({ item }) {
46954
47245
  children: item.title
46955
47246
  }),
46956
47247
  item.delegatedTo ? /* @__PURE__ */ jsx("span", {
46957
- className: "ms-auto shrink-0 truncate text-[11px] text-muted",
47248
+ className: "ms-auto shrink-0 truncate text-xs text-muted",
46958
47249
  children: t("todo.delegatedTo", { skill: item.delegatedTo })
46959
47250
  }) : null
46960
47251
  ]
@@ -57165,13 +57456,16 @@ function ResultBlockList({ blocks, runId, onDownload }) {
57165
57456
  }
57166
57457
  /**
57167
57458
  * run 完成结果块渐进挂载(AnimatePresence 逐块入场):
57168
- * markdown / json / table / chart / image / file + artifact 下载卡。
57459
+ * markdown / json / table / chart / image / file
57460
+ * 产物只由 blocks 中的 file block 承载——历史消息也只持久化 blocks,
57461
+ * 走同一路渲染,刷新前后的卡片计数才一致。
57169
57462
  * @stable
57170
57463
  */
57171
57464
  function ResultBlocksPro({ bridge, activeRunId, onDownload }) {
57172
- const t = useT();
57173
57465
  const result = useSyncExternalStore(bridge.subscribe, () => bridge.latestResult);
57174
57466
  if (!result || result.runId !== activeRunId) return null;
57467
+ const blocks = result.blocks.filter((_, index) => index !== result.outputBlockIndex);
57468
+ if (blocks.length === 0 && !result.title && !result.summary) return null;
57175
57469
  return /* @__PURE__ */ jsxs("div", {
57176
57470
  className: "flex flex-col gap-3",
57177
57471
  children: [
@@ -57184,25 +57478,10 @@ function ResultBlocksPro({ bridge, activeRunId, onDownload }) {
57184
57478
  children: result.summary
57185
57479
  }) : null,
57186
57480
  /* @__PURE__ */ jsx(ResultBlockList, {
57187
- blocks: result.blocks,
57481
+ blocks,
57188
57482
  runId: result.runId,
57189
57483
  ...onDownload ? { onDownload } : {}
57190
- }),
57191
- result.artifacts && result.artifacts.length > 0 ? /* @__PURE__ */ jsxs("div", {
57192
- className: "flex flex-col gap-2",
57193
- children: [/* @__PURE__ */ jsx("h4", {
57194
- className: "text-xs font-medium tracking-wide text-muted uppercase",
57195
- children: t("result.artifacts")
57196
- }), result.artifacts.map((artifact) => /* @__PURE__ */ jsx(FileCard, {
57197
- file: {
57198
- path: artifact.path,
57199
- runId: artifact.runId,
57200
- size: artifact.size,
57201
- ...artifact.mimeType ? { mimeType: artifact.mimeType } : {}
57202
- },
57203
- ...onDownload ? { onDownload } : {}
57204
- }, artifact.id))]
57205
- }) : null
57484
+ })
57206
57485
  ]
57207
57486
  });
57208
57487
  }
@@ -57303,7 +57582,7 @@ function isRenderableSpec(snapshot) {
57303
57582
  function WebSkillMessageExtensions({ message, onDownload, surfaceRegistry, renderer }) {
57304
57583
  const t = useT();
57305
57584
  if (message.role === "user") return null;
57306
- const blocks = message.blocks?.filter((block) => block.type !== "markdown" || block.text.trim() !== message.text.trim());
57585
+ const blocks = message.blocks;
57307
57586
  const surfaces = message.surfaces ?? [];
57308
57587
  const renderable = surfaces.filter(isRenderableSpec);
57309
57588
  return /* @__PURE__ */ jsxs("div", {
@@ -57331,40 +57610,60 @@ function WebSkillMessageExtensions({ message, onDownload, surfaceRegistry, rende
57331
57610
 
57332
57611
  //#endregion
57333
57612
  //#region src/react/AssistantUiMessage.tsx
57334
- function MessageAction({ label, onClick, children }) {
57613
+ /** 操作栏按钮的统一外观;primitive 按钮与自绘按钮共用,防止两条路径长得不一样 */
57614
+ const ACTION_BUTTON_CLASS = "inline-flex size-7 items-center justify-center rounded-md text-muted transition-colors hover:bg-subtle hover:text-ink focus-visible:opacity-100";
57615
+ function MessageAction({ label, onClick, asChild = false, children }) {
57335
57616
  return /* @__PURE__ */ jsx(Tooltip, {
57336
57617
  content: label,
57337
- children: /* @__PURE__ */ jsx("button", {
57618
+ children: asChild ? children : /* @__PURE__ */ jsx("button", {
57338
57619
  type: "button",
57339
57620
  "aria-label": label,
57340
57621
  onClick,
57341
- className: "inline-flex size-7 items-center justify-center rounded-md text-muted transition-colors hover:bg-subtle hover:text-ink focus-visible:opacity-100",
57622
+ className: ACTION_BUTTON_CLASS,
57342
57623
  children
57343
57624
  })
57344
57625
  });
57345
57626
  }
57346
- function AssistantUiMessageActions({ message, onRetry, onDelete, onViewTrace }) {
57627
+ function AssistantUiMessageActions({ message, onRetry, onDelete, onViewTrace, modelLabels }) {
57347
57628
  const t = useT();
57629
+ const copied = useAuiState((s) => s.message.isCopied);
57348
57630
  if (!message) return null;
57349
57631
  const isUser = message.role === "user";
57350
- return /* @__PURE__ */ jsx("div", {
57632
+ return /* @__PURE__ */ jsxs("div", {
57351
57633
  "data-testid": "assistant-ui-message-actions",
57352
57634
  "aria-label": "Message actions",
57353
- className: "pointer-events-none absolute inset-x-0 -bottom-7 h-7",
57354
- children: /* @__PURE__ */ jsxs(ActionBarPrimitive.Root, {
57635
+ className: "pointer-events-none absolute inset-x-0 -bottom-7 flex h-7 items-center",
57636
+ children: [/* @__PURE__ */ jsxs(ActionBarPrimitive.Root, {
57355
57637
  hideWhenRunning: true,
57356
57638
  autohide: "always",
57357
57639
  autohideFloat: "single-branch",
57358
- className: `webskill-aui-actions pointer-events-auto flex items-center gap-1 ${isUser ? "justify-end" : ""}`,
57640
+ className: `webskill-aui-actions pointer-events-auto flex grow items-center gap-1 ${isUser ? "justify-end" : ""}`,
57359
57641
  children: [
57360
- /* @__PURE__ */ jsx(ActionBarPrimitive.Copy, {
57361
- "aria-label": t("message.copy"),
57362
- className: "inline-flex size-7 items-center justify-center rounded-md text-muted transition-colors hover:bg-subtle hover:text-ink focus-visible:opacity-100",
57363
- children: /* @__PURE__ */ jsx(Copy, {
57364
- className: "size-3.5",
57365
- "aria-hidden": true
57642
+ /* @__PURE__ */ jsx(MessageAction, {
57643
+ label: copied ? t("message.copied") : t("message.copy"),
57644
+ asChild: true,
57645
+ children: /* @__PURE__ */ jsx(ActionBarPrimitive.Copy, {
57646
+ "aria-label": t("message.copy"),
57647
+ className: ACTION_BUTTON_CLASS,
57648
+ children: /* @__PURE__ */ jsx(Copy, {
57649
+ className: "size-3.5",
57650
+ "aria-hidden": true
57651
+ })
57366
57652
  })
57367
57653
  }),
57654
+ isUser ? /* @__PURE__ */ jsx(MessageAction, {
57655
+ label: t("message.edit"),
57656
+ asChild: true,
57657
+ children: /* @__PURE__ */ jsx(ActionBarPrimitive.Edit, {
57658
+ "aria-label": t("message.edit"),
57659
+ "data-testid": "message-edit",
57660
+ className: ACTION_BUTTON_CLASS,
57661
+ children: /* @__PURE__ */ jsx(Pencil, {
57662
+ className: "size-3.5",
57663
+ "aria-hidden": true
57664
+ })
57665
+ })
57666
+ }) : null,
57368
57667
  isUser && onRetry ? /* @__PURE__ */ jsx(MessageAction, {
57369
57668
  label: t("message.retry"),
57370
57669
  onClick: () => onRetry(message.id),
@@ -57390,19 +57689,43 @@ function AssistantUiMessageActions({ message, onRetry, onDelete, onViewTrace })
57390
57689
  })
57391
57690
  }) : null
57392
57691
  ]
57393
- })
57692
+ }), !isUser && message.model ? /* @__PURE__ */ jsx("span", {
57693
+ "data-testid": "message-model",
57694
+ className: "ms-auto shrink-0 text-xs text-muted",
57695
+ children: modelLabels?.[message.model] ?? message.model
57696
+ }) : null]
57394
57697
  });
57395
57698
  }
57396
57699
  /** assistant-ui Base message layout with WebSkill-only capabilities mounted as secondary extensions. */
57397
57700
  function AssistantUiMessage(props) {
57398
57701
  const { message } = props;
57702
+ const t = useT();
57399
57703
  const role = useAuiState((s) => s.message.role);
57400
57704
  const todos = useAuiState((s) => s.message.metadata?.custom?.["todos"]);
57705
+ const isEditing = useAuiState((s) => s.composer.isEditing);
57401
57706
  if (role === "user") return /* @__PURE__ */ jsxs("div", {
57402
57707
  className: "webskill-aui-message webskill-aui-message--user relative mb-7",
57403
57708
  "data-testid": "assistant-ui-user-message",
57404
57709
  children: [
57405
- /* @__PURE__ */ jsx("div", {
57710
+ isEditing ? /* @__PURE__ */ jsxs(ComposerPrimitive.Root, {
57711
+ "data-testid": "message-edit-composer",
57712
+ className: "flex flex-col gap-2 rounded-card border border-border bg-surface p-2",
57713
+ children: [/* @__PURE__ */ jsx(ComposerPrimitive.Input, {
57714
+ autoFocus: true,
57715
+ className: "min-h-16 w-full resize-none bg-transparent text-sm text-ink outline-none"
57716
+ }), /* @__PURE__ */ jsxs("div", {
57717
+ className: "flex items-center justify-end gap-2",
57718
+ children: [/* @__PURE__ */ jsx(ComposerPrimitive.Cancel, {
57719
+ "data-testid": "message-edit-cancel",
57720
+ className: "rounded-md px-2 py-1 text-xs text-muted transition-colors hover:bg-subtle hover:text-ink",
57721
+ children: t("message.editCancel")
57722
+ }), /* @__PURE__ */ jsx(ComposerPrimitive.Send, {
57723
+ "data-testid": "message-edit-send",
57724
+ className: "rounded-md bg-primary px-2 py-1 text-xs text-primary-foreground transition-opacity hover:opacity-90 disabled:opacity-50",
57725
+ children: t("message.editSend")
57726
+ })]
57727
+ })]
57728
+ }) : /* @__PURE__ */ jsx("div", {
57406
57729
  className: "webskill-aui-user-bubble",
57407
57730
  children: message?.text ?? ""
57408
57731
  }),
@@ -57421,7 +57744,7 @@ function AssistantUiMessage(props) {
57421
57744
  Array.isArray(todos) ? /* @__PURE__ */ jsx(TodoPanel, { items: todos }) : null,
57422
57745
  /* @__PURE__ */ jsx("div", {
57423
57746
  className: "webskill-aui-assistant-content flex min-w-0 flex-col gap-3",
57424
- children: /* @__PURE__ */ jsx(WebSkillMessageParts, {})
57747
+ children: /* @__PURE__ */ jsx(WebSkillMessageParts, { ...props.onOpenCandidate ? { onOpenCandidate: props.onOpenCandidate } : {} })
57425
57748
  }),
57426
57749
  message ? /* @__PURE__ */ jsx(WebSkillMessageExtensions, {
57427
57750
  message,
@@ -57729,10 +58052,17 @@ const SUGGESTION_KEY = {
57729
58052
  RUN_MAX_TURNS_EXCEEDED: "error.suggestion.RUN_MAX_TURNS_EXCEEDED",
57730
58053
  TOOL_RESOLUTION_EXHAUSTED: "error.suggestion.TOOL_RESOLUTION_EXHAUSTED"
57731
58054
  };
58055
+ /** 触顶类错误码 → 该由哪个上限负责(FR-21.2)。判据是码,不是 message 文本。 */
58056
+ const LIMIT_OF = {
58057
+ RUN_TIMEOUT: "totalTimeoutMs",
58058
+ RUN_MAX_TURNS_EXCEEDED: "maxTurns"
58059
+ };
57732
58060
  /** 结构化错误卡:错误码徽章 + 描述 + 建议(engine error 事件 / 失败 run) @stable */
57733
- function ErrorCard({ code, message, onDismiss }) {
58061
+ function ErrorCard({ code, message, loopLimits, onOpenSettings, onDismiss }) {
57734
58062
  const t = useT();
57735
58063
  const suggestionKey = code && code in SUGGESTION_KEY ? SUGGESTION_KEY[code] : "error.suggestion";
58064
+ const limit = code && code in LIMIT_OF ? LIMIT_OF[code] : void 0;
58065
+ const limitText = limit && loopLimits ? t(`error.limit.${limit}`, { value: limit === "totalTimeoutMs" ? Math.round(loopLimits.totalTimeoutMs / 1e3) : loopLimits.maxTurns }) : void 0;
57736
58066
  return /* @__PURE__ */ jsx("div", {
57737
58067
  role: "alert",
57738
58068
  className: "rounded-card border border-danger/30 bg-danger-soft shadow-card",
@@ -57761,12 +58091,21 @@ function ErrorCard({ code, message, onDismiss }) {
57761
58091
  }),
57762
58092
  /* @__PURE__ */ jsx("p", {
57763
58093
  className: "mt-1 text-sm break-words text-ink",
57764
- children: message
58094
+ "data-testid": "error-detail",
58095
+ children: limitText ?? message
57765
58096
  }),
57766
58097
  /* @__PURE__ */ jsx("p", {
57767
58098
  className: "mt-1 text-xs text-muted",
57768
58099
  children: t(suggestionKey)
57769
- })
58100
+ }),
58101
+ limit && onOpenSettings ? /* @__PURE__ */ jsx(Button, {
58102
+ size: "sm",
58103
+ variant: "ghost",
58104
+ className: "mt-2",
58105
+ "data-testid": "error-open-settings",
58106
+ onClick: onOpenSettings,
58107
+ children: t("error.openSettings")
58108
+ }) : null
57770
58109
  ]
57771
58110
  }),
57772
58111
  onDismiss ? /* @__PURE__ */ jsx("button", {
@@ -57794,14 +58133,6 @@ const INTERACTION_ACTIONS$1 = [{
57794
58133
  id: "cancel",
57795
58134
  intent: "cancel"
57796
58135
  }];
57797
- const kindIcons = {
57798
- ask: MessageCircleQuestionMark,
57799
- confirm: CircleQuestionMark,
57800
- form: ClipboardList,
57801
- select: ListChecks,
57802
- authorize: ShieldAlert,
57803
- "file-pick": Paperclip
57804
- };
57805
58136
  /**
57806
58137
  * 订阅 bridge.pending 渲染五类交互卡(native 档;其它档降级后也由它接管)。
57807
58138
  * 表单本体走 `NativeSpecSurface`——与 native 档 surface 侧同一个渲染入口。
@@ -57850,24 +58181,22 @@ function FilePickCard({ request, bridge }) {
57850
58181
  "data-testid": "interaction-card",
57851
58182
  "data-webskill-interaction-anchor": "",
57852
58183
  className: "rounded-card border border-border bg-surface shadow-card",
57853
- children: /* @__PURE__ */ jsxs("div", {
58184
+ children: /* @__PURE__ */ jsx("div", {
57854
58185
  className: "flex items-start gap-3 px-4 py-4",
57855
- children: [/* @__PURE__ */ jsx("span", {
57856
- className: "grid size-8 shrink-0 place-items-center rounded-lg bg-subtle text-muted",
57857
- children: /* @__PURE__ */ jsx(Paperclip, {
57858
- className: "size-4",
57859
- "aria-hidden": true
57860
- })
57861
- }), /* @__PURE__ */ jsxs("div", {
58186
+ children: /* @__PURE__ */ jsxs("div", {
57862
58187
  className: "flex min-w-0 flex-1 flex-col gap-3",
57863
58188
  children: [
57864
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
57865
- className: "text-sm font-medium text-ink",
57866
- children: t("interaction.filePick.title")
57867
- }), /* @__PURE__ */ jsx("p", {
57868
- className: "text-xs text-muted",
57869
- children: request.message
57870
- })] }),
58189
+ /* @__PURE__ */ jsxs("div", {
58190
+ className: "flex flex-col gap-1",
58191
+ children: [/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Badge, {
58192
+ tone: "info",
58193
+ "data-testid": "interaction-kind",
58194
+ children: t(interactionTitleKey(request))
58195
+ }) }), /* @__PURE__ */ jsx("p", {
58196
+ className: "text-xs text-muted",
58197
+ children: request.message
58198
+ })]
58199
+ }),
57871
58200
  error ? /* @__PURE__ */ jsx("p", {
57872
58201
  role: "alert",
57873
58202
  className: "text-xs text-danger",
@@ -57897,7 +58226,7 @@ function FilePickCard({ request, bridge }) {
57897
58226
  onChange: (event) => void onPicked(event.target.files)
57898
58227
  })
57899
58228
  ]
57900
- })]
58229
+ })
57901
58230
  })
57902
58231
  });
57903
58232
  }
@@ -57913,12 +58242,33 @@ function fileToBase64(file) {
57913
58242
  reader.readAsDataURL(file);
57914
58243
  });
57915
58244
  }
58245
+ /** 页面操作确认卡的载荷;形状不对就整段不渲染,退回通用授权展示 */
58246
+ function pageActionDetails(details) {
58247
+ if (typeof details !== "object" || details === null) return void 0;
58248
+ const record = details;
58249
+ const action = record["action"];
58250
+ const target = record["target"];
58251
+ if (action !== "click" && action !== "fill" && action !== "submit") return void 0;
58252
+ if (typeof target !== "object" || target === null) return void 0;
58253
+ const { role, name } = target;
58254
+ if (typeof role !== "string") return void 0;
58255
+ const value = record["value"];
58256
+ return {
58257
+ action,
58258
+ role,
58259
+ ...typeof name === "string" ? { name } : {},
58260
+ ...typeof value === "string" ? { value } : {}
58261
+ };
58262
+ }
57916
58263
  function ActiveInteractionCard({ request, bridge }) {
57917
58264
  const t = useT();
57918
- const spec = interactionToUiSpec(request, interactionLabels(request, t));
58265
+ const spec = interactionToUiSpec(request, {
58266
+ ...interactionLabels(request, t),
58267
+ title: request.type === "form" && request.title ? request.title : ""
58268
+ });
57919
58269
  const isAuthorize = request.type === "authorize";
57920
- const Icon = kindIcons[request.type];
57921
58270
  const preview = isAuthorize && typeof request.details === "object" && request.details !== null ? request.details["preview"] : void 0;
58271
+ const pageAction = isAuthorize && request.capability === "pageAction" ? pageActionDetails(request.details) : void 0;
57922
58272
  const handleAction = (event) => {
57923
58273
  if (event.intent !== "submit") {
57924
58274
  bridge.resolve({
@@ -57939,53 +58289,58 @@ function ActiveInteractionCard({ request, bridge }) {
57939
58289
  "data-webskill-interaction-anchor": "",
57940
58290
  className: `rounded-card border shadow-card ${isAuthorize ? "border-warning/50 bg-warning-soft" : "border-border bg-surface"}`,
57941
58291
  children: [
57942
- request.origin ? /* @__PURE__ */ jsx("div", {
57943
- className: "px-4 pt-3",
57944
- children: /* @__PURE__ */ jsx(Badge, {
58292
+ /* @__PURE__ */ jsxs("div", {
58293
+ className: "flex flex-wrap items-center gap-2 px-4 pt-3",
58294
+ children: [/* @__PURE__ */ jsx(Badge, {
58295
+ tone: isAuthorize ? "warning" : "info",
58296
+ "data-testid": "interaction-kind",
58297
+ children: t(interactionTitleKey(request))
58298
+ }), request.origin ? /* @__PURE__ */ jsx(Badge, {
57945
58299
  tone: "info",
57946
58300
  "data-testid": "interaction-origin",
57947
58301
  children: t("interaction.origin", { label: request.origin.label })
57948
- })
57949
- }) : null,
57950
- /* @__PURE__ */ jsxs("div", {
57951
- className: "flex items-start gap-3 px-4 pt-4",
57952
- children: [/* @__PURE__ */ jsx("span", {
57953
- className: `grid size-8 shrink-0 place-items-center rounded-lg ${isAuthorize ? "bg-warning/15 text-warning" : "bg-subtle text-muted"}`,
57954
- children: /* @__PURE__ */ jsx(Icon, {
57955
- className: "size-4",
57956
- "aria-hidden": true
57957
- })
57958
- }), request.type === "authorize" ? /* @__PURE__ */ jsxs("div", {
57959
- className: "flex min-w-0 flex-1 flex-col gap-2",
57960
- children: [
57961
- /* @__PURE__ */ jsxs("div", {
57962
- className: "flex items-center gap-2",
57963
- children: [/* @__PURE__ */ jsx("span", {
57964
- className: "text-xs font-medium text-muted",
57965
- children: t("interaction.authorize.capability")
57966
- }), /* @__PURE__ */ jsx(Badge, {
57967
- tone: "warning",
57968
- children: request.capability
57969
- })]
57970
- }),
57971
- /* @__PURE__ */ jsx("p", {
57972
- className: "text-xs text-muted",
57973
- children: t("interaction.authorize.description")
57974
- }),
57975
- request.details !== void 0 ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
57976
- className: "mb-1 text-xs font-medium text-muted",
57977
- children: t("interaction.authorize.details")
57978
- }), /* @__PURE__ */ jsx("pre", {
57979
- "data-testid": "interaction-authorize-details",
57980
- className: "max-h-64 overflow-auto rounded-lg border border-border bg-canvas p-3 font-mono text-xs whitespace-pre-wrap text-ink",
57981
- children: typeof preview === "string" ? preview : JSON.stringify(request.details, null, 2)
57982
- })] }) : null
57983
- ]
57984
58302
  }) : null]
57985
58303
  }),
58304
+ request.type === "authorize" ? /* @__PURE__ */ jsxs("div", {
58305
+ className: "flex min-w-0 flex-col gap-2 px-4 pt-3",
58306
+ children: [
58307
+ /* @__PURE__ */ jsxs("div", {
58308
+ className: "flex items-center gap-2",
58309
+ children: [/* @__PURE__ */ jsx("span", {
58310
+ className: "text-xs font-medium text-muted",
58311
+ children: t("interaction.authorize.capability")
58312
+ }), /* @__PURE__ */ jsx(Badge, {
58313
+ tone: "warning",
58314
+ children: request.capability
58315
+ })]
58316
+ }),
58317
+ /* @__PURE__ */ jsx("p", {
58318
+ className: "text-xs text-muted",
58319
+ children: t("interaction.authorize.description")
58320
+ }),
58321
+ pageAction ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
58322
+ "data-testid": "interaction-page-action",
58323
+ className: "text-sm text-ink",
58324
+ children: t(`interaction.pageAction.${pageAction.action}`, { target: pageAction.name ?? t(`interaction.pageAction.role.${pageAction.action}`) })
58325
+ }), pageAction.value !== void 0 ? /* @__PURE__ */ jsx("p", {
58326
+ "data-testid": "interaction-page-action-value",
58327
+ className: "font-mono text-sm text-ink",
58328
+ children: pageAction.value
58329
+ }) : null] }) : null,
58330
+ request.details !== void 0 && pageAction === void 0 ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
58331
+ className: "mb-1 text-xs font-medium text-muted",
58332
+ children: t("interaction.authorize.details")
58333
+ }), /* @__PURE__ */ jsx("pre", {
58334
+ "data-testid": "interaction-authorize-details",
58335
+ className: "max-h-64 overflow-auto rounded-lg border border-border bg-canvas p-3 font-mono text-xs whitespace-pre-wrap text-ink",
58336
+ children: typeof preview === "string" ? preview : JSON.stringify(request.details, null, 2)
58337
+ })] }) : null
58338
+ ]
58339
+ }) : null,
57986
58340
  /* @__PURE__ */ jsx("div", {
57987
58341
  className: "px-4 py-4",
57988
58342
  children: /* @__PURE__ */ jsx(NativeSpecSurface, {
58343
+ shell: "none",
57989
58344
  surfaceId: request.id,
57990
58345
  spec,
57991
58346
  actions: INTERACTION_ACTIONS$1,
@@ -58124,6 +58479,16 @@ function SpecInteraction({ channel, renderer }) {
58124
58479
 
58125
58480
  //#endregion
58126
58481
  //#region src/react/SettingsDrawer.tsx
58482
+ /** 分区级错误位。testid 带分区名,用例可判定错误来自哪一区,而不是「页面上有个红字」。 */
58483
+ function SectionError({ section, message }) {
58484
+ if (message === void 0) return null;
58485
+ return /* @__PURE__ */ jsx("div", {
58486
+ role: "alert",
58487
+ "data-testid": `settings-error-${section}`,
58488
+ className: "rounded-lg border border-danger/30 bg-danger-soft px-3 py-2 text-xs text-danger",
58489
+ children: message
58490
+ });
58491
+ }
58127
58492
  const PROVIDERS = [
58128
58493
  "openai-compatible",
58129
58494
  "anthropic",
@@ -58383,8 +58748,39 @@ function ConfirmButton({ testId, label, confirmLabel, disabled, onConfirm }) {
58383
58748
  children: armed ? confirmLabel : label
58384
58749
  });
58385
58750
  }
58751
+ /**
58752
+ * 三个运行上限在界面上的形态:两个超时用秒(毫秒对人不友好),轮数就是轮数。
58753
+ * 存储侧永远是毫秒,换算只在 `limitForm` / `limitValue` 这一对里出现。
58754
+ */
58755
+ const LIMIT_FIELDS = [
58756
+ "totalTimeoutMs",
58757
+ "maxTurns",
58758
+ "toolTimeoutMs"
58759
+ ];
58760
+ /** 字段名 → 文案键;写全键名而非拼接,字典键是字面量类型,拼出来的 `string` 过不了编译 */
58761
+ const LIMIT_LABEL = {
58762
+ totalTimeoutMs: "settings.agent.totalTimeout",
58763
+ maxTurns: "settings.agent.maxTurns",
58764
+ toolTimeoutMs: "settings.agent.toolTimeout"
58765
+ };
58766
+ /** 存储值(毫秒 / 轮)→ 输入框文本(秒 / 轮) */
58767
+ const limitForm = (loop) => ({
58768
+ totalTimeoutMs: String(loop.totalTimeoutMs / 1e3),
58769
+ maxTurns: String(loop.maxTurns),
58770
+ toolTimeoutMs: String(loop.toolTimeoutMs / 1e3)
58771
+ });
58772
+ /**
58773
+ * 输入框文本 → 存储值;非正整数一律返回 undefined,由调用方抦下写入(FR-21.1)。
58774
+ * 不接受 0 与负数:它们不是「不限制」,而是一发就超。
58775
+ */
58776
+ const limitValue = (field, raw) => {
58777
+ const text = raw.trim();
58778
+ const parsed = Number(text);
58779
+ if (text === "" || !Number.isInteger(parsed) || parsed <= 0) return void 0;
58780
+ return field === "maxTurns" ? parsed : parsed * 1e3;
58781
+ };
58386
58782
  /** 设置抽屉:模型列表(增删改 / 设默认 / 逐条探测)+ 流式与 temperature + Agent 能力 + 语音语言 @stable */
58387
- function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModelId, onAppearanceChange, onSaved, userProfileApi: profileApi, onClose }) {
58783
+ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModelId, onAppearanceChange, onSaved, userProfileApi: profileApi, initialSectionId, onClose }) {
58388
58784
  const t = useT();
58389
58785
  const [entries, setEntries] = useState([]);
58390
58786
  const [defaultId, setDefaultId] = useState();
@@ -58397,6 +58793,10 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58397
58793
  const [skillGenerationEnabled, setSkillGenerationEnabled] = useState(false);
58398
58794
  const [generativeUiEnabled, setGenerativeUiEnabled] = useState(false);
58399
58795
  const [delegationEnabled, setDelegationEnabled] = useState(false);
58796
+ /** 三个运行上限的输入框文本(FR-21.1) */
58797
+ const [limits, setLimits] = useState(() => limitForm(DEFAULT_LOOP_LIMITS));
58798
+ /** 上限校验失败的提示;贴在输入框旁,不走分区底部的写失败错误块 */
58799
+ const [limitsError, setLimitsError] = useState();
58400
58800
  const [userProfile, setUserProfile] = useState(defaultRuntimeConfig().userProfile);
58401
58801
  const [profile, setProfile] = useState();
58402
58802
  const [profileBusy, setProfileBusy] = useState(false);
@@ -58404,7 +58804,10 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58404
58804
  const [clearOnDisable, setClearOnDisable] = useState(false);
58405
58805
  const [multimodal, setMultimodal] = useState(defaultRuntimeConfig().multimodal);
58406
58806
  const [loaded, setLoaded] = useState(false);
58407
- const [error, setError] = useState();
58807
+ /** 写失败的错误按分区隔离;它们可以同时存在,切分区不清(FR-16.4 / D-3) */
58808
+ const [errors, setErrors] = useState({});
58809
+ /** 抽屉级错误:初始加载失败不属于任何单一分区 */
58810
+ const [drawerError, setDrawerError] = useState();
58408
58811
  const [probes, setProbes] = useState({});
58409
58812
  const [chrome, setChrome] = useState();
58410
58813
  const configStore = useMemo(() => runtimeConfig ? withRuntimeConfigDefaults(runtimeConfig) : void 0, [runtimeConfig]);
@@ -58425,6 +58828,8 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58425
58828
  if (!open || !configStore) return;
58426
58829
  let cancelled = false;
58427
58830
  setLoaded(false);
58831
+ setErrors({});
58832
+ setDrawerError(void 0);
58428
58833
  configStore.load().then((rc) => {
58429
58834
  if (cancelled) return;
58430
58835
  setEntries([...rc.llm.entries]);
@@ -58435,6 +58840,8 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58435
58840
  setSkillGenerationEnabled(rc.agentCapabilities.skillGeneration);
58436
58841
  setGenerativeUiEnabled(rc.agentCapabilities.generativeUi);
58437
58842
  setDelegationEnabled(rc.agentCapabilities.delegation);
58843
+ setLimits(limitForm(rc.loop));
58844
+ setLimitsError(void 0);
58438
58845
  setMultimodal(rc.multimodal);
58439
58846
  setUserProfile(rc.userProfile);
58440
58847
  setClearOnDisable(false);
@@ -58442,7 +58849,7 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58442
58849
  setProbes({});
58443
58850
  setLoaded(true);
58444
58851
  }).catch((e) => {
58445
- if (!cancelled) setError(e instanceof Error ? e.message : String(e));
58852
+ if (!cancelled) setDrawerError(e instanceof Error ? e.message : String(e));
58446
58853
  });
58447
58854
  return () => {
58448
58855
  cancelled = true;
@@ -58468,20 +58875,30 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58468
58875
  cancelled = true;
58469
58876
  };
58470
58877
  }, [open, profileApi]);
58471
- const fail = (e) => setError(e instanceof Error ? e.message : String(e));
58472
- /** 所有写路径的唯一出口:读最新配置 → 打补丁 → 保存 → 通知宿主重装配 */
58473
- const persist = (mutate) => {
58878
+ const failIn = (section) => (e) => setErrors((prev) => ({
58879
+ ...prev,
58880
+ [section]: e instanceof Error ? e.message : String(e)
58881
+ }));
58882
+ /**
58883
+ * 所有写路径的唯一出口:读最新配置 → 打补丁 → 保存 → 通知宿主重装配。
58884
+ * `section` 为必传:失败信息必须落在发起它的分区,漏传由编译器拦下(FR-16.4)。
58885
+ */
58886
+ const persist = (section, mutate) => {
58474
58887
  if (!configStore) return;
58888
+ setErrors((prev) => ({
58889
+ ...prev,
58890
+ [section]: void 0
58891
+ }));
58475
58892
  (async () => {
58476
58893
  const rc = await configStore.load();
58477
58894
  await configStore.save(mutate(rc));
58478
58895
  onSaved();
58479
- })().catch(fail);
58896
+ })().catch(failIn(section));
58480
58897
  };
58481
58898
  const persistLlm = (next, nextDefaultId) => {
58482
58899
  setEntries(next);
58483
58900
  setDefaultId(nextDefaultId);
58484
- persist((rc) => ({
58901
+ persist("models", (rc) => ({
58485
58902
  ...rc,
58486
58903
  llm: {
58487
58904
  entries: next,
@@ -58506,7 +58923,7 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58506
58923
  tools: !isBuiltin && form.toolsCapable
58507
58924
  }
58508
58925
  };
58509
- const next = entries.some((item) => item.id === entry.id) ? entries.map((item) => item.id === entry.id ? entry : item) : [...entries, entry];
58926
+ const next = entries.some((item) => item.id === entry.id) ? entries.map((item) => item.id === entry.id ? entry : item) : [entry, ...entries];
58510
58927
  setEditing(void 0);
58511
58928
  persistLlm(next, defaultId ?? entry.id);
58512
58929
  };
@@ -58516,7 +58933,7 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58516
58933
  if (editing === id) setEditing(void 0);
58517
58934
  setEntries(next);
58518
58935
  setDefaultId(nextDefaultId);
58519
- persist((rc) => ({
58936
+ persist("models", (rc) => ({
58520
58937
  ...rc,
58521
58938
  llm: {
58522
58939
  entries: next,
@@ -58544,14 +58961,14 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58544
58961
  };
58545
58962
  const setStreamingConfig = (next) => {
58546
58963
  setStreaming(next);
58547
- persist((rc) => ({
58964
+ persist("general", (rc) => ({
58548
58965
  ...rc,
58549
58966
  streaming: next
58550
58967
  }));
58551
58968
  };
58552
58969
  const commitTemperature = () => {
58553
58970
  const parsed = temperature.trim() === "" ? void 0 : Number(temperature);
58554
- persist((rc) => {
58971
+ persist("general", (rc) => {
58555
58972
  const loop = { ...rc.loop };
58556
58973
  delete loop.temperature;
58557
58974
  if (parsed !== void 0 && Number.isFinite(parsed)) loop.temperature = parsed;
@@ -58561,20 +58978,51 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58561
58978
  };
58562
58979
  });
58563
58980
  };
58564
- const setAgentCapability = (patch) => persist((rc) => ({
58981
+ const setAgentCapability = (patch) => persist("agent", (rc) => ({
58565
58982
  ...rc,
58566
58983
  agentCapabilities: {
58567
58984
  ...rc.agentCapabilities,
58568
58985
  ...patch
58569
58986
  }
58570
58987
  }));
58988
+ /**
58989
+ * 上限失焦时提交(与 temperature 同口径)。校验不过就只给错误、不调 `persist`——
58990
+ * 把 `-1` 写进去再在运行时报错,用户根本对不上号。
58991
+ */
58992
+ const commitLimit = (field) => {
58993
+ const value = limitValue(field, limits[field]);
58994
+ if (value === void 0) {
58995
+ setLimitsError(t("settings.agent.limits.invalid"));
58996
+ return;
58997
+ }
58998
+ setLimitsError(void 0);
58999
+ persist("agent", (rc) => ({
59000
+ ...rc,
59001
+ loop: {
59002
+ ...rc.loop,
59003
+ [field]: value
59004
+ }
59005
+ }));
59006
+ };
59007
+ /** 恢复默认值(FR-21.1):写回 `DEFAULT_LOOP_LIMITS`,与 agent loop 自己用的是同一份 */
59008
+ const resetLimits = () => {
59009
+ setLimits(limitForm(DEFAULT_LOOP_LIMITS));
59010
+ setLimitsError(void 0);
59011
+ persist("agent", (rc) => ({
59012
+ ...rc,
59013
+ loop: {
59014
+ ...rc.loop,
59015
+ ...DEFAULT_LOOP_LIMITS
59016
+ }
59017
+ }));
59018
+ };
58571
59019
  const setUserProfileConfig = (patch) => {
58572
59020
  const next = {
58573
59021
  ...userProfile,
58574
59022
  ...patch
58575
59023
  };
58576
59024
  setUserProfile(next);
58577
- persist((rc) => ({
59025
+ persist("privacy", (rc) => ({
58578
59026
  ...rc,
58579
59027
  userProfile: next
58580
59028
  }));
@@ -58582,7 +59030,11 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58582
59030
  /** 画像操作统一走这里:失败要能看到原因,而不是静静地什么都没发生 */
58583
59031
  const runProfileTask = (task) => {
58584
59032
  setProfileBusy(true);
58585
- task().then(setProfile).catch(fail).finally(() => setProfileBusy(false));
59033
+ setErrors((prev) => ({
59034
+ ...prev,
59035
+ privacy: void 0
59036
+ }));
59037
+ task().then(setProfile).catch(failIn("privacy")).finally(() => setProfileBusy(false));
58586
59038
  };
58587
59039
  const clearAll = async () => {
58588
59040
  if (!profileApi) return;
@@ -58599,7 +59051,7 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58599
59051
  ...patch
58600
59052
  };
58601
59053
  setMultimodal(next);
58602
- persist((rc) => ({
59054
+ persist("multimodal", (rc) => ({
58603
59055
  ...rc,
58604
59056
  multimodal: next
58605
59057
  }));
@@ -58671,6 +59123,10 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58671
59123
  title: t("settings.general.title"),
58672
59124
  description: t("settings.general.description")
58673
59125
  }),
59126
+ /* @__PURE__ */ jsx(SectionError, {
59127
+ section: "general",
59128
+ message: errors.general
59129
+ }),
58674
59130
  runtimeConfig ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FormField, {
58675
59131
  label: t("settings.streaming"),
58676
59132
  description: t("settings.streamingNote"),
@@ -58735,65 +59191,9 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58735
59191
  children: t("settings.demoNote")
58736
59192
  })]
58737
59193
  }) : null,
58738
- error ? /* @__PURE__ */ jsx("div", {
58739
- role: "alert",
58740
- className: "rounded-lg border border-danger/30 bg-danger-soft px-3 py-2 text-xs text-danger",
58741
- children: error
58742
- }) : null,
58743
- /* @__PURE__ */ jsx(RecordList, {
58744
- items: entries,
58745
- getKey: (entry) => entry.id,
58746
- rowTestId: "settings-model-row",
58747
- actionsLabel: (entry) => t("settings.model.actions", { label: entry.label }),
58748
- emptyState: t("settings.model.empty"),
58749
- onAdd: {
58750
- label: t("settings.model.add"),
58751
- testId: "settings-model-add",
58752
- onSelect: () => {
58753
- setForm(EMPTY_FORM);
58754
- setEditing("new");
58755
- }
58756
- },
58757
- actions: modelActions,
58758
- columns: [{
58759
- id: "label",
58760
- label: t("settings.model.label"),
58761
- render: (entry) => {
58762
- const unavailable = entryUnavailable(entry);
58763
- return /* @__PURE__ */ jsxs("div", {
58764
- className: "flex flex-col gap-1",
58765
- children: [
58766
- /* @__PURE__ */ jsxs("div", {
58767
- className: "flex flex-wrap items-center gap-2",
58768
- children: [
58769
- /* @__PURE__ */ jsx("span", { children: entry.label }),
58770
- entry.id === defaultId ? /* @__PURE__ */ jsx(Badge, {
58771
- tone: "success",
58772
- children: t("settings.model.default")
58773
- }) : null,
58774
- unavailable ? /* @__PURE__ */ jsx(Badge, {
58775
- tone: "warning",
58776
- children: t("settings.model.unavailable")
58777
- }) : null,
58778
- probeBadges(entry)
58779
- ]
58780
- }),
58781
- /* @__PURE__ */ jsxs("p", {
58782
- className: "text-xs font-normal text-muted",
58783
- children: [t(`settings.provider.${entry.provider}`), entry.model.trim() !== "" ? ` · ${entry.model}` : ""]
58784
- }),
58785
- unavailable ? /* @__PURE__ */ jsx("p", {
58786
- className: "text-xs font-normal text-warning",
58787
- children: unavailable
58788
- }) : null,
58789
- entry.provider === "chrome-builtin" ? /* @__PURE__ */ jsx("p", {
58790
- className: "text-xs font-normal text-muted",
58791
- children: t("settings.provider.chrome-builtin.limitation")
58792
- }) : null
58793
- ]
58794
- });
58795
- }
58796
- }]
59194
+ /* @__PURE__ */ jsx(SectionError, {
59195
+ section: "models",
59196
+ message: errors.models
58797
59197
  }),
58798
59198
  editing === void 0 ? null : /* @__PURE__ */ jsxs("div", {
58799
59199
  className: "flex flex-col gap-4 rounded-card border border-border p-3",
@@ -58932,6 +59332,61 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58932
59332
  })
58933
59333
  ]
58934
59334
  }),
59335
+ /* @__PURE__ */ jsx(RecordList, {
59336
+ items: entries,
59337
+ getKey: (entry) => entry.id,
59338
+ rowTestId: "settings-model-row",
59339
+ actionsLabel: (entry) => t("settings.model.actions", { label: entry.label }),
59340
+ emptyState: t("settings.model.empty"),
59341
+ onAdd: {
59342
+ label: t("settings.model.add"),
59343
+ testId: "settings-model-add",
59344
+ onSelect: () => {
59345
+ setForm(EMPTY_FORM);
59346
+ setEditing("new");
59347
+ }
59348
+ },
59349
+ actions: modelActions,
59350
+ columns: [{
59351
+ id: "label",
59352
+ label: t("settings.model.label"),
59353
+ render: (entry) => {
59354
+ const unavailable = entryUnavailable(entry);
59355
+ return /* @__PURE__ */ jsxs("div", {
59356
+ className: "flex flex-col gap-1",
59357
+ children: [
59358
+ /* @__PURE__ */ jsxs("div", {
59359
+ className: "flex flex-wrap items-center gap-2",
59360
+ children: [
59361
+ /* @__PURE__ */ jsx("span", { children: entry.label }),
59362
+ entry.id === defaultId ? /* @__PURE__ */ jsx(Badge, {
59363
+ tone: "success",
59364
+ children: t("settings.model.default")
59365
+ }) : null,
59366
+ unavailable ? /* @__PURE__ */ jsx(Badge, {
59367
+ tone: "warning",
59368
+ children: t("settings.model.unavailable")
59369
+ }) : null,
59370
+ probeBadges(entry)
59371
+ ]
59372
+ }),
59373
+ /* @__PURE__ */ jsxs("p", {
59374
+ className: "text-xs font-normal text-muted",
59375
+ children: [t(`settings.provider.${entry.provider}`), entry.model.trim() !== "" ? ` · ${entry.model}` : ""]
59376
+ }),
59377
+ unavailable ? /* @__PURE__ */ jsx("p", {
59378
+ className: "text-xs font-normal text-warning",
59379
+ children: unavailable
59380
+ }) : null,
59381
+ entry.provider === "chrome-builtin" ? /* @__PURE__ */ jsx("p", {
59382
+ className: "text-xs font-normal text-muted",
59383
+ children: t("settings.provider.chrome-builtin.limitation")
59384
+ }) : null
59385
+ ]
59386
+ });
59387
+ }
59388
+ }]
59389
+ }),
58935
59390
  /* @__PURE__ */ jsx("p", {
58936
59391
  className: "text-xs text-muted",
58937
59392
  children: t("settings.nonStreamingFallback")
@@ -58951,6 +59406,10 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58951
59406
  title: t("settings.agent.title"),
58952
59407
  description: t("settings.agent.description")
58953
59408
  }),
59409
+ /* @__PURE__ */ jsx(SectionError, {
59410
+ section: "agent",
59411
+ message: errors.agent
59412
+ }),
58954
59413
  plainChatOnly ? /* @__PURE__ */ jsx("p", {
58955
59414
  className: "text-xs text-warning",
58956
59415
  "data-testid": "settings-agent-plain-chat",
@@ -58984,6 +59443,11 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
58984
59443
  }
58985
59444
  })
58986
59445
  }),
59446
+ /* @__PURE__ */ jsx("p", {
59447
+ "data-testid": "settings-agent-generative-ui-unaffected",
59448
+ className: "-mt-2 text-xs text-muted",
59449
+ children: t("settings.agent.generativeUiUnaffected")
59450
+ }),
58987
59451
  /* @__PURE__ */ jsx(FormField, {
58988
59452
  label: t("settings.agent.skillGeneration"),
58989
59453
  description: t("settings.agent.skillGenerationNote"),
@@ -59011,7 +59475,48 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
59011
59475
  setAgentCapability({ delegation: next });
59012
59476
  }
59013
59477
  })
59014
- })
59478
+ }),
59479
+ /* @__PURE__ */ jsx(DescriptionText, {
59480
+ title: t("settings.agent.limits"),
59481
+ description: t("settings.agent.limitsNote")
59482
+ }),
59483
+ /* @__PURE__ */ jsx("div", {
59484
+ className: "flex gap-3",
59485
+ children: LIMIT_FIELDS.map((field) => /* @__PURE__ */ jsxs("div", {
59486
+ className: "flex min-w-0 flex-1 flex-col gap-1",
59487
+ children: [/* @__PURE__ */ jsx(Label, {
59488
+ htmlFor: `webskill-settings-limit-${field}`,
59489
+ children: t(LIMIT_LABEL[field])
59490
+ }), /* @__PURE__ */ jsx(Input, {
59491
+ id: `webskill-settings-limit-${field}`,
59492
+ "data-testid": `settings-agent-limit-${field}`,
59493
+ className: "w-full",
59494
+ type: "text",
59495
+ inputMode: "numeric",
59496
+ value: limits[field],
59497
+ disabled: !loaded,
59498
+ onChange: (event) => setLimits((prev) => ({
59499
+ ...prev,
59500
+ [field]: event.target.value
59501
+ })),
59502
+ onBlur: () => commitLimit(field)
59503
+ })]
59504
+ }, field))
59505
+ }),
59506
+ limitsError ? /* @__PURE__ */ jsx("p", {
59507
+ className: "text-xs text-danger",
59508
+ "data-testid": "settings-agent-limits-error",
59509
+ role: "alert",
59510
+ children: limitsError
59511
+ }) : null,
59512
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, {
59513
+ size: "sm",
59514
+ variant: "ghost",
59515
+ disabled: !loaded,
59516
+ "data-testid": "settings-agent-limits-reset",
59517
+ onClick: resetLimits,
59518
+ children: t("settings.agent.limits.reset")
59519
+ }) })
59015
59520
  ] })
59016
59521
  },
59017
59522
  {
@@ -59026,6 +59531,10 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
59026
59531
  title: t("settings.privacy.title"),
59027
59532
  description: t("settings.privacy.description")
59028
59533
  }),
59534
+ /* @__PURE__ */ jsx(SectionError, {
59535
+ section: "privacy",
59536
+ message: errors.privacy
59537
+ }),
59029
59538
  /* @__PURE__ */ jsx(FormField, {
59030
59539
  label: t("settings.privacy.enabled"),
59031
59540
  description: t("settings.privacy.enabledRisk"),
@@ -59114,7 +59623,7 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
59114
59623
  api: profileApi,
59115
59624
  busy: profileBusy,
59116
59625
  onChanged: setProfile,
59117
- onError: fail,
59626
+ onError: failIn("privacy"),
59118
59627
  onRefine: () => runProfileTask(() => profileApi.refine()),
59119
59628
  onDeleteEntry: (id) => runProfileTask(() => profileApi.deleteEntry(id)),
59120
59629
  onClearRecords: () => runProfileTask(async () => {
@@ -59144,6 +59653,10 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
59144
59653
  title: t("settings.multimodal.title"),
59145
59654
  description: t("settings.multimodal.description")
59146
59655
  }),
59656
+ /* @__PURE__ */ jsx(SectionError, {
59657
+ section: "multimodal",
59658
+ message: errors.multimodal
59659
+ }),
59147
59660
  /* @__PURE__ */ jsx(FormField, {
59148
59661
  label: t("settings.multimodal.imageAttachments"),
59149
59662
  description: t("settings.multimodal.imageAttachmentsRisk"),
@@ -59200,24 +59713,38 @@ function SettingsDrawer({ open, runtimeConfig, dictationLang = "", selectedModel
59200
59713
  }
59201
59714
  ] : []
59202
59715
  ];
59203
- const [activeSection, setActiveSection] = useState("general");
59716
+ const [activeSection, setActiveSection] = useState(initialSectionId ?? "general");
59204
59717
  const active = sections.some((section) => section.id === activeSection) ? activeSection : "general";
59718
+ useEffect(() => {
59719
+ if (open && initialSectionId !== void 0) setActiveSection(initialSectionId);
59720
+ }, [open, initialSectionId]);
59205
59721
  return /* @__PURE__ */ jsx(Sheet, {
59206
59722
  open,
59207
59723
  onOpenChange: (next) => !next && onClose(),
59208
59724
  children: /* @__PURE__ */ jsxs(SheetContent, {
59209
59725
  side: "right",
59726
+ size: "lg",
59210
59727
  title: t("settings.title"),
59211
- className: "flex w-[44rem] max-w-[calc(100vw-2rem)] flex-col p-0",
59212
- children: [/* @__PURE__ */ jsx("h2", {
59213
- className: "border-b border-border px-5 py-4 font-display text-base font-semibold text-ink",
59214
- children: t("settings.title")
59215
- }), /* @__PURE__ */ jsx(SettingsPanel, {
59216
- sections,
59217
- activeId: active,
59218
- onActiveChange: setActiveSection,
59219
- className: "min-h-0 flex-1"
59220
- })]
59728
+ className: "flex flex-col p-0",
59729
+ children: [
59730
+ /* @__PURE__ */ jsx("h2", {
59731
+ className: "border-b border-border px-5 py-4 font-display text-base font-semibold text-ink",
59732
+ children: t("settings.title")
59733
+ }),
59734
+ /* @__PURE__ */ jsx("div", {
59735
+ className: "px-5 empty:hidden",
59736
+ children: /* @__PURE__ */ jsx(SectionError, {
59737
+ section: "drawer",
59738
+ message: drawerError
59739
+ })
59740
+ }),
59741
+ /* @__PURE__ */ jsx(SettingsPanel, {
59742
+ sections,
59743
+ activeId: active,
59744
+ onActiveChange: setActiveSection,
59745
+ className: "min-h-0 flex-1"
59746
+ })
59747
+ ]
59221
59748
  })
59222
59749
  });
59223
59750
  }
@@ -59274,12 +59801,25 @@ async function downloadArtifactFile(storage, chatRoot, file) {
59274
59801
  URL.revokeObjectURL(url);
59275
59802
  }
59276
59803
  }
59277
- /** 无工具模型的常驻说明;单独成组件是因为 `Chatbot` 本身在 LocaleProvider 之外,取不到 `useT` */
59278
- function PlainChatNotice() {
59279
- return /* @__PURE__ */ jsx("p", {
59280
- "data-testid": "plain-chat-notice",
59281
- className: "px-1 pb-1 text-xs text-muted",
59282
- children: useT()("composer.plainChatOnly")
59804
+ /** 所选模型的能力徽章;单独成组件是因为 `Chatbot` 本身在 LocaleProvider 之外,取不到 `useT` */
59805
+ function ModelCapabilityBadges({ tools, images }) {
59806
+ const t = useT();
59807
+ const toolsBadge = /* @__PURE__ */ jsx(Badge, {
59808
+ tone: tools ? "neutral" : "warning",
59809
+ "data-testid": "capability-tools",
59810
+ children: t(tools ? "capability.tools.on" : "capability.tools.off")
59811
+ });
59812
+ return /* @__PURE__ */ jsxs("div", {
59813
+ "data-testid": "model-capabilities",
59814
+ className: "flex flex-wrap items-center gap-1.5 px-1 pb-1",
59815
+ children: [tools ? toolsBadge : /* @__PURE__ */ jsx(Tooltip, {
59816
+ content: t("settings.capability.plainChat"),
59817
+ children: toolsBadge
59818
+ }), /* @__PURE__ */ jsx(Badge, {
59819
+ tone: "neutral",
59820
+ "data-testid": "capability-images",
59821
+ children: t(images ? "capability.images.on" : "capability.images.off")
59822
+ })]
59283
59823
  });
59284
59824
  }
59285
59825
  /**
@@ -59356,6 +59896,20 @@ function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, render
59356
59896
  const [error, setError] = useState();
59357
59897
  const [drawerOpen, setDrawerOpen] = useState(false);
59358
59898
  const [settingsOpen, setSettingsOpen] = useState(false);
59899
+ /** 打开设置时定位到哪个分区:触顶报错直达 Agent 区,顶栏入口仍从头开始(FR-21.2) */
59900
+ const [settingsSection, setSettingsSection] = useState("general");
59901
+ const openSettings = (section) => {
59902
+ setSettingsSection(section);
59903
+ setSettingsOpen(true);
59904
+ };
59905
+ /** 触顶报错要说出「当前值」,所以渲染面留一份运行上限;随设置保存重取(FR-21.2) */
59906
+ const [loopLimits, setLoopLimits] = useState(() => {
59907
+ const { totalTimeoutMs, maxTurns } = defaultRuntimeConfig().loop;
59908
+ return {
59909
+ totalTimeoutMs,
59910
+ maxTurns
59911
+ };
59912
+ });
59359
59913
  /** 当前进行中 run 的 part 累积器(流式正文 / 工具 / 生命周期步进的唯一来源) */
59360
59914
  const [live, setLive] = useState();
59361
59915
  const [interactionPending, setInteractionPending] = useState(false);
@@ -59420,6 +59974,10 @@ function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, render
59420
59974
  });
59421
59975
  multimodalRef.current = rc.multimodal;
59422
59976
  setMultimodal(rc.multimodal);
59977
+ setLoopLimits({
59978
+ totalTimeoutMs: rc.loop.totalTimeoutMs,
59979
+ maxTurns: rc.loop.maxTurns
59980
+ });
59423
59981
  }).catch(() => void 0);
59424
59982
  return () => {
59425
59983
  cancelled = true;
@@ -59445,8 +60003,10 @@ function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, render
59445
60003
  }, [selectedEntry]);
59446
60004
  /** 演示档一个模型条目都没有,别把「模型不支持图片」这种话安在它头上 */
59447
60005
  const modelTakesImages = llmSelection.entries.length === 0 || imageCapable;
59448
- /** 无工具模型:技能、生成式 UI、待办全部不可达,输入区要常驻说明(FR-14.4) */
59449
- const plainChatOnly = selectedEntry !== void 0 && !entryCapabilities(selectedEntry).tools;
60006
+ /** 选中模型的关键能力;演示档一个条目都没有,不改徽章(FR-16.3) */
60007
+ const modelCapabilities = selectedEntry === void 0 ? void 0 : entryCapabilities(selectedEntry);
60008
+ /** 消息上存的是条目 id,展示得换成人读得懂的名称(FR-16.2) */
60009
+ const modelLabels = useMemo(() => Object.fromEntries(llmSelection.entries.map((entry) => [entry.id, entry.label])), [llmSelection.entries]);
59450
60010
  const composerModels = useMemo(() => {
59451
60011
  if (llmSelection.entries.length === 0) return void 0;
59452
60012
  const selected = modelId ?? llmSelection.defaultId ?? llmSelection.entries[0]?.id ?? "";
@@ -59571,7 +60131,11 @@ function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, render
59571
60131
  engine.retry(messageId).catch((e) => setError({ message: toErrorMessage(e) }));
59572
60132
  }, [engine]);
59573
60133
  const handleEdit = useCallback((messageId, text) => {
59574
- engine.editAndResend(messageId, text).then(() => setMessages((prev) => prev.slice(0, prev.findIndex((m) => m.id === messageId)))).catch((e) => setError({ message: toErrorMessage(e) }));
60134
+ setMessages((prev) => {
60135
+ const index = prev.findIndex((m) => m.id === messageId);
60136
+ return index < 0 ? prev : prev.slice(0, index);
60137
+ });
60138
+ engine.editAndResend(messageId, text).catch((e) => setError({ message: toErrorMessage(e) }));
59575
60139
  }, [engine]);
59576
60140
  const handleDeleteMessage = useCallback((messageId) => {
59577
60141
  engine.deleteMessage(messageId).then(() => setMessages((prev) => prev.filter((m) => m.id !== messageId))).catch((e) => setError({ message: toErrorMessage(e) }));
@@ -59756,7 +60320,7 @@ function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, render
59756
60320
  onOpenSessions: () => setDrawerOpen(true),
59757
60321
  onCreateSession: handleCreate,
59758
60322
  onOpenConsole: () => adapter.navigation.openConsole(),
59759
- onOpenSettings: () => setSettingsOpen(true),
60323
+ onOpenSettings: () => openSettings("general"),
59760
60324
  theme,
59761
60325
  onToggleTheme: () => handleAppearanceChange({ theme: theme === "dark" ? "light" : "dark" })
59762
60326
  }),
@@ -59789,9 +60353,11 @@ function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, render
59789
60353
  onRetry: handleRetry,
59790
60354
  onDelete: handleDeleteMessage,
59791
60355
  onDownload: handleDownload,
60356
+ modelLabels,
59792
60357
  ...surfaceRegistry ? { surfaceRegistry } : {},
59793
60358
  renderer,
59794
- ...adapter.navigation.openConsoleTrace ? { onViewTrace: adapter.navigation.openConsoleTrace } : {}
60359
+ ...adapter.navigation.openConsoleTrace ? { onViewTrace: adapter.navigation.openConsoleTrace } : {},
60360
+ ...adapter.navigation.openConsoleCandidate ? { onOpenCandidate: adapter.navigation.openConsoleCandidate } : {}
59795
60361
  })
59796
60362
  }),
59797
60363
  (() => {
@@ -59832,6 +60398,8 @@ function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, render
59832
60398
  error ? /* @__PURE__ */ jsx(ErrorCard, {
59833
60399
  message: error.message,
59834
60400
  ...error.code ? { code: error.code } : {},
60401
+ loopLimits,
60402
+ onOpenSettings: () => openSettings("agent"),
59835
60403
  onDismiss: () => setError(void 0)
59836
60404
  }) : null
59837
60405
  ]
@@ -59846,7 +60414,10 @@ function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, render
59846
60414
  } : {},
59847
60415
  onLocate: handleLocateInteraction
59848
60416
  }),
59849
- plainChatOnly ? /* @__PURE__ */ jsx(PlainChatNotice, {}) : null,
60417
+ modelCapabilities ? /* @__PURE__ */ jsx(ModelCapabilityBadges, {
60418
+ tools: modelCapabilities.tools,
60419
+ images: modelCapabilities.image
60420
+ }) : null,
59850
60421
  /* @__PURE__ */ jsx(AssistantUiComposer, {
59851
60422
  running: sending,
59852
60423
  disabled: interactionPending,
@@ -59876,6 +60447,7 @@ function Chatbot({ adapter, config, locale: localeProp, theme: themeProp, render
59876
60447
  ...config?.runtimeConfig ? { runtimeConfig: config.runtimeConfig } : {},
59877
60448
  ...selectedModelId !== "" ? { selectedModelId } : {},
59878
60449
  dictationLang,
60450
+ initialSectionId: settingsSection,
59879
60451
  onAppearanceChange: handleAppearanceChange,
59880
60452
  userProfileApi,
59881
60453
  onSaved: () => {