@yadsh/dsh-qa-surface 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/README.md +236 -20
  2. package/compatibility.json +11 -3
  3. package/lib/account-remotes.js +100 -0
  4. package/lib/account-remotes.js.map +1 -0
  5. package/lib/accounts/credentials.js +27 -0
  6. package/lib/accounts/credentials.js.map +1 -0
  7. package/lib/accounts/errors.js +9 -0
  8. package/lib/accounts/errors.js.map +1 -0
  9. package/lib/accounts/file.js +101 -0
  10. package/lib/accounts/file.js.map +1 -0
  11. package/lib/accounts/index.js +2 -0
  12. package/lib/accounts/index.js.map +1 -0
  13. package/lib/accounts/store.js +461 -0
  14. package/lib/accounts/store.js.map +1 -0
  15. package/lib/accounts/token.js +61 -0
  16. package/lib/accounts/token.js.map +1 -0
  17. package/lib/attachment-rules.js +111 -0
  18. package/lib/attachment-rules.js.map +1 -0
  19. package/lib/attestation.js.map +1 -1
  20. package/lib/cli.js +256 -0
  21. package/lib/cli.js.map +1 -0
  22. package/lib/client/QaAccountsController.js +359 -0
  23. package/lib/client/QaAccountsController.js.map +1 -0
  24. package/lib/client/QaSessionController.js +238 -180
  25. package/lib/client/QaSessionController.js.map +1 -1
  26. package/lib/client/QaSurface.js +281 -105
  27. package/lib/client/QaSurface.js.map +1 -1
  28. package/lib/client/QaTranscriptAdapter.js +95 -244
  29. package/lib/client/QaTranscriptAdapter.js.map +1 -1
  30. package/lib/client/attachments.js +150 -0
  31. package/lib/client/attachments.js.map +1 -0
  32. package/lib/client/attestation.js +7 -1
  33. package/lib/client/attestation.js.map +1 -1
  34. package/lib/client/base64.js +16 -0
  35. package/lib/client/base64.js.map +1 -0
  36. package/lib/client/chat-files.js +48 -0
  37. package/lib/client/chat-files.js.map +1 -0
  38. package/lib/client/components/Markdown.js +54 -13
  39. package/lib/client/components/Markdown.js.map +1 -1
  40. package/lib/client/components/QaAuthGate.js +40 -0
  41. package/lib/client/components/QaAuthGate.js.map +1 -0
  42. package/lib/client/components/QaChangelog.js +131 -0
  43. package/lib/client/components/QaChangelog.js.map +1 -0
  44. package/lib/client/components/QaComposer.js +56 -74
  45. package/lib/client/components/QaComposer.js.map +1 -1
  46. package/lib/client/components/QaFileAttachment.js +19 -0
  47. package/lib/client/components/QaFileAttachment.js.map +1 -0
  48. package/lib/client/components/QaFilesPanel.js +45 -0
  49. package/lib/client/components/QaFilesPanel.js.map +1 -0
  50. package/lib/client/components/QaHeader.js +34 -0
  51. package/lib/client/components/QaHeader.js.map +1 -0
  52. package/lib/client/components/QaMessage.js +61 -18
  53. package/lib/client/components/QaMessage.js.map +1 -1
  54. package/lib/client/components/QaModal.js +31 -0
  55. package/lib/client/components/QaModal.js.map +1 -0
  56. package/lib/client/components/QaProfile.js +64 -0
  57. package/lib/client/components/QaProfile.js.map +1 -0
  58. package/lib/client/components/QaRightRail.js +15 -0
  59. package/lib/client/components/QaRightRail.js.map +1 -0
  60. package/lib/client/components/QaSidebar.js +68 -20
  61. package/lib/client/components/QaSidebar.js.map +1 -1
  62. package/lib/client/components/QaSourcesPanel.js +127 -0
  63. package/lib/client/components/QaSourcesPanel.js.map +1 -0
  64. package/lib/client/components/QaTurnRail.js +296 -0
  65. package/lib/client/components/QaTurnRail.js.map +1 -0
  66. package/lib/client/components/QaWelcomeNotice.js +125 -0
  67. package/lib/client/components/QaWelcomeNotice.js.map +1 -0
  68. package/lib/client/components/QaWidthHandle.js +147 -0
  69. package/lib/client/components/QaWidthHandle.js.map +1 -0
  70. package/lib/client/components/QaWorkGroup.js +19 -20
  71. package/lib/client/components/QaWorkGroup.js.map +1 -1
  72. package/lib/client/components/source-refs.js +78 -0
  73. package/lib/client/components/source-refs.js.map +1 -0
  74. package/lib/client/components/surface-utils.js +28 -0
  75. package/lib/client/components/surface-utils.js.map +1 -0
  76. package/lib/client/components/thinking-phrases.js +24 -0
  77. package/lib/client/components/thinking-phrases.js.map +1 -0
  78. package/lib/client/create-session.js +26 -0
  79. package/lib/client/create-session.js.map +1 -0
  80. package/lib/client/failure-copy.js +63 -0
  81. package/lib/client/failure-copy.js.map +1 -0
  82. package/lib/client/index.js +135 -16
  83. package/lib/client/index.js.map +1 -1
  84. package/lib/client/project-session-state.js +78 -0
  85. package/lib/client/project-session-state.js.map +1 -0
  86. package/lib/client/prompt-content.js +54 -0
  87. package/lib/client/prompt-content.js.map +1 -0
  88. package/lib/client/session-admission.js +38 -0
  89. package/lib/client/session-admission.js.map +1 -0
  90. package/lib/client/session-assets.js +52 -0
  91. package/lib/client/session-assets.js.map +1 -0
  92. package/lib/client/session-sources.js +61 -0
  93. package/lib/client/session-sources.js.map +1 -0
  94. package/lib/client/settings/card.js +143 -0
  95. package/lib/client/settings/card.js.map +1 -0
  96. package/lib/client/settings/fields.js +145 -0
  97. package/lib/client/settings/fields.js.map +1 -0
  98. package/lib/client/settings/format.js +255 -0
  99. package/lib/client/settings/format.js.map +1 -0
  100. package/lib/client/settings/sections/access.js +25 -0
  101. package/lib/client/settings/sections/access.js.map +1 -0
  102. package/lib/client/settings/sections/accounts.js +47 -0
  103. package/lib/client/settings/sections/accounts.js.map +1 -0
  104. package/lib/client/settings/sections/attachments.js +46 -0
  105. package/lib/client/settings/sections/attachments.js.map +1 -0
  106. package/lib/client/settings/sections/branding.js +28 -0
  107. package/lib/client/settings/sections/branding.js.map +1 -0
  108. package/lib/client/settings/sections/common.js +20 -0
  109. package/lib/client/settings/sections/common.js.map +1 -0
  110. package/lib/client/settings/sections/embedding.js +19 -0
  111. package/lib/client/settings/sections/embedding.js.map +1 -0
  112. package/lib/client/settings/sections/interface.js +60 -0
  113. package/lib/client/settings/sections/interface.js.map +1 -0
  114. package/lib/client/settings/sections/lockdown.js +82 -0
  115. package/lib/client/settings/sections/lockdown.js.map +1 -0
  116. package/lib/client/settings/sections/session.js +53 -0
  117. package/lib/client/settings/sections/session.js.map +1 -0
  118. package/lib/client/settings/sections/sources.js +72 -0
  119. package/lib/client/settings/sections/sources.js.map +1 -0
  120. package/lib/client/settings/sections/status.js +37 -0
  121. package/lib/client/settings/sections/status.js.map +1 -0
  122. package/lib/client/settings/sections.js +23 -0
  123. package/lib/client/settings/sections.js.map +1 -0
  124. package/lib/client/settings/styles.js +57 -0
  125. package/lib/client/settings/styles.js.map +1 -0
  126. package/lib/client/settlement.js +24 -0
  127. package/lib/client/settlement.js.map +1 -0
  128. package/lib/client/stream-publisher.js +47 -0
  129. package/lib/client/stream-publisher.js.map +1 -0
  130. package/lib/client/styles.js +225 -17
  131. package/lib/client/styles.js.map +1 -1
  132. package/lib/client/tool-presentation.js +102 -0
  133. package/lib/client/tool-presentation.js.map +1 -0
  134. package/lib/client/turn-sources.js +98 -0
  135. package/lib/client/turn-sources.js.map +1 -0
  136. package/lib/client/types.js +2 -0
  137. package/lib/client/types.js.map +1 -1
  138. package/lib/client/use-right-rail.js +96 -0
  139. package/lib/client/use-right-rail.js.map +1 -0
  140. package/lib/client/use-session-ui-state.js +75 -0
  141. package/lib/client/use-session-ui-state.js.map +1 -0
  142. package/lib/client/use-transcript-view.js +44 -0
  143. package/lib/client/use-transcript-view.js.map +1 -0
  144. package/lib/client.js +9052 -1345
  145. package/lib/client.js.map +1 -1
  146. package/lib/config-resolvers/accounts.js +60 -0
  147. package/lib/config-resolvers/accounts.js.map +1 -0
  148. package/lib/config-resolvers/attachments.js +28 -0
  149. package/lib/config-resolvers/attachments.js.map +1 -0
  150. package/lib/config-resolvers/basics.js +59 -0
  151. package/lib/config-resolvers/basics.js.map +1 -0
  152. package/lib/config-resolvers/defaults.js +132 -0
  153. package/lib/config-resolvers/defaults.js.map +1 -0
  154. package/lib/config-resolvers/lockdown.js +79 -0
  155. package/lib/config-resolvers/lockdown.js.map +1 -0
  156. package/lib/config-resolvers/session.js +42 -0
  157. package/lib/config-resolvers/session.js.map +1 -0
  158. package/lib/config-resolvers/shared.js +42 -0
  159. package/lib/config-resolvers/shared.js.map +1 -0
  160. package/lib/config-resolvers/sources.js +81 -0
  161. package/lib/config-resolvers/sources.js.map +1 -0
  162. package/lib/config-resolvers/ui.js +20 -0
  163. package/lib/config-resolvers/ui.js.map +1 -0
  164. package/lib/config.js +279 -102
  165. package/lib/config.js.map +1 -1
  166. package/lib/entry-redirect.js +45 -0
  167. package/lib/entry-redirect.js.map +1 -0
  168. package/lib/host-route.js +25 -1
  169. package/lib/host-route.js.map +1 -1
  170. package/lib/index.js +258 -23
  171. package/lib/index.js.map +1 -1
  172. package/lib/launch-token.js +42 -0
  173. package/lib/launch-token.js.map +1 -0
  174. package/lib/profile.js +214 -0
  175. package/lib/profile.js.map +1 -0
  176. package/lib/prompt-notes.js +231 -0
  177. package/lib/prompt-notes.js.map +1 -0
  178. package/lib/provenance/collector.js +40 -0
  179. package/lib/provenance/collector.js.map +1 -0
  180. package/lib/provenance/connectors.js +147 -0
  181. package/lib/provenance/connectors.js.map +1 -0
  182. package/lib/provenance/dedupe.js +89 -0
  183. package/lib/provenance/dedupe.js.map +1 -0
  184. package/lib/provenance/extractors.js +340 -0
  185. package/lib/provenance/extractors.js.map +1 -0
  186. package/lib/provenance/file-preview.js +39 -0
  187. package/lib/provenance/file-preview.js.map +1 -0
  188. package/lib/provenance/host-store.js +387 -0
  189. package/lib/provenance/host-store.js.map +1 -0
  190. package/lib/provenance/index.js +9 -0
  191. package/lib/provenance/index.js.map +1 -0
  192. package/lib/provenance/normalize.js +128 -0
  193. package/lib/provenance/normalize.js.map +1 -0
  194. package/lib/provenance/reported.js +53 -0
  195. package/lib/provenance/reported.js.map +1 -0
  196. package/lib/provenance/types.js +2 -0
  197. package/lib/provenance/types.js.map +1 -0
  198. package/lib/resolve-config.js +35 -249
  199. package/lib/resolve-config.js.map +1 -1
  200. package/lib/secure-session.js +122 -14
  201. package/lib/secure-session.js.map +1 -1
  202. package/lib/shared/session-key.js +18 -0
  203. package/lib/shared/session-key.js.map +1 -0
  204. package/lib/shared/settings.js +10 -0
  205. package/lib/shared/settings.js.map +1 -0
  206. package/lib/thinking-phrases.js +68 -0
  207. package/lib/thinking-phrases.js.map +1 -0
  208. package/lib/typert.host.js +749 -11
  209. package/lib/typert.remote-client.d.ts +23 -3
  210. package/lib/typert.remote-client.js +593 -6
  211. package/lib/types/account-remotes.d.ts +42 -0
  212. package/lib/types/accounts/credentials.d.ts +14 -0
  213. package/lib/types/accounts/errors.d.ts +11 -0
  214. package/lib/types/accounts/file.d.ts +82 -0
  215. package/lib/types/accounts/index.d.ts +2 -0
  216. package/lib/types/accounts/store.d.ts +144 -0
  217. package/lib/types/accounts/token.d.ts +31 -0
  218. package/lib/types/attachment-rules.d.ts +44 -0
  219. package/lib/types/attestation.d.ts +1 -1
  220. package/lib/types/cli.d.ts +9 -0
  221. package/lib/types/client/QaAccountsController.d.ts +102 -0
  222. package/lib/types/client/QaConfigController.d.ts +1 -1
  223. package/lib/types/client/QaSessionController.d.ts +61 -22
  224. package/lib/types/client/QaSurface.d.ts +14 -3
  225. package/lib/types/client/QaTranscriptAdapter.d.ts +5 -10
  226. package/lib/types/client/attachments.d.ts +54 -0
  227. package/lib/types/client/base64.d.ts +10 -0
  228. package/lib/types/client/chat-files.d.ts +30 -0
  229. package/lib/types/client/components/Markdown.d.ts +11 -1
  230. package/lib/types/client/components/QaAgentsDrawer.d.ts +1 -1
  231. package/lib/types/client/components/QaAuthGate.d.ts +15 -0
  232. package/lib/types/client/components/QaChangelog.d.ts +21 -0
  233. package/lib/types/client/components/QaComposer.d.ts +8 -4
  234. package/lib/types/client/components/QaFileAttachment.d.ts +14 -0
  235. package/lib/types/client/components/QaFilesPanel.d.ts +15 -0
  236. package/lib/types/client/components/QaHeader.d.ts +41 -0
  237. package/lib/types/client/components/QaMessage.d.ts +12 -3
  238. package/lib/types/client/components/QaModal.d.ts +26 -0
  239. package/lib/types/client/components/QaProfile.d.ts +25 -0
  240. package/lib/types/client/components/QaRightRail.d.ts +23 -0
  241. package/lib/types/client/components/QaSidebar.d.ts +44 -2
  242. package/lib/types/client/components/QaSourcesPanel.d.ts +23 -0
  243. package/lib/types/client/components/QaTurnRail.d.ts +65 -0
  244. package/lib/types/client/components/QaWelcomeNotice.d.ts +27 -0
  245. package/lib/types/client/components/QaWidthHandle.d.ts +43 -0
  246. package/lib/types/client/components/QaWorkGroup.d.ts +5 -3
  247. package/lib/types/client/components/source-refs.d.ts +16 -0
  248. package/lib/types/client/components/surface-utils.d.ts +11 -0
  249. package/lib/types/client/components/thinking-phrases.d.ts +9 -0
  250. package/lib/types/client/create-session.d.ts +13 -0
  251. package/lib/types/client/failure-copy.d.ts +19 -0
  252. package/lib/types/client/index.d.ts +1 -0
  253. package/lib/types/client/project-session-state.d.ts +30 -0
  254. package/lib/types/client/prompt-content.d.ts +30 -0
  255. package/lib/types/client/session-admission.d.ts +23 -0
  256. package/lib/types/client/session-assets.d.ts +20 -0
  257. package/lib/types/client/session-sources.d.ts +28 -0
  258. package/lib/types/client/settings/card.d.ts +23 -0
  259. package/lib/types/client/settings/fields.d.ts +139 -0
  260. package/lib/types/client/settings/format.d.ts +108 -0
  261. package/lib/types/client/settings/sections/access.d.ts +9 -0
  262. package/lib/types/client/settings/sections/accounts.d.ts +9 -0
  263. package/lib/types/client/settings/sections/attachments.d.ts +15 -0
  264. package/lib/types/client/settings/sections/branding.d.ts +8 -0
  265. package/lib/types/client/settings/sections/common.d.ts +28 -0
  266. package/lib/types/client/settings/sections/embedding.d.ts +8 -0
  267. package/lib/types/client/settings/sections/interface.d.ts +9 -0
  268. package/lib/types/client/settings/sections/lockdown.d.ts +9 -0
  269. package/lib/types/client/settings/sections/session.d.ts +9 -0
  270. package/lib/types/client/settings/sections/sources.d.ts +9 -0
  271. package/lib/types/client/settings/sections/status.d.ts +22 -0
  272. package/lib/types/client/settings/sections.d.ts +25 -0
  273. package/lib/types/client/settings/styles.d.ts +8 -0
  274. package/lib/types/client/settlement.d.ts +6 -0
  275. package/lib/types/client/stream-publisher.d.ts +28 -0
  276. package/lib/types/client/tool-presentation.d.ts +6 -0
  277. package/lib/types/client/turn-sources.d.ts +14 -0
  278. package/lib/types/client/types.d.ts +101 -9
  279. package/lib/types/client/use-right-rail.d.ts +56 -0
  280. package/lib/types/client/use-session-ui-state.d.ts +41 -0
  281. package/lib/types/client/use-transcript-view.d.ts +20 -0
  282. package/lib/types/config-resolvers/accounts.d.ts +15 -0
  283. package/lib/types/config-resolvers/attachments.d.ts +6 -0
  284. package/lib/types/config-resolvers/basics.d.ts +8 -0
  285. package/lib/types/config-resolvers/defaults.d.ts +4 -0
  286. package/lib/types/config-resolvers/lockdown.d.ts +10 -0
  287. package/lib/types/config-resolvers/session.d.ts +6 -0
  288. package/lib/types/config-resolvers/shared.d.ts +16 -0
  289. package/lib/types/config-resolvers/sources.d.ts +6 -0
  290. package/lib/types/config-resolvers/ui.d.ts +6 -0
  291. package/lib/types/entry-redirect.d.ts +20 -0
  292. package/lib/types/host-route.d.ts +14 -1
  293. package/lib/types/index.d.ts +54 -3
  294. package/lib/types/launch-token.d.ts +21 -0
  295. package/lib/types/profile.d.ts +76 -0
  296. package/lib/types/prompt-notes.d.ts +110 -0
  297. package/lib/types/provenance/collector.d.ts +26 -0
  298. package/lib/types/provenance/connectors.d.ts +11 -0
  299. package/lib/types/provenance/dedupe.d.ts +6 -0
  300. package/lib/types/provenance/extractors.d.ts +14 -0
  301. package/lib/types/provenance/file-preview.d.ts +10 -0
  302. package/lib/types/provenance/host-store.d.ts +54 -0
  303. package/lib/types/provenance/index.d.ts +10 -0
  304. package/lib/types/provenance/normalize.d.ts +13 -0
  305. package/lib/types/provenance/reported.d.ts +5 -0
  306. package/lib/types/provenance/types.d.ts +78 -0
  307. package/lib/types/resolve-config.d.ts +8 -3
  308. package/lib/types/secure-session.d.ts +36 -2
  309. package/lib/types/shared/session-key.d.ts +23 -0
  310. package/lib/types/shared/settings.d.ts +10 -0
  311. package/lib/types/thinking-phrases.d.ts +17 -0
  312. package/lib/types/types.d.ts +290 -16
  313. package/lib/types/user-workspace.d.ts +38 -0
  314. package/lib/user-workspace.js +231 -0
  315. package/lib/user-workspace.js.map +1 -0
  316. package/package.json +71 -47
  317. package/CHANGELOG.md +0 -93
  318. package/SPEC-dsh-qa-surface.md +0 -2425
  319. package/docs/ARCHITECTURE.md +0 -66
  320. package/docs/COMPATIBILITY.md +0 -14
  321. package/docs/CONFIGURATION.md +0 -112
  322. package/docs/EMBEDDING.md +0 -13
  323. package/lib/client/components/QaSourcesDrawer.js +0 -46
  324. package/lib/client/components/QaSourcesDrawer.js.map +0 -1
  325. package/lib/types/client/components/QaSourcesDrawer.d.ts +0 -8
@@ -1,15 +1,26 @@
1
- import type { HostDescriptionSource } from "@deepseek-ai/dsh-client-connection/client";
1
+ import type { ConnectionGenerationState } from "@deepseek-ai/dsh-client-connection/client";
2
2
  import type { InjectFace, PropsRuntime } from "@deepseek-ai/dsh-client-ui-slots";
3
3
  import type { QaConfigController } from "./QaConfigController.js";
4
4
  import type { QaRouteController } from "./QaRouteController.js";
5
- import type { QaSecureSession, QaSessions, QaSessionsApi } from "./types.js";
5
+ import type { QaAccountsController } from "./QaAccountsController.js";
6
+ import type { QaConversation, QaCreateSession, QaFileUpload, QaSecureSession, QaSessions, QaSessionsApi, QaSourceApi } from "./types.js";
6
7
  export interface QaSurfaceFace {
7
8
  readonly route: QaRouteController;
8
9
  readonly config: QaConfigController;
9
10
  readonly sessions: QaSessions;
11
+ readonly conversation: QaConversation;
10
12
  readonly api: QaSessionsApi;
11
- readonly connection: HostDescriptionSource;
13
+ readonly connection: ConnectionGenerationState;
12
14
  readonly secureSession: QaSecureSession;
15
+ readonly createSession: QaCreateSession;
16
+ readonly sourceApi: QaSourceApi;
17
+ /**
18
+ * Browser file-upload service, when the page serves the upload plugin.
19
+ * Resolved per send so a page that loads it later still gets file support.
20
+ */
21
+ readonly fileUpload?: () => QaFileUpload | undefined;
22
+ /** Present when the deployment mounts the QA account gate. */
23
+ readonly accounts?: QaAccountsController;
13
24
  }
14
25
  type QaSurfaceProps = PropsRuntime<"shell.overlay"> & InjectFace<QaSurfaceFace>;
15
26
  export declare function QaSurface(props: QaSurfaceProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +1,5 @@
1
- import type { ConversationSnapshot } from "@deepseek-ai/dsh-client-runtime/client";
2
- import type { QaMessage, QaSource } from "../types.js";
1
+ import type { ConversationSnapshot } from "@deepseek-ai/dsh-client-ui-conversation/client";
2
+ import type { QaMessage } from "../types.js";
3
3
  /**
4
4
  * The hidden regeneration prompt. Regenerate sends this as an ordinary
5
5
  * prompt — the session has no truncation seam, so a "variant" is a real
@@ -8,15 +8,10 @@ import type { QaMessage, QaSource } from "../types.js";
8
8
  */
9
9
  export declare const QA_REGENERATE_MARKER = "\u041F\u0435\u0440\u0435\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u0443\u0439 \u0441\u0432\u043E\u0439 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442 \u2014 \u0434\u0430\u0439 \u043D\u043E\u0432\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442, \u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u044F \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439.";
10
10
  /** Project end-user messages plus optional operator-approved work detail. */
11
- export declare function projectTranscript(snapshot: ConversationSnapshot, options?: {
11
+ export declare function projectTranscript(snapshot: ConversationSnapshot | undefined, options?: {
12
+ /** Live turn lifecycle from the bound Session (drives running-row status). */
13
+ readonly running?: boolean;
12
14
  readonly showToolActivity?: boolean;
13
15
  readonly showReasoning?: boolean;
14
16
  }): readonly QaMessage[];
15
- /**
16
- * Collect the sources this chat has actually touched, in first-use order:
17
- * fetched pages, searches, and files read. This is the same tool activity the
18
- * work groups render, projected as a flat citation-style list, so it carries
19
- * no information beyond `ui.showToolActivity`.
20
- */
21
- export declare function projectSources(snapshot: ConversationSnapshot): readonly QaSource[];
22
17
  //# sourceMappingURL=QaTranscriptAdapter.d.ts.map
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Composer-side attachment intake: which files are accepted, how a pasted
3
+ * blob turns into an attachment, and the browser-side ceilings. The Host
4
+ * remains authoritative — these checks exist so a refusal happens before a
5
+ * round trip, not to replace the Host's own admission.
6
+ */
7
+ import type { QaAttachmentDraft, QaFileDraft, QaImageMediaType, ResolvedQaSurfaceConfig } from "../types.js";
8
+ /** Raster formats the host attachment path accepts. */
9
+ export declare const QA_IMAGE_MEDIA_TYPES: readonly QaImageMediaType[];
10
+ /** Soft image ceiling; the Host stays authoritative at admission. */
11
+ export declare const QA_MAX_IMAGE_BYTES: number;
12
+ /** The attachment policy as the composer reads it. */
13
+ export interface QaAttachmentLimits {
14
+ readonly textFiles: boolean;
15
+ readonly pastedTextLines: number;
16
+ readonly maxFileBytes: number;
17
+ readonly maxPending: number;
18
+ readonly extensions: readonly string[];
19
+ }
20
+ /**
21
+ * Project the deployment's resolved configuration into the composer's policy.
22
+ * @param config - effective QA configuration.
23
+ * @returns the attachment ceilings the composer enforces.
24
+ */
25
+ export declare function attachmentLimits(config: ResolvedQaSurfaceConfig): QaAttachmentLimits;
26
+ /**
27
+ * The file picker's `accept` value: the raster formats plus either the
28
+ * configured text extensions or the browser's whole `text/*` family.
29
+ * @param limits - attachment policy in effect.
30
+ * @returns the accept attribute value.
31
+ */
32
+ export declare function attachmentAccept(limits: QaAttachmentLimits): string;
33
+ /** Whether a dropped payload may be attached as a text file at all. */
34
+ export declare function acceptsTextFile(name: string, mediaType: string, limits: QaAttachmentLimits): boolean;
35
+ /**
36
+ * Turn one dropped or picked file into a composer draft, or into the message
37
+ * the visitor sees when the file is not accepted.
38
+ * @param file - browser file from a picker, drop or paste.
39
+ * @param limits - attachment policy in effect.
40
+ * @returns the draft, or a refusal message.
41
+ */
42
+ export declare function draftFromFile(file: File, limits: QaAttachmentLimits): Promise<QaAttachmentDraft | string>;
43
+ /**
44
+ * Convert a large pasted blob into an attached file. Pasted text has no file
45
+ * name of its own, so the name states what it is; the model resolves it from
46
+ * the durable store like any other attachment.
47
+ * @param text - pasted plain text.
48
+ * @param limits - attachment policy in effect.
49
+ * @returns the draft, or null when the paste stays in the input field.
50
+ */
51
+ export declare function draftFromPaste(text: string, limits: QaAttachmentLimits): QaFileDraft | null;
52
+ /** Format one attachment size for a card, a chip or a refusal message. */
53
+ export declare function formatFileSize(bytes: number): string;
54
+ //# sourceMappingURL=attachments.d.ts.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Browser-side binary-to-base64. Chunked so `String.fromCharCode` never
3
+ * crosses the engine's argument limit on large attachments.
4
+ */
5
+ /**
6
+ * @param bytes - raw bytes to encode.
7
+ * @returns the canonical base64 text (no `data:` prefix, no padding tricks).
8
+ */
9
+ export declare function bytesToBase64(bytes: Uint8Array): string;
10
+ //# sourceMappingURL=base64.d.ts.map
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Attachment roster of one chat, projected for the rail's files tab: a pure
3
+ * scan of the durable transcript, newest message first. The browser never
4
+ * re-reads file bytes (the attachment route serves images), so a row keeps
5
+ * the same handle the transcript shows.
6
+ */
7
+ import type { QaImageView, QaMessage, QaFileView } from "../types.js";
8
+ /** Everything one user message carried, in prompt order. */
9
+ export interface QaChatFileGroup {
10
+ /** The user message id; doubles as the transcript turn anchor. */
11
+ readonly messageId: string;
12
+ /** Wall-clock send time, when the transcript recorded one. */
13
+ readonly timestamp?: number;
14
+ readonly files: readonly QaFileView[];
15
+ readonly images: readonly QaImageView[];
16
+ }
17
+ /** Whether the group carries at least one attachment of either kind. */
18
+ export declare function groupHasAttachments(group: QaChatFileGroup): boolean;
19
+ /** Total attachment count across groups; the header badge's value. */
20
+ export declare function countChatAttachments(groups: readonly QaChatFileGroup[]): number;
21
+ /**
22
+ * Group the attachments of a chat by their sending message. Only user
23
+ * messages can carry attachments; messages without any are dropped. The
24
+ * groups come out newest message first, matching a roster that grows at the
25
+ * bottom of the transcript.
26
+ * @param messages - the chat's projected transcript.
27
+ * @returns attachment groups, newest message first.
28
+ */
29
+ export declare function collectChatFiles(messages: readonly QaMessage[]): readonly QaChatFileGroup[];
30
+ //# sourceMappingURL=chat-files.d.ts.map
@@ -1,9 +1,19 @@
1
+ import type { QaSource } from "../../types.js";
2
+ import { type QaSourceRefs } from "./source-refs.js";
3
+ /** Inline source awareness handed down from the owning assistant message. */
4
+ export interface MarkdownSourceContext {
5
+ readonly refs?: QaSourceRefs;
6
+ /** Open a path-backed source in the sources drawer's detail view. */
7
+ readonly onSourceOpen?: (source: QaSource) => void;
8
+ }
1
9
  /**
2
10
  * Deliberately small, HTML-free Markdown renderer for assistant-visible text.
3
11
  * Memoized on the text value: stream updates re-render only the message whose
4
12
  * text actually changed, so committed history is never re-parsed.
5
13
  */
6
- export declare const Markdown: import("react").MemoExoticComponent<({ text, }: {
14
+ export declare const Markdown: import("react").MemoExoticComponent<({ text, sourceRefs, onSourceOpen, }: {
7
15
  readonly text: string;
16
+ readonly sourceRefs?: QaSourceRefs;
17
+ readonly onSourceOpen?: (source: QaSource) => void;
8
18
  }) => import("react/jsx-runtime").JSX.Element>;
9
19
  //# sourceMappingURL=Markdown.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { SessionSummary } from "@deepseek-ai/dsh-client-runtime/client";
1
+ import type { SessionSummary } from "@deepseek-ai/dsh-api-session-controller/client";
2
2
  /** One row of the agents panel: a subagent session of the open chat. */
3
3
  export interface QaSubagentRow {
4
4
  readonly id: string;
@@ -0,0 +1,15 @@
1
+ import type { QaAccountsController, QaAccountsSnapshot } from "../QaAccountsController.js";
2
+ export interface QaAuthGateProps {
3
+ readonly accounts: QaAccountsController;
4
+ readonly snapshot: QaAccountsSnapshot;
5
+ readonly title: string;
6
+ readonly logoUrl: string | null;
7
+ readonly allowRegistration: boolean;
8
+ }
9
+ /**
10
+ * The full-frame login/registration card shown instead of the chat while the
11
+ * deployment has accounts enabled and the browser holds no valid identity.
12
+ * Errors are the Host's coarse codes rendered as audience-safe copy.
13
+ */
14
+ export declare function QaAuthGate(props: QaAuthGateProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=QaAuthGate.d.ts.map
@@ -0,0 +1,21 @@
1
+ export declare const QA_VERSION: string;
2
+ export interface QaChangelogEntry {
3
+ readonly version: string;
4
+ readonly date: string;
5
+ readonly sections: readonly {
6
+ readonly title: string;
7
+ readonly items: readonly string[];
8
+ }[];
9
+ }
10
+ export declare const QA_CHANGELOG: readonly QaChangelogEntry[];
11
+ /** Props of the {@link QaChangelogModal} dialog. */
12
+ export interface QaChangelogModalProps {
13
+ readonly open: boolean;
14
+ readonly onClose: () => void;
15
+ }
16
+ /**
17
+ * The version/changelog dialog opened from the sidebar footer. Rendering is
18
+ * a no-op while closed; Escape and a backdrop click close it.
19
+ */
20
+ export declare function QaChangelogModal(props: QaChangelogModalProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=QaChangelog.d.ts.map
@@ -1,4 +1,5 @@
1
- import type { QaImageDraft } from "../../types.js";
1
+ import type { QaAttachmentDraft } from "../../types.js";
2
+ import { type QaAttachmentLimits } from "../attachments.js";
2
3
  export interface QaComposerProps {
3
4
  readonly placeholder: string;
4
5
  readonly quickQuestions?: readonly string[];
@@ -7,15 +8,18 @@ export interface QaComposerProps {
7
8
  readonly running: boolean;
8
9
  readonly showStop: boolean;
9
10
  readonly status: string | null;
10
- readonly images: readonly QaImageDraft[];
11
- readonly onImagesChange: (images: readonly QaImageDraft[]) => void;
12
- readonly onSend: (text: string, images: readonly QaImageDraft[]) => Promise<boolean>;
11
+ readonly attachments: readonly QaAttachmentDraft[];
12
+ /** Deployment policy: accepted kinds, ceilings and the paste threshold. */
13
+ readonly limits: QaAttachmentLimits;
14
+ readonly onAttachmentsChange: (attachments: readonly QaAttachmentDraft[]) => void;
15
+ readonly onSend: (text: string, attachments: readonly QaAttachmentDraft[]) => Promise<boolean>;
13
16
  readonly onStop: () => Promise<void>;
14
17
  }
15
18
  /**
16
19
  * Memoized with the default shallow compare: every prop is a scalar, a
17
20
  * stable array or a stable callback, so a stream of transcript frames never
18
21
  * re-renders the composer and typing stays responsive while an answer runs.
22
+ * The caller owns the draft array identity: `limits` must be stable too.
19
23
  */
20
24
  export declare const QaComposer: import("react").MemoExoticComponent<(props: QaComposerProps) => import("react/jsx-runtime").JSX.Element>;
21
25
  //# sourceMappingURL=QaComposer.d.ts.map
@@ -0,0 +1,14 @@
1
+ export interface QaFileAttachmentProps {
2
+ readonly name: string;
3
+ readonly bytes: number;
4
+ /** Pending draft vs already-sent attachment: pending offers removal. */
5
+ readonly tone: "draft" | "sent";
6
+ readonly onRemove?: () => void;
7
+ }
8
+ /**
9
+ * One attached file: the extension badge, the name and the size. The browser
10
+ * never re-reads these bytes (the Host attachment route serves images), so
11
+ * both the composer card and the sent row show the same handle.
12
+ */
13
+ export declare function QaFileAttachment({ name, bytes, tone, onRemove, }: QaFileAttachmentProps): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=QaFileAttachment.d.ts.map
@@ -0,0 +1,15 @@
1
+ import type { QaChatFileGroup } from "../chat-files.js";
2
+ export interface QaFilesPanelProps {
3
+ readonly groups: readonly QaChatFileGroup[];
4
+ /** Resolve an image attachment to an object URL; images render inert without it. */
5
+ readonly resolveImage?: (attachmentId: string) => Promise<string>;
6
+ /** Scroll the transcript to the group's user message. */
7
+ readonly onJumpToMessage: (messageId: string) => void;
8
+ }
9
+ /**
10
+ * The chat's attachment roster: one section per sending message, newest
11
+ * first. Rows mirror the transcript's handles — the browser never reads a
12
+ * file back, and the images are the same object URLs the message showed.
13
+ */
14
+ export declare function QaFilesPanel({ groups, resolveImage, onJumpToMessage, }: QaFilesPanelProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=QaFilesPanel.d.ts.map
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The surface's header chrome: brand row, the derived conversation title, the
3
+ * agents/sources/files controls and the reset action. Plain (non-memoized)
4
+ * rendering — the badge counts move with the session state anyway, so
5
+ * reference guards would never pay off here.
6
+ */
7
+ /**
8
+ * The subagent indication for headerless deployments: a slim status line
9
+ * above the transcript with the way back to the parent chat. With a header,
10
+ * the same indication lives in the title row instead.
11
+ */
12
+ export declare function QaSubagentBanner({ onClose, }: {
13
+ readonly onClose: () => void;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export interface QaHeaderProps {
16
+ readonly logoUrl: string | null;
17
+ /** The derived conversation title; null hides the heading. */
18
+ readonly title: string | null;
19
+ /** A subagent view replaces the mode caption with its return control. */
20
+ readonly viewingSubagent: boolean;
21
+ readonly onCloseSubagent: () => void;
22
+ readonly agentPreset: string | null;
23
+ readonly agentCount: number;
24
+ readonly agentsOpen: boolean;
25
+ /** Toggles the agents drawer; also closes the right rail. */
26
+ readonly onToggleAgents: () => void;
27
+ /** Whether the deployment shows the sources control in the header at all. */
28
+ readonly sourcesVisible: boolean;
29
+ readonly sourcesCount: number;
30
+ readonly sourcesComplete: boolean;
31
+ readonly sourcesOpen: boolean;
32
+ readonly onOpenSources: () => void;
33
+ readonly fileCount: number;
34
+ readonly filesOpen: boolean;
35
+ readonly onOpenFiles: () => void;
36
+ readonly showReset: boolean;
37
+ readonly resetDisabled: boolean;
38
+ readonly onReset: () => void;
39
+ }
40
+ export declare function QaHeader({ logoUrl, title, viewingSubagent, onCloseSubagent, agentPreset, agentCount, agentsOpen, onToggleAgents, sourcesVisible, sourcesCount, sourcesComplete, sourcesOpen, onOpenSources, fileCount, filesOpen, onOpenFiles, showReset, resetDisabled, onReset, }: QaHeaderProps): import("react/jsx-runtime").JSX.Element;
41
+ //# sourceMappingURL=QaHeader.d.ts.map
@@ -1,14 +1,23 @@
1
- import type { QaMessage as QaMessageModel } from "../../types.js";
1
+ import type { QaMessage as QaMessageModel, QaSource, QaTurnSources } from "../../types.js";
2
2
  export interface QaMessageProps {
3
3
  readonly message: QaMessageModel;
4
4
  readonly renderMarkdown: boolean;
5
5
  readonly showTimestamp: boolean;
6
- /** Storage prefix persisted message ratings live under. */
6
+ /**
7
+ * Storage prefix persisted message ratings live under. Callers scope it to
8
+ * the chat: message ids repeat across chats (`assistant:<seq>`).
9
+ */
7
10
  readonly stateKey?: string;
8
11
  /** Ask for a fresh variant of this answer; omit to hide the control. */
9
12
  readonly onRegenerate?: () => void;
10
13
  /** Resolve one durable attachment into a viewable URL. */
11
14
  readonly resolveImage?: (attachmentId: string) => Promise<string>;
15
+ /** Open the drawer at the exact canonical snapshot shown in this footer. */
16
+ readonly onOpenSources?: (sources: readonly QaSource[], complete: boolean, incompleteOrigins: QaTurnSources["incompleteOrigins"]) => void;
17
+ /** Open one path-backed source's detail (an inline footnote click). */
18
+ readonly onSourceDetail?: (source: QaSource) => void;
19
+ /** Operator-configured running phrases; omitted reads the built-in list. */
20
+ readonly thinkingPhrases?: readonly string[];
12
21
  }
13
22
  /**
14
23
  * Whether two transcript messages render identically. The transcript
@@ -17,5 +26,5 @@ export interface QaMessageProps {
17
26
  * comparison is by value, which keeps fresh copies cheap to recognize.
18
27
  */
19
28
  export declare function sameMessage(a: QaMessageModel, b: QaMessageModel): boolean;
20
- export declare const QaMessage: import("react").MemoExoticComponent<({ message, renderMarkdown, showTimestamp, stateKey, onRegenerate, resolveImage, }: QaMessageProps) => import("react/jsx-runtime").JSX.Element>;
29
+ export declare const QaMessage: import("react").MemoExoticComponent<({ message, renderMarkdown, showTimestamp, stateKey, onRegenerate, resolveImage, onOpenSources, onSourceDetail, thinkingPhrases, }: QaMessageProps) => import("react/jsx-runtime").JSX.Element>;
21
30
  //# sourceMappingURL=QaMessage.d.ts.map
@@ -0,0 +1,26 @@
1
+ import { type ReactNode } from "react";
2
+ export interface QaModalProps {
3
+ readonly open: boolean;
4
+ /** Dialog title; also the dialog's accessible name. */
5
+ readonly title: string;
6
+ /** Accessible label of the close control, e.g. "Закрыть профиль". */
7
+ readonly closeLabel: string;
8
+ readonly onClose: () => void;
9
+ readonly children: ReactNode;
10
+ /** Actions pinned under the body; omit for a body-only dialog. */
11
+ readonly footer?: ReactNode;
12
+ /**
13
+ * Wider panel, for a dialog whose prose must not wrap mid-sentence: the
14
+ * profile form and the changelog both take it. The default width stays with
15
+ * the text-list dialogs it was sized for.
16
+ */
17
+ readonly wide?: boolean;
18
+ }
19
+ /**
20
+ * The shared QA dialog shell: backdrop, panel, head with the close control,
21
+ * a scrolling body, and an optional footer. Escape and a backdrop click close
22
+ * it, and the close control takes focus on open. Rendering is a no-op while
23
+ * closed, so a closed dialog costs nothing.
24
+ */
25
+ export declare function QaModal(props: QaModalProps): import("react/jsx-runtime").JSX.Element | null;
26
+ //# sourceMappingURL=QaModal.d.ts.map
@@ -0,0 +1,25 @@
1
+ import type { QaAccountIdentityField, QaAccountProfile, QaAccountProfileInput } from "../../types.js";
2
+ export interface QaProfileModalProps {
3
+ readonly open: boolean;
4
+ readonly email: string;
5
+ readonly profile: QaAccountProfile;
6
+ /** Handle fields the deployment declares, in its configured order. */
7
+ readonly identities: readonly QaAccountIdentityField[];
8
+ readonly instructionsMaxLength: number;
9
+ readonly onClose: () => void;
10
+ /**
11
+ * Persist the edited profile. Resolves to audience-safe refusal copy, or
12
+ * null once the Host stored it.
13
+ */
14
+ readonly onSave: (input: QaAccountProfileInput) => Promise<string | null>;
15
+ }
16
+ /**
17
+ * The signed-in user's own profile: the full name, one field per declared
18
+ * external system, and the free-form instructions the assistant receives.
19
+ *
20
+ * The form is seeded from the stored profile each time it opens, so a closed
21
+ * dialog never keeps stale edits; limits mirror the Host's, which stays the
22
+ * authority — the browser only avoids a round trip for the obvious refusals.
23
+ */
24
+ export declare function QaProfileModal(props: QaProfileModalProps): import("react/jsx-runtime").JSX.Element;
25
+ //# sourceMappingURL=QaProfile.d.ts.map
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from "react";
2
+ import type { QaRailTab } from "../use-session-ui-state.js";
3
+ /** One rail tab's strip chip: label, live count, and its body is the panel. */
4
+ export interface QaRailTabModel {
5
+ readonly id: QaRailTab;
6
+ readonly title: string;
7
+ /** Items the tab will show; 0 hides the badge. */
8
+ readonly count: number;
9
+ readonly body: ReactNode;
10
+ }
11
+ export interface QaRightRailProps {
12
+ readonly tabs: readonly QaRailTabModel[];
13
+ readonly activeTab: QaRailTab;
14
+ readonly onTabSelect: (tab: QaRailTab) => void;
15
+ readonly onClose: () => void;
16
+ }
17
+ /**
18
+ * The chat's right rail: a fixed column whose top edge is the tab strip,
19
+ * mirroring the Harness right Sidebar's chrome. Tabs are plain chips with
20
+ * counts; the strip's last control collapses the whole column.
21
+ */
22
+ export declare function QaRightRail({ tabs, activeTab, onTabSelect, onClose, }: QaRightRailProps): import("react/jsx-runtime").JSX.Element | null;
23
+ //# sourceMappingURL=QaRightRail.d.ts.map
@@ -1,4 +1,5 @@
1
- import type { SessionSummary } from "@deepseek-ai/dsh-client-runtime/client";
1
+ import type { SessionSummary } from "@deepseek-ai/dsh-api-session-controller/client";
2
+ import type { QaAccountIdentityField, QaAccountProfile, QaAccountProfileInput } from "../../types.js";
2
3
  /** One renderable row of the chat-history sidebar. */
3
4
  export interface QaChatRow {
4
5
  readonly id: string;
@@ -7,6 +8,8 @@ export interface QaChatRow {
7
8
  readonly active: boolean;
8
9
  readonly meta: string;
9
10
  readonly updatedAt: number;
11
+ /** Chat owner's display name; present in the admin ownership view only. */
12
+ readonly ownerName?: string;
10
13
  }
11
14
  /**
12
15
  * Project this browser's indexed chat ids onto the host session list, most
@@ -14,9 +17,29 @@ export interface QaChatRow {
14
17
  * `updatedAt` (fresh messages) orders the list. Ids the host no longer lists
15
18
  * are skipped (the controller prunes them on switch).
16
19
  */
17
- export declare function buildChatRows(chatIds: readonly string[], byId: Readonly<Record<string, SessionSummary>>, activeId: string | null, now?: number): readonly QaChatRow[];
20
+ export declare function buildChatRows(chatIds: readonly string[], byId: Readonly<Record<string, SessionSummary>>, activeId: string | null, ownerNameOf?: (sessionId: string) => string | undefined, now?: number): readonly QaChatRow[];
21
+ /** One per-owner section of the admin sidebar grouping. */
22
+ export interface QaSidebarSection {
23
+ /**
24
+ * Section header; chats nobody claimed group under "Без владельца". An
25
+ * empty name renders no header (the flat, non-grouped mode).
26
+ */
27
+ readonly name: string;
28
+ readonly rows: readonly QaChatRow[];
29
+ }
30
+ /**
31
+ * Group rows into per-owner sections for the admin view. Sections order by
32
+ * their freshest row so the busiest users float up; unclaimed chats go last.
33
+ * Row order inside a section is already the global updatedAt order.
34
+ */
35
+ export declare function buildOwnerSections(rows: readonly QaChatRow[]): readonly QaSidebarSection[];
18
36
  export interface QaSidebarProps {
19
37
  readonly rows: readonly QaChatRow[];
38
+ /**
39
+ * Render per-owner sections instead of the flat list; the admin ownership
40
+ * view. Rows without an owner name fall into a trailing section.
41
+ */
42
+ readonly groupByOwner?: boolean;
20
43
  /** Deployment brand shown next to the logo (also while collapsed). */
21
44
  readonly title: string;
22
45
  /** Optional image logo; a built-in mark is drawn when null. */
@@ -29,6 +52,25 @@ export interface QaSidebarProps {
29
52
  readonly onNewChat: () => void;
30
53
  /** Removes a chat from this browser's index; omit to hide the control. */
31
54
  readonly onDelete?: (sessionId: string) => void;
55
+ /** The signed-in account; omit when accounts are disabled. */
56
+ readonly account?: {
57
+ readonly email: string;
58
+ readonly role: string;
59
+ readonly onLogout: () => void;
60
+ /**
61
+ * Self-service profile editing. Omitted when the deployment turns the
62
+ * feature off, which also leaves the footer name as plain text. Memoized
63
+ * by the caller: this object is compared by reference.
64
+ */
65
+ readonly profileDialog?: {
66
+ readonly profile: QaAccountProfile;
67
+ /** Handle fields the dialog renders, in the deployment's order. */
68
+ readonly fields: readonly QaAccountIdentityField[];
69
+ readonly instructionsMaxLength: number;
70
+ /** Persist edited fields; resolves to refusal copy, or null. */
71
+ readonly onSave: (input: QaAccountProfileInput) => Promise<string | null>;
72
+ };
73
+ };
32
74
  }
33
75
  /**
34
76
  * Whether two sidebar row lists show the same thing. Rows are rebuilt on
@@ -0,0 +1,23 @@
1
+ import type { QaSource, QaTurnSources, ResolvedQaSurfaceConfig } from "../../types.js";
2
+ import type { QaBoundSourceApi } from "../types.js";
3
+ export declare function SourceIcon({ kind }: {
4
+ readonly kind: QaSource["kind"];
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export interface QaSourcesPanelProps {
7
+ readonly sources: readonly QaSource[];
8
+ readonly complete: boolean;
9
+ readonly incompleteOrigins?: QaTurnSources["incompleteOrigins"];
10
+ readonly sessionId: string | null;
11
+ readonly sourceApi: QaBoundSourceApi;
12
+ readonly display: ResolvedQaSurfaceConfig["sources"]["display"];
13
+ readonly filePreview: ResolvedQaSurfaceConfig["sources"]["filePreview"];
14
+ /** Open straight onto this source's detail (an inline footnote click). */
15
+ readonly initialDetail?: QaSource | null;
16
+ /** The list is a message-scoped subset rather than the whole chat. */
17
+ readonly pinned?: boolean;
18
+ /** Dismiss the pinned subset and show the whole chat's sources. */
19
+ readonly onShowAll?: () => void;
20
+ }
21
+ /** Canonical grouped source panel and safe local-file preview. */
22
+ export declare function QaSourcesPanel({ sources, complete, incompleteOrigins, sessionId, sourceApi, display, filePreview, initialDetail, pinned, onShowAll, }: QaSourcesPanelProps): import("react/jsx-runtime").JSX.Element;
23
+ //# sourceMappingURL=QaSourcesPanel.d.ts.map
@@ -0,0 +1,65 @@
1
+ import { type RefObject } from "react";
2
+ import type { QaMessage } from "../../types.js";
3
+ /**
4
+ * One mark of the turn rail: the user prompt that opens the turn, a bounded
5
+ * answer preview for the hover tooltip, and the message id that anchors the
6
+ * jump (the prompt's message slot in the transcript).
7
+ */
8
+ export interface QaTurnRailItem {
9
+ /** 1-based position in the visible transcript; also the React key. */
10
+ readonly turn: number;
11
+ /** The user message id that opens the turn (scroll anchor). */
12
+ readonly id: string;
13
+ readonly prompt: string;
14
+ readonly response: string;
15
+ }
16
+ /** Transcript attribute marking the message slot that opens a turn. */
17
+ export declare const QA_TURN_ANCHOR_ATTRIBUTE = "data-dsh-qa-turn-anchor";
18
+ /** Scroll distance from the floor at which the rail still calls it "at bottom". */
19
+ export declare const QA_TURN_FOLLOW_PX = 96;
20
+ /** The reading line: reading offset from the scrollport top while scrolling. */
21
+ export declare const QA_TURN_READING_PX = 96;
22
+ /**
23
+ * Rail ladder of the visible transcript: every user prompt opens a turn, the
24
+ * first non-empty answer after it fills the response preview. Hidden variant
25
+ * answers never reach this list because callers pass the already-filtered
26
+ * messages.
27
+ */
28
+ export declare function buildTurnRailItems(messages: readonly QaMessage[]): readonly QaTurnRailItem[];
29
+ /** Deep equality guard so the memoized rail skips streaming commits. */
30
+ export declare function sameTurnRailItems(left: readonly QaTurnRailItem[], right: readonly QaTurnRailItem[]): boolean;
31
+ /**
32
+ * Turn owning the transcript's reading line, or the newest one while the
33
+ * reader follows the live tail. Anchors above the line are scanned in flow
34
+ * order; the last one at or above it owns the mark.
35
+ */
36
+ export declare function computeActiveTurn(scroller: HTMLElement, items: readonly QaTurnRailItem[]): number | null;
37
+ export interface QaTurnRailProps {
38
+ readonly items: readonly QaTurnRailItem[];
39
+ readonly activeTurn: number | null;
40
+ /** Turn still generating; its mark pulses. */
41
+ readonly busyTurn: number | null;
42
+ /** The transcript scroller the rail floats over and measures its band from. */
43
+ readonly scrollerRef: RefObject<HTMLDivElement | null>;
44
+ readonly onNavigate: (item: QaTurnRailItem) => void;
45
+ }
46
+ declare function QaTurnRailView({ items, activeTurn, busyTurn, scrollerRef, onNavigate, }: QaTurnRailProps): import("react/jsx-runtime").JSX.Element | null;
47
+ /**
48
+ * Fixed-pitch rail of every turn of the visible transcript, floating over the
49
+ * transcript's right gutter: the active mark follows the reading line, a
50
+ * hover/focus preview shows the prompt and answer, and a click lands the
51
+ * transcript on that turn. Memoized like the harness rail — the transcript
52
+ * re-renders on every streaming delta, and the rail only changes when a turn
53
+ * is added or becomes active.
54
+ */
55
+ export declare const QaTurnRail: import("react").MemoExoticComponent<typeof QaTurnRailView>;
56
+ /** Land the transcript on a turn's prompt row, harness-style. */
57
+ export declare function turnScrollTarget(scroller: HTMLElement, row: HTMLElement): number;
58
+ /**
59
+ * Find the message slot carrying `anchorId` and land the transcript on it,
60
+ * harness-style. Returns whether the anchor row exists; callers tie their
61
+ * near-bottom bookkeeping and rail-mark updates to that outcome.
62
+ */
63
+ export declare function scrollToTranscriptAnchor(scroller: HTMLElement, anchorId: string): boolean;
64
+ export {};
65
+ //# sourceMappingURL=QaTurnRail.d.ts.map
@@ -0,0 +1,27 @@
1
+ import type { SettingsOnboardingOwnerProps } from "@deepseek-ai/dsh-client-ui-settings/client";
2
+ import type { StorageLike } from "../types.js";
3
+ /** Bump when the notice changes materially and must be acknowledged again. */
4
+ export declare const QA_WELCOME_NOTICE_VERSION = "2026-09-12.1";
5
+ export declare const QA_WELCOME_NOTICE_COPY: Readonly<{
6
+ title: "Перед началом тестирования";
7
+ paragraphs: readonly string[];
8
+ continueLabel: "Понятно, продолжить";
9
+ }>;
10
+ export interface QaWelcomeNoticeFace {
11
+ readonly storage: StorageLike;
12
+ readonly storageKey: string;
13
+ }
14
+ export interface QaWelcomeNoticeProps extends QaWelcomeNoticeFace {
15
+ readonly complete?: () => void;
16
+ }
17
+ export interface QaWelcomeNoticeStepProps extends SettingsOnboardingOwnerProps, QaWelcomeNoticeFace {
18
+ }
19
+ /** Route-scoped replacement for DSH's stock `welcome-notice` onboarding step. */
20
+ export declare function QaWelcomeNotice(props: QaWelcomeNoticeProps): import("react").ReactPortal | null;
21
+ /**
22
+ * Invisible shadow for DSH's stock welcome step. The host coordinator removes
23
+ * onboarding content as soon as a chat stops being blank, so the visible QA
24
+ * notice is owned by the route overlay above instead of this lifecycle.
25
+ */
26
+ export declare function QaWelcomeNoticeStep(props: QaWelcomeNoticeStepProps): null;
27
+ //# sourceMappingURL=QaWelcomeNotice.d.ts.map