@yadsh/dsh-qa-surface 0.9.0 → 0.11.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 (250) hide show
  1. package/README.md +269 -2
  2. package/lib/access/service.js +49 -10
  3. package/lib/access/service.js.map +1 -1
  4. package/lib/account-remotes.js +41 -0
  5. package/lib/account-remotes.js.map +1 -1
  6. package/lib/accounts/database.js +140 -0
  7. package/lib/accounts/database.js.map +1 -1
  8. package/lib/accounts/errors.js.map +1 -1
  9. package/lib/accounts/service-token.js +103 -0
  10. package/lib/accounts/service-token.js.map +1 -0
  11. package/lib/accounts/store.js +291 -5
  12. package/lib/accounts/store.js.map +1 -1
  13. package/lib/admin/conversation-log.js +14 -8
  14. package/lib/admin/conversation-log.js.map +1 -1
  15. package/lib/admin/permissions.js +5 -0
  16. package/lib/admin/permissions.js.map +1 -1
  17. package/lib/admin/quality-store.js +4 -0
  18. package/lib/admin/quality-store.js.map +1 -1
  19. package/lib/admin/service.js +180 -7
  20. package/lib/admin/service.js.map +1 -1
  21. package/lib/admin/session-log.js +39 -8
  22. package/lib/admin/session-log.js.map +1 -1
  23. package/lib/attachment-rules.js +39 -6
  24. package/lib/attachment-rules.js.map +1 -1
  25. package/lib/cli.js +83 -1
  26. package/lib/cli.js.map +1 -1
  27. package/lib/client/QaAccountsController.js +213 -4
  28. package/lib/client/QaAccountsController.js.map +1 -1
  29. package/lib/client/QaSessionController.js +49 -21
  30. package/lib/client/QaSessionController.js.map +1 -1
  31. package/lib/client/QaSurface.js +51 -9
  32. package/lib/client/QaSurface.js.map +1 -1
  33. package/lib/client/QaSurfaceGuard.js +12 -5
  34. package/lib/client/QaSurfaceGuard.js.map +1 -1
  35. package/lib/client/admin/QaAdmin.js +14 -2
  36. package/lib/client/admin/QaAdmin.js.map +1 -1
  37. package/lib/client/admin/pages/SkillFiles.js +78 -0
  38. package/lib/client/admin/pages/SkillFiles.js.map +1 -0
  39. package/lib/client/admin/pages/Users.js +74 -3
  40. package/lib/client/admin/pages/Users.js.map +1 -1
  41. package/lib/client/admin/routes.js +8 -1
  42. package/lib/client/admin/routes.js.map +1 -1
  43. package/lib/client/admin/shared.js +5 -1
  44. package/lib/client/admin/shared.js.map +1 -1
  45. package/lib/client/admin/styles.js +2 -0
  46. package/lib/client/admin/styles.js.map +1 -1
  47. package/lib/client/attachments.js +41 -11
  48. package/lib/client/attachments.js.map +1 -1
  49. package/lib/client/base64.js +22 -1
  50. package/lib/client/base64.js.map +1 -1
  51. package/lib/client/components/QaAgentsDrawer.js +9 -6
  52. package/lib/client/components/QaAgentsDrawer.js.map +1 -1
  53. package/lib/client/components/QaApproval.js +1 -1
  54. package/lib/client/components/QaApproval.js.map +1 -1
  55. package/lib/client/components/QaAuthGate.js +19 -10
  56. package/lib/client/components/QaAuthGate.js.map +1 -1
  57. package/lib/client/components/QaChangelog.js +56 -0
  58. package/lib/client/components/QaChangelog.js.map +1 -1
  59. package/lib/client/components/QaFilesPanel.js +17 -11
  60. package/lib/client/components/QaFilesPanel.js.map +1 -1
  61. package/lib/client/components/QaHeader.js +3 -11
  62. package/lib/client/components/QaHeader.js.map +1 -1
  63. package/lib/client/components/QaModal.js.map +1 -1
  64. package/lib/client/components/QaQuestions.js +4 -4
  65. package/lib/client/components/QaQuestions.js.map +1 -1
  66. package/lib/client/components/QaSidebar.js +10 -2
  67. package/lib/client/components/QaSidebar.js.map +1 -1
  68. package/lib/client/components/QaWidthHandle.js +111 -5
  69. package/lib/client/components/QaWidthHandle.js.map +1 -1
  70. package/lib/client/components/QaWorkspaceBrowser.js +231 -0
  71. package/lib/client/components/QaWorkspaceBrowser.js.map +1 -0
  72. package/lib/client/index.js +122 -53
  73. package/lib/client/index.js.map +1 -1
  74. package/lib/client/kiosk.js +51 -0
  75. package/lib/client/kiosk.js.map +1 -0
  76. package/lib/client/lineage.js +64 -0
  77. package/lib/client/lineage.js.map +1 -1
  78. package/lib/client/markdown/blocks.js +122 -7
  79. package/lib/client/markdown/blocks.js.map +1 -1
  80. package/lib/client/markdown/inline.js +108 -12
  81. package/lib/client/markdown/inline.js.map +1 -1
  82. package/lib/client/markdown/katex-css.js +12 -0
  83. package/lib/client/markdown/katex-css.js.map +1 -0
  84. package/lib/client/markdown/math.js +84 -0
  85. package/lib/client/markdown/math.js.map +1 -0
  86. package/lib/client/markdown/render.js +74 -5
  87. package/lib/client/markdown/render.js.map +1 -1
  88. package/lib/client/settings/card.js +2 -2
  89. package/lib/client/settings/card.js.map +1 -1
  90. package/lib/client/settings/sections/attachments.js +6 -5
  91. package/lib/client/settings/sections/attachments.js.map +1 -1
  92. package/lib/client/settings/sections/notes.js +64 -0
  93. package/lib/client/settings/sections/notes.js.map +1 -0
  94. package/lib/client/settings/sections/sources.js +4 -1
  95. package/lib/client/settings/sections/sources.js.map +1 -1
  96. package/lib/client/settings/sections.js +1 -0
  97. package/lib/client/settings/sections.js.map +1 -1
  98. package/lib/client/settlement.js +1 -1
  99. package/lib/client/settlement.js.map +1 -1
  100. package/lib/client/source-preview.js +3 -0
  101. package/lib/client/source-preview.js.map +1 -1
  102. package/lib/client/styles.js +106 -18
  103. package/lib/client/styles.js.map +1 -1
  104. package/lib/client/types.js.map +1 -1
  105. package/lib/client/user-settings/IntegrationTokensPage.js +150 -0
  106. package/lib/client/user-settings/IntegrationTokensPage.js.map +1 -0
  107. package/lib/client/user-settings/PasswordSettingsPage.js +48 -0
  108. package/lib/client/user-settings/PasswordSettingsPage.js.map +1 -0
  109. package/lib/client/user-settings/SkillCatalog.js +2 -2
  110. package/lib/client/user-settings/SkillCatalog.js.map +1 -1
  111. package/lib/client/user-settings/UserSettingsDialog.js +17 -2
  112. package/lib/client/user-settings/UserSettingsDialog.js.map +1 -1
  113. package/lib/client/user-settings/copy.js +20 -0
  114. package/lib/client/user-settings/copy.js.map +1 -1
  115. package/lib/client.js +31007 -686
  116. package/lib/client.js.map +1 -1
  117. package/lib/config-resolvers/attachments.js +6 -5
  118. package/lib/config-resolvers/attachments.js.map +1 -1
  119. package/lib/config-resolvers/defaults.js +33 -2
  120. package/lib/config-resolvers/defaults.js.map +1 -1
  121. package/lib/config-resolvers/integration.js +94 -0
  122. package/lib/config-resolvers/integration.js.map +1 -0
  123. package/lib/config-resolvers/notes.js +26 -0
  124. package/lib/config-resolvers/notes.js.map +1 -0
  125. package/lib/config-resolvers/sources.js +4 -0
  126. package/lib/config-resolvers/sources.js.map +1 -1
  127. package/lib/config.js +107 -0
  128. package/lib/config.js.map +1 -1
  129. package/lib/index.js +348 -12
  130. package/lib/index.js.map +1 -1
  131. package/lib/integration/answer.js +100 -0
  132. package/lib/integration/answer.js.map +1 -0
  133. package/lib/integration/attachments.js +231 -0
  134. package/lib/integration/attachments.js.map +1 -0
  135. package/lib/integration/contract.js +53 -0
  136. package/lib/integration/contract.js.map +1 -0
  137. package/lib/integration/host-runner.js +243 -0
  138. package/lib/integration/host-runner.js.map +1 -0
  139. package/lib/integration/http.js +538 -0
  140. package/lib/integration/http.js.map +1 -0
  141. package/lib/integration/service.js +331 -0
  142. package/lib/integration/service.js.map +1 -0
  143. package/lib/integration/transcript-reader.js +202 -0
  144. package/lib/integration/transcript-reader.js.map +1 -0
  145. package/lib/integration/transcript.js +148 -0
  146. package/lib/integration/transcript.js.map +1 -0
  147. package/lib/personal-skills/index.js +2 -2
  148. package/lib/personal-skills/index.js.map +1 -1
  149. package/lib/personal-skills/paths.js +14 -8
  150. package/lib/personal-skills/paths.js.map +1 -1
  151. package/lib/personal-skills/provider.js +16 -4
  152. package/lib/personal-skills/provider.js.map +1 -1
  153. package/lib/personal-skills/service.js +240 -30
  154. package/lib/personal-skills/service.js.map +1 -1
  155. package/lib/prompt-notes.js +103 -6
  156. package/lib/prompt-notes.js.map +1 -1
  157. package/lib/provenance/document-preview.js +60 -0
  158. package/lib/provenance/document-preview.js.map +1 -0
  159. package/lib/provenance/file-preview.js +191 -19
  160. package/lib/provenance/file-preview.js.map +1 -1
  161. package/lib/qa-tools/catalog.js +18 -1
  162. package/lib/qa-tools/catalog.js.map +1 -1
  163. package/lib/qa-tools/docs-tools.js +563 -0
  164. package/lib/qa-tools/docs-tools.js.map +1 -0
  165. package/lib/qa-tools/file-delete-gate.js +60 -0
  166. package/lib/qa-tools/file-delete-gate.js.map +1 -0
  167. package/lib/qa-tools/file-delete.js +156 -0
  168. package/lib/qa-tools/file-delete.js.map +1 -0
  169. package/lib/resolve-config.js +6 -0
  170. package/lib/resolve-config.js.map +1 -1
  171. package/lib/secure-session.js +83 -3
  172. package/lib/secure-session.js.map +1 -1
  173. package/lib/shared/documents.js +22 -0
  174. package/lib/shared/documents.js.map +1 -0
  175. package/lib/shared/integration-tokens.js +23 -0
  176. package/lib/shared/integration-tokens.js.map +1 -0
  177. package/lib/typert.host.js +1320 -134
  178. package/lib/typert.remote-client.d.ts +33 -1
  179. package/lib/typert.remote-client.js +1102 -74
  180. package/lib/types/access/service.d.ts +33 -2
  181. package/lib/types/account-remotes.d.ts +30 -1
  182. package/lib/types/accounts/database.d.ts +53 -0
  183. package/lib/types/accounts/errors.d.ts +5 -1
  184. package/lib/types/accounts/service-token.d.ts +70 -0
  185. package/lib/types/accounts/store.d.ts +131 -1
  186. package/lib/types/admin/conversation-log.d.ts +12 -0
  187. package/lib/types/admin/service.d.ts +56 -1
  188. package/lib/types/admin/session-log.d.ts +21 -0
  189. package/lib/types/attachment-rules.d.ts +26 -3
  190. package/lib/types/client/QaAccountsController.d.ts +64 -5
  191. package/lib/types/client/QaSessionController.d.ts +24 -2
  192. package/lib/types/client/admin/pages/SkillFiles.d.ts +17 -0
  193. package/lib/types/client/admin/routes.d.ts +2 -0
  194. package/lib/types/client/admin/shared.d.ts +2 -0
  195. package/lib/types/client/attachments.d.ts +21 -4
  196. package/lib/types/client/base64.d.ts +13 -1
  197. package/lib/types/client/components/QaAgentsDrawer.d.ts +2 -1
  198. package/lib/types/client/components/QaFilesPanel.d.ts +16 -4
  199. package/lib/types/client/components/QaHeader.d.ts +9 -3
  200. package/lib/types/client/components/QaModal.d.ts +4 -3
  201. package/lib/types/client/components/QaWidthHandle.d.ts +48 -2
  202. package/lib/types/client/components/QaWorkspaceBrowser.d.ts +15 -0
  203. package/lib/types/client/index.d.ts +1 -1
  204. package/lib/types/client/kiosk.d.ts +34 -0
  205. package/lib/types/client/lineage.d.ts +42 -0
  206. package/lib/types/client/markdown/blocks.d.ts +14 -1
  207. package/lib/types/client/markdown/inline.d.ts +23 -7
  208. package/lib/types/client/markdown/katex-css.d.ts +11 -0
  209. package/lib/types/client/markdown/math.d.ts +23 -0
  210. package/lib/types/client/markdown/render.d.ts +2 -1
  211. package/lib/types/client/settings/sections/notes.d.ts +12 -0
  212. package/lib/types/client/settings/sections.d.ts +1 -0
  213. package/lib/types/client/settlement.d.ts +4 -1
  214. package/lib/types/client/styles.d.ts +15 -2
  215. package/lib/types/client/types.d.ts +120 -1
  216. package/lib/types/client/user-settings/IntegrationTokensPage.d.ts +21 -0
  217. package/lib/types/client/user-settings/PasswordSettingsPage.d.ts +19 -0
  218. package/lib/types/client/user-settings/UserSettingsDialog.d.ts +11 -2
  219. package/lib/types/client/user-settings/copy.d.ts +10 -1
  220. package/lib/types/config-resolvers/integration.d.ts +47 -0
  221. package/lib/types/config-resolvers/notes.d.ts +10 -0
  222. package/lib/types/config.d.ts +10 -0
  223. package/lib/types/index.d.ts +111 -1
  224. package/lib/types/integration/answer.d.ts +65 -0
  225. package/lib/types/integration/attachments.d.ts +85 -0
  226. package/lib/types/integration/contract.d.ts +196 -0
  227. package/lib/types/integration/host-runner.d.ts +44 -0
  228. package/lib/types/integration/http.d.ts +79 -0
  229. package/lib/types/integration/service.d.ts +120 -0
  230. package/lib/types/integration/transcript-reader.d.ts +100 -0
  231. package/lib/types/integration/transcript.d.ts +59 -0
  232. package/lib/types/personal-skills/index.d.ts +2 -2
  233. package/lib/types/personal-skills/paths.d.ts +15 -3
  234. package/lib/types/personal-skills/provider.d.ts +14 -2
  235. package/lib/types/personal-skills/service.d.ts +89 -14
  236. package/lib/types/prompt-notes.d.ts +37 -0
  237. package/lib/types/provenance/document-preview.d.ts +28 -0
  238. package/lib/types/provenance/file-preview.d.ts +69 -2
  239. package/lib/types/qa-tools/catalog.d.ts +1 -1
  240. package/lib/types/qa-tools/docs-tools.d.ts +160 -0
  241. package/lib/types/qa-tools/file-delete-gate.d.ts +42 -0
  242. package/lib/types/qa-tools/file-delete.d.ts +32 -0
  243. package/lib/types/secure-session.d.ts +52 -1
  244. package/lib/types/shared/documents.d.ts +20 -0
  245. package/lib/types/shared/integration-tokens.d.ts +24 -0
  246. package/lib/types/types.d.ts +263 -3
  247. package/lib/types/ui-mode.d.ts +18 -0
  248. package/lib/ui-mode.js +22 -0
  249. package/lib/ui-mode.js.map +1 -0
  250. package/package.json +12 -10
@@ -1 +1 @@
1
- {"version":3,"file":"settlement.js","sourceRoot":"","sources":["../../src/client/settlement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,YAAY,GAChB,4GAA4G,CAAC;AAC/G,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAC/C,MAAM,cAAc,GAAqC,MAAM,CAAC,MAAM,CAAC;IACrE,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,YAAY;IAC3B,iBAAiB,EAAE,sBAAsB;IACzC,mBAAmB,EAAE,iBAAiB;IACtC,MAAM,EAAE,oBAAoB;CAC7B,CAAC,CAAC;AACH,8EAA8E;AAC9E,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,sEAAsE;AACtE,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,2DAA2D;AAC3D,MAAM,UAAU,GAAG,KAAK,CAAC;AAYzB,4DAA4D;AAC5D,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACpC,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AAO,CAAC,MAAM,EAAE;QAC/C,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,GAAG,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;KAClE,CAAC;AACJ,CAAC"}
@@ -16,6 +16,9 @@ export function sourcePreviewFailureCopy(failure) {
16
16
  if (reason === "outside-roots") {
17
17
  return "Этот файл лежит вне каталогов, доступных для предпросмотра: открыть можно рабочую папку чата, общие каталоги только для чтения и вложения.";
18
18
  }
19
+ if (reason === "unsupported") {
20
+ return "Такой файл не открывается в панели — его можно скачать и посмотреть отдельно.";
21
+ }
19
22
  if (reason === "not-evidence") {
20
23
  return "Источник больше не входит в доказательства этого чата — открой его из ответа заново.";
21
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"source-preview.js","sourceRoot":"","sources":["../../src/client/source-preview.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+EAA+E;AAC/E,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAEvD,SAAS,cAAc,CAAC,OAAgB;IACtC,MAAM,OAAO,GAAI,OAAsD;QACrE,EAAE,OAAO,CAAC;IACZ,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;AACvE,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxE,IAAI,MAAM,KAAK,eAAe,EAAE,CAAC;QAC/B,OAAO,4IAA4I,CAAC;IACtJ,CAAC;IACD,IAAI,MAAM,KAAK,cAAc,EAAE,CAAC;QAC9B,OAAO,sFAAsF,CAAC;IAChG,CAAC;IACD,OAAO,kFAAkF,CAAC;AAC5F,CAAC"}
1
+ {"version":3,"file":"source-preview.js","sourceRoot":"","sources":["../../src/client/source-preview.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+EAA+E;AAC/E,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAEvD,SAAS,cAAc,CAAC,OAAgB;IACtC,MAAM,OAAO,GAAI,OAAsD;QACrE,EAAE,OAAO,CAAC;IACZ,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;AACvE,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,MAAM,MAAM,GAAG,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxE,IAAI,MAAM,KAAK,eAAe,EAAE,CAAC;QAC/B,OAAO,4IAA4I,CAAC;IACtJ,CAAC;IACD,IAAI,MAAM,KAAK,aAAa,EAAE,CAAC;QAC7B,OAAO,+EAA+E,CAAC;IACzF,CAAC;IACD,IAAI,MAAM,KAAK,cAAc,EAAE,CAAC;QAC9B,OAAO,sFAAsF,CAAC;IAChG,CAAC;IACD,OAAO,kFAAkF,CAAC;AAC5F,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { QA_BLEED_MAX_WIDTH } from "./components/QaWidthHandle.js";
2
2
  import { QA_ADMIN_CONSOLE_STYLES } from "./admin/styles.js";
3
3
  import { AUDIT_UI_STYLES } from "@yadsh/dsh-audit-ui";
4
+ import { KATEX_CSS } from "./markdown/katex-css.js";
4
5
  /**
5
6
  * Company interaction palette ("Цвета взаимодействия" guideline) — the single
6
7
  * source of every hard-coded color in this file. The object is emitted once as
@@ -47,15 +48,27 @@ export const QA_BRAND_TOKEN_NAMES = Object.keys(QA_BRAND_PALETTE).map(tokenName)
47
48
  const QA_BRAND_TOKENS = Object.entries(QA_BRAND_PALETTE)
48
49
  .map(([token, value]) => `--dsh-qa-${tokenName(token)}:${value}`)
49
50
  .join(";");
51
+ /**
52
+ * Overlay-compatibility mask (documented exception to the no-hiding-hacks
53
+ * rule): while the QA surface owns the page in the OVERLAY composition, mask
54
+ * every sibling of the host's overlay layer inside the app frame, so deleting
55
+ * the overlay element in the browser reveals a blank page instead of the
56
+ * operator shell. The mask hangs off the body attribute the surface effect
57
+ * owns — not off the overlay node itself — and finds the frame structurally,
58
+ * since the frame's own classes are CSS-module hashed.
59
+ *
60
+ * In the kiosk presentation this rule is not shipped at all: the host's
61
+ * `DSH_UI_MODE=qa` composition never mounts the app frame beneath the
62
+ * surface, so there is nothing to hide and no hack to carry.
63
+ */
64
+ const QA_HOST_COLUMN_MASK_RULE = String.raw `
65
+ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-shell-overlay]){display:none!important}`;
50
66
  export const QA_SURFACE_STYLES = String.raw `
51
- /* While the QA surface owns the page, mask every sibling of the host's
52
- overlay layer inside the app frame, so deleting the overlay element in the
53
- browser reveals a blank page instead of the operator shell. The mask hangs
54
- off the body attribute the surface effect owns — not off the overlay node
55
- itself — and finds the frame structurally, since the frame's own classes
56
- are CSS-module hashed. */
57
- body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-shell-overlay]){display:none!important}
58
67
  .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}
68
+ /* Root-presentation modifier (kiosk): the surface is registered into the
69
+ runtime's 'root' slot and owns the viewport in normal flow — no fixed
70
+ cover, no stacking race, the document has no native shell beneath it. */
71
+ .dsh-qa-surface--root{position:relative;inset:auto;z-index:auto;width:100%}
59
72
  .dsh-qa-onboarding{${QA_BRAND_TOKENS};position:fixed;inset:0;z-index:2147483640;display:grid;place-items:center;padding:24px;background:var(--dsh-qa-overlay);color:var(--dsw-alias-label-primary);font-family:inherit}
60
73
  .dsh-qa-onboarding__panel{display:grid;grid-template-columns:auto minmax(0,1fr);gap:18px;width:min(620px,100%);max-height:100%;overflow-y:auto;padding:28px;border:1px solid var(--dsw-alias-border-l2);border-radius:18px;background:var(--dsw-alias-bg-layer-2);box-shadow:0 22px 64px rgba(0,0,0,.28)}
61
74
  .dsh-qa-onboarding__mark{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:var(--dsh-qa-accent-soft);color:var(--dsh-qa-accent-hover)}
@@ -74,8 +87,9 @@ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-she
74
87
  .dsh-qa-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column}
75
88
  .dsh-qa-workspace{position:relative;display:flex;flex:1;min-width:0;min-height:0;overflow:hidden}
76
89
  .dsh-qa-chat{position:relative;flex:1;min-width:0;min-height:0;display:flex;flex-direction:column}
77
- .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)}
90
+ .dsh-qa-sidebar{flex:none;position:relative;width:var(--dsh-qa-sidebar-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)}
78
91
  .dsh-qa-sidebar--collapsed{width:52px;align-items:center;padding-top:12px}
92
+ .dsh-qa-sidebar__resize{position:absolute;top:0;bottom:0;right:-4px;width:8px;cursor:col-resize;touch-action:none;user-select:none;z-index:11}
79
93
  .dsh-qa-sidebar__head{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none;padding:14px 10px 10px 16px}
80
94
  .dsh-qa-sidebar__brand{display:flex;align-items:center;gap:8px;min-width:0}
81
95
  .dsh-qa-sidebar__logo{display:grid;place-items:center;width:20px;height:20px;flex:none;color:var(--dsh-qa-brand)}
@@ -163,6 +177,12 @@ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-she
163
177
  .dsh-qa-auth__submit:hover{background:var(--dsh-qa-accent-hover)}
164
178
  .dsh-qa-auth__submit:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
165
179
  .dsh-qa-auth__submit:disabled{opacity:.6;cursor:default}
180
+ .dsh-qa-auth__lead{margin:0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px}
181
+ .dsh-qa-auth__notice{margin:0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:17px}
182
+ .dsh-qa-auth__link{appearance:none;padding:0;border:0;background:0 0;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;line-height:17px;text-align:center;text-decoration:underline;cursor:pointer}
183
+ .dsh-qa-auth__link:hover{color:var(--dsw-alias-label-primary)}
184
+ .dsh-qa-auth__link:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
185
+ .dsh-qa-auth__link:disabled{opacity:.6;cursor:default}
166
186
  .dsh-qa-crash{align-items:center;justify-content:center;padding:24px}
167
187
  .dsh-qa-crash__card{display:flex;flex-direction:column;gap:12px;width:min(380px,100%);padding:28px;border:1px solid var(--dsw-alias-border-l2);border-radius:14px;background:var(--dsw-alias-bg-layer-2);box-shadow:0 18px 48px var(--dsh-qa-overlay);text-align:center}
168
188
  .dsh-qa-crash__card h1{margin:0;color:var(--dsw-alias-label-primary);font-size:19px;font-weight:600;line-height:26px}
@@ -195,6 +215,7 @@ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-she
195
215
  .dsh-qa-changelog__list li{margin:3px 0}
196
216
  .dsh-qa-changelog__list li::marker{color:var(--dsw-alias-label-tertiary)}
197
217
  .dsh-qa-modal__panel--settings{width:min(840px,100%);height:min(640px,calc(100vh - 48px))}
218
+ .dsh-qa-modal__panel--document{width:min(1100px,100%);height:min(880px,calc(100vh - 48px))}
198
219
  .dsh-qa-modal__panel--settings .dsh-qa-modal__body{padding:0;overflow:hidden}
199
220
  .dsh-qa-settings{display:grid;grid-template-columns:200px minmax(0,1fr);height:100%;min-height:0}
200
221
  .dsh-qa-settings__nav{display:flex;flex-direction:column;gap:2px;padding:12px 10px;border-right:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);overflow-y:auto}
@@ -221,6 +242,8 @@ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-she
221
242
  .dsh-qa-settings__field input,.dsh-qa-settings__field textarea{appearance:none;width:100%;padding:9px 11px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font:inherit;font-size:14px;line-height:20px}
222
243
  .dsh-qa-settings__field textarea{min-height:64px;line-height:19px;resize:vertical}
223
244
  .dsh-qa-settings__field input:focus,.dsh-qa-settings__field textarea:focus{outline:none;border-color:var(--dsh-qa-brand)}
245
+ .dsh-qa-settings__field select{appearance:none;width:100%;padding:9px 11px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font:inherit;font-size:14px;line-height:20px}
246
+ .dsh-qa-settings__field select:focus{outline:none;border-color:var(--dsh-qa-brand)}
224
247
  .dsh-qa-settings__field input:read-only{opacity:.6}
225
248
  .dsh-qa-settings__code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:20px}
226
249
  .dsh-qa-settings__field-hint{margin:0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px}
@@ -256,6 +279,7 @@ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-she
256
279
  .dsh-qa-settings__row-title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:600;line-height:20px}
257
280
  .dsh-qa-settings__row-description{color:var(--dsw-alias-label-secondary);font-size:13px;line-height:19px}
258
281
  .dsh-qa-settings__row-meta{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px}
282
+ .dsh-qa-settings__row-note{color:var(--dsh-qa-info,var(--dsw-alias-label-secondary));font-size:12px;line-height:17px}
259
283
  .dsh-qa-settings__row-warning{color:var(--dsh-qa-warning);font-size:12px;line-height:17px}
260
284
  .dsh-qa-settings__row-error{color:var(--dsh-qa-error);font-size:12px;line-height:17px}
261
285
  .dsh-qa-settings__chips{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
@@ -301,8 +325,6 @@ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-she
301
325
  .dsh-qa-header__actions{display:flex;align-items:center;flex:none;gap:10px;margin-left:auto}
302
326
  .dsh-qa-header__logo{width:24px;height:24px;object-fit:contain;border-radius:6px;flex:none}
303
327
  .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}
304
- .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}
305
- .dsh-qa-header__mode svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
306
328
  .dsh-qa-header__reset{padding:5px 10px;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;cursor:pointer}
307
329
  .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}
308
330
  .dsh-qa-header__agents:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
@@ -337,6 +359,7 @@ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-she
337
359
  .dsh-qa-agents__text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
338
360
  .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}
339
361
  .dsh-qa-agents__meta{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:15px}
362
+ .dsh-qa-agents__meta-list{display:flex;gap:8px}
340
363
  .dsh-qa-agents__open{flex:none;color:var(--dsh-qa-accent);font-size:12px;font-weight:500;line-height:18px}
341
364
  .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}
342
365
  .dsh-qa-header__sources:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
@@ -384,7 +407,7 @@ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-she
384
407
  .dsh-qa-skill-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}.dsh-qa-skill-list li{display:flex;align-items:baseline;gap:10px;padding:9px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-layer-2);font-size:12px}.dsh-qa-skill-list li strong{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}.dsh-qa-skill-list li span{color:var(--dsw-alias-label-tertiary);font-size:11px}.dsh-qa-skill-list li em{margin-left:auto;padding:2px 7px;border-radius:999px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);font-size:10px;font-style:normal}
385
408
  .dsh-qa-effective section{margin:0 0 20px}.dsh-qa-effective h4{margin:0 0 8px;color:var(--dsw-alias-label-tertiary);font-size:10px;letter-spacing:.06em;text-transform:uppercase}.dsh-qa-effective__list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}.dsh-qa-effective__list li{display:flex;align-items:baseline;gap:10px;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-layer-2);font-size:12px}.dsh-qa-effective__list span{color:var(--dsw-alias-label-tertiary);font-size:11px}
386
409
  .dsh-qa-skills{overflow:auto}.dsh-qa-skills table{width:100%;border-collapse:collapse;font-size:12px}.dsh-qa-skills th,.dsh-qa-skills td{padding:10px;border-bottom:1px solid var(--dsw-alias-border-l2);text-align:left;vertical-align:top}.dsh-qa-skills td>strong{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.dsh-qa-skills td>em{margin-right:6px;padding:1px 6px;border-radius:999px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);font-size:10px;font-style:normal}
387
- .dsh-qa-skill-detail__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:24px}.dsh-qa-skill-detail__grid h4{margin:0 0 10px;color:var(--dsw-alias-label-tertiary);font-size:10px;letter-spacing:.06em;text-transform:uppercase}.dsh-qa-skill-roles{margin:12px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}.dsh-qa-skill-roles li{display:flex;align-items:center;gap:10px;font-size:12px}.dsh-qa-skill-roles em{padding:1px 7px;border-radius:999px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);font-size:10px;font-style:normal}.dsh-qa-skill-tools{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}.dsh-qa-skill-tools li{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;padding:9px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-layer-2);font-size:12px}.dsh-qa-skill-tools em{color:var(--dsw-alias-label-tertiary);font-size:11px;font-style:normal}.dsh-qa-skill-warnings{margin:14px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px;color:var(--dsh-qa-warning-hover);font-size:11px;line-height:16px}
410
+ .dsh-qa-skill-detail__grid{display:grid;grid-template-columns:minmax(240px,320px) minmax(0,1fr);gap:24px}.dsh-qa-skill-detail__grid h4{margin:0 0 10px;color:var(--dsw-alias-label-tertiary);font-size:10px;letter-spacing:.06em;text-transform:uppercase}.dsh-qa-skill-roles{margin:12px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}.dsh-qa-skill-roles li{display:flex;align-items:center;gap:10px;font-size:12px}.dsh-qa-skill-roles em{padding:1px 7px;border-radius:999px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);font-size:10px;font-style:normal}.dsh-qa-skill-tools{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}.dsh-qa-skill-tools li{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;padding:8px 12px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:var(--dsw-alias-bg-layer-2);font-size:12px}.dsh-qa-skill-tools code{flex:none}.dsh-qa-skill-tools__state{display:flex;flex:1 1 auto;flex-wrap:wrap;justify-content:flex-end;gap:2px 12px;min-width:0}.dsh-qa-skill-tools em{color:var(--dsw-alias-label-tertiary);font-size:11px;font-style:normal}.dsh-qa-skill-warnings{margin:14px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px;color:var(--dsh-qa-warning-hover);font-size:11px;line-height:16px}
388
411
  .dsh-qa-panel-launcher{display:flex;align-items:center;gap:2px;flex:none}
389
412
  .dsh-qa-panel-launcher__button{appearance:none;display:grid;place-items:center;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);cursor:pointer}
390
413
  .dsh-qa-panel-launcher__button:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
@@ -456,6 +479,46 @@ body[data-dsh-qa-surface="active"] div:has(>[data-shell-overlay])>:not([data-she
456
479
  .dsh-qa-files__jump:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
457
480
  .dsh-qa-files__jump svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
458
481
  .dsh-qa-files__items{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
482
+ .dsh-qa-files__workspace{margin:0 0 14px}
483
+ .dsh-qa-files__workspace h3{display:flex;align-items:center;gap:7px;margin:6px 4px 8px;color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600;line-height:18px}
484
+ .dsh-qa-ws{display:flex;flex-direction:column;gap:6px;min-width:0}
485
+ .dsh-qa-ws__crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin:0 2px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px}
486
+ .dsh-qa-ws__crumb{appearance:none;padding:1px 3px;border:0;border-radius:5px;background:0 0;color:var(--dsh-qa-accent);font:inherit;font-size:12px;cursor:pointer}
487
+ .dsh-qa-ws__crumb:hover{background:var(--dsw-alias-interactive-bg-hover)}
488
+ .dsh-qa-ws__crumb[aria-current=true]{color:var(--dsw-alias-label-primary);font-weight:600;cursor:default}
489
+ .dsh-qa-ws__crumb:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
490
+ .dsh-qa-ws__list{display:flex;flex-direction:column;gap:2px;margin:0;padding:0;list-style:none}
491
+ .dsh-qa-ws__row{min-width:0}
492
+ .dsh-qa-ws__entry{appearance:none;display:flex;align-items:center;gap:7px;width:100%;box-sizing:border-box;padding:5px 7px;border:0;border-radius:8px;background:0 0;color:var(--dsw-alias-label-primary);font:inherit;font-size:12px;line-height:17px;text-align:left;cursor:pointer}
493
+ .dsh-qa-ws__entry:hover{background:var(--dsw-alias-interactive-bg-hover)}
494
+ .dsh-qa-ws__entry:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
495
+ .dsh-qa-ws__icon{display:grid;place-items:center;flex:none;color:var(--dsw-alias-label-tertiary)}
496
+ .dsh-qa-ws__entry[data-kind=directory] .dsh-qa-ws__icon{color:var(--dsh-qa-accent)}
497
+ .dsh-qa-ws__icon svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
498
+ .dsh-qa-ws__name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
499
+ .dsh-qa-ws__size{flex:none;color:var(--dsw-alias-label-tertiary);font-size:11px}
500
+ .dsh-qa-ws__status{margin:2px 6px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px}
501
+ .dsh-qa-ws__preview{display:flex;flex-direction:column;gap:6px;min-width:0}
502
+ .dsh-qa-ws__preview-head{display:flex;align-items:center;gap:7px;min-width:0}
503
+ .dsh-qa-ws__back{appearance:none;flex:none;padding:1px 3px;border:0;border-radius:5px;background:0 0;color:var(--dsh-qa-accent);font:inherit;font-size:12px;cursor:pointer}
504
+ .dsh-qa-ws__back:hover{background:var(--dsw-alias-interactive-bg-hover)}
505
+ .dsh-qa-ws__back:focus-visible,.dsh-qa-ws__toggle:focus-visible,.dsh-qa-ws__download:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
506
+ .dsh-qa-ws__preview-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--dsw-alias-label-primary);font-size:12px;font-weight:600}
507
+ .dsh-qa-ws__download{appearance:none;flex:none;padding:2px 8px;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:11px;cursor:pointer}
508
+ .dsh-qa-ws__download:hover{border-color:var(--dsw-alias-label-dimmed);color:var(--dsw-alias-label-primary)}
509
+ .dsh-qa-ws__meta{margin:0 2px;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}
510
+ .dsh-qa-ws__toggle{appearance:none;align-self:flex-start;padding:1px 3px;border:0;border-radius:5px;background:0 0;color:var(--dsh-qa-accent);font:inherit;font-size:11px;cursor:pointer}
511
+ .dsh-qa-ws__text{margin:0;padding:8px 9px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font-size:11px;line-height:16px;white-space:pre-wrap;word-break:break-word}
512
+ .dsh-qa-ws__image{max-width:100%;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-2)}
513
+ .dsh-qa-ws__pdf{width:100%;height:62vh;min-height:240px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-3)}
514
+ .dsh-qa-ws__expand{appearance:none;display:grid;place-items:center;flex:none;width:24px;height:24px;padding:0;border:0;border-radius:6px;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
515
+ .dsh-qa-ws__expand:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
516
+ .dsh-qa-ws__expand:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
517
+ .dsh-qa-ws__expand svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
518
+ .dsh-qa-ws__expanded{display:flex;flex-direction:column;gap:8px;min-width:0}
519
+ .dsh-qa-ws__expanded .dsh-qa-ws__text{max-height:none;font-size:12px}
520
+ .dsh-qa-ws__expanded .dsh-qa-ws__pdf{height:72vh}
521
+ .dsh-qa-ws__expanded .dsh-qa-ws__image{max-height:72vh;object-fit:contain}
459
522
  .dsh-qa-files__thumb{display:inline-block;width:72px;height:54px;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-2)}
460
523
  span.dsh-qa-files__thumb{display:inline-block}
461
524
  img.dsh-qa-files__thumb{object-fit:cover;background:var(--dsw-alias-bg-layer-3)}
@@ -645,6 +708,14 @@ a.dsh-qa-srcref:hover,button.dsh-qa-srcref:hover{border-color:var(--dsw-alias-la
645
708
  .dsh-qa-md-table th,.dsh-qa-md-table td{max-width:max(160px,calc(var(--dsh-qa-content-width,920px)*0.35));border:1px solid var(--dsw-alias-border-l2);padding:6px 10px;vertical-align:top;overflow-wrap:anywhere}
646
709
  .dsh-qa-md-table thead th{background:var(--dsw-alias-bg-layer-2);font-weight:600}
647
710
  .dsh-qa-md-table tbody tr:nth-child(even){background:var(--dsw-alias-bg-layer-2)}
711
+ .dsh-qa-md-math{overflow-x:auto;overflow-y:hidden;margin:16px 0;text-align:center}
712
+ .dsh-qa-md-math .katex-display{margin:0}
713
+ .dsh-qa-md-fn-ref{margin:0 1px;font-size:.8em;line-height:0;vertical-align:super}
714
+ .dsh-qa-md-footnotes{margin:20px 0 0;padding-top:12px;border-top:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);font-size:.9em}
715
+ .dsh-qa-md-footnotes ol{margin:0;padding-left:22px}
716
+ .dsh-qa-md-footnotes li{margin-top:4px}
717
+ .dsh-qa-md-footnotes li>:first-child{margin-top:0}
718
+ .dsh-qa-md-footnotes sup{margin:0 1px;font-size:.8em;line-height:0;vertical-align:super}
648
719
  .dsh-qa-message--assistant .dsh-qa-message__content .dsh-qa-md-code{width:calc(100% + var(--dsh-qa-bleed)*2);margin-right:calc(var(--dsh-qa-bleed)*-1);margin-left:calc(var(--dsh-qa-bleed)*-1)}
649
720
  .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}
650
721
  @keyframes dsh-qa-blink{50%{opacity:0}}
@@ -660,7 +731,7 @@ a.dsh-qa-srcref:hover,button.dsh-qa-srcref:hover{border-color:var(--dsw-alias-la
660
731
  .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}
661
732
  .dsh-qa-notice__body p{margin:0}
662
733
  .dsh-qa-notice__body .dsh-qa-md{font-size:13px;line-height:20px;white-space:pre-wrap}
663
- .dsh-qa-notice__meta{margin:0 0 6px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
734
+ .dsh-qa-notice__meta{margin:0 0 6px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px;white-space:pre-line;overflow-wrap:anywhere}
664
735
  .dsh-qa-work{width:100%;color:var(--dsw-alias-label-secondary);font-size:14px;line-height:22px}
665
736
  .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}
666
737
  .dsh-qa-work__toggle:hover{color:var(--dsw-alias-label-primary)}
@@ -706,6 +777,7 @@ a.dsh-qa-srcref:hover,button.dsh-qa-srcref:hover{border-color:var(--dsw-alias-la
706
777
  .dsh-qa-approval__reason{margin:0;color:var(--dsw-alias-label-primary);font-size:13px;line-height:19px;overflow-wrap:anywhere}
707
778
  .dsh-qa-approval__tool{margin:6px 0 0;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}
708
779
  .dsh-qa-approval__tool code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px}
780
+ .dsh-qa-approval__delegated{color:var(--dsw-alias-label-tertiary);font-weight:400;margin-left:6px}
709
781
  .dsh-qa-approval__actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
710
782
  .dsh-qa-approval__button{appearance:none;padding:7px 14px;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:600;line-height:18px;cursor:pointer}
711
783
  .dsh-qa-approval__button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
@@ -717,7 +789,8 @@ a.dsh-qa-srcref:hover,button.dsh-qa-srcref:hover{border-color:var(--dsw-alias-la
717
789
  .dsh-qa-question{padding:12px 14px;border:1px solid var(--dsh-qa-info30);border-radius:12px;background:var(--dsh-qa-info10)}
718
790
  .dsh-qa-question__strip{display:flex;align-items:center;gap:7px;margin:0 0 8px;color:var(--dsh-qa-info);font-size:12px;font-weight:600;line-height:16px}
719
791
  .dsh-qa-question__dot{width:7px;height:7px;flex:none;border-radius:999px;background:var(--dsh-qa-info)}
720
- .dsh-qa-question__header{margin:0 0 4px;color:var(--dsw-alias-label-tertiary);font-size:11px;font-weight:600;line-height:16px;text-transform:uppercase;letter-spacing:.04em}
792
+ .dsh-qa-question__count{margin-left:auto;font-weight:500;color:var(--dsh-qa-info)}
793
+ .dsh-qa-question__header{margin:0 0 4px;color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:600;line-height:16px}
721
794
  .dsh-qa-question__fieldset{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0;padding:0;border:0}
722
795
  .dsh-qa-question__text{margin:0;padding:0;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:19px;overflow-wrap:anywhere}
723
796
  .dsh-qa-question__detail{margin:0;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto}
@@ -818,20 +891,35 @@ a.dsh-qa-srcref:hover,button.dsh-qa-srcref:hover{border-color:var(--dsw-alias-la
818
891
  .dsh-qa-composer__action:disabled{opacity:.4;cursor:default}
819
892
  .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}
820
893
  @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}
821
- @media (max-width:760px){.dsh-qa-admin__header{min-height:56px;padding:8px 14px}.dsh-qa-admin__layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.dsh-qa-admin__layout>nav{flex-direction:row;overflow-x:auto;padding:8px;border-right:0;border-bottom:1px solid var(--dsw-alias-border-l2)}.dsh-qa-admin__layout>nav strong{display:none}.dsh-qa-admin__layout>nav button{white-space:nowrap}.dsh-qa-admin__content,.dsh-qa-role-editor{padding:20px 14px 76px}.dsh-qa-admin__title-row{flex-direction:column}.dsh-qa-role-grid{grid-template-columns:1fr}.dsh-qa-role-editor__general{grid-template-columns:1fr}.dsh-qa-role-editor__wide{grid-column:auto}.dsh-qa-admin__savebar{bottom:-76px;margin:24px -14px -76px;padding:10px 14px}.dsh-qa-admin__savebar>span{display:none}.dsh-qa-audit li{grid-template-columns:1fr 1fr}.dsh-qa-capabilities__toolbar{align-items:stretch;flex-direction:column}.dsh-qa-capabilities__toolbar>input{width:100%}}
822
- @media (max-width:600px){.dsh-qa-sidebar{display:none}.dsh-qa-panel,.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-width-handle{display:none}.dsh-qa-transcript__inner{--dsh-qa-bleed:0px;max-width:100%;padding:16px 16px 28px}.dsh-qa-footer__inner{max-width:100%}.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}}
894
+ @media (max-width:760px){.dsh-qa-admin__header{min-height:56px;padding:8px 14px}.dsh-qa-admin__layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.dsh-qa-admin__layout>nav{flex-direction:row;overflow-x:auto;padding:8px;border-right:0;border-bottom:1px solid var(--dsw-alias-border-l2)}.dsh-qa-admin__layout>nav strong{display:none}.dsh-qa-admin__layout>nav button{white-space:nowrap}.dsh-qa-admin__content,.dsh-qa-role-editor{padding:20px 14px 76px}.dsh-qa-admin__title-row{flex-direction:column}.dsh-qa-role-grid{grid-template-columns:1fr}.dsh-qa-role-editor__general{grid-template-columns:1fr}.dsh-qa-skill-detail__grid{grid-template-columns:1fr}.dsh-qa-role-editor__wide{grid-column:auto}.dsh-qa-admin__savebar{bottom:-76px;margin:24px -14px -76px;padding:10px 14px}.dsh-qa-admin__savebar>span{display:none}.dsh-qa-audit li{grid-template-columns:1fr 1fr}.dsh-qa-capabilities__toolbar{align-items:stretch;flex-direction:column}.dsh-qa-capabilities__toolbar>input{width:100%}}
895
+ @media (max-width:600px){.dsh-qa-sidebar{display:none}.dsh-qa-panel,.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-width-handle{display:none}.dsh-qa-transcript__inner{--dsh-qa-bleed:0px;max-width:100%;padding:16px 16px 28px}.dsh-qa-footer__inner{max-width:100%}.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}}
823
896
  @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}}
824
897
  @media (prefers-reduced-motion:reduce){.dsh-qa-message__cursor,.dsh-qa-message__pending-spinner,.dsh-qa-work__spinner,.dsh-qa-work-item__spinner,.dsh-qa-command__spinner{animation:none}.dsh-qa-work__chevron{transition:none}.dsh-qa-rail__frame,.dsh-qa-rail__pos,.dsh-qa-rail__mark::before,.dsh-qa-rail__mark--busy::before,.dsh-qa-rail__preview{transition:none;animation:none}}
825
898
  ${QA_ADMIN_CONSOLE_STYLES}
826
899
  `;
827
900
  /**
828
- * Everything the QA overlay paints, as one sheet for one `<style>` tag.
901
+ * Everything the QA surface paints, as one sheet for one `<style>` tag — the
902
+ * kiosk form, with no host-hiding rules: in the kiosk composition the native
903
+ * shell never mounts, so the sheet carries nothing aimed at it.
829
904
  *
830
905
  * The shared audit components keep their own stylesheet in
831
- * `@yadsh/dsh-audit-ui`; it is folded in here so the overlay is self-contained
906
+ * `@yadsh/dsh-audit-ui`; it is folded in here so the surface is self-contained
832
907
  * — the audit dialog must look right whether or not the audit plugin's own
833
908
  * client bundle happens to have injected the same rules into the document.
909
+ *
910
+ * The math styles and their fonts come from the bundled KaTeX copy the same
911
+ * way: the data-URI fonts resolve whatever the Host page loads, and identical
912
+ * rules from its own KaTeX stylesheet are harmless.
834
913
  */
835
- export const QA_OVERLAY_STYLES = `${QA_SURFACE_STYLES}
914
+ export const QA_ROOT_STYLES = `${QA_SURFACE_STYLES}
915
+ ${KATEX_CSS}
836
916
  ${AUDIT_UI_STYLES}`;
917
+ /**
918
+ * The overlay-composition sheet: the same rules as {@link QA_ROOT_STYLES}
919
+ * plus the host-column mask. Deployed into hosts without the kiosk patches,
920
+ * where the surface still covers a mounted native shell and the mask is what
921
+ * a deleted overlay element uncovers — a blank page instead of the shell.
922
+ */
923
+ export const QA_OVERLAY_STYLES = `${QA_HOST_COLUMN_MASK_RULE}
924
+ ${QA_ROOT_STYLES}`;
837
925
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA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_Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { QA_SERVICE_TOKEN_DEFAULT_SCOPES, QA_SERVICE_TOKEN_LABEL_MAX, QA_SERVICE_TOKEN_SCOPES, QA_SERVICE_TOKEN_TTL_DAYS_MAX, QA_SERVICE_TOKEN_TTL_DAYS_MIN, } from "../../shared/integration-tokens.js";
4
+ import { QaSettingsActions, QaSettingsButton, QaSettingsField, QaSettingsNotice, QaSettingsSection, } from "./fields.js";
5
+ /** Scope names as the person choosing them reads them. */
6
+ const SCOPE_LABELS = {
7
+ ask: "Задавать вопросы",
8
+ "sessions:read": "Читать историю чатов",
9
+ };
10
+ /** The lifetimes a token is usually asked for; the Host bounds the real range. */
11
+ const TTL_CHOICES = [30, 90, 180, 365];
12
+ function scopeLabels(scopes) {
13
+ return scopes.length === 0
14
+ ? "без прав"
15
+ : scopes.map((scope) => SCOPE_LABELS[scope]).join(", ");
16
+ }
17
+ /** `2026-09-21` for a stored ISO timestamp; the empty string when unparseable. */
18
+ function day(iso) {
19
+ const at = Date.parse(iso);
20
+ return Number.isFinite(at) ? new Date(at).toISOString().slice(0, 10) : "";
21
+ }
22
+ function tokenState(token, now) {
23
+ if (token.revokedAt !== null)
24
+ return "revoked";
25
+ return Date.parse(token.expiresAt) <= now ? "expired" : "active";
26
+ }
27
+ /**
28
+ * The integration tokens of the signed-in account: mint, read the secret once,
29
+ * and revoke.
30
+ *
31
+ * An integration token is the credential a non-browser application presents to
32
+ * the QA HTTP API, and it is deliberately a second, separate credential from
33
+ * the browser session: it survives a password change, it carries its own
34
+ * scopes and expiry, and it is revoked here rather than by signing anybody out.
35
+ * The page therefore says what the token is *for* before it offers to mint one
36
+ * — handing a long-lived key to a service is not a preference toggle.
37
+ *
38
+ * The plaintext exists in exactly one place: the answer that minted it. It is
39
+ * shown once, with the warning that this is the only time, and the list that
40
+ * follows carries no secret in any state — a list that could repeat a
41
+ * credential would be a list that leaks it.
42
+ */
43
+ export function QaIntegrationTokensPage(props) {
44
+ const [tokens, setTokens] = useState([]);
45
+ const [loading, setLoading] = useState(true);
46
+ const [error, setError] = useState(null);
47
+ const [label, setLabel] = useState("");
48
+ const [days, setDays] = useState(TTL_CHOICES[1] ?? 90);
49
+ const [scopes, setScopes] = useState(QA_SERVICE_TOKEN_DEFAULT_SCOPES);
50
+ const [busy, setBusy] = useState(false);
51
+ const [issued, setIssued] = useState(null);
52
+ const [copied, setCopied] = useState(false);
53
+ const [pendingRevoke, setPendingRevoke] = useState(null);
54
+ const [revoking, setRevoking] = useState(null);
55
+ useEffect(() => {
56
+ let live = true;
57
+ void props.api.list().then((result) => {
58
+ if (!live)
59
+ return;
60
+ setLoading(false);
61
+ if (result.ok) {
62
+ setTokens(result.value);
63
+ return;
64
+ }
65
+ setError(result.error);
66
+ });
67
+ return () => {
68
+ live = false;
69
+ };
70
+ }, [props.api]);
71
+ // Revocation is not undoable and a token may be in production: the row asks
72
+ // twice, and the second click is the one that acts.
73
+ const reload = async () => {
74
+ const result = await props.api.list();
75
+ if (result.ok) {
76
+ setTokens(result.value);
77
+ setError(null);
78
+ return;
79
+ }
80
+ setError(result.error);
81
+ };
82
+ const submit = (event) => {
83
+ event.preventDefault();
84
+ if (busy)
85
+ return;
86
+ setBusy(true);
87
+ setError(null);
88
+ setCopied(false);
89
+ void props.api
90
+ .create({
91
+ label: label.trim(),
92
+ scopes: [...scopes],
93
+ ttlDays: days,
94
+ })
95
+ .then(async (result) => {
96
+ setBusy(false);
97
+ if (!result.ok) {
98
+ setError(result.error);
99
+ return;
100
+ }
101
+ setIssued(result.value);
102
+ setLabel("");
103
+ await reload();
104
+ });
105
+ };
106
+ const toggleScope = (scope, checked) => {
107
+ setScopes((current) => checked
108
+ ? QA_SERVICE_TOKEN_SCOPES.filter((candidate) => candidate === scope || current.includes(candidate))
109
+ : current.filter((candidate) => candidate !== scope));
110
+ };
111
+ const revoke = (tokenId) => {
112
+ if (revoking !== null)
113
+ return;
114
+ setRevoking(tokenId);
115
+ setError(null);
116
+ void props.api.revoke(tokenId).then(async (result) => {
117
+ setRevoking(null);
118
+ setPendingRevoke(null);
119
+ if (!result.ok) {
120
+ setError(result.error);
121
+ return;
122
+ }
123
+ await reload();
124
+ });
125
+ };
126
+ const copySecret = (secret) => {
127
+ const clipboard = navigator.clipboard;
128
+ if (clipboard === undefined)
129
+ return;
130
+ void clipboard.writeText(secret).then(() => setCopied(true), () => undefined);
131
+ };
132
+ const now = Date.now();
133
+ return (_jsxs("div", { className: "dsh-qa-settings__page", children: [_jsx("h3", { className: "dsh-qa-settings__page-title", children: "\u0418\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0435 \u0442\u043E\u043A\u0435\u043D\u044B" }), _jsx("p", { className: "dsh-qa-settings__lead", children: "\u0422\u043E\u043A\u0435\u043D \u2014 \u044D\u0442\u043E \u043A\u043B\u044E\u0447 \u0434\u043B\u044F \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u044B: \u043E\u043D\u0430 \u0437\u0430\u0434\u0430\u0451\u0442 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043E\u0442 \u0438\u043C\u0435\u043D\u0438 \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0451\u0442\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438, \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044F \u0431\u0440\u0430\u0443\u0437\u0435\u0440. \u0412\u044B\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D \u043A\u0430\u0436\u0434\u043E\u0439 \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u043E\u0442\u0437\u044B\u0432\u0430\u0439\u0442\u0435 \u0435\u0433\u043E, \u043A\u043E\u0433\u0434\u0430 \u043E\u043D\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043D\u0443\u0436\u043D\u0430. \u0422\u043E\u043A\u0435\u043D \u043F\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043C\u0435\u043D\u0443 \u0432\u0430\u0448\u0435\u0433\u043E \u043F\u0430\u0440\u043E\u043B\u044F, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u043E\u0442\u0437\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E." }), issued === null ? null : (_jsxs(QaSettingsSection, { title: "\u0422\u043E\u043A\u0435\u043D \u0441\u043E\u0437\u0434\u0430\u043D", children: [_jsx(QaSettingsNotice, { tone: "warn", children: "\u0421\u043A\u043E\u043F\u0438\u0440\u0443\u0439\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0438 \u043F\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u0435\u0433\u043E \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438. \u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0433\u043E \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u043D\u0435\u043B\u044C\u0437\u044F: \u043D\u0430 \u0441\u0442\u0435\u043D\u0434\u0435 \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0442\u043F\u0435\u0447\u0430\u0442\u043E\u043A." }), _jsx(QaSettingsField, { label: "\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0442\u043E\u043A\u0435\u043D\u0430", hint: "\u041F\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0433\u043E \u043A\u0430\u043A \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A Authorization: Bearer \u2026", children: _jsx("input", { className: "dsh-qa-settings__code", value: issued.token, readOnly: true, onFocus: (event) => event.currentTarget.select() }) }), _jsxs(QaSettingsActions, { children: [_jsx(QaSettingsButton, { label: copied ? "Скопировано" : "Скопировать", onClick: () => copySecret(issued.token) }), _jsx(QaSettingsButton, { tone: "primary", label: "\u042F \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u043B \u0442\u043E\u043A\u0435\u043D", onClick: () => {
134
+ setIssued(null);
135
+ setCopied(false);
136
+ } })] })] })), _jsx(QaSettingsSection, { title: "\u041D\u043E\u0432\u044B\u0439 \u0442\u043E\u043A\u0435\u043D", children: props.api.canCreate ? (_jsxs("form", { className: "dsh-qa-settings__page", onSubmit: submit, children: [_jsx(QaSettingsField, { label: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435", hint: "\u041F\u043E \u043D\u0435\u043C\u0443 \u0432\u044B \u043E\u0442\u043B\u0438\u0447\u0438\u0442\u0435 \u0442\u043E\u043A\u0435\u043D\u044B \u0432 \u0441\u043F\u0438\u0441\u043A\u0435: \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u00AB\u043C\u043E\u0441\u0442 \u0437\u0430\u044F\u0432\u043E\u043A\u00BB.", children: _jsx("input", { value: label, maxLength: QA_SERVICE_TOKEN_LABEL_MAX, placeholder: "\u043C\u043E\u0441\u0442 \u0437\u0430\u044F\u0432\u043E\u043A", onChange: (event) => setLabel(event.currentTarget.value) }) }), QA_SERVICE_TOKEN_SCOPES.map((scope) => (_jsx("div", { className: "dsh-qa-settings__toggle-row", children: _jsxs("label", { className: "dsh-qa-settings__toggle", children: [_jsx("input", { type: "checkbox", checked: scopes.includes(scope), onChange: (event) => toggleScope(scope, event.currentTarget.checked) }), _jsx("span", { className: "dsh-qa-settings__toggle-label", children: SCOPE_LABELS[scope] })] }) }, scope))), _jsx("p", { className: "dsh-qa-settings__field-hint", children: "\u041F\u0440\u0430\u0432\u0430 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0432\u0430\u044E\u0442 \u0442\u043E\u043A\u0435\u043D, \u043D\u043E \u043D\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044F\u044E\u0442 \u0434\u043E\u0441\u0442\u0443\u043F \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0451\u0442\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438: \u0442\u043E\u043A\u0435\u043D \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435 \u0442\u043E\u0433\u043E, \u0447\u0442\u043E \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u044B." }), _jsx(QaSettingsField, { label: "\u0421\u0440\u043E\u043A, \u0434\u043D\u0435\u0439", hint: `От ${String(QA_SERVICE_TOKEN_TTL_DAYS_MIN)} до ${String(QA_SERVICE_TOKEN_TTL_DAYS_MAX)}; по умолчанию — срок вашей сессии.`, children: _jsx("select", { value: days, onChange: (event) => setDays(Number(event.currentTarget.value)), children: TTL_CHOICES.map((choice) => (_jsx("option", { value: choice, children: choice }, choice))) }) }), _jsx(QaSettingsActions, { children: _jsx(QaSettingsButton, { type: "submit", tone: "primary", disabled: busy, label: busy ? "Создание…" : "Создать токен" }) })] })) : (_jsx(QaSettingsNotice, { tone: "info", children: "\u0418\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0439 API \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D \u043D\u0430 \u044D\u0442\u043E\u043C \u0441\u0442\u0435\u043D\u0434\u0435, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0441\u043E\u0437\u0434\u0430\u0432\u0430\u0442\u044C \u0442\u043E\u043A\u0435\u043D\u044B \u043F\u043E\u043A\u0430 \u043D\u0435 \u0434\u043B\u044F \u0447\u0435\u0433\u043E. \u0412\u044B\u0434\u0430\u043D\u043D\u044B\u0435 \u0440\u0430\u043D\u0435\u0435 \u0442\u043E\u043A\u0435\u043D\u044B \u043E\u0441\u0442\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u043F\u0438\u0441\u043A\u0435 \u043D\u0438\u0436\u0435 \u2014 \u0438\u0445 \u043C\u043E\u0436\u043D\u043E \u043E\u0442\u043E\u0437\u0432\u0430\u0442\u044C." })) }), _jsxs(QaSettingsSection, { title: "\u0412\u044B\u0434\u0430\u043D\u043D\u044B\u0435 \u0442\u043E\u043A\u0435\u043D\u044B", children: [error === null ? null : (_jsx(QaSettingsNotice, { tone: "error", children: error })), loading ? (_jsx("p", { className: "dsh-qa-settings__field-hint", children: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430\u2026" })) : tokens.length === 0 ? (_jsx("p", { className: "dsh-qa-settings__field-hint", children: "\u0423 \u0432\u0430\u0441 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442 \u0438\u043D\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0445 \u0442\u043E\u043A\u0435\u043D\u043E\u0432." })) : (_jsx("ul", { className: "dsh-qa-settings__rows", children: tokens.map((token) => {
137
+ const state = tokenState(token, now);
138
+ const confirming = pendingRevoke === token.id;
139
+ return (_jsx("li", { className: "dsh-qa-settings__row", children: _jsxs("div", { className: "dsh-qa-settings__row-button", children: [_jsx("span", { className: "dsh-qa-settings__row-title", children: token.label }), _jsx("span", { className: "dsh-qa-settings__row-description", children: scopeLabels(token.scopes) }), _jsxs("span", { className: "dsh-qa-settings__row-meta", children: ["\u0441\u043E\u0437\u0434\u0430\u043D ", day(token.createdAt), " \u00B7 \u0434\u043E ", day(token.expiresAt), " ", "\u00B7 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0439: ", token.useCount, token.lastUsedAt === null
140
+ ? ""
141
+ : ` · последний раз ${day(token.lastUsedAt)}`] }), state === "active" ? null : (_jsx("span", { className: state === "revoked"
142
+ ? "dsh-qa-settings__row-meta"
143
+ : "dsh-qa-settings__row-warning", children: state === "revoked"
144
+ ? "отозван"
145
+ : "истёк — интеграция больше не может им пользоваться" })), state === "active" ? (_jsx(QaSettingsActions, { children: confirming ? (_jsxs(_Fragment, { children: [_jsx(QaSettingsButton, { label: "\u041E\u0442\u043C\u0435\u043D\u0430", onClick: () => setPendingRevoke(null) }), _jsx(QaSettingsButton, { tone: "danger", disabled: revoking === token.id, label: revoking === token.id
146
+ ? "Отзываем…"
147
+ : "Отозвать окончательно", onClick: () => revoke(token.id) })] })) : (_jsx(QaSettingsButton, { tone: "danger", label: "\u041E\u0442\u043E\u0437\u0432\u0430\u0442\u044C", title: `Отозвать токен «${token.label}»`, onClick: () => setPendingRevoke(token.id) })) })) : null] }) }, token.id));
148
+ }) }))] })] }));
149
+ }
150
+ //# sourceMappingURL=IntegrationTokensPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntegrationTokensPage.js","sourceRoot":"","sources":["../../../src/client/user-settings/IntegrationTokensPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5D,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,EAC1B,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,GAC9B,MAAM,oCAAoC,CAAC;AAO5C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,0DAA0D;AAC1D,MAAM,YAAY,GAAwC;IACxD,GAAG,EAAE,kBAAkB;IACvB,eAAe,EAAE,sBAAsB;CACxC,CAAC;AAEF,kFAAkF;AAClF,MAAM,WAAW,GAAsB,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1D,SAAS,WAAW,CAAC,MAAsC;IACzD,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC;QACxB,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,MA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AAC,gBAAgB,IACf,KAAK,EAAC,sCAAQ,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,GACrC,EACF,KAAC,gBAAgB,IACf,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,KAAK,KAAK,CAAC,EAAE,EAC/B,KAAK,EACH,QAAQ,KAAK,KAAK,CAAC,EAAE;4DACnB,CAAC,CAAC,WAAW;4DACb,CAAC,CAAC,uBAAuB,EAE7B,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GAC/B,IACD,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,gBAAgB,IACf,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,kDAAU,EAChB,KAAK,EAAE,mBAAmB,KAAK,CAAC,KAAK,GAAG,EACxC,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,GACzC,CACH,GACiB,CACrB,CAAC,CAAC,CAAC,IAAI,IACJ,IAzDC,KAAK,CAAC,EAAE,CA0DZ,CACN,CAAC;wBACJ,CAAC,CAAC,GACC,CACN,IACiB,IAChB,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { QaSettingsActions, QaSettingsButton, QaSettingsField, QaSettingsNotice, } from "./fields.js";
4
+ /** The Host's own floor; repeated here so the form refuses before the round trip. */
5
+ const MIN_PASSWORD_LENGTH = 8;
6
+ /**
7
+ * The password section of the settings dialog: current, new, repeat. The
8
+ * repeat field is client-side only — it exists to catch a typo in the field
9
+ * that, unlike a name, cannot be read back later.
10
+ *
11
+ * The consequence is stated rather than discovered: changing a password ends
12
+ * every *other* session of this account, which is exactly the point after a
13
+ * leak and exactly what looks like a bug when nobody said so.
14
+ */
15
+ export function QaPasswordSettingsPage(props) {
16
+ const [current, setCurrent] = useState("");
17
+ const [next, setNext] = useState("");
18
+ const [repeat, setRepeat] = useState("");
19
+ const [busy, setBusy] = useState(false);
20
+ const [error, setError] = useState(null);
21
+ const [saved, setSaved] = useState(false);
22
+ const tooShort = next !== "" && next.length < MIN_PASSWORD_LENGTH;
23
+ const mismatch = repeat !== "" && repeat !== next;
24
+ const incomplete = current === "" || next === "" || repeat === "";
25
+ const submit = (event) => {
26
+ event.preventDefault();
27
+ if (busy || incomplete || mismatch || tooShort)
28
+ return;
29
+ setBusy(true);
30
+ setError(null);
31
+ setSaved(false);
32
+ void props.onChange(current, next).then((refusal) => {
33
+ setBusy(false);
34
+ if (refusal !== null) {
35
+ setError(refusal);
36
+ return;
37
+ }
38
+ // The fields never keep a password that is no longer the account's: a
39
+ // second submit after a success would be a change nobody asked for.
40
+ setCurrent("");
41
+ setNext("");
42
+ setRepeat("");
43
+ setSaved(true);
44
+ });
45
+ };
46
+ return (_jsxs("form", { className: "dsh-qa-settings__page", onSubmit: submit, children: [_jsx("h3", { className: "dsh-qa-settings__page-title", children: "\u041F\u0430\u0440\u043E\u043B\u044C" }), _jsx("p", { className: "dsh-qa-settings__lead", children: "\u0421\u043C\u0435\u043D\u0430 \u043F\u0430\u0440\u043E\u043B\u044F \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0432\u0430\u0448\u0438 \u0441\u0435\u0441\u0441\u0438\u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u2014 \u0442\u0430\u043C \u043F\u0440\u0438\u0434\u0451\u0442\u0441\u044F \u0432\u043E\u0439\u0442\u0438 \u0437\u0430\u043D\u043E\u0432\u043E. \u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F." }), _jsx(QaSettingsField, { label: "\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u043F\u0430\u0440\u043E\u043B\u044C", children: _jsx("input", { type: "password", name: "current-password", autoComplete: "current-password", required: true, disabled: busy, value: current, onChange: (event) => setCurrent(event.currentTarget.value) }) }), _jsx(QaSettingsField, { label: "\u041D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C", children: _jsx("input", { type: "password", name: "new-password", autoComplete: "new-password", required: true, minLength: MIN_PASSWORD_LENGTH, disabled: busy, value: next, onChange: (event) => setNext(event.currentTarget.value) }) }), _jsx(QaSettingsField, { label: "\u041D\u043E\u0432\u044B\u0439 \u043F\u0430\u0440\u043E\u043B\u044C \u0435\u0449\u0451 \u0440\u0430\u0437", children: _jsx("input", { type: "password", name: "repeat-password", autoComplete: "new-password", required: true, minLength: MIN_PASSWORD_LENGTH, disabled: busy, value: repeat, onChange: (event) => setRepeat(event.currentTarget.value) }) }), tooShort ? (_jsxs("p", { className: "dsh-qa-settings__field-hint", children: ["\u041F\u0430\u0440\u043E\u043B\u044C \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435 \u043A\u043E\u0440\u043E\u0447\u0435 ", MIN_PASSWORD_LENGTH, " \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432."] })) : null, mismatch ? (_jsx("p", { className: "dsh-qa-settings__field-hint", children: "\u041F\u0430\u0440\u043E\u043B\u0438 \u043D\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0442." })) : null, error === null ? null : (_jsx(QaSettingsNotice, { tone: "error", children: error })), saved && error === null ? (_jsx(QaSettingsNotice, { tone: "info", children: "\u041F\u0430\u0440\u043E\u043B\u044C \u0438\u0437\u043C\u0435\u043D\u0451\u043D. \u0414\u0440\u0443\u0433\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u044B." })) : null, _jsx(QaSettingsActions, { children: _jsx(QaSettingsButton, { type: "submit", tone: "primary", disabled: busy || incomplete || mismatch || tooShort, label: busy ? "Сохранение…" : "Сменить пароль" }) })] }));
47
+ }
48
+ //# sourceMappingURL=PasswordSettingsPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordSettingsPage.js","sourceRoot":"","sources":["../../../src/client/user-settings/PasswordSettingsPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,qFAAqF;AACrF,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAc9B;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAkC;IACvE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACzC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,IAAI,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC;IAClE,MAAM,QAAQ,GAAG,MAAM,KAAK,EAAE,IAAI,MAAM,KAAK,IAAI,CAAC;IAClD,MAAM,UAAU,GAAG,OAAO,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,IAAI,MAAM,KAAK,EAAE,CAAC;IAClE,MAAM,MAAM,GAAG,CAAC,KAAiC,EAAE,E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,GAC9C,GACgB,IACf,CACR,CAAC;AACJ,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from "react";
3
3
  import { QaSettingsButton, QaSettingsNotice } from "./fields.js";
4
- import { SKILLS_EMPTY_COPY, diagnosticMessage } from "./copy.js";
4
+ import { SKILLS_EMPTY_COPY, adminEditMessage, diagnosticMessage, } from "./copy.js";
5
5
  import { skillMatchesQuery, skillMetaLine, skillToolWarning } from "./draft.js";
6
6
  /**
7
7
  * The skills list: what exists, how it is invoked, and what needs attention.
@@ -13,7 +13,7 @@ export function QaSkillCatalog(props) {
13
13
  const visible = useMemo(() => props.skills.filter((skill) => skillMatchesQuery(skill, query)), [props.skills, query]);
14
14
  return (_jsxs("div", { className: "dsh-qa-settings__page", children: [_jsxs("div", { className: "dsh-qa-settings__page-head", children: [_jsxs("div", { className: "dsh-qa-settings__head-text", children: [_jsx("h3", { className: "dsh-qa-settings__page-title", children: "\u041D\u0430\u0432\u044B\u043A\u0438" }), _jsx("p", { className: "dsh-qa-settings__field-hint", children: "\u0418\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442 \u043A \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u044E\u0449\u0438\u043C\u0441\u044F \u0437\u0430\u0434\u0430\u0447\u0430\u043C." })] }), _jsx(QaSettingsButton, { tone: "primary", label: "\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u0430\u0432\u044B\u043A", onClick: props.onCreate })] }), props.error === null ? null : (_jsxs(QaSettingsNotice, { tone: "error", children: [props.error, " ", _jsx("button", { type: "button", className: "dsh-qa-settings__link", onClick: props.onReload, children: "\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C" })] })), props.loading && props.skills.length === 0 ? (_jsx("p", { className: "dsh-qa-settings__field-hint", children: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430\u2026" })) : null, !props.loading && props.skills.length === 0 ? (_jsxs("div", { className: "dsh-qa-settings__empty", children: [_jsx("p", { className: "dsh-qa-settings__empty-title", children: SKILLS_EMPTY_COPY.title }), _jsx("p", { className: "dsh-qa-settings__field-hint", children: SKILLS_EMPTY_COPY.body }), _jsx(QaSettingsButton, { tone: "primary", label: SKILLS_EMPTY_COPY.action, onClick: props.onCreate })] })) : null, props.skills.length === 0 ? null : (_jsxs(_Fragment, { children: [_jsx("input", { className: "dsh-qa-settings__search", type: "search", value: query, placeholder: "\u041F\u043E\u0438\u0441\u043A \u043D\u0430\u0432\u044B\u043A\u043E\u0432\u2026", "aria-label": "\u041F\u043E\u0438\u0441\u043A \u043D\u0430\u0432\u044B\u043A\u043E\u0432", onChange: (event) => setQuery(event.currentTarget.value) }), _jsx("ul", { className: "dsh-qa-settings__rows", children: visible.map((skill) => (_jsx("li", { className: "dsh-qa-settings__row", children: _jsxs("button", { type: "button", className: "dsh-qa-settings__row-button", onClick: () => props.onOpen(skill.name), children: [_jsx("span", { className: "dsh-qa-settings__row-title", children: skill.name }), _jsx("span", { className: "dsh-qa-settings__row-description", children: skill.description === ""
15
15
  ? "Без описания"
16
- : skill.description }), _jsx("span", { className: "dsh-qa-settings__row-meta", children: skillMetaLine(skill) }), skillToolWarning(skill) === null ? null : (_jsx("span", { className: "dsh-qa-settings__row-warning", children: skillToolWarning(skill) })), skill.valid ? null : (_jsx("span", { className: "dsh-qa-settings__row-error", children: diagnosticMessage(skill.diagnostics.find((entry) => entry.severity === "error") ?? {
16
+ : skill.description }), _jsx("span", { className: "dsh-qa-settings__row-meta", children: skillMetaLine(skill) }), skill.adminEdit === null ? null : (_jsx("span", { className: "dsh-qa-settings__row-note", children: adminEditMessage(skill.adminEdit) })), skillToolWarning(skill) === null ? null : (_jsx("span", { className: "dsh-qa-settings__row-warning", children: skillToolWarning(skill) })), skill.valid ? null : (_jsx("span", { className: "dsh-qa-settings__row-error", children: diagnosticMessage(skill.diagnostics.find((entry) => entry.severity === "error") ?? {
17
17
  code: "skill-file-missing",
18
18
  severity: "error",
19
19
  field: null,