@yadsh/dsh-qa-surface 0.1.1 → 0.2.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +162 -14
  3. package/SPEC-dsh-qa-surface.md +600 -96
  4. package/capability-policy.json +5 -0
  5. package/compatibility.json +7 -1
  6. package/cordis.patch.yml +11 -0
  7. package/docs/ARCHITECTURE.md +49 -7
  8. package/docs/COMPATIBILITY.md +5 -4
  9. package/docs/CONFIGURATION.md +96 -2
  10. package/lib/attestation.js +10 -0
  11. package/lib/attestation.js.map +1 -0
  12. package/lib/client/QaConfigController.js +111 -4
  13. package/lib/client/QaConfigController.js.map +1 -1
  14. package/lib/client/QaSessionController.js +501 -119
  15. package/lib/client/QaSessionController.js.map +1 -1
  16. package/lib/client/QaSurface.js +137 -20
  17. package/lib/client/QaSurface.js.map +1 -1
  18. package/lib/client/QaTranscriptAdapter.js +534 -45
  19. package/lib/client/QaTranscriptAdapter.js.map +1 -1
  20. package/lib/client/attestation.js +60 -0
  21. package/lib/client/attestation.js.map +1 -0
  22. package/lib/client/chat-index.js +86 -0
  23. package/lib/client/chat-index.js.map +1 -0
  24. package/lib/client/components/Markdown.js +75 -5
  25. package/lib/client/components/Markdown.js.map +1 -1
  26. package/lib/client/components/QaAgentsDrawer.js +40 -0
  27. package/lib/client/components/QaAgentsDrawer.js.map +1 -0
  28. package/lib/client/components/QaComposer.js +132 -15
  29. package/lib/client/components/QaComposer.js.map +1 -1
  30. package/lib/client/components/QaMessage.js +184 -10
  31. package/lib/client/components/QaMessage.js.map +1 -1
  32. package/lib/client/components/QaSidebar.js +124 -0
  33. package/lib/client/components/QaSidebar.js.map +1 -0
  34. package/lib/client/components/QaSourcesDrawer.js +46 -0
  35. package/lib/client/components/QaSourcesDrawer.js.map +1 -0
  36. package/lib/client/components/QaWorkGroup.js +135 -0
  37. package/lib/client/components/QaWorkGroup.js.map +1 -0
  38. package/lib/client/components/VariantSwitcher.js +29 -0
  39. package/lib/client/components/VariantSwitcher.js.map +1 -0
  40. package/lib/client/components/format.js +48 -0
  41. package/lib/client/components/format.js.map +1 -0
  42. package/lib/client/index.js +77 -34
  43. package/lib/client/index.js.map +1 -1
  44. package/lib/client/styles.js +308 -43
  45. package/lib/client/styles.js.map +1 -1
  46. package/lib/client/types.js +13 -0
  47. package/lib/client/types.js.map +1 -0
  48. package/lib/client/wait-for.js +49 -0
  49. package/lib/client/wait-for.js.map +1 -0
  50. package/lib/client.js +8228 -383
  51. package/lib/client.js.map +1 -1
  52. package/lib/config.js +61 -9
  53. package/lib/config.js.map +1 -1
  54. package/lib/index.js +166 -70
  55. package/lib/index.js.map +1 -1
  56. package/lib/lockdown-policy.js +20 -0
  57. package/lib/lockdown-policy.js.map +1 -0
  58. package/lib/resolve-config.js +122 -10
  59. package/lib/resolve-config.js.map +1 -1
  60. package/lib/secure-session.js +170 -0
  61. package/lib/secure-session.js.map +1 -0
  62. package/lib/typert.host.d.ts +3 -0
  63. package/lib/typert.host.js +191 -0
  64. package/lib/typert.remote-client.d.ts +24 -0
  65. package/lib/typert.remote-client.js +129 -0
  66. package/lib/types/attestation.d.ts +17 -0
  67. package/lib/types/client/QaConfigController.d.ts +34 -2
  68. package/lib/types/client/QaSessionController.d.ts +106 -19
  69. package/lib/types/client/QaSurface.d.ts +5 -4
  70. package/lib/types/client/QaTranscriptAdapter.d.ts +17 -2
  71. package/lib/types/client/attestation.d.ts +25 -0
  72. package/lib/types/client/chat-index.d.ts +28 -0
  73. package/lib/types/client/components/Markdown.d.ts +7 -3
  74. package/lib/types/client/components/QaAgentsDrawer.d.ts +25 -0
  75. package/lib/types/client/components/QaComposer.d.ts +12 -2
  76. package/lib/types/client/components/QaMessage.d.ts +14 -1
  77. package/lib/types/client/components/QaSidebar.d.ts +41 -0
  78. package/lib/types/client/components/QaSourcesDrawer.d.ts +8 -0
  79. package/lib/types/client/components/QaWorkGroup.d.ts +19 -0
  80. package/lib/types/client/components/VariantSwitcher.d.ts +19 -0
  81. package/lib/types/client/components/format.d.ts +9 -0
  82. package/lib/types/client/index.d.ts +1 -5
  83. package/lib/types/client/types.d.ts +29 -0
  84. package/lib/types/client/wait-for.d.ts +11 -0
  85. package/lib/types/index.d.ts +22 -6
  86. package/lib/types/lockdown-policy.d.ts +18 -0
  87. package/lib/types/secure-session.d.ts +22 -0
  88. package/lib/types/types.d.ts +148 -1
  89. package/package.json +29 -3
@@ -1,58 +1,323 @@
1
+ /**
2
+ * Company interaction palette ("Цвета взаимодействия" guideline) — the single
3
+ * source of every hard-coded color in this file. The object is emitted once as
4
+ * --dsh-qa-* custom properties on the .dsh-qa-surface root; rules below may
5
+ * only reference these tokens (brand and interaction colors) or the themed
6
+ * --dsw-alias-* tokens (surfaces and typography keep following the host
7
+ * light/dark theme). Rebranding = editing this one object.
8
+ */
9
+ const QA_BRAND_PALETTE = {
10
+ brand: "#3D9E9A",
11
+ // Primary — CTA (Link / Link30 / TextSelect / LinkHover)
12
+ accent: "#6D9E45",
13
+ accentSoft: "#D4E2C3",
14
+ textSelect: "#CBD5C6",
15
+ accentHover: "#51733F",
16
+ // Blue — informational
17
+ info: "#2C71E8",
18
+ info30: "#C0D5F8",
19
+ info10: "#EAF1FD",
20
+ // Green — success
21
+ success: "#4CB250",
22
+ success30: "#CAE6CB",
23
+ success10: "#EEF8EE",
24
+ // Red — failure
25
+ error: "#EA3E3E",
26
+ error30: "#F9C6C6",
27
+ error10: "#FDECEC",
28
+ errorHover: "#C13533",
29
+ // Orange — notifications
30
+ warning: "#FFAD0A",
31
+ warning30: "#FFE7B6",
32
+ warning10: "#FFF7E7",
33
+ warningHover: "#DF9911",
34
+ // Text/icon color placed on top of an accent fill.
35
+ accentContrast: "#FFFFFF",
36
+ };
37
+ const QA_BRAND_TOKENS = Object.entries(QA_BRAND_PALETTE)
38
+ .map(([token, value]) => `--dsh-qa-${token.replace(/[A-Z]/gu, (letter) => `-${letter.toLowerCase()}`)}:${value}`)
39
+ .join(";");
1
40
  export const QA_SURFACE_STYLES = String.raw `
2
- .dsh-qa-surface{position:fixed;inset:0;z-index:2147483000;pointer-events:auto;display:flex;flex-direction:column;min-width:0;height:100vh;height:100dvh;overflow:hidden;background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font-family:inherit}
41
+ .dsh-qa-surface{${QA_BRAND_TOKENS};position:fixed;inset:0;z-index:2147483000;pointer-events:auto;display:flex;flex-direction:row;min-width:0;height:100vh;height:100dvh;overflow:hidden;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font-family:inherit}
42
+ .dsh-qa-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column}
43
+ .dsh-qa-sidebar{flex:none;width:264px;display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base)}
44
+ .dsh-qa-sidebar--collapsed{width:52px;align-items:center;padding-top:12px}
45
+ .dsh-qa-sidebar__head{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none;padding:14px 10px 10px 16px}
46
+ .dsh-qa-sidebar__brand{display:flex;align-items:center;gap:8px;min-width:0}
47
+ .dsh-qa-sidebar__logo{display:grid;place-items:center;width:20px;height:20px;flex:none;color:var(--dsh-qa-brand)}
48
+ .dsh-qa-sidebar__logo svg,.dsh-qa-sidebar__logo img{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
49
+ .dsh-qa-sidebar__logo img{object-fit:contain;border-radius:6px}
50
+ .dsh-qa-sidebar__name{min-width:0;overflow:hidden;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:18px;text-overflow:ellipsis;white-space:nowrap}
51
+ .dsh-qa-sidebar__collapse,.dsh-qa-sidebar__expand{appearance:none;display:grid;place-items:center;flex:none;width:26px;height:26px;padding:0;border:0;border-radius:7px;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
52
+ .dsh-qa-sidebar__collapse:hover,.dsh-qa-sidebar__expand:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
53
+ .dsh-qa-sidebar__collapse:focus-visible,.dsh-qa-sidebar__expand:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
54
+ .dsh-qa-sidebar__collapse svg,.dsh-qa-sidebar__expand svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round;transition:transform .16s}.dsh-qa-sidebar__expand svg{transform:rotate(180deg)}
55
+ .dsh-qa-sidebar__newbar{flex:none;padding:2px 12px 10px}
56
+ .dsh-qa-sidebar__new{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;padding:8px 12px;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;font-weight:500;line-height:18px;cursor:pointer;transition:border-color .12s,background .12s}
57
+ .dsh-qa-sidebar__new:hover:not(:disabled){border-color:var(--dsw-alias-label-dimmed);background:var(--dsw-alias-interactive-bg-hover)}
58
+ .dsh-qa-sidebar__new:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
59
+ .dsh-qa-sidebar__new:disabled{color:var(--dsw-alias-label-tertiary);cursor:default}
60
+ .dsh-qa-sidebar__new svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
61
+ .dsh-qa-sidebar__search{position:relative;flex:none;padding:0 12px 10px}
62
+ .dsh-qa-sidebar__search svg{position:absolute;top:7px;left:22px;width:14px;height:14px;fill:none;stroke:var(--dsw-alias-label-tertiary);stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
63
+ .dsh-qa-sidebar__search input{display:block;width:100%;padding:7px 10px 7px 32px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:18px;-webkit-appearance:none;appearance:none}
64
+ .dsh-qa-sidebar__search input::placeholder{color:var(--dsw-alias-label-tertiary)}
65
+ .dsh-qa-sidebar__search input:focus{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px;border-color:transparent}
66
+ .dsh-qa-sidebar__list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 8px 12px}
67
+ .dsh-qa-sidebar__empty{margin:8px 8px 0;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:18px}
68
+ .dsh-qa-sidebar__item{display:flex;align-items:center;gap:2px;width:100%;padding:2px;border-radius:8px}
69
+ .dsh-qa-sidebar__item:hover,.dsh-qa-sidebar__item--active{background:var(--dsw-alias-bg-layer-2)}
70
+ .dsh-qa-sidebar__item-main{appearance:none;display:flex;align-items:center;gap:8px;flex:1;min-width:0;border:0;background:0 0;cursor:pointer;text-align:left;font:inherit;padding:7px 6px;border-radius:8px}
71
+ .dsh-qa-sidebar__item-main:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
72
+ .dsh-qa-sidebar__item-delete{appearance:none;flex:none;display:flex;align-items:center;justify-content:center;border:0;background:0 0;cursor:pointer;color:var(--dsw-alias-label-tertiary);padding:5px;border-radius:6px;opacity:0;transition:opacity .12s}
73
+ .dsh-qa-sidebar__item:hover .dsh-qa-sidebar__item-delete,.dsh-qa-sidebar__item-delete:focus-visible,.dsh-qa-sidebar__item-delete--confirm{opacity:1}
74
+ .dsh-qa-sidebar__item-delete:hover{color:var(--dsw-alias-label-primary)}
75
+ .dsh-qa-sidebar__item-delete:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
76
+ .dsh-qa-sidebar__item-delete--confirm{color:var(--dsh-qa-error-hover)}
77
+ .dsh-qa-sidebar__item-delete svg{width:14px;height:14px;display:block;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
78
+ .dsh-qa-sidebar__item-title{flex:1;min-width:0;overflow:hidden;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}
79
+ .dsh-qa-sidebar__item--active .dsh-qa-sidebar__item-title{color:var(--dsw-alias-label-primary);font-weight:500}
80
+ .dsh-qa-sidebar__item-meta{flex:none;display:flex;align-items:center;gap:5px;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:14px}
81
+ .dsh-qa-sidebar__dot{width:7px;height:7px;border-radius:999px;background:var(--dsh-qa-brand);flex:none}
3
82
  .dsh-qa-surface *{box-sizing:border-box}
83
+ .dsh-qa-surface ::selection{background:var(--dsh-qa-text-select)}
4
84
  .dsh-qa-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
5
- .dsh-qa-header{flex:none;border-bottom:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2)}
6
- .dsh-qa-header__inner,.dsh-qa-footer__inner,.dsh-qa-transcript__inner{width:100%;margin:0 auto}
7
- .dsh-qa-header__inner{min-height:72px;display:flex;align-items:center;gap:12px;padding:12px 24px}
8
- .dsh-qa-header__logo{width:36px;height:36px;object-fit:contain;border-radius:9px;flex:none}
9
- .dsh-qa-header__text{flex:1;min-width:0}
10
- .dsh-qa-header h1{margin:0;color:var(--dsw-alias-label-primary);font-size:17px;font-weight:650;line-height:1.35}
11
- .dsh-qa-header p{margin:2px 0 0;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.4}
85
+ .dsh-qa-header{position:relative;flex:none;background:var(--dsw-alias-bg-base)}
86
+ .dsh-qa-header::after{content:"";position:absolute;right:0;bottom:1px;left:0;height:1px;background:var(--dsw-alias-border-l2);pointer-events:none}
87
+ .dsh-qa-header__inner{width:100%;padding:11px 28px 0 30px}
88
+ .dsh-qa-header__title-row{display:flex;align-items:center;min-height:32px;gap:10px}
89
+ .dsh-qa-header__logo{width:24px;height:24px;object-fit:contain;border-radius:6px;flex:none}
90
+ .dsh-qa-header h1{max-width:min(42vw,420px);min-width:0;overflow:hidden;margin:0;color:var(--dsw-alias-label-primary);font-size:14px;font-weight:500;line-height:20px;text-overflow:ellipsis;white-space:nowrap}
91
+ .dsh-qa-header__mode{display:inline-flex;align-items:center;gap:5px;flex:none;color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:20px;white-space:nowrap}
92
+ .dsh-qa-header__mode svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
93
+ .dsh-qa-header__reset{margin-left:auto;padding:5px 10px;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;cursor:pointer}
94
+ .dsh-qa-header__agents{display:inline-flex;align-items:center;gap:6px;flex:none;padding:5px 10px;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;line-height:20px;cursor:pointer}
95
+ .dsh-qa-header__agents--end{margin-left:auto}
96
+ .dsh-qa-header__agents:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
97
+ .dsh-qa-header__agents:disabled{opacity:.45;cursor:default}
98
+ .dsh-qa-header__agents[aria-expanded="true"]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
99
+ .dsh-qa-header__agents svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
100
+ .dsh-qa-header__agents:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
101
+ .dsh-qa-agentview{display:flex;align-items:center;gap:8px;flex:none;padding:6px 28px;border-bottom:1px solid var(--dsh-qa-info-30);background:var(--dsh-qa-info-10);color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}
102
+ .dsh-qa-header__viewing{display:inline-flex;align-items:center;gap:7px;flex:none;padding:3px 10px;border-radius:999px;background:var(--dsh-qa-info-10);color:var(--dsh-qa-info);font-size:13px;line-height:20px;white-space:nowrap}
103
+ .dsh-qa-header__viewing > svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
104
+ .dsh-qa-header__back{border:0;background:transparent;padding:0;color:var(--dsh-qa-info);font:inherit;font-size:13px;font-weight:500;line-height:20px;cursor:pointer}
105
+ .dsh-qa-header__back:hover{text-decoration:underline}
106
+ .dsh-qa-header__back:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
107
+ .dsh-qa-agentview strong{color:var(--dsw-alias-label-primary);font-weight:600}
108
+ .dsh-qa-agentview__icon{width:16px;height:16px;flex:none;fill:none;stroke:var(--dsh-qa-info);stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
109
+ .dsh-qa-agentview button{margin-left:auto;flex:none;padding:4px 10px;border:0;border-radius:8px;background:transparent;color:var(--dsh-qa-info);font:inherit;font-size:13px;font-weight:500;cursor:pointer}
110
+ .dsh-qa-agentview button:hover{background:color-mix(in srgb,var(--dsh-qa-info) 12%,transparent)}
111
+ .dsh-qa-agentview button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:1px}
112
+ .dsh-qa-agents{flex:none;display:flex;flex-direction:column;width:360px;min-height:0;border-left:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base)}
113
+ .dsh-qa-agents__head{display:flex;align-items:center;justify-content:space-between;flex:none;padding:14px 12px 10px 16px;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}
114
+ .dsh-qa-agents__head button{appearance:none;display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:7px;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
115
+ .dsh-qa-agents__head button:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
116
+ .dsh-qa-agents__head button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
117
+ .dsh-qa-agents__head button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round}
118
+ .dsh-qa-agents__list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 10px 12px}
119
+ .dsh-qa-agents__item{display:flex;align-items:center;gap:10px;width:100%;margin:0 0 6px;padding:10px 12px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2);font:inherit;text-align:left;cursor:pointer}
120
+ .dsh-qa-agents__item:hover{border-color:var(--dsw-alias-label-dimmed)}
121
+ .dsh-qa-agents__item--active{border-color:var(--dsh-qa-brand)}
122
+ .dsh-qa-agents__item:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
123
+ .dsh-qa-agents__dot{width:8px;height:8px;flex:none;border-radius:999px;background:var(--dsw-alias-label-tertiary)}
124
+ .dsh-qa-agents__dot--running{background:var(--dsh-qa-success)}
125
+ .dsh-qa-agents__text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
126
+ .dsh-qa-agents__title{overflow:hidden;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:18px;text-overflow:ellipsis;white-space:nowrap}
127
+ .dsh-qa-agents__meta{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:15px}
128
+ .dsh-qa-agents__open{flex:none;color:var(--dsh-qa-accent);font-size:12px;font-weight:500;line-height:18px}
129
+ .dsh-qa-header__sources{display:inline-flex;align-items:center;gap:6px;flex:none;padding:5px 10px;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;line-height:20px;cursor:pointer}
130
+ .dsh-qa-header__sources--end{margin-left:auto}
131
+ .dsh-qa-header__sources:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
132
+ .dsh-qa-header__sources:disabled{opacity:.45;cursor:default}
133
+ .dsh-qa-header__sources[aria-expanded="true"]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
134
+ .dsh-qa-header__sources svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
135
+ .dsh-qa-header__sources:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
136
+ .dsh-qa-header__reset:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
137
+ .dsh-qa-header__reset:disabled{opacity:.45;cursor:default}
138
+ .dsh-qa-header__tabs{position:relative;z-index:1;display:flex;gap:32px;margin-top:4px}
139
+ .dsh-qa-header__tabs span{position:relative;padding:0 0 11px;color:var(--dsh-qa-accent);font-size:13px;font-weight:500;line-height:16px}
140
+ .dsh-qa-header__tabs span::after{content:"";position:absolute;right:0;bottom:1px;left:0;height:2px;border-radius:2px;background:var(--dsh-qa-accent)}
12
141
  .dsh-qa-transcript{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
13
- .dsh-qa-transcript__inner{min-height:100%;padding:32px 24px 24px}
14
- .dsh-qa-welcome{min-height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:40px 0}
15
- .dsh-qa-welcome h2{max-width:620px;margin:0;color:var(--dsw-alias-label-primary);font-size:clamp(24px,4vw,34px);font-weight:600;line-height:1.25}
16
- .dsh-qa-suggestions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:24px}
17
- .dsh-qa-suggestions button{max-width:360px;padding:9px 13px;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;line-height:1.35;cursor:pointer}
18
- .dsh-qa-suggestions button:hover:not(:disabled){border-color:var(--dsw-alias-label-dimmed);color:var(--dsw-alias-label-primary)}
19
- .dsh-qa-suggestions button:disabled{opacity:.5;cursor:default}
20
- .dsh-qa-message{display:flex;flex-direction:column;max-width:min(82%,720px);margin:0 0 24px}
142
+ .dsh-qa-transcript__inner{width:100%;min-height:100%;margin:0 auto;padding:18px 16px 42px}
143
+ .dsh-qa-welcome{min-height:calc(100% - 40px);display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:48px 0 88px}
144
+ .dsh-qa-welcome h2{max-width:620px;margin:0;color:var(--dsw-alias-label-primary);font-size:clamp(25px,4vw,34px);font-weight:600;line-height:1.24;letter-spacing:-.02em}
145
+ .dsh-qa-welcome p{max-width:520px;margin:10px 0 0;color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:21px}
146
+ .dsh-qa-message-slot{width:100%;min-width:0}
147
+ .dsh-qa-variants{display:flex;align-items:center;gap:2px;margin:-10px 0 16px}
148
+ .dsh-qa-variants button{display:grid;place-items:center;width:24px;height:24px;padding:0;border:0;border-radius:7px;background:transparent;color:var(--dsw-alias-label-tertiary);cursor:pointer}
149
+ .dsh-qa-variants button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
150
+ .dsh-qa-variants button:disabled{opacity:.4;cursor:default}
151
+ .dsh-qa-variants button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-1px}
152
+ .dsh-qa-variants button svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
153
+ .dsh-qa-variants span{min-width:34px;text-align:center;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;font-variant-numeric:tabular-nums}
154
+ .dsh-qa-sources{flex:none;display:flex;flex-direction:column;width:360px;min-height:0;border-left:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base)}
155
+ .dsh-qa-sources__head{display:flex;align-items:center;justify-content:space-between;flex:none;padding:14px 12px 10px 16px;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}
156
+ .dsh-qa-sources__head button{appearance:none;display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:7px;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
157
+ .dsh-qa-sources__head button:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
158
+ .dsh-qa-sources__head button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
159
+ .dsh-qa-sources__head button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round}
160
+ .dsh-qa-sources__list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 10px 12px}
161
+ button.dsh-qa-sources__item{display:flex;gap:10px;width:100%;margin:0 0 8px;padding:10px 12px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2);font:inherit;text-align:left;cursor:pointer;transition:border-color .12s}
162
+ .dsh-qa-sources__kind{display:grid;place-items:center;width:18px;height:18px;flex:none;margin-top:1px;color:var(--dsw-alias-label-tertiary)}
163
+ .dsh-qa-sources__kind svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
164
+ .dsh-qa-sources__item:hover{border-color:var(--dsw-alias-label-dimmed)}
165
+ .dsh-qa-sources__item:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
166
+ .dsh-qa-sources__text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
167
+ .dsh-qa-sources__title{overflow:hidden;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:18px;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}
168
+ a.dsh-qa-sources__title:hover{text-decoration:underline}
169
+ .dsh-qa-sources__target{overflow:hidden;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px;text-overflow:ellipsis;white-space:nowrap}
170
+ .dsh-qa-sources__text p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:17px}
171
+ .dsh-qa-sourcedetail{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 10px 12px}
172
+ .dsh-qa-sourcedetail__head{display:flex;align-items:center;gap:8px;flex:none;padding:2px 2px 8px}
173
+ .dsh-qa-sourcedetail__back{display:grid;place-items:center;width:26px;height:26px;flex:none;padding:0;border:0;border-radius:7px;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
174
+ .dsh-qa-sourcedetail__back:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
175
+ .dsh-qa-sourcedetail__back:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
176
+ .dsh-qa-sourcedetail__back svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
177
+ .dsh-qa-sourcedetail__kind{display:grid;place-items:center;width:16px;height:16px;flex:none;color:var(--dsw-alias-label-tertiary)}
178
+ .dsh-qa-sourcedetail__kind svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
179
+ .dsh-qa-sourcedetail__title{min-width:0;overflow:hidden;flex:1;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px;text-overflow:ellipsis;white-space:nowrap}
180
+ .dsh-qa-sourcedetail__open{flex:none;padding:3px 10px;border:1px solid var(--dsh-qa-accent);border-radius:999px;color:var(--dsh-qa-accent);font-size:12px;font-weight:500;line-height:18px;text-decoration:none}
181
+ .dsh-qa-sourcedetail__open:hover{background:var(--dsh-qa-accent);color:var(--dsh-qa-accent-contrast)}
182
+ .dsh-qa-sourcedetail__open:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
183
+ .dsh-qa-sourcedetail__target{flex:none;margin:0 2px 8px;overflow:hidden;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px;text-overflow:ellipsis;white-space:nowrap}
184
+ .dsh-qa-sourcedetail__body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font-size:12px;line-height:19px;white-space:pre-wrap;overflow-wrap:anywhere}
185
+ .dsh-qa-sourcedetail__body a{color:var(--dsh-qa-accent);text-decoration:underline}
186
+ .dsh-qa-sourcedetail__body p{margin:0}
187
+ .dsh-qa-sourcedetail__empty{margin:0;color:var(--dsw-alias-label-tertiary)}
188
+ .dsh-qa-message{display:flex;flex-direction:column;width:100%;min-width:0;margin:0 0 20px}
21
189
  .dsh-qa-message--user{align-items:flex-end;margin-left:auto}
22
190
  .dsh-qa-message--assistant{align-items:flex-start;margin-right:auto}
23
- .dsh-qa-message--system{align-items:center;max-width:100%;margin-left:auto;margin-right:auto}
24
- .dsh-qa-message__meta{display:flex;gap:8px;margin:0 4px 6px;color:var(--dsw-alias-label-tertiary);font-size:11px;font-weight:600;line-height:1.3}
25
- .dsh-qa-message__content{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid var(--dsw-alias-border-l2);border-radius:14px;padding:11px 14px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);font-size:15px;line-height:1.62}
26
- .dsh-qa-message--user .dsh-qa-message__content{background:var(--dsw-alias-bg-module-platform)}
27
- .dsh-qa-message--system .dsh-qa-message__content{padding:7px 11px;border-radius:9px;color:var(--dsw-alias-label-secondary);font-size:13px}
28
- .dsh-qa-message[data-status="error"] .dsh-qa-message__content{border-color:var(--dsw-alias-status-error)}
29
- .dsh-qa-message__content p,.dsh-qa-message__content ul,.dsh-qa-message__content blockquote,.dsh-qa-message__content pre{margin:0 0 10px}
191
+ .dsh-qa-message--work{align-items:flex-start;margin:-4px 0 14px}
192
+ .dsh-qa-message--system{align-items:center;margin:4px auto 20px}
193
+ .dsh-qa-message__content{max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);font-size:15px;line-height:1.62}
194
+ .dsh-qa-message--user .dsh-qa-message__content{max-width:min(525px,82%);padding:10px 16px;border-radius:22px;background:var(--dsw-specific-bubble);font-size:16px;line-height:24px}
195
+ .dsh-qa-message__images{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
196
+ .dsh-qa-message--user .dsh-qa-message__images{justify-content:flex-end}
197
+ .dsh-qa-message__image{display:block;width:132px;height:96px;border-radius:12px;border:1px solid var(--dsw-alias-border-l2);object-fit:cover;background:var(--dsw-alias-bg-layer-2)}
198
+ a.dsh-qa-message__image{padding:0}
199
+ span.dsh-qa-message__image{display:grid;place-items:center;color:var(--dsw-alias-label-tertiary);font-size:11px}
200
+ span.dsh-qa-message__image[data-state="broken"]::after{content:"Не удалось загрузить"}
201
+ span.dsh-qa-message__image[data-state="loading"]{animation:dsh-qa-spin 1.2s linear infinite;border-style:dashed}
202
+ .dsh-qa-message--assistant .dsh-qa-message__content{width:100%;padding:2px 0}
203
+ .dsh-qa-message--system .dsh-qa-message__content{padding:7px 11px;border-radius:9px;background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}
204
+ .dsh-qa-message[data-status="info"] .dsh-qa-message__content{color:var(--dsh-qa-info)}
205
+ .dsh-qa-message[data-status="error"] .dsh-qa-message__content{color:var(--dsh-qa-error)}
206
+ .dsh-qa-message__actions{display:flex;align-items:center;gap:8px;height:28px;margin-top:6px;color:var(--dsw-alias-label-tertiary)}
207
+ .dsh-qa-message--user .dsh-qa-message__actions{justify-content:flex-end}
208
+ .dsh-qa-message__actions button{display:grid;place-items:center;width:28px;height:28px;padding:5px;border:0;border-radius:999px;background:transparent;color:var(--dsw-alias-label-tertiary);cursor:pointer}
209
+ .dsh-qa-message__actions button:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}
210
+ .dsh-qa-message__actions button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:1px}
211
+ .dsh-qa-message__actions svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round}
212
+ .dsh-qa-message__actions button[data-active]{color:var(--dsh-qa-accent)}
213
+ .dsh-qa-message__actions button[data-active]:hover{color:var(--dsh-qa-accent)}
214
+ .dsh-qa-message__meta{display:flex;align-items:center;gap:12px;min-width:0;padding:0 8px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;white-space:nowrap}
215
+
216
+ .dsh-qa-message__content p,.dsh-qa-message__content ul,.dsh-qa-message__content blockquote,.dsh-qa-message__content pre{margin:0 0 14px}
30
217
  .dsh-qa-message__content :last-child{margin-bottom:0}
31
- .dsh-qa-message__content h2,.dsh-qa-message__content h3,.dsh-qa-message__content h4{margin:14px 0 7px;line-height:1.35}
32
- .dsh-qa-message__content h2{font-size:18px}.dsh-qa-message__content h3{font-size:16px}.dsh-qa-message__content h4{font-size:15px}
33
- .dsh-qa-message__content ul{padding-left:22px}.dsh-qa-message__content a{color:var(--dsw-alias-brand-primary)}
218
+ .dsh-qa-message__content h2,.dsh-qa-message__content h3,.dsh-qa-message__content h4{margin:18px 0 8px;line-height:1.35}
219
+ .dsh-qa-message__content h2{font-size:19px}.dsh-qa-message__content h3{font-size:17px}.dsh-qa-message__content h4{font-size:15px}
220
+ .dsh-qa-message__content ul{padding-left:22px}.dsh-qa-message__content a{color:var(--dsh-qa-accent)}
34
221
  .dsh-qa-message__content code{border-radius:5px;padding:1px 4px;background:var(--dsw-alias-bg-layer-2);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em}
35
- .dsh-qa-message__content pre{overflow-x:auto;border-radius:9px;padding:12px;background:var(--dsw-alias-bg-layer-2)}
222
+ .dsh-qa-message__content pre{overflow-x:auto;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;padding:13px;background:var(--dsw-alias-bg-layer-2)}
36
223
  .dsh-qa-message__content pre code{padding:0;background:transparent}
224
+ .dsh-qa-message__content ol{margin:0 0 14px;padding-left:22px}
225
+ .dsh-qa-message__content ol li,.dsh-qa-message__content ul li{margin:0 0 4px}
226
+ .dsh-qa-message__content hr{border:0;border-top:1px solid var(--dsw-alias-border-l2);margin:16px 0}
227
+ .dsh-qa-md-table{overflow-x:auto;margin:0 0 14px}
228
+ .dsh-qa-md-table table{border-collapse:collapse;width:auto;min-width:calc(100% - var(--dsh-qa-bleed,0px)*2);font-size:14px}
229
+ .dsh-qa-md-table th,.dsh-qa-md-table td{border:1px solid var(--dsw-alias-border-l2);padding:6px 10px;vertical-align:top}
230
+ .dsh-qa-md-table thead th{background:var(--dsw-alias-bg-layer-2);font-weight:600}
231
+ .dsh-qa-md-table tbody tr:nth-child(even){background:var(--dsw-alias-bg-layer-2)}
232
+ .dsh-qa-message--assistant .dsh-qa-message__content pre,.dsh-qa-message--assistant .dsh-qa-md-table{--dsh-qa-bleed:min(72px,max(0px,(100vw - 100%)/2 - 28px));width:calc(100% + var(--dsh-qa-bleed)*2);margin-right:calc(var(--dsh-qa-bleed)*-1);margin-left:calc(var(--dsh-qa-bleed)*-1)}
37
233
  .dsh-qa-message__content blockquote{border-left:3px solid var(--dsw-alias-border-l2);padding-left:12px;color:var(--dsw-alias-label-secondary)}
38
234
  .dsh-qa-message__cursor{display:inline-block;width:7px;height:1em;margin-left:3px;vertical-align:-2px;background:var(--dsw-alias-label-secondary);animation:dsh-qa-blink 1s steps(2,start) infinite}
39
235
  @keyframes dsh-qa-blink{50%{opacity:0}}
40
- .dsh-qa-error{display:flex;align-items:center;justify-content:center;gap:10px;margin:16px auto;padding:10px 12px;border:1px solid var(--dsw-alias-status-error);border-radius:10px;color:var(--dsw-alias-label-primary);font-size:13px}
41
- .dsh-qa-error button{border:0;background:transparent;color:var(--dsw-alias-brand-primary);font:inherit;font-weight:600;cursor:pointer}
42
- .dsh-qa-footer{flex:none;border-top:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);padding:0 24px max(14px,env(safe-area-inset-bottom))}
43
- .dsh-qa-footer__inner{position:relative;padding-top:14px}
44
- .dsh-qa-status{min-height:18px;margin-bottom:5px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}
45
- .dsh-qa-composer{display:flex;align-items:flex-end;gap:10px;border:1px solid var(--dsw-alias-border-l2);border-radius:14px;padding:7px;background:var(--dsw-alias-bg-layer-3);transition:border-color .16s}
46
- .dsh-qa-composer:focus-within{border-color:var(--dsw-alias-brand-primary)}
47
- .dsh-qa-composer textarea{flex:1;min-width:0;max-height:160px;resize:none;overflow-y:auto;border:0;outline:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:15px;line-height:22px;padding:7px 9px}
236
+ .dsh-qa-notice{width:100%;min-width:0;margin:-4px 0 14px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-2)}
237
+ .dsh-qa-notice__summary{display:flex;align-items:center;gap:7px;min-height:32px;padding:4px 10px;list-style:none;color:var(--dsw-alias-label-secondary);font-size:13px;cursor:pointer}
238
+ .dsh-qa-notice__summary::-webkit-details-marker{display:none}
239
+ .dsh-qa-notice__summary:hover{color:var(--dsw-alias-label-primary)}
240
+ .dsh-qa-notice__summary:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
241
+ .dsh-qa-notice__icon{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
242
+ .dsh-qa-notice__title{flex:1;min-width:0;overflow:hidden;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
243
+ .dsh-qa-notice__chevron{width:13px;height:13px;flex:none;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;transition:transform .16s ease}
244
+ .dsh-qa-notice[open] .dsh-qa-notice__chevron{transform:rotate(90deg)}
245
+ .dsh-qa-notice__body{padding:2px 12px 10px 32px;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px;white-space:pre-wrap;overflow-wrap:anywhere}
246
+ .dsh-qa-notice__body p{margin:0}
247
+ .dsh-qa-work{width:100%;color:var(--dsw-alias-label-secondary);font-size:14px;line-height:22px}
248
+ .dsh-qa-work__toggle{display:flex;align-items:center;gap:7px;min-height:30px;margin:0;padding:3px 5px 3px 0;border:0;border-radius:7px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer}
249
+ .dsh-qa-work__toggle:hover{color:var(--dsw-alias-label-primary)}
250
+ .dsh-qa-work__toggle:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
251
+ .dsh-qa-work__chevron{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;transition:transform .16s ease}
252
+ .dsh-qa-work__chevron[data-open],.dsh-qa-work-tool[open]>.dsh-qa-work-item .dsh-qa-work__chevron{transform:rotate(90deg)}
253
+ .dsh-qa-work__spinner,.dsh-qa-work-item__spinner{width:13px;height:13px;flex:none;border:1.5px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-label-secondary);border-radius:50%;animation:dsh-qa-spin .9s linear infinite}
254
+ @keyframes dsh-qa-spin{to{transform:rotate(360deg)}}
255
+ .dsh-qa-work__body{position:relative;margin:4px 0 2px 6px;padding:3px 0 5px 18px;border-left:1px solid var(--dsw-alias-border-l2)}
256
+ .dsh-qa-work-item{min-width:0;color:var(--dsw-alias-label-secondary)}
257
+ .dsh-qa-work-item--tool{display:flex;align-items:center;gap:7px;min-height:32px;padding:4px 6px;border-radius:7px}
258
+ .dsh-qa-work-tool>summary{list-style:none;cursor:pointer}
259
+ .dsh-qa-work-tool>summary::-webkit-details-marker{display:none}
260
+ .dsh-qa-work-tool>summary:hover{background:var(--dsw-alias-interactive-bg-hover)}
261
+ .dsh-qa-work-tool>summary:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-1px}
262
+ .dsh-qa-work-item__icon{display:grid;place-items:center;width:16px;height:16px;flex:none;color:var(--dsw-alias-label-tertiary)}
263
+ .dsh-qa-work-item__icon svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round}
264
+ .dsh-qa-work-item__icon[data-state="ok"]{color:var(--dsh-qa-success,var(--dsw-alias-label-secondary))}
265
+ .dsh-qa-work-item__icon[data-state="error"]{color:var(--dsh-qa-error)}
266
+ .dsh-qa-work-item__label{flex:none;color:var(--dsw-alias-label-secondary);font-weight:500}
267
+ .dsh-qa-work-item__summary{min-width:0;overflow:hidden;flex:1;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap}.dsh-qa-work-item__agent-id{flex:none;padding:1px 6px;border-radius:999px;background:var(--dsh-qa-info-10);color:var(--dsh-qa-info);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:10px;line-height:15px}.dsh-qa-work-tool[data-tool="subagent"],.dsh-qa-work-item[data-tool="subagent"]{border:1px solid var(--dsh-qa-info-30);border-radius:9px}
268
+ .dsh-qa-work-item--text{padding:5px 6px 9px}
269
+ .dsh-qa-work-item__text-head{display:flex;align-items:center;gap:7px;min-height:24px}
270
+ .dsh-qa-work-item__text{padding:3px 0 0 23px;color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:23px;white-space:pre-wrap;overflow-wrap:anywhere}
271
+ .dsh-qa-work-item__text p,.dsh-qa-work-item__text ul,.dsh-qa-work-item__text pre{margin:0 0 9px}
272
+ .dsh-qa-work-item__text :last-child{margin-bottom:0}
273
+ .dsh-qa-work-tool__body{margin:0 6px 7px 29px;overflow:hidden;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-layer-2)}
274
+ .dsh-qa-work-tool__body section+section{border-top:1px solid var(--dsw-alias-border-l2)}
275
+ .dsh-qa-work-tool__body section>span{display:block;padding:7px 10px 0;color:var(--dsw-alias-label-tertiary);font-size:11px;font-weight:600;line-height:18px;text-transform:uppercase;letter-spacing:.04em}
276
+ .dsh-qa-work-tool__body pre{max-height:260px;overflow:auto;margin:0;padding:7px 10px 10px;color:var(--dsw-alias-label-secondary);background:transparent;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;line-height:19px;white-space:pre-wrap;overflow-wrap:anywhere}
277
+ .dsh-qa-error{display:flex;align-items:center;justify-content:center;gap:10px;margin:16px auto;padding:10px 12px;border:1px solid var(--dsh-qa-error);border-radius:10px;color:var(--dsw-alias-label-primary);font-size:13px}
278
+ .dsh-qa-error button{border:0;background:transparent;color:var(--dsh-qa-accent);font:inherit;font-weight:600;cursor:pointer}
279
+ .dsh-qa-footer{position:relative;flex:none;padding:28px 16px max(12px,env(safe-area-inset-bottom));background:linear-gradient(180deg,color-mix(in srgb,var(--dsw-alias-bg-base) 0%,transparent) 0,var(--dsw-alias-bg-base) 28px)}
280
+ .dsh-qa-footer__inner{width:100%;margin:0 auto}
281
+ .dsh-qa-composer-wrap{display:flex;flex-direction:column;gap:10px;width:100%}
282
+ .dsh-qa-footer__disclaimer{display:flex;align-items:flex-start;justify-content:center;gap:6px;margin:10px auto 0;max-width:640px;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px;text-align:left}
283
+ .dsh-qa-footer__disclaimer svg{width:13px;height:13px;flex:none;margin-top:1px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round}
284
+ .dsh-qa-quick-questions{display:flex;gap:8px;width:100%;padding:2px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
285
+ .dsh-qa-quick-questions button{flex:none;max-width:min(360px,80vw);padding:8px 13px;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
286
+ .dsh-qa-quick-questions button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
287
+ .dsh-qa-quick-questions button:disabled{opacity:.5;cursor:default}
288
+ .dsh-qa-quick-questions button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:1px}
289
+ .dsh-qa-composer-wrap--drag .dsh-qa-composer{border-color:var(--dsh-qa-accent);border-style:dashed;background:color-mix(in srgb,var(--dsh-qa-accent) 6%,var(--dsw-specific-input-major))}
290
+ .dsh-qa-composer__images{display:flex;flex-wrap:wrap;gap:8px}
291
+ .dsh-qa-composer__image{position:relative;display:block;width:64px;height:64px;flex:none}
292
+ .dsh-qa-composer__image img{display:block;width:100%;height:100%;object-fit:cover;border-radius:10px;border:1px solid var(--dsw-alias-border-l2)}
293
+ .dsh-qa-composer__image button{position:absolute;top:-6px;right:-6px;display:grid;place-items:center;width:18px;height:18px;padding:0;border:0;border-radius:999px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);cursor:pointer;box-shadow:var(--dsw-shadow-lv2)}
294
+ .dsh-qa-composer__image button:hover{color:var(--dsh-qa-error)}
295
+ .dsh-qa-composer__image button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:1px}
296
+ .dsh-qa-composer__image button svg{width:9px;height:9px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
297
+ .dsh-qa-composer__attachment-error{margin:0;color:var(--dsh-qa-error);font-size:12px;line-height:18px}
298
+ .dsh-qa-composer__attach{display:grid;place-items:center;flex:none;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-tertiary);cursor:pointer}
299
+ .dsh-qa-composer__attach:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
300
+ .dsh-qa-composer__attach:disabled{opacity:.4;cursor:default}
301
+ .dsh-qa-composer__attach:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:1px}
302
+ .dsh-qa-composer__attach svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
303
+ .dsh-qa-composer{display:flex;flex-direction:column;gap:10px;width:100%;min-height:94px;padding:14px 10px 8px 16px;border:1px solid var(--dsw-alias-border-l2-darkmode-thin);border-radius:22px;background:var(--dsw-specific-input-major);box-shadow:var(--dsw-shadow-lv2);transition:border-color .12s,box-shadow .12s}
304
+ .dsh-qa-composer:focus-within{border-color:var(--dsh-qa-accent)}
305
+ .dsh-qa-composer textarea{display:block;width:100%;min-height:28px;max-height:168px;resize:none;overflow-y:auto;border:0;outline:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:16px;line-height:24px;padding:0 6px 0 0;caret-color:var(--dsh-qa-accent)}
48
306
  .dsh-qa-composer textarea::placeholder{color:var(--dsw-alias-label-tertiary)}
49
- .dsh-qa-button{appearance:none;flex:none;border:1px solid transparent;border-radius:9px;padding:8px 13px;font:inherit;font-size:13px;font-weight:600;line-height:18px;cursor:pointer}
50
- .dsh-qa-button:focus-visible,.dsh-qa-suggestions button:focus-visible,.dsh-qa-error button:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px}
51
- .dsh-qa-button:disabled{opacity:.45;cursor:default}
52
- .dsh-qa-button--send{background:var(--dsw-alias-brand-primary);color:var(--dsw-alias-label-on-primary)}
53
- .dsh-qa-button--stop,.dsh-qa-button--secondary{border-color:var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-secondary)}
54
- @media (max-width:600px){.dsh-qa-header__inner{min-height:60px;padding:9px 14px}.dsh-qa-header__logo{width:32px;height:32px}.dsh-qa-header p{display:none}.dsh-qa-transcript__inner{padding:22px 14px 16px}.dsh-qa-message{max-width:90%;margin-bottom:18px}.dsh-qa-message__content{font-size:14px;padding:10px 12px}.dsh-qa-footer{padding-left:10px;padding-right:10px}.dsh-qa-button{padding-left:11px;padding-right:11px}}
55
- @media (max-height:480px) and (orientation:landscape){.dsh-qa-header__inner{min-height:48px;padding-top:6px;padding-bottom:6px}.dsh-qa-header p{display:none}.dsh-qa-transcript__inner{padding-top:14px}.dsh-qa-footer__inner{padding-top:7px}.dsh-qa-status{position:absolute;right:0;top:-18px}}
56
- @media (prefers-reduced-motion:reduce){.dsh-qa-message__cursor{animation:none}}
307
+ .dsh-qa-composer textarea:disabled{cursor:default}
308
+ .dsh-qa-composer__toolbar{display:flex;align-items:center;min-height:34px;gap:12px}
309
+ .dsh-qa-composer__hint{flex:1;min-width:0;overflow:hidden;color:var(--dsw-alias-label-caption);font-size:11px;line-height:18px;text-overflow:ellipsis;white-space:nowrap}
310
+ .dsh-qa-composer__action{display:grid;place-items:center;flex:none;width:34px;height:34px;padding:0;border:0;border-radius:999px;color:var(--dsh-qa-accent-contrast);cursor:pointer}
311
+ .dsh-qa-composer__action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
312
+ .dsh-qa-composer__action--send{background:var(--dsh-qa-accent)}
313
+ .dsh-qa-composer__action--send:hover:not(:disabled){background:var(--dsh-qa-accent-hover)}
314
+ .dsh-qa-composer__action--stop{background:var(--dsh-qa-error)}
315
+ .dsh-qa-composer__action--stop svg{fill:currentColor;stroke:none}
316
+ .dsh-qa-composer__action:disabled{opacity:.4;cursor:default}
317
+ .dsh-qa-composer__action:focus-visible,.dsh-qa-error button:focus-visible,.dsh-qa-header__reset:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
318
+ @media (hover:hover){.dsh-qa-message__actions .dsh-qa-message__meta{opacity:0;transition:opacity 80ms ease}.dsh-qa-message:hover .dsh-qa-message__actions .dsh-qa-message__meta,.dsh-qa-message:focus-within .dsh-qa-message__actions .dsh-qa-message__meta,.dsh-qa-message__actions[data-persistent] .dsh-qa-message__meta{opacity:1}}.dsh-qa-message__actions[data-persistent] .dsh-qa-message__meta{opacity:1}
319
+ @media (max-width:600px){.dsh-qa-sidebar{display:none}.dsh-qa-sources,.dsh-qa-agents{position:absolute;inset:0;z-index:6;width:100%;border-left:0}.dsh-qa-header__inner{padding-left:16px;padding-right:16px}.dsh-qa-header h1{max-width:48vw}.dsh-qa-header__mode{font-size:12px}.dsh-qa-transcript__inner{padding:16px 16px 28px}.dsh-qa-message{margin-bottom:16px}.dsh-qa-message--user .dsh-qa-message__content{max-width:88%;font-size:15px}.dsh-qa-message__content{font-size:14px}.dsh-qa-footer{padding-left:10px;padding-right:10px;padding-bottom:max(8px,env(safe-area-inset-bottom))}.dsh-qa-composer{min-height:84px;padding-top:12px}.dsh-qa-composer__hint{font-size:0}.dsh-qa-composer__hint::after{content:"Enter: отправить";font-size:11px}}
320
+ @media (max-height:480px) and (orientation:landscape){.dsh-qa-header__inner{padding-top:6px}.dsh-qa-header__tabs{display:none}.dsh-qa-transcript__inner{padding-top:12px}.dsh-qa-footer{padding-top:12px}.dsh-qa-composer{min-height:72px;gap:4px;padding-top:8px}}
321
+ @media (prefers-reduced-motion:reduce){.dsh-qa-message__cursor,.dsh-qa-work__spinner,.dsh-qa-work-item__spinner{animation:none}.dsh-qa-work__chevron{transition:none}}
57
322
  `;
58
323
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD1C,CAAC"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,gBAAgB,GAAG;IACvB,KAAK,EAAE,SAAS;IAChB,yDAAyD;IACzD,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,uBAAuB;IACvB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,kBAAkB;IAClB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,gBAAgB;IAChB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,SAAS;IACrB,yBAAyB;IACzB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,YAAY,EAAE,SAAS;IACvB,mDAAmD;IACnD,cAAc,EAAE,SAAS;CACjB,CAAC;AAEX,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;KACrD,GAAG,CACF,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CACjB,YAAY,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAC1F;KACA,IAAI,CAAC,GAAG,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;kBACzB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyRhC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /** The state projected while no QA chat is bound (route inactive or booting). */
2
+ export const QA_SESSION_IDLE_STATE = Object.freeze({
3
+ phase: "idle",
4
+ sessionId: null,
5
+ messages: Object.freeze([]),
6
+ error: null,
7
+ canSend: false,
8
+ canStop: false,
9
+ chatsRevision: 0,
10
+ sources: Object.freeze([]),
11
+ viewingSubagent: null,
12
+ });
13
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAkCA,iFAAiF;AACjF,MAAM,CAAC,MAAM,qBAAqB,GAAmB,MAAM,CAAC,MAAM,CAAC;IACjE,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC3B,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,KAAK;IACd,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC1B,eAAe,EAAE,IAAI;CACtB,CAAC,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Resolve with the first snapshot of an observable source that satisfies
3
+ * `predicate`, or reject after `timeoutMs`. This is the DSH-runtime glue the
4
+ * QA surface needs instead of ad-hoc sleeps; the source only has to expose
5
+ * the getSnapshot/subscribe store pair used across the client bundle.
6
+ */
7
+ export function waitFor(source, predicate, timeoutMs) {
8
+ const current = source.getSnapshot();
9
+ if (predicate(current))
10
+ return Promise.resolve(current);
11
+ return new Promise((resolve, reject) => {
12
+ let settled = false;
13
+ const timeout = {};
14
+ let unsubscribe = () => undefined;
15
+ const finish = (value) => {
16
+ if (settled)
17
+ return;
18
+ settled = true;
19
+ if (timeout.id !== undefined)
20
+ clearTimeout(timeout.id);
21
+ unsubscribe();
22
+ resolve(value);
23
+ };
24
+ unsubscribe = source.subscribe(() => {
25
+ const next = source.getSnapshot();
26
+ if (predicate(next))
27
+ finish(next);
28
+ });
29
+ // Tolerate observable implementations that notify synchronously while a
30
+ // subscriber is being installed, and close that subscription afterward.
31
+ if (settled) {
32
+ unsubscribe();
33
+ return;
34
+ }
35
+ const afterSubscribe = source.getSnapshot();
36
+ if (predicate(afterSubscribe)) {
37
+ finish(afterSubscribe);
38
+ return;
39
+ }
40
+ timeout.id = setTimeout(() => {
41
+ if (settled)
42
+ return;
43
+ settled = true;
44
+ unsubscribe();
45
+ reject(new Error("Timed out waiting for the DSH runtime."));
46
+ }, timeoutMs);
47
+ });
48
+ }
49
+ //# sourceMappingURL=wait-for.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wait-for.js","sourceRoot":"","sources":["../../src/client/wait-for.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CACrB,MAGC,EACD,SAAgC,EAChC,SAAiB;IAEjB,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IACrC,IAAI,SAAS,CAAC,OAAO,CAAC;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACxC,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,OAAO,GAA2C,EAAE,CAAC;QAC3D,IAAI,WAAW,GAAe,GAAG,EAAE,CAAC,SAAS,CAAC;QAC9C,MAAM,MAAM,GAAG,CAAC,KAAQ,EAAE,EAAE;YAC1B,IAAI,OAAO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,OAAO,CAAC,EAAE,KAAK,SAAS;gBAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACvD,WAAW,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,CAAC;QACF,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE;YAClC,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;YAClC,IAAI,SAAS,CAAC,IAAI,CAAC;gBAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;QACH,wEAAwE;QACxE,wEAAwE;QACxE,IAAI,OAAO,EAAE,CAAC;YACZ,WAAW,EAAE,CAAC;YACd,OAAO;QACT,CAAC;QACD,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QAC5C,IAAI,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC;YAC9B,MAAM,CAAC,cAAc,CAAC,CAAC;YACvB,OAAO;QACT,CAAC;QACD,OAAO,CAAC,EAAE,GAAG,UAAU,CAAC,GAAG,EAAE;YAC3B,IAAI,OAAO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,WAAW,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC,CAAC;QAC9D,CAAC,EAAE,SAAS,CAAC,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC"}