@yadsh/dsh-qa-surface 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +192 -15
- package/cordis.patch.yml +8 -0
- package/lib/account-remotes.js +100 -0
- package/lib/account-remotes.js.map +1 -0
- package/lib/accounts/credentials.js +35 -0
- package/lib/accounts/credentials.js.map +1 -0
- package/lib/accounts/errors.js +9 -0
- package/lib/accounts/errors.js.map +1 -0
- package/lib/accounts/file.js +101 -0
- package/lib/accounts/file.js.map +1 -0
- package/lib/accounts/store.js +159 -161
- package/lib/accounts/store.js.map +1 -1
- package/lib/accounts/token.js +61 -0
- package/lib/accounts/token.js.map +1 -0
- package/lib/approvals.js +179 -0
- package/lib/approvals.js.map +1 -0
- package/lib/attachment-rules.js +111 -0
- package/lib/attachment-rules.js.map +1 -0
- package/lib/cli.js +132 -9
- package/lib/cli.js.map +1 -1
- package/lib/client/QaAccountsController.js +32 -2
- package/lib/client/QaAccountsController.js.map +1 -1
- package/lib/client/QaSessionController.js +140 -65
- package/lib/client/QaSessionController.js.map +1 -1
- package/lib/client/QaSurface.js +134 -107
- package/lib/client/QaSurface.js.map +1 -1
- package/lib/client/QaTranscriptAdapter.js +71 -6
- package/lib/client/QaTranscriptAdapter.js.map +1 -1
- package/lib/client/approvals.js +104 -0
- package/lib/client/approvals.js.map +1 -0
- package/lib/client/attachments.js +150 -0
- package/lib/client/attachments.js.map +1 -0
- package/lib/client/attestation.js +4 -1
- package/lib/client/attestation.js.map +1 -1
- package/lib/client/base64.js +16 -0
- package/lib/client/base64.js.map +1 -0
- package/lib/client/chat-files.js +48 -0
- package/lib/client/chat-files.js.map +1 -0
- package/lib/client/components/Markdown.js +1 -1
- package/lib/client/components/Markdown.js.map +1 -1
- package/lib/client/components/QaApproval.js +23 -0
- package/lib/client/components/QaApproval.js.map +1 -0
- package/lib/client/components/QaChangelog.js +62 -19
- package/lib/client/components/QaChangelog.js.map +1 -1
- package/lib/client/components/QaComposer.js +56 -74
- package/lib/client/components/QaComposer.js.map +1 -1
- package/lib/client/components/QaFileAttachment.js +19 -0
- package/lib/client/components/QaFileAttachment.js.map +1 -0
- package/lib/client/components/QaFilesPanel.js +45 -0
- package/lib/client/components/QaFilesPanel.js.map +1 -0
- package/lib/client/components/QaHeader.js +34 -0
- package/lib/client/components/QaHeader.js.map +1 -0
- package/lib/client/components/QaMessage.js +17 -4
- package/lib/client/components/QaMessage.js.map +1 -1
- package/lib/client/components/QaModal.js +31 -0
- package/lib/client/components/QaModal.js.map +1 -0
- package/lib/client/components/QaProfile.js +64 -0
- package/lib/client/components/QaProfile.js.map +1 -0
- package/lib/client/components/QaQuestions.js +96 -0
- package/lib/client/components/QaQuestions.js.map +1 -0
- package/lib/client/components/QaRightRail.js +15 -0
- package/lib/client/components/QaRightRail.js.map +1 -0
- package/lib/client/components/QaSidebar.js +6 -1
- package/lib/client/components/QaSidebar.js.map +1 -1
- package/lib/client/components/{QaSourcesDrawer.js → QaSourcesPanel.js} +3 -3
- package/lib/client/components/QaSourcesPanel.js.map +1 -0
- package/lib/client/components/QaTurnRail.js +15 -0
- package/lib/client/components/QaTurnRail.js.map +1 -1
- package/lib/client/components/QaWidthHandle.js +25 -20
- package/lib/client/components/QaWidthHandle.js.map +1 -1
- package/lib/client/components/QaWorkGroup.js +19 -20
- package/lib/client/components/QaWorkGroup.js.map +1 -1
- package/lib/client/components/surface-utils.js +28 -0
- package/lib/client/components/surface-utils.js.map +1 -0
- package/lib/client/components/thinking-phrases.js +24 -0
- package/lib/client/components/thinking-phrases.js.map +1 -0
- package/lib/client/create-session.js +7 -32
- package/lib/client/create-session.js.map +1 -1
- package/lib/client/failure-copy.js +63 -0
- package/lib/client/failure-copy.js.map +1 -0
- package/lib/client/index.js +49 -7
- package/lib/client/index.js.map +1 -1
- package/lib/client/project-session-state.js +5 -3
- package/lib/client/project-session-state.js.map +1 -1
- package/lib/client/prompt-content.js +54 -0
- package/lib/client/prompt-content.js.map +1 -0
- package/lib/client/questions.js +114 -0
- package/lib/client/questions.js.map +1 -0
- package/lib/client/settings/card.js +143 -0
- package/lib/client/settings/card.js.map +1 -0
- package/lib/client/settings/fields.js +145 -0
- package/lib/client/settings/fields.js.map +1 -0
- package/lib/client/settings/format.js +255 -0
- package/lib/client/settings/format.js.map +1 -0
- package/lib/client/settings/sections/access.js +25 -0
- package/lib/client/settings/sections/access.js.map +1 -0
- package/lib/client/settings/sections/accounts.js +47 -0
- package/lib/client/settings/sections/accounts.js.map +1 -0
- package/lib/client/settings/sections/attachments.js +46 -0
- package/lib/client/settings/sections/attachments.js.map +1 -0
- package/lib/client/settings/sections/branding.js +28 -0
- package/lib/client/settings/sections/branding.js.map +1 -0
- package/lib/client/settings/sections/common.js +20 -0
- package/lib/client/settings/sections/common.js.map +1 -0
- package/lib/client/settings/sections/embedding.js +19 -0
- package/lib/client/settings/sections/embedding.js.map +1 -0
- package/lib/client/settings/sections/interface.js +60 -0
- package/lib/client/settings/sections/interface.js.map +1 -0
- package/lib/client/settings/sections/lockdown.js +82 -0
- package/lib/client/settings/sections/lockdown.js.map +1 -0
- package/lib/client/settings/sections/session.js +53 -0
- package/lib/client/settings/sections/session.js.map +1 -0
- package/lib/client/settings/sections/sources.js +74 -0
- package/lib/client/settings/sections/sources.js.map +1 -0
- package/lib/client/settings/sections/status.js +37 -0
- package/lib/client/settings/sections/status.js.map +1 -0
- package/lib/client/settings/sections.js +23 -0
- package/lib/client/settings/sections.js.map +1 -0
- package/lib/client/settings/styles.js +57 -0
- package/lib/client/settings/styles.js.map +1 -0
- package/lib/client/stream-publisher.js +47 -0
- package/lib/client/stream-publisher.js.map +1 -0
- package/lib/client/styles.js +127 -19
- package/lib/client/styles.js.map +1 -1
- package/lib/client/types.js +2 -0
- package/lib/client/types.js.map +1 -1
- package/lib/client/use-right-rail.js +96 -0
- package/lib/client/use-right-rail.js.map +1 -0
- package/lib/client/use-session-ui-state.js +26 -19
- package/lib/client/use-session-ui-state.js.map +1 -1
- package/lib/client.js +5694 -813
- package/lib/client.js.map +1 -1
- package/lib/config-resolvers/accounts.js +60 -0
- package/lib/config-resolvers/accounts.js.map +1 -0
- package/lib/config-resolvers/attachments.js +28 -0
- package/lib/config-resolvers/attachments.js.map +1 -0
- package/lib/config-resolvers/basics.js +61 -0
- package/lib/config-resolvers/basics.js.map +1 -0
- package/lib/config-resolvers/defaults.js +136 -0
- package/lib/config-resolvers/defaults.js.map +1 -0
- package/lib/config-resolvers/lockdown.js +90 -0
- package/lib/config-resolvers/lockdown.js.map +1 -0
- package/lib/config-resolvers/session.js +42 -0
- package/lib/config-resolvers/session.js.map +1 -0
- package/lib/config-resolvers/shared.js +51 -0
- package/lib/config-resolvers/shared.js.map +1 -0
- package/lib/config-resolvers/sources.js +83 -0
- package/lib/config-resolvers/sources.js.map +1 -0
- package/lib/config-resolvers/ui.js +20 -0
- package/lib/config-resolvers/ui.js.map +1 -0
- package/lib/config.js +76 -6
- package/lib/config.js.map +1 -1
- package/lib/entry-redirect.js +2 -1
- package/lib/entry-redirect.js.map +1 -1
- package/lib/index.js +198 -79
- package/lib/index.js.map +1 -1
- package/lib/profile.js +214 -0
- package/lib/profile.js.map +1 -0
- package/lib/prompt-notes.js +231 -0
- package/lib/prompt-notes.js.map +1 -0
- package/lib/provenance/host-store.js +25 -9
- package/lib/provenance/host-store.js.map +1 -1
- package/lib/provenance/reported.js +37 -12
- package/lib/provenance/reported.js.map +1 -1
- package/lib/questions.js +185 -0
- package/lib/questions.js.map +1 -0
- package/lib/resolve-config.js +35 -410
- package/lib/resolve-config.js.map +1 -1
- package/lib/secure-session.js +139 -21
- package/lib/secure-session.js.map +1 -1
- package/lib/session-ownership.js +55 -0
- package/lib/session-ownership.js.map +1 -0
- package/lib/shared/session-key.js +18 -0
- package/lib/shared/session-key.js.map +1 -0
- package/lib/shared/settings.js +10 -0
- package/lib/shared/settings.js.map +1 -0
- package/lib/thinking-phrases.js +68 -0
- package/lib/thinking-phrases.js.map +1 -0
- package/lib/typert.host.js +506 -21
- package/lib/typert.remote-client.d.ts +15 -1
- package/lib/typert.remote-client.js +407 -15
- package/lib/types/account-remotes.d.ts +42 -0
- package/lib/types/accounts/credentials.d.ts +20 -0
- package/lib/types/accounts/errors.d.ts +11 -0
- package/lib/types/accounts/file.d.ts +82 -0
- package/lib/types/accounts/store.d.ts +74 -43
- package/lib/types/accounts/token.d.ts +31 -0
- package/lib/types/approvals.d.ts +65 -0
- package/lib/types/attachment-rules.d.ts +44 -0
- package/lib/types/cli.d.ts +2 -2
- package/lib/types/client/QaAccountsController.d.ts +8 -1
- package/lib/types/client/QaSessionController.d.ts +53 -16
- package/lib/types/client/QaSurface.d.ts +14 -1
- package/lib/types/client/approvals.d.ts +39 -0
- package/lib/types/client/attachments.d.ts +54 -0
- package/lib/types/client/base64.d.ts +10 -0
- package/lib/types/client/chat-files.d.ts +30 -0
- package/lib/types/client/components/QaApproval.d.ts +13 -0
- package/lib/types/client/components/QaChangelog.d.ts +1 -1
- package/lib/types/client/components/QaComposer.d.ts +8 -4
- package/lib/types/client/components/QaFileAttachment.d.ts +14 -0
- package/lib/types/client/components/QaFilesPanel.d.ts +15 -0
- package/lib/types/client/components/QaHeader.d.ts +41 -0
- package/lib/types/client/components/QaMessage.d.ts +3 -1
- package/lib/types/client/components/QaModal.d.ts +26 -0
- package/lib/types/client/components/QaProfile.d.ts +25 -0
- package/lib/types/client/components/QaQuestions.d.ts +13 -0
- package/lib/types/client/components/QaRightRail.d.ts +23 -0
- package/lib/types/client/components/QaSidebar.d.ts +14 -0
- package/lib/types/client/components/{QaSourcesDrawer.d.ts → QaSourcesPanel.d.ts} +7 -4
- package/lib/types/client/components/QaTurnRail.d.ts +6 -0
- package/lib/types/client/components/QaWidthHandle.d.ts +14 -7
- package/lib/types/client/components/QaWorkGroup.d.ts +5 -3
- package/lib/types/client/components/surface-utils.d.ts +11 -0
- package/lib/types/client/components/thinking-phrases.d.ts +9 -0
- package/lib/types/client/create-session.d.ts +6 -9
- package/lib/types/client/failure-copy.d.ts +19 -0
- package/lib/types/client/project-session-state.d.ts +8 -1
- package/lib/types/client/prompt-content.d.ts +30 -0
- package/lib/types/client/questions.d.ts +45 -0
- package/lib/types/client/settings/card.d.ts +23 -0
- package/lib/types/client/settings/fields.d.ts +139 -0
- package/lib/types/client/settings/format.d.ts +108 -0
- package/lib/types/client/settings/sections/access.d.ts +9 -0
- package/lib/types/client/settings/sections/accounts.d.ts +9 -0
- package/lib/types/client/settings/sections/attachments.d.ts +15 -0
- package/lib/types/client/settings/sections/branding.d.ts +8 -0
- package/lib/types/client/settings/sections/common.d.ts +28 -0
- package/lib/types/client/settings/sections/embedding.d.ts +8 -0
- package/lib/types/client/settings/sections/interface.d.ts +9 -0
- package/lib/types/client/settings/sections/lockdown.d.ts +9 -0
- package/lib/types/client/settings/sections/session.d.ts +9 -0
- package/lib/types/client/settings/sections/sources.d.ts +9 -0
- package/lib/types/client/settings/sections/status.d.ts +22 -0
- package/lib/types/client/settings/sections.d.ts +25 -0
- package/lib/types/client/settings/styles.d.ts +8 -0
- package/lib/types/client/stream-publisher.d.ts +28 -0
- package/lib/types/client/types.d.ts +76 -1
- package/lib/types/client/use-right-rail.d.ts +56 -0
- package/lib/types/client/use-session-ui-state.d.ts +13 -7
- package/lib/types/config-resolvers/accounts.d.ts +15 -0
- package/lib/types/config-resolvers/attachments.d.ts +6 -0
- package/lib/types/config-resolvers/basics.d.ts +8 -0
- package/lib/types/config-resolvers/defaults.d.ts +4 -0
- package/lib/types/config-resolvers/lockdown.d.ts +10 -0
- package/lib/types/config-resolvers/session.d.ts +6 -0
- package/lib/types/config-resolvers/shared.d.ts +23 -0
- package/lib/types/config-resolvers/sources.d.ts +6 -0
- package/lib/types/config-resolvers/ui.d.ts +6 -0
- package/lib/types/index.d.ts +48 -15
- package/lib/types/profile.d.ts +76 -0
- package/lib/types/prompt-notes.d.ts +110 -0
- package/lib/types/provenance/reported.d.ts +9 -1
- package/lib/types/questions.d.ts +83 -0
- package/lib/types/resolve-config.d.ts +8 -3
- package/lib/types/secure-session.d.ts +46 -2
- package/lib/types/session-ownership.d.ts +30 -0
- package/lib/types/shared/session-key.d.ts +23 -0
- package/lib/types/shared/settings.d.ts +10 -0
- package/lib/types/thinking-phrases.d.ts +17 -0
- package/lib/types/types.d.ts +203 -9
- package/lib/types/user-workspace.d.ts +42 -0
- package/lib/user-workspace.js +246 -0
- package/lib/user-workspace.js.map +1 -0
- package/package.json +15 -8
- package/CHANGELOG.md +0 -176
- package/SPEC-dsh-qa-surface.md +0 -2425
- package/docs/ARCHITECTURE.md +0 -66
- package/docs/COMPATIBILITY.md +0 -14
- package/docs/CONFIGURATION.md +0 -199
- package/docs/EMBEDDING.md +0 -13
- package/docs/SOURCES-MIGRATION.md +0 -28
- package/docs/SOURCES-PROVENANCE-AUDIT.md +0 -88
- package/docs/SPEC-dsh-qa-surface-accounts.md +0 -219
- package/docs/SPEC-dsh-qa-surface-sources-provenance.md +0 -1692
- package/lib/client/components/QaSourcesDrawer.js.map +0 -1
package/lib/client/styles.js
CHANGED
|
@@ -110,7 +110,9 @@ export const QA_SURFACE_STYLES = String.raw `
|
|
|
110
110
|
.dsh-qa-sidebar__version:hover{color:var(--dsw-alias-label-primary)}
|
|
111
111
|
.dsh-qa-sidebar__version:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px;border-radius:4px}
|
|
112
112
|
.dsh-qa-sidebar__account{display:flex;align-items:center;gap:6px;min-width:0;margin-bottom:6px}
|
|
113
|
-
.dsh-qa-sidebar__account-name{min-width:0;overflow:hidden;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:16px;text-overflow:ellipsis;white-space:nowrap}
|
|
113
|
+
.dsh-qa-sidebar__account-name{appearance:none;min-width:0;overflow:hidden;padding:0;border:0;background:0 0;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;line-height:16px;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;transition:color .12s}
|
|
114
|
+
.dsh-qa-sidebar__account-name:hover{color:var(--dsw-alias-label-primary)}
|
|
115
|
+
.dsh-qa-sidebar__account-name:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px;border-radius:4px}
|
|
114
116
|
.dsh-qa-sidebar__account-role{flex:none;padding:1px 6px;border-radius:999px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-tertiary);font-size:10px;font-weight:500;line-height:15px}
|
|
115
117
|
.dsh-qa-sidebar__account-exit{appearance:none;display:grid;place-items:center;flex:none;width:24px;height:24px;padding:0;border:0;border-radius:7px;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
|
|
116
118
|
.dsh-qa-sidebar__account-exit:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
@@ -136,15 +138,17 @@ export const QA_SURFACE_STYLES = String.raw `
|
|
|
136
138
|
.dsh-qa-auth__submit:hover{background:var(--dsh-qa-accent-hover)}
|
|
137
139
|
.dsh-qa-auth__submit:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
|
|
138
140
|
.dsh-qa-auth__submit:disabled{opacity:.6;cursor:default}
|
|
139
|
-
.dsh-qa-
|
|
140
|
-
.dsh-qa-
|
|
141
|
-
.dsh-qa-
|
|
142
|
-
.dsh-qa-
|
|
143
|
-
.dsh-qa-
|
|
144
|
-
.dsh-qa-
|
|
145
|
-
.dsh-qa-
|
|
146
|
-
.dsh-qa-
|
|
147
|
-
.dsh-qa-
|
|
141
|
+
.dsh-qa-modal{position:fixed;inset:0;z-index:2147483600;display:grid;place-items:center;padding:24px;background:var(--dsh-qa-overlay)}
|
|
142
|
+
.dsh-qa-modal__panel{display:flex;flex-direction:column;width:min(560px,100%);max-height:min(640px,100%);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);overflow:hidden}
|
|
143
|
+
.dsh-qa-modal__panel--wide{width:min(720px,100%)}
|
|
144
|
+
.dsh-qa-modal__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding:16px 18px 12px;border-bottom:1px solid var(--dsw-alias-border-l2)}
|
|
145
|
+
.dsh-qa-modal__title{margin:0;color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:20px}
|
|
146
|
+
.dsh-qa-modal__close{appearance:none;display:grid;place-items:center;flex:none;width:28px;height:28px;padding:0;border:0;border-radius:8px;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
|
|
147
|
+
.dsh-qa-modal__close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
148
|
+
.dsh-qa-modal__close:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
|
|
149
|
+
.dsh-qa-modal__close svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
|
|
150
|
+
.dsh-qa-modal__body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:6px 18px 18px}
|
|
151
|
+
.dsh-qa-modal__footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:none;padding:12px 18px;border-top:1px solid var(--dsw-alias-border-l2)}
|
|
148
152
|
.dsh-qa-changelog__entry{padding-top:10px}
|
|
149
153
|
.dsh-qa-changelog__version{display:flex;align-items:baseline;gap:8px;margin:0 0 2px;color:var(--dsw-alias-label-primary);font-size:13px;font-weight:600;line-height:20px}
|
|
150
154
|
.dsh-qa-changelog__date{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:16px}
|
|
@@ -154,6 +158,25 @@ export const QA_SURFACE_STYLES = String.raw `
|
|
|
154
158
|
.dsh-qa-changelog__list{margin:4px 0 0;padding-left:18px;color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}
|
|
155
159
|
.dsh-qa-changelog__list li{margin:3px 0}
|
|
156
160
|
.dsh-qa-changelog__list li::marker{color:var(--dsw-alias-label-tertiary)}
|
|
161
|
+
.dsh-qa-profile{display:flex;flex-direction:column;gap:12px;margin-top:6px}
|
|
162
|
+
.dsh-qa-profile__lead{margin:0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px}
|
|
163
|
+
.dsh-qa-profile__field{display:flex;flex-direction:column;gap:5px}
|
|
164
|
+
.dsh-qa-profile__field span{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:16px}
|
|
165
|
+
.dsh-qa-profile__field input,.dsh-qa-profile__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}
|
|
166
|
+
.dsh-qa-profile__field textarea{min-height:76px;line-height:19px;resize:vertical}
|
|
167
|
+
.dsh-qa-profile__field input:focus,.dsh-qa-profile__field textarea:focus{outline:none;border-color:var(--dsh-qa-brand)}
|
|
168
|
+
.dsh-qa-profile__field input:read-only{opacity:.6}
|
|
169
|
+
.dsh-qa-profile__count{margin:-6px 0 0;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:15px;text-align:right}
|
|
170
|
+
.dsh-qa-profile__hint{margin:0;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px}
|
|
171
|
+
.dsh-qa-profile__error{margin:0;color:var(--dsh-qa-error);font-size:12px;line-height:17px}
|
|
172
|
+
.dsh-qa-profile__save{appearance:none;padding:8px 16px;border:0;border-radius:9px;background:var(--dsh-qa-brand);color:var(--dsh-qa-accent-contrast);font:inherit;font-size:13px;font-weight:600;line-height:19px;cursor:pointer;transition:background .12s}
|
|
173
|
+
.dsh-qa-profile__save:hover{background:var(--dsh-qa-accent-hover)}
|
|
174
|
+
.dsh-qa-profile__save:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
|
|
175
|
+
.dsh-qa-profile__save:disabled{opacity:.6;cursor:default}
|
|
176
|
+
.dsh-qa-profile__cancel{appearance:none;padding:8px 14px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px;background:0 0;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;line-height:19px;cursor:pointer;transition:color .12s}
|
|
177
|
+
.dsh-qa-profile__cancel:hover{color:var(--dsw-alias-label-primary)}
|
|
178
|
+
.dsh-qa-profile__cancel:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
|
|
179
|
+
.dsh-qa-profile__cancel:disabled{opacity:.6;cursor:default}
|
|
157
180
|
.dsh-qa-surface *{box-sizing:border-box}
|
|
158
181
|
.dsh-qa-surface ::selection{background:var(--dsh-qa-text-select)}
|
|
159
182
|
.dsh-qa-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
|
|
@@ -167,7 +190,6 @@ export const QA_SURFACE_STYLES = String.raw `
|
|
|
167
190
|
.dsh-qa-header__mode svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
|
|
168
191
|
.dsh-qa-header__reset{margin-left:auto;padding:5px 10px;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;cursor:pointer}
|
|
169
192
|
.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}
|
|
170
|
-
.dsh-qa-header__agents--end{margin-left:auto}
|
|
171
193
|
.dsh-qa-header__agents:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
172
194
|
.dsh-qa-header__agents:disabled{opacity:.45;cursor:default}
|
|
173
195
|
.dsh-qa-header__agents[aria-expanded="true"]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
@@ -202,12 +224,18 @@ export const QA_SURFACE_STYLES = String.raw `
|
|
|
202
224
|
.dsh-qa-agents__meta{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:15px}
|
|
203
225
|
.dsh-qa-agents__open{flex:none;color:var(--dsh-qa-accent);font-size:12px;font-weight:500;line-height:18px}
|
|
204
226
|
.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}
|
|
205
|
-
.dsh-qa-header__sources--end{margin-left:auto}
|
|
206
227
|
.dsh-qa-header__sources:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
207
228
|
.dsh-qa-header__sources:disabled{opacity:.45;cursor:default}
|
|
208
229
|
.dsh-qa-header__sources[aria-expanded="true"]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
209
230
|
.dsh-qa-header__sources svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
|
|
210
231
|
.dsh-qa-header__sources:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
|
|
232
|
+
.dsh-qa-header__files{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}
|
|
233
|
+
.dsh-qa-header__files--end{margin-left:auto}
|
|
234
|
+
.dsh-qa-header__files:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
235
|
+
.dsh-qa-header__files:disabled{opacity:.45;cursor:default}
|
|
236
|
+
.dsh-qa-header__files[aria-expanded="true"]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
237
|
+
.dsh-qa-header__files svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
|
|
238
|
+
.dsh-qa-header__files:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
|
|
211
239
|
.dsh-qa-header__reset:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
|
|
212
240
|
.dsh-qa-header__reset:disabled{opacity:.45;cursor:default}
|
|
213
241
|
.dsh-qa-header__tabs{position:relative;z-index:1;display:flex;gap:32px;margin-top:4px}
|
|
@@ -233,12 +261,35 @@ export const QA_SURFACE_STYLES = String.raw `
|
|
|
233
261
|
.dsh-qa-variants button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-1px}
|
|
234
262
|
.dsh-qa-variants button svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
|
|
235
263
|
.dsh-qa-variants span{min-width:34px;text-align:center;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:20px;font-variant-numeric:tabular-nums}
|
|
236
|
-
.dsh-qa-
|
|
237
|
-
.dsh-qa-
|
|
238
|
-
.dsh-qa-
|
|
239
|
-
.dsh-qa-
|
|
240
|
-
.dsh-qa-
|
|
241
|
-
.dsh-qa-
|
|
264
|
+
.dsh-qa-panel{flex:none;display:flex;flex-direction:column;width:360px;min-height:0;border-left:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-base)}
|
|
265
|
+
.dsh-qa-panel__strip{display:flex;align-items:center;gap:4px;flex:none;padding:10px 10px 8px 12px}
|
|
266
|
+
.dsh-qa-panel__tab{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:0;border-radius:8px;background:transparent;color:var(--dsw-alias-label-tertiary);font:inherit;font-size:13px;font-weight:500;line-height:20px;cursor:pointer}
|
|
267
|
+
.dsh-qa-panel__tab span{display:inline-grid;place-items:center;min-width:19px;height:18px;padding:0 5px;border-radius:999px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-tertiary);font-size:10px;font-weight:400;line-height:18px}
|
|
268
|
+
.dsh-qa-panel__tab:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
269
|
+
.dsh-qa-panel__tab--active{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
270
|
+
.dsh-qa-panel__tab--active span{background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary)}
|
|
271
|
+
.dsh-qa-panel__tab:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
|
|
272
|
+
.dsh-qa-panel__close{appearance:none;display:grid;place-items:center;width:26px;height:26px;margin-left:auto;flex:none;padding:0;border:0;border-radius:7px;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
|
|
273
|
+
.dsh-qa-panel__close:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
274
|
+
.dsh-qa-panel__close:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
|
|
275
|
+
.dsh-qa-panel__close svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round}
|
|
276
|
+
.dsh-qa-panel__body{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
|
|
277
|
+
.dsh-qa-sourcespanel{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
|
|
278
|
+
.dsh-qa-sourcespanel__all{appearance:none;flex:none;align-self:flex-start;margin:2px 12px 10px 16px;padding:0;border:0;background:transparent;color:var(--dsh-qa-accent);font:inherit;font-size:12px;cursor:pointer}
|
|
279
|
+
.dsh-qa-sourcespanel__all:hover{text-decoration:underline}
|
|
280
|
+
.dsh-qa-sourcespanel__all:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
|
|
281
|
+
.dsh-qa-files{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 10px 12px}
|
|
282
|
+
.dsh-qa-files__empty{margin:12px 6px;color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px}
|
|
283
|
+
.dsh-qa-files__group{margin:0 0 14px}
|
|
284
|
+
.dsh-qa-files__group 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}
|
|
285
|
+
.dsh-qa-files__jump{appearance:none;display:grid;place-items:center;width:22px;height:22px;flex:none;padding:0;border:0;border-radius:6px;background:0 0;color:var(--dsw-alias-label-tertiary);cursor:pointer}
|
|
286
|
+
.dsh-qa-files__jump:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
287
|
+
.dsh-qa-files__jump:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:-2px}
|
|
288
|
+
.dsh-qa-files__jump svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
|
|
289
|
+
.dsh-qa-files__items{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
|
|
290
|
+
.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)}
|
|
291
|
+
span.dsh-qa-files__thumb{display:inline-block}
|
|
292
|
+
img.dsh-qa-files__thumb{object-fit:cover;background:var(--dsw-alias-bg-layer-3)}
|
|
242
293
|
.dsh-qa-sources__list{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 10px 12px}
|
|
243
294
|
.dsh-qa-sources__group{margin:0 0 14px}
|
|
244
295
|
.dsh-qa-sources__group h3{display:flex;align-items:center;gap:7px;margin:4px 4px 8px;color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600;line-height:18px}
|
|
@@ -298,6 +349,9 @@ a.dsh-qa-sources__title:hover{text-decoration:underline}
|
|
|
298
349
|
.dsh-qa-message--user .dsh-qa-message__content{max-width:min(525px,82%);padding:10px 16px;border-radius:22px;background:var(--dsw-specific-bubble);font-size:16px;line-height:24px}
|
|
299
350
|
.dsh-qa-message__byline{display:block;margin-bottom:2px;color:var(--dsw-alias-label-secondary);font-size:12px;line-height:16px;font-weight:500}
|
|
300
351
|
.dsh-qa-message__images{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
|
|
352
|
+
.dsh-qa-message__files{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 8px}
|
|
353
|
+
.dsh-qa-message--user .dsh-qa-message__files{justify-content:flex-end}
|
|
354
|
+
.dsh-qa-message__files .dsh-qa-file{background:var(--dsw-alias-bg-layer-3)}
|
|
301
355
|
.dsh-qa-message--user .dsh-qa-message__images{justify-content:flex-end}
|
|
302
356
|
.dsh-qa-message__image{display:block;width:132px;height:96px;border-radius:12px;border:1px solid var(--dsw-alias-border-l2);object-fit:cover;background:var(--dsw-alias-bg-layer-2)}
|
|
303
357
|
a.dsh-qa-message__image{padding:0}
|
|
@@ -389,6 +443,8 @@ a.dsh-qa-srcref:hover,button.dsh-qa-srcref:hover{border-color:var(--dsw-alias-la
|
|
|
389
443
|
.dsh-qa-work{width:100%;color:var(--dsw-alias-label-secondary);font-size:14px;line-height:22px}
|
|
390
444
|
.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}
|
|
391
445
|
.dsh-qa-work__toggle:hover{color:var(--dsw-alias-label-primary)}
|
|
446
|
+
.dsh-qa-work[data-state="error"] .dsh-qa-work__toggle{color:var(--dsh-qa-error)}
|
|
447
|
+
.dsh-qa-work[data-state="error"] .dsh-qa-work__toggle:hover{color:var(--dsh-qa-error)}
|
|
392
448
|
.dsh-qa-work__toggle:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:2px}
|
|
393
449
|
.dsh-qa-work__chevron{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round;stroke-linejoin:round;transition:transform .16s ease}
|
|
394
450
|
.dsh-qa-work__chevron[data-open],.dsh-qa-work-tool[open]>.dsh-qa-work-item .dsh-qa-work__chevron{transform:rotate(90deg)}
|
|
@@ -418,6 +474,48 @@ a.dsh-qa-srcref:hover,button.dsh-qa-srcref:hover{border-color:var(--dsw-alias-la
|
|
|
418
474
|
.dsh-qa-work-tool__body pre{max-height:260px;overflow:auto;margin:0;padding:7px 10px 10px;color:var(--dsw-alias-label-secondary);background:transparent;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;line-height:19px;white-space:pre-wrap;overflow-wrap:anywhere}
|
|
419
475
|
.dsh-qa-error{display:flex;align-items:center;justify-content:center;gap:10px;margin:16px auto;padding:10px 12px;border:1px solid var(--dsh-qa-error);border-radius:10px;color:var(--dsw-alias-label-primary);font-size:13px}
|
|
420
476
|
.dsh-qa-error button{border:0;background:transparent;color:var(--dsh-qa-accent);font:inherit;font-weight:600;cursor:pointer}
|
|
477
|
+
.dsh-qa-approvals{display:flex;flex-direction:column;gap:8px;width:100%;margin-bottom:10px}
|
|
478
|
+
.dsh-qa-approval{padding:12px 14px;border:1px solid var(--dsh-qa-warning30);border-radius:12px;background:var(--dsh-qa-warning10)}
|
|
479
|
+
.dsh-qa-approval__strip{display:flex;align-items:center;gap:7px;margin:0 0 8px;color:var(--dsh-qa-warning-hover);font-size:12px;font-weight:600;line-height:16px}
|
|
480
|
+
.dsh-qa-approval__dot{width:7px;height:7px;flex:none;border-radius:999px;background:var(--dsh-qa-warning)}
|
|
481
|
+
.dsh-qa-approval__reason{margin:0;color:var(--dsw-alias-label-primary);font-size:13px;line-height:19px;overflow-wrap:anywhere}
|
|
482
|
+
.dsh-qa-approval__tool{margin:6px 0 0;color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}
|
|
483
|
+
.dsh-qa-approval__tool code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px}
|
|
484
|
+
.dsh-qa-approval__actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
|
|
485
|
+
.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}
|
|
486
|
+
.dsh-qa-approval__button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
|
|
487
|
+
.dsh-qa-approval__button:disabled{opacity:.5;cursor:default}
|
|
488
|
+
.dsh-qa-approval__button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:1px}
|
|
489
|
+
.dsh-qa-approval__button--primary{border-color:transparent;background:var(--dsh-qa-accent);color:var(--dsh-qa-accent-contrast)}
|
|
490
|
+
.dsh-qa-approval__button--primary:hover:not(:disabled){background:var(--dsh-qa-accent-hover)}
|
|
491
|
+
.dsh-qa-questions{display:flex;flex-direction:column;gap:8px;width:100%;margin-bottom:10px}
|
|
492
|
+
.dsh-qa-question{padding:12px 14px;border:1px solid var(--dsh-qa-info30);border-radius:12px;background:var(--dsh-qa-info10)}
|
|
493
|
+
.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}
|
|
494
|
+
.dsh-qa-question__dot{width:7px;height:7px;flex:none;border-radius:999px;background:var(--dsh-qa-info)}
|
|
495
|
+
.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}
|
|
496
|
+
.dsh-qa-question__fieldset{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0;padding:0;border:0}
|
|
497
|
+
.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}
|
|
498
|
+
.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}
|
|
499
|
+
.dsh-qa-question__options{display:flex;flex-direction:column;gap:6px}
|
|
500
|
+
.dsh-qa-question__option{display:flex;align-items:flex-start;gap:8px;padding:7px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-2);cursor:pointer}
|
|
501
|
+
.dsh-qa-question__option[data-checked="true"]{border-color:var(--dsh-qa-info);background:color-mix(in srgb,var(--dsh-qa-info) 8%,var(--dsw-alias-bg-layer-2))}
|
|
502
|
+
.dsh-qa-question__option input{margin:2px 0 0;accent-color:var(--dsh-qa-info)}
|
|
503
|
+
.dsh-qa-question__option-text{display:flex;flex-direction:column;gap:2px;min-width:0}
|
|
504
|
+
.dsh-qa-question__option-label{color:var(--dsw-alias-label-primary);font-size:13px;line-height:18px;overflow-wrap:anywhere}
|
|
505
|
+
.dsh-qa-question__option-description{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:17px;overflow-wrap:anywhere}
|
|
506
|
+
.dsh-qa-question__custom{display:flex;flex-direction:column;gap:4px}
|
|
507
|
+
.dsh-qa-question__custom span{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}
|
|
508
|
+
.dsh-qa-question__custom textarea{width:100%;resize:vertical;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;line-height:19px}
|
|
509
|
+
.dsh-qa-question__custom textarea:focus-visible{outline:2px solid var(--dsh-qa-info);outline-offset:1px}
|
|
510
|
+
.dsh-qa-question__fieldset:disabled{opacity:.6}
|
|
511
|
+
.dsh-qa-question__error{margin:0;color:var(--dsh-qa-error);font-size:12px;line-height:17px}
|
|
512
|
+
.dsh-qa-question__actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}
|
|
513
|
+
.dsh-qa-question__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}
|
|
514
|
+
.dsh-qa-question__button:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}
|
|
515
|
+
.dsh-qa-question__button:disabled{opacity:.5;cursor:default}
|
|
516
|
+
.dsh-qa-question__button:focus-visible{outline:2px solid var(--dsh-qa-info);outline-offset:1px}
|
|
517
|
+
.dsh-qa-question__button--primary{border-color:transparent;background:var(--dsh-qa-accent);color:var(--dsh-qa-accent-contrast)}
|
|
518
|
+
.dsh-qa-question__button--primary:hover:not(:disabled){background:var(--dsh-qa-accent-hover)}
|
|
421
519
|
.dsh-qa-footer{position:relative;flex:none;padding:28px 16px max(12px,env(safe-area-inset-bottom));background:linear-gradient(180deg,color-mix(in srgb,var(--dsw-alias-bg-base) 0%,transparent) 0,var(--dsw-alias-bg-base) 28px)}
|
|
422
520
|
.dsh-qa-footer__inner{width:100%;max-width:var(--dsh-qa-content-width);margin:0 auto}
|
|
423
521
|
.dsh-qa-composer-wrap{display:flex;flex-direction:column;gap:10px;width:100%}
|
|
@@ -430,6 +528,16 @@ a.dsh-qa-srcref:hover,button.dsh-qa-srcref:hover{border-color:var(--dsw-alias-la
|
|
|
430
528
|
.dsh-qa-quick-questions button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:1px}
|
|
431
529
|
.dsh-qa-composer-wrap--drag .dsh-qa-composer{border-color:var(--dsh-qa-accent);border-style:dashed;background:color-mix(in srgb,var(--dsh-qa-accent) 6%,var(--dsw-specific-input-major))}
|
|
432
530
|
.dsh-qa-composer__images{display:flex;flex-wrap:wrap;gap:8px}
|
|
531
|
+
.dsh-qa-composer__files{display:flex;flex-wrap:wrap;gap:8px}
|
|
532
|
+
.dsh-qa-file{display:flex;align-items:center;gap:10px;max-width:280px;min-width:0;padding:8px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2)}
|
|
533
|
+
.dsh-qa-file__badge{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:9px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);font-size:10px;font-weight:700;letter-spacing:.02em}
|
|
534
|
+
.dsh-qa-file__text{display:flex;flex-direction:column;gap:1px;min-width:0}
|
|
535
|
+
.dsh-qa-file__name{color:var(--dsw-alias-label-primary);font-size:13px;line-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
536
|
+
.dsh-qa-file__meta{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}
|
|
537
|
+
.dsh-qa-file button{display:grid;place-items:center;flex:none;width:18px;height:18px;padding:0;border:0;border-radius:999px;background:transparent;color:var(--dsw-alias-label-tertiary);cursor:pointer}
|
|
538
|
+
.dsh-qa-file button:hover{color:var(--dsh-qa-error)}
|
|
539
|
+
.dsh-qa-file button:focus-visible{outline:2px solid var(--dsh-qa-accent);outline-offset:1px}
|
|
540
|
+
.dsh-qa-file button svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
|
|
433
541
|
.dsh-qa-composer__image{position:relative;display:block;width:64px;height:64px;flex:none}
|
|
434
542
|
.dsh-qa-composer__image img{display:block;width:100%;height:100%;object-fit:cover;border-radius:10px;border:1px solid var(--dsw-alias-border-l2)}
|
|
435
543
|
.dsh-qa-composer__image button{position:absolute;top:-6px;right:-6px;display:grid;place-items:center;width:18px;height:18px;padding:0;border:0;border-radius:999px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);cursor:pointer;box-shadow:var(--dsw-shadow-lv2)}
|
|
@@ -458,7 +566,7 @@ a.dsh-qa-srcref:hover,button.dsh-qa-srcref:hover{border-color:var(--dsw-alias-la
|
|
|
458
566
|
.dsh-qa-composer__action:disabled{opacity:.4;cursor:default}
|
|
459
567
|
.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}
|
|
460
568
|
@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}
|
|
461
|
-
@media (max-width:600px){.dsh-qa-sidebar{display:none}.dsh-qa-
|
|
569
|
+
@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{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}}
|
|
462
570
|
@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}}
|
|
463
571
|
@media (prefers-reduced-motion:reduce){.dsh-qa-message__cursor,.dsh-qa-work__spinner,.dsh-qa-work-item__spinner{animation:none}.dsh-qa-work__chevron{transition:none}.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}}
|
|
464
572
|
`;
|
package/lib/client/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,gBAAgB,GAAG;IACvB,KAAK,EAAE,SAAS;IAChB,yDAAyD;IACzD,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;IACtB,uBAAuB;IACvB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,kBAAkB;IAClB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,gBAAgB;IAChB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,SAAS;IACrB,yBAAyB;IACzB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,SAAS;IACpB,YAAY,EAAE,SAAS;IACvB,mDAAmD;IACnD,cAAc,EAAE,SAAS;IACzB,qDAAqD;IACrD,OAAO,EAAE,wBAAwB;CACzB,CAAC;AAEX,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;KACrD,GAAG,CACF,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CACjB,YAAY,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAC1F;KACA,IAAI,CAAC,GAAG,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;kBACzB,eAAe;qBACZ,eAAe
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRo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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAghBnC,CAAC"}
|
package/lib/client/types.js
CHANGED
package/lib/client/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/client/types.ts"],"names":[],"mappings":"AAyNA,iFAAiF;AACjF,MAAM,CAAC,MAAM,qBAAqB,GAAmB,MAAM,CAAC,MAAM,CAAC;IACjE,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC3B,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,KAAK;IACd,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC1B,eAAe,EAAE,IAAI;IACrB,uBAAuB,EAAE,SAAS;IAClC,eAAe,EAAE,IAAI;IACrB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;CAC7B,CAAC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Right-rail controller over the chat-local drawer state: every transition
|
|
4
|
+
* between the whole-chat list, a pinned message subset and a single source's
|
|
5
|
+
* detail lives here, so the surface only wires controls to intents. The
|
|
6
|
+
* callbacks stay referentially stable — they close over `useState` setters,
|
|
7
|
+
* whose identities never change.
|
|
8
|
+
*/
|
|
9
|
+
export function useRightRail(ui) {
|
|
10
|
+
const { railOpen, railTab, setRailOpen, setRailTab, setDrawerSources, setDrawerCompleteness, setDrawerDetail, setAgentsOpen, } = ui;
|
|
11
|
+
const openSources = useCallback((sources, complete, incompleteOrigins) => {
|
|
12
|
+
setDrawerSources(sources);
|
|
13
|
+
setDrawerCompleteness({
|
|
14
|
+
complete,
|
|
15
|
+
...(incompleteOrigins === undefined ? {} : { incompleteOrigins }),
|
|
16
|
+
});
|
|
17
|
+
setDrawerDetail(null);
|
|
18
|
+
setRailOpen(true);
|
|
19
|
+
setRailTab("sources");
|
|
20
|
+
setAgentsOpen(false);
|
|
21
|
+
}, [
|
|
22
|
+
setAgentsOpen,
|
|
23
|
+
setDrawerCompleteness,
|
|
24
|
+
setDrawerDetail,
|
|
25
|
+
setDrawerSources,
|
|
26
|
+
setRailOpen,
|
|
27
|
+
setRailTab,
|
|
28
|
+
]);
|
|
29
|
+
const openSourceDetail = useCallback((source) => {
|
|
30
|
+
setDrawerSources(null);
|
|
31
|
+
setDrawerCompleteness(null);
|
|
32
|
+
setDrawerDetail(source);
|
|
33
|
+
setRailOpen(true);
|
|
34
|
+
setRailTab("sources");
|
|
35
|
+
setAgentsOpen(false);
|
|
36
|
+
}, [
|
|
37
|
+
setAgentsOpen,
|
|
38
|
+
setDrawerCompleteness,
|
|
39
|
+
setDrawerDetail,
|
|
40
|
+
setDrawerSources,
|
|
41
|
+
setRailOpen,
|
|
42
|
+
setRailTab,
|
|
43
|
+
]);
|
|
44
|
+
const showAllSources = useCallback(() => {
|
|
45
|
+
setDrawerSources(null);
|
|
46
|
+
setDrawerCompleteness(null);
|
|
47
|
+
setDrawerDetail(null);
|
|
48
|
+
}, [setDrawerCompleteness, setDrawerDetail, setDrawerSources]);
|
|
49
|
+
const close = useCallback(() => {
|
|
50
|
+
setRailOpen(false);
|
|
51
|
+
setDrawerSources(null);
|
|
52
|
+
setDrawerCompleteness(null);
|
|
53
|
+
setDrawerDetail(null);
|
|
54
|
+
}, [setDrawerCompleteness, setDrawerDetail, setDrawerSources, setRailOpen]);
|
|
55
|
+
const openTab = useCallback((tab) => {
|
|
56
|
+
if (railOpen && railTab === tab) {
|
|
57
|
+
close();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
setAgentsOpen(false);
|
|
61
|
+
setRailOpen(true);
|
|
62
|
+
setRailTab(tab);
|
|
63
|
+
if (tab === "sources")
|
|
64
|
+
showAllSources();
|
|
65
|
+
}, [
|
|
66
|
+
close,
|
|
67
|
+
railOpen,
|
|
68
|
+
railTab,
|
|
69
|
+
setAgentsOpen,
|
|
70
|
+
setRailOpen,
|
|
71
|
+
setRailTab,
|
|
72
|
+
showAllSources,
|
|
73
|
+
]);
|
|
74
|
+
const selectTab = useCallback((tab) => {
|
|
75
|
+
setRailTab(tab);
|
|
76
|
+
}, [setRailTab]);
|
|
77
|
+
const toggleAgents = useCallback(() => {
|
|
78
|
+
setAgentsOpen((open) => !open);
|
|
79
|
+
setRailOpen(false);
|
|
80
|
+
}, [setAgentsOpen, setRailOpen]);
|
|
81
|
+
return {
|
|
82
|
+
railOpen,
|
|
83
|
+
railTab,
|
|
84
|
+
drawerSources: ui.drawerSources,
|
|
85
|
+
drawerCompleteness: ui.drawerCompleteness,
|
|
86
|
+
drawerDetail: ui.drawerDetail,
|
|
87
|
+
openSources,
|
|
88
|
+
openSourceDetail,
|
|
89
|
+
showAllSources,
|
|
90
|
+
close,
|
|
91
|
+
openTab,
|
|
92
|
+
selectTab,
|
|
93
|
+
toggleAgents,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=use-right-rail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-right-rail.js","sourceRoot":"","sources":["../../src/client/use-right-rail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAsC,MAAM,OAAO,CAAC;AA6DxE;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,EAAoB;IAC/C,MAAM,EACJ,QAAQ,EACR,OAAO,EACP,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,aAAa,GACd,GAAG,EAAE,CAAC;IAEP,MAAM,WAAW,GAAG,WAAW,CAC7B,CACE,OAA4B,EAC5B,QAAiB,EACjB,iBAAqD,EACrD,EAAE;QACF,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC1B,qBAAqB,CAAC;YACpB,QAAQ;YACR,GAAG,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC;SAClE,CAAC,CAAC;QACH,eAAe,CAAC,IAAI,CAAC,CAAC;QACtB,WAAW,CAAC,IAAI,CAAC,CAAC;QAClB,UAAU,CAAC,SAAS,CAAC,CAAC;QACtB,aAAa,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC,EACD;QACE,aAAa;QACb,qBAAqB;QACrB,eAAe;QACf,gBAAgB;QAChB,WAAW;QACX,UAAU;KACX,CACF,CAAC;IAEF,MAAM,gBAAgB,GAAG,WAAW,CAClC,CAAC,MAAgB,EAAE,EAAE;QACnB,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACvB,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC5B,eAAe,CAAC,MAAM,CAAC,CAAC;QACxB,WAAW,CAAC,IAAI,CAAC,CAAC;QAClB,UAAU,CAAC,SAAS,CAAC,CAAC;QACtB,aAAa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AAC;IAEF,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QAC/B,WAAW,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;IAEjC,OAAO;QACL,QAAQ;QACR,OAAO;QACP,aAAa,EAAE,EAAE,CAAC,aAAa;QAC/B,kBAAkB,EAAE,EAAE,CAAC,kBAAkB;QACzC,YAAY,EAAE,EAAE,CAAC,YAAY;QAC7B,WAAW;QACX,gBAAgB;QAChB,cAAc;QACd,KAAK;QACL,OAAO;QACP,SAAS;QACT,YAAY;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -3,48 +3,53 @@ import { revokeObjectUrlIfBlob } from "./session-assets.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Per-chat UI state: composer attachments, variant offsets, the rail mark and
|
|
5
5
|
* the drawers. Everything here describes the chat it was made in, so a
|
|
6
|
-
* session change clears it instead of leaking a draft, an
|
|
7
|
-
* from one conversation into the next.
|
|
6
|
+
* session change clears it instead of leaking a draft, an attachment or a
|
|
7
|
+
* drawer from one conversation into the next.
|
|
8
8
|
*/
|
|
9
9
|
export function useSessionUiState(sessionId) {
|
|
10
10
|
/** Per group: how many answers back from the newest is shown (0 = newest). */
|
|
11
11
|
const [variantOffsets, setVariantOffsets] = useState({});
|
|
12
12
|
const [activeTurn, setActiveTurn] = useState(null);
|
|
13
13
|
const [agentsOpen, setAgentsOpen] = useState(false);
|
|
14
|
-
const [
|
|
14
|
+
const [railOpen, setRailOpen] = useState(false);
|
|
15
|
+
const [railTab, setRailTab] = useState("sources");
|
|
15
16
|
const [drawerSources, setDrawerSources] = useState(null);
|
|
16
17
|
const [drawerCompleteness, setDrawerCompleteness] = useState(null);
|
|
17
18
|
const [drawerDetail, setDrawerDetail] = useState(null);
|
|
18
|
-
const [
|
|
19
|
+
const [pendingAttachments, setPendingAttachmentsState] = useState([]);
|
|
19
20
|
/** Mirror of the live drafts: blob URLs to revoke when they leave state. */
|
|
20
|
-
const
|
|
21
|
+
const pendingAttachmentsRef = useRef([]);
|
|
21
22
|
/**
|
|
22
23
|
* The single entry point that changes the draft set: every image that
|
|
23
24
|
* leaves state has its preview blob URL revoked here, whether it was
|
|
24
25
|
* removed by the composer, cleared by a send or dropped on a chat switch.
|
|
25
26
|
*/
|
|
26
|
-
const
|
|
27
|
-
for (const draft of
|
|
28
|
-
if (!next.includes(draft))
|
|
27
|
+
const setPendingAttachments = useCallback((next) => {
|
|
28
|
+
for (const draft of pendingAttachmentsRef.current) {
|
|
29
|
+
if (draft.kind === "image" && !next.includes(draft)) {
|
|
29
30
|
revokeObjectUrlIfBlob(draft.previewUrl);
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
pendingAttachmentsRef.current = next;
|
|
34
|
+
setPendingAttachmentsState(next);
|
|
33
35
|
}, []);
|
|
34
36
|
useEffect(() => {
|
|
35
37
|
setVariantOffsets({});
|
|
36
38
|
setActiveTurn(null);
|
|
37
39
|
setAgentsOpen(false);
|
|
38
|
-
|
|
40
|
+
setRailOpen(false);
|
|
41
|
+
setRailTab("sources");
|
|
39
42
|
setDrawerSources(null);
|
|
40
43
|
setDrawerCompleteness(null);
|
|
41
44
|
setDrawerDetail(null);
|
|
42
|
-
|
|
43
|
-
}, [sessionId,
|
|
45
|
+
setPendingAttachments([]);
|
|
46
|
+
}, [sessionId, setPendingAttachments]);
|
|
44
47
|
// Whatever is still attached dies with the surface, and its URLs with it.
|
|
45
48
|
useEffect(() => () => {
|
|
46
|
-
for (const draft of
|
|
47
|
-
|
|
49
|
+
for (const draft of pendingAttachmentsRef.current) {
|
|
50
|
+
if (draft.kind === "image")
|
|
51
|
+
revokeObjectUrlIfBlob(draft.previewUrl);
|
|
52
|
+
}
|
|
48
53
|
}, []);
|
|
49
54
|
return {
|
|
50
55
|
variantOffsets,
|
|
@@ -53,16 +58,18 @@ export function useSessionUiState(sessionId) {
|
|
|
53
58
|
setActiveTurn,
|
|
54
59
|
agentsOpen,
|
|
55
60
|
setAgentsOpen,
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
railOpen,
|
|
62
|
+
setRailOpen,
|
|
63
|
+
railTab,
|
|
64
|
+
setRailTab,
|
|
58
65
|
drawerSources,
|
|
59
66
|
setDrawerSources,
|
|
60
67
|
drawerCompleteness,
|
|
61
68
|
setDrawerCompleteness,
|
|
62
69
|
drawerDetail,
|
|
63
70
|
setDrawerDetail,
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
pendingAttachments,
|
|
72
|
+
setPendingAttachments,
|
|
66
73
|
};
|
|
67
74
|
}
|
|
68
75
|
//# sourceMappingURL=use-session-ui-state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-session-ui-state.js","sourceRoot":"","sources":["../../src/client/use-session-ui-state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GAGT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-session-ui-state.js","sourceRoot":"","sources":["../../src/client/use-session-ui-state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GAGT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAwC5D;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,SAAwB;IACxD,8EAA8E;IAC9E,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAClD,EAAE,CACH,CAAC;IACF,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAClE,MAAM,CAAC,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