dsh-total-quality 2.0.55 → 2.0.57

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 (197) hide show
  1. package/CONTRIBUTING.md +51 -47
  2. package/LICENSE.md +37 -37
  3. package/README.en.md +32 -30
  4. package/README.md +90 -88
  5. package/agent-host.cjs +277 -277
  6. package/client.js +199 -92
  7. package/cordis.patch.yml +5 -5
  8. package/docs/enterprise-onboarding.md +10 -10
  9. package/docs/technical-reference.md +223 -223
  10. package/host.cjs +91 -124
  11. package/llm-bridge.cjs +234 -234
  12. package/locale/en.json +5 -5
  13. package/locale/zh.json +5 -5
  14. package/package.json +3 -2
  15. package/public/app.css +3 -0
  16. package/public/app.js +6 -2
  17. package/public/index.html +8 -9
  18. package/public/js/api.js +152 -152
  19. package/public/js/assistant-history.js +62 -62
  20. package/public/js/material-library.js +100 -100
  21. package/public/js/mobile-preview.js +119 -0
  22. package/public/js/pages-company-knowledge.js +9 -32
  23. package/public/js/pages-core.js +232 -232
  24. package/public/js/pages-growth.js +148 -148
  25. package/public/js/pages-qms.js +1 -1
  26. package/public/js/pages-qtools.js +410 -410
  27. package/public/js/pages-thanks.js +71 -71
  28. package/public/js/plugin-updates.js +53 -0
  29. package/public/js/quality-workflow.js +205 -205
  30. package/public/js/survey-dates.js +41 -41
  31. package/public/js/survey-knowledge.js +301 -301
  32. package/public/js/tool-wizards.js +621 -621
  33. package/public/js/ui.js +467 -467
  34. package/public/js/voice-capture-worklet.js +30 -30
  35. package/public/js/xiaozhi-voice.js +264 -264
  36. package/public/js/xiaozhi.js +468 -468
  37. package/public/platform-help.html +426 -426
  38. package/public/platform-site/assets/0468a68574112812.css +10703 -10703
  39. package/public/platform-site/assets/159e086d35adfa1c.css +2094 -2094
  40. package/public/platform-site/assets/169e3159cade0d9f.css +98 -98
  41. package/public/platform-site/assets/22b917c4a3d4ae3d.svg +14 -14
  42. package/public/platform-site/assets/476f9254ccf723e7.css +8265 -8265
  43. package/public/platform-site/assets/85a0a4fb4416ded9.css +120 -120
  44. package/public/platform-site/assets/a3b272383226f6d9.svg +135 -135
  45. package/public/platform-site/assets/fd16dc5f3cc9d97e.svg +104 -104
  46. package/public/platform-site/assets/qip-favicon.svg +5 -5
  47. package/public/platform-site/index.html +279 -279
  48. package/public/platform-site/offline.js +261 -261
  49. package/public/platform-site/qip-brand.css +566 -566
  50. package/public/platform-site/qip-module-guides.js +237 -237
  51. package/public/responsive.css +103 -101
  52. package/public/vendor/markdown-it-15.0.3.LICENSE +22 -22
  53. package/public/vendor/markdown-it-15.0.3.umd.min.js +13 -13
  54. package/public/workbench.css +7 -7
  55. package/public/xiaozhi.css +292 -292
  56. package/resources/qms-templates/019ffb58f24ed48d.docx +0 -0
  57. package/resources/qms-templates/04a69165fc15143a.docx +0 -0
  58. package/resources/qms-templates/09af69358c989a63.docx +0 -0
  59. package/resources/qms-templates/0e7ac77844e45311.docx +0 -0
  60. package/resources/qms-templates/12446a1b5e173c71.docx +0 -0
  61. package/resources/qms-templates/15ae40f67f9a3efc.docx +0 -0
  62. package/resources/qms-templates/18a69bbebf2ece7f.docx +0 -0
  63. package/resources/qms-templates/1978faa989134f02.docx +0 -0
  64. package/resources/qms-templates/1a30e121de752f7b.docx +0 -0
  65. package/resources/qms-templates/1b88907969ea7d4c.docx +0 -0
  66. package/resources/qms-templates/1e92b808722bf90a.docx +0 -0
  67. package/resources/qms-templates/2091cad340dc0e7f.docx +0 -0
  68. package/resources/qms-templates/271ae1002c896ed7.docx +0 -0
  69. package/resources/qms-templates/280ce53e5d3b5fcf.docx +0 -0
  70. package/resources/qms-templates/28ca8e4ede0adf6d.docx +0 -0
  71. package/resources/qms-templates/2ac6675f3cb1f993.docx +0 -0
  72. package/resources/qms-templates/2c3b799389909d8b.docx +0 -0
  73. package/resources/qms-templates/2c51038ba2cc3264.docx +0 -0
  74. package/resources/qms-templates/30c888851d16d764.docx +0 -0
  75. package/resources/qms-templates/3459fc4daaa2743d.docx +0 -0
  76. package/resources/qms-templates/3751dafc335e0e80.docx +0 -0
  77. package/resources/qms-templates/38798cd4298cd2db.docx +0 -0
  78. package/resources/qms-templates/38f551f9d738ab0a.docx +0 -0
  79. package/resources/qms-templates/3c85a23ea17018b4.docx +0 -0
  80. package/resources/qms-templates/3cdb7d14caf1b852.docx +0 -0
  81. package/resources/qms-templates/3f23239bb6b3e1db.docx +0 -0
  82. package/resources/qms-templates/42a5b9efeeaa8007.docx +0 -0
  83. package/resources/qms-templates/47352aafe9b8dac1.docx +0 -0
  84. package/resources/qms-templates/495359b1e3cbb8fe.docx +0 -0
  85. package/resources/qms-templates/4ca6920464785166.docx +0 -0
  86. package/resources/qms-templates/4ce862582a7791be.docx +0 -0
  87. package/resources/qms-templates/54c9a02a10991b9e.docx +0 -0
  88. package/resources/qms-templates/5aeb8fddf5f3693f.docx +0 -0
  89. package/resources/qms-templates/5d7e5576b0e73be7.docx +0 -0
  90. package/resources/qms-templates/5db3a40edac37791.docx +0 -0
  91. package/resources/qms-templates/5ffa21eb78eb6f77.docx +0 -0
  92. package/resources/qms-templates/60d0fbcb709b7161.docx +0 -0
  93. package/resources/qms-templates/63e1d3a166756095.docx +0 -0
  94. package/resources/qms-templates/65c724c080d32f10.docx +0 -0
  95. package/resources/qms-templates/674bd7826c6cbac2.docx +0 -0
  96. package/resources/qms-templates/677e851acca1b879.docx +0 -0
  97. package/resources/qms-templates/6bf15feb1a0d2a8d.docx +0 -0
  98. package/resources/qms-templates/6c3889c7d0918db9.docx +0 -0
  99. package/resources/qms-templates/6c4c349eeb0a96a8.docx +0 -0
  100. package/resources/qms-templates/6c5befbd33f759c1.docx +0 -0
  101. package/resources/qms-templates/6df8367901347508.docx +0 -0
  102. package/resources/qms-templates/71db51997037692b.docx +0 -0
  103. package/resources/qms-templates/78a8ef8c76510c99.docx +0 -0
  104. package/resources/qms-templates/8397bfd1c0a1b013.docx +0 -0
  105. package/resources/qms-templates/84d750cf858b60a1.docx +0 -0
  106. package/resources/qms-templates/880de58a4b334533.docx +0 -0
  107. package/resources/qms-templates/88c37d1b87d9b78c.docx +0 -0
  108. package/resources/qms-templates/88e9cd42f1849462.docx +0 -0
  109. package/resources/qms-templates/8956597403be35b6.docx +0 -0
  110. package/resources/qms-templates/94675c810a233e1f.docx +0 -0
  111. package/resources/qms-templates/94dff59dd7ebec6e.docx +0 -0
  112. package/resources/qms-templates/9670b9cd02141594.docx +0 -0
  113. package/resources/qms-templates/98c373ebd7b5163d.docx +0 -0
  114. package/resources/qms-templates/a4078cf2378a9388.docx +0 -0
  115. package/resources/qms-templates/a5b110c7ef917139.docx +0 -0
  116. package/resources/qms-templates/aec75820e45774be.docx +0 -0
  117. package/resources/qms-templates/b31c085e281d230c.docx +0 -0
  118. package/resources/qms-templates/b7c1c3c72f8ffeef.docx +0 -0
  119. package/resources/qms-templates/b81b82eaa5c8f422.docx +0 -0
  120. package/resources/qms-templates/b92a2fa31f75f137.docx +0 -0
  121. package/resources/qms-templates/b96c54ae9cfffc54.docx +0 -0
  122. package/resources/qms-templates/bc47cfd626c010e7.docx +0 -0
  123. package/resources/qms-templates/be60792734afca69.docx +0 -0
  124. package/resources/qms-templates/c0018d8ae9ad19e1.docx +0 -0
  125. package/resources/qms-templates/c171027c964c8be3.docx +0 -0
  126. package/resources/qms-templates/c4b93d71f5d98b4b.docx +0 -0
  127. package/resources/qms-templates/c531da29fcb3090f.docx +0 -0
  128. package/resources/qms-templates/c88eddd43358d015.docx +0 -0
  129. package/resources/qms-templates/cb978da542f0d892.docx +0 -0
  130. package/resources/qms-templates/ccde4a94532a8d36.docx +0 -0
  131. package/resources/qms-templates/cf3fb1e20ae6f24d.docx +0 -0
  132. package/resources/qms-templates/d231b4982fc8113e.docx +0 -0
  133. package/resources/qms-templates/d3c55aa5ed14055c.docx +0 -0
  134. package/resources/qms-templates/db45c44a00a13349.docx +0 -0
  135. package/resources/qms-templates/db849a41210f54e0.docx +0 -0
  136. package/resources/qms-templates/dba9ce363d83ddc8.docx +0 -0
  137. package/resources/qms-templates/dca3ea4c95eb2225.docx +0 -0
  138. package/resources/qms-templates/dfa4220d2b6b8131.docx +0 -0
  139. package/resources/qms-templates/dfa51222c777734f.docx +0 -0
  140. package/resources/qms-templates/e07ea511507e14f5.docx +0 -0
  141. package/resources/qms-templates/e0a2e00c03458dfa.docx +0 -0
  142. package/resources/qms-templates/e0e802f46b6764d1.docx +0 -0
  143. package/resources/qms-templates/e53fc85717f2852b.docx +0 -0
  144. package/resources/qms-templates/e9dd82d5e54520e5.docx +0 -0
  145. package/resources/qms-templates/ea7bfc22c06d82a9.docx +0 -0
  146. package/resources/qms-templates/ecf0db9f37294536.docx +0 -0
  147. package/resources/qms-templates/f05fcfc87e82ff39.docx +0 -0
  148. package/resources/qms-templates/fb9e56a17c4a4f97.docx +0 -0
  149. package/resources/qms-templates/manifest.json +932 -0
  150. package/src/data/seed-sme.js +317 -317
  151. package/src/data/seed.js +879 -879
  152. package/src/lib/backup-identity.js +57 -57
  153. package/src/lib/chat-answer.js +225 -225
  154. package/src/lib/chat-context.js +99 -99
  155. package/src/lib/company-library.js +28 -19
  156. package/src/lib/data-import.js +217 -217
  157. package/src/lib/data-sources.js +118 -118
  158. package/src/lib/demo-data.js +27 -1
  159. package/src/lib/employee-intake.js +84 -84
  160. package/src/lib/growth.js +53 -53
  161. package/src/lib/intake-packets.js +119 -119
  162. package/src/lib/issue-intake.js +88 -88
  163. package/src/lib/kb-revision.js +214 -214
  164. package/src/lib/llm.js +279 -279
  165. package/src/lib/model-error.js +14 -14
  166. package/src/lib/privacy.js +26 -26
  167. package/src/lib/qms-drafting.js +194 -194
  168. package/src/lib/qms-jobs.js +11 -7
  169. package/src/lib/qms-manual-review.js +185 -185
  170. package/src/lib/qms-procedure-review.js +109 -109
  171. package/src/lib/qms-templates.js +358 -326
  172. package/src/lib/qms.js +369 -369
  173. package/src/lib/quality-priority.js +100 -100
  174. package/src/lib/quality-state.js +92 -92
  175. package/src/lib/quality-workflow.js +65 -65
  176. package/src/lib/retrieval.js +159 -159
  177. package/src/lib/spc.js +127 -127
  178. package/src/lib/voice-hotwords.txt +22 -22
  179. package/src/lib/voice-text.js +13 -13
  180. package/src/lib/voice-worker.js +72 -72
  181. package/src/lib/voice.js +330 -330
  182. package/src/lib/workbench-notices.js +49 -49
  183. package/src/lib/workbench.js +103 -106
  184. package/src/package.json +3 -3
  185. package/src/tools/analysis.js +306 -306
  186. package/src/tools/data.js +596 -596
  187. package/src/tools/docs.js +430 -430
  188. package/src/tools/registry.js +57 -57
  189. package/tools-dsh.cjs +153 -153
  190. package//345/256/211/350/243/205/350/257/264/346/230/216.md +33 -25
  191. package//346/234/254/346/234/272/347/213/254/347/253/213/345/256/211/350/243/205/350/257/264/346/230/216.md +17 -17
  192. package//350/207/252/346/243/200.cjs +88 -88
  193. package/public/js/remote-knowledge.js +0 -165
  194. package/public/js/workbench-notices.js +0 -67
  195. package/public/remote-knowledge-help.html +0 -35
  196. package/public/remote-knowledge.css +0 -40
  197. package/src/lib/remote-knowledge.js +0 -284
@@ -1,292 +1,292 @@
1
- .workspace {
2
- --page-bar-height: 52px;
3
- --xiaozhi-min: 300px;
4
- --xiaozhi-main-min: 440px;
5
- position: relative;
6
- display: flex;
7
- flex: 1;
8
- min-height: 0;
9
- }
10
- .workspace > .main { min-width: 0; container: workspace / inline-size; }
11
- .workspace .topbar { height: var(--page-bar-height); }
12
- .workspace .topbar > :first-child { min-width: 0; }
13
- .topbar-title, .topbar-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
14
- .xiaozhi-menu { width: 100%; border: 0; background: transparent; font-family: inherit; }
15
- #xiaozhiToggle { border: 1px solid transparent; flex: none; font-family: inherit; }
16
- #xiaozhiToggle[aria-expanded="true"] { color: #154baa; background: #eaf2ff; border-color: #cbdcf9; }
17
- .xiaozhi-pane {
18
- position: relative;
19
- flex: 0 0 var(--xiaozhi-width, clamp(330px, 31vw, 500px));
20
- min-width: var(--xiaozhi-min);
21
- max-width: calc(100% - var(--xiaozhi-main-min));
22
- display: grid;
23
- grid-template-rows: auto minmax(0, 1fr) auto;
24
- border-left: 1px solid #dbe4f1;
25
- background: #fff;
26
- color: #182a47;
27
- }
28
- .xiaozhi-pane[hidden], .xiaozhi-pane [hidden] { display: none; }
29
- .xiaozhi-divider {
30
- position: absolute;
31
- inset-block: 0;
32
- left: -6px;
33
- width: 11px;
34
- z-index: 2;
35
- cursor: col-resize;
36
- touch-action: none;
37
- }
38
- .xiaozhi-divider::before {
39
- content: "";
40
- position: absolute;
41
- inset: 0 4px;
42
- border-radius: 2px;
43
- }
44
- .xiaozhi-divider::after {
45
- content: "";
46
- position: absolute;
47
- top: 50%;
48
- left: 50%;
49
- width: 5px;
50
- height: 32px;
51
- border-radius: 4px;
52
- background: #a9bcda;
53
- transform: translate(-50%, -50%);
54
- }
55
- .xiaozhi-divider:hover::before,
56
- .xiaozhi-divider:focus-visible::before,
57
- .workspace.xiaozhi-resizing .xiaozhi-divider::before { background: #c2d6fb; }
58
- .xiaozhi-divider:hover::after,
59
- .xiaozhi-divider:focus-visible::after,
60
- .workspace.xiaozhi-resizing .xiaozhi-divider::after { background: #2763d9; }
61
- .workspace.xiaozhi-resizing,
62
- .workspace.xiaozhi-resizing * { cursor: col-resize !important; user-select: none; }
63
- .xiaozhi-header {
64
- display: flex;
65
- align-items: center;
66
- gap: 10px;
67
- min-height: var(--page-bar-height);
68
- padding: 8px 14px;
69
- border-bottom: 1px solid #e6edf6;
70
- }
71
- .xiaozhi-mark {
72
- display: grid;
73
- width: 32px;
74
- height: 32px;
75
- place-items: center;
76
- flex: none;
77
- border-radius: 9px;
78
- background: linear-gradient(135deg, #123d9f, #316ce6);
79
- color: #fff;
80
- font-size: 14px;
81
- font-weight: 700;
82
- }
83
- .xiaozhi-title { flex: 1; min-width: 0; }
84
- .xiaozhi-title h2 { font-size: 15px; }
85
- .xiaozhi-title p { color: #566987; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
86
- .xiaozhi-close {
87
- width: 32px;
88
- height: 32px;
89
- flex: none;
90
- border: 0;
91
- border-radius: 7px;
92
- background: transparent;
93
- color: #385373;
94
- cursor: pointer;
95
- font-family: inherit;
96
- font-size: 23px;
97
- line-height: 1;
98
- }
99
- .xiaozhi-close:hover { background: #edf3fe; }
100
- .xiaozhi-messages {
101
- overflow: auto;
102
- overscroll-behavior: contain;
103
- padding: 16px 14px;
104
- scrollbar-gutter: stable;
105
- }
106
- .xiaozhi-history {
107
- grid-row: 2 / 4;
108
- overflow: auto;
109
- overscroll-behavior: contain;
110
- padding: 12px 14px;
111
- scrollbar-gutter: stable;
112
- }
113
- .xiaozhi-history-list { list-style: none; display: grid; gap: 6px; padding: 0; margin: 0; }
114
- .xiaozhi-history-row {
115
- display: flex;
116
- align-items: center;
117
- border: 1px solid #e2eaf5;
118
- border-radius: 8px;
119
- background: #fff;
120
- }
121
- .xiaozhi-history-row:hover, .xiaozhi-history-row:has([aria-current="true"]) {
122
- background: #edf4ff;
123
- border-color: #cbdcf9;
124
- }
125
- .xiaozhi-history-open, .xiaozhi-history-delete {
126
- border: 0;
127
- background: transparent;
128
- font-family: inherit;
129
- cursor: pointer;
130
- }
131
- .xiaozhi-history-open {
132
- display: grid;
133
- flex: 1;
134
- min-width: 0;
135
- gap: 4px;
136
- padding: 10px 12px;
137
- text-align: left;
138
- color: #182a47;
139
- border-radius: 8px;
140
- }
141
- .xiaozhi-history-row strong { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
142
- .xiaozhi-history-delete { flex: none; margin-right: 6px; padding: 7px 8px; border-radius: 6px; color: #9b2a26; font-size: 12px; }
143
- .xiaozhi-history-delete:hover, .xiaozhi-history-delete:focus-visible { background: #fff0ef; }
144
- @media (hover: hover) and (pointer: fine) {
145
- .xiaozhi-history-row:not(:hover):not(:focus-within):not(:has([aria-current="true"])) .xiaozhi-history-delete { opacity: 0; }
146
- }
147
- .xiaozhi-history-row small, .xiaozhi-history-note { color: #566987; font-size: 12px; }
148
- .xiaozhi-history-note { margin: 0 0 10px; }
149
- .xiaozhi-header > .btn { flex: none; white-space: nowrap; }
150
- #xiaozhiHistoryToggle[aria-expanded="true"] { background: #edf4ff; border-color: #cbdcf9; color: #154baa; }
151
- .xiaozhi-welcome {
152
- padding: 16px;
153
- border: 1px solid #dce8fa;
154
- border-radius: 11px;
155
- background: #f4f8ff;
156
- }
157
- .xiaozhi-welcome h3 { margin-bottom: 5px; font-size: 15px; }
158
- .xiaozhi-welcome p { color: #4c6284; line-height: 1.65; }
159
- .xiaozhi-prompts { display: grid; gap: 8px; margin-top: 12px; }
160
- .xiaozhi-prompts button {
161
- width: 100%;
162
- padding: 9px 11px;
163
- border: 1px solid #dde6f3;
164
- border-radius: 8px;
165
- background: #fff;
166
- color: #244878;
167
- font: inherit;
168
- text-align: left;
169
- cursor: pointer;
170
- }
171
- .xiaozhi-prompts button:hover { background: #f3f7ff; border-color: #adc8f6; }
172
- .xiaozhi-message { max-width: 100%; margin-bottom: 14px; overflow-wrap: anywhere; }
173
- .xiaozhi-answer, .xiaozhi-user {
174
- width: fit-content;
175
- max-width: 100%;
176
- border-radius: 11px;
177
- padding: 10px 12px;
178
- line-height: 1.75;
179
- }
180
- .xiaozhi-answer { min-width: 0; background: #f2f6fd; }
181
- .xiaozhi-answer:has(.markdown-table-scroll) { width: 100%; }
182
- .xiaozhi-user { margin-left: auto; max-width: 90%; background: #1b54ce; color: #fff; white-space: pre-wrap; }
183
- .xiaozhi-answer > :first-child { margin-top: 0; }
184
- .xiaozhi-answer > :last-child { margin-bottom: 0; }
185
- .xiaozhi-answer :is(h1,h2,h3,h4,h5,h6) { margin: 1em 0 .38em; color: #173657; line-height: 1.45; }
186
- .xiaozhi-answer h1 { font-size: 1.28em; }
187
- .xiaozhi-answer h2 { font-size: 1.16em; }
188
- .xiaozhi-answer :is(h3,h4,h5,h6) { font-size: 1.05em; }
189
- .xiaozhi-answer :is(p,ul,ol,pre,blockquote) { margin: .6em 0; }
190
- .xiaozhi-answer :is(ul,ol) { padding-inline-start: 1.5em; }
191
- .xiaozhi-answer li + li { margin-top: .35em; }
192
- .xiaozhi-answer li > p { margin: 0 0 .2em; }
193
- .xiaozhi-answer blockquote { padding: .35em .8em; border-inline-start: 3px solid #baccea; color: #425879; }
194
- .xiaozhi-answer hr { margin: 1em 0; border: 0; border-top: 1px solid #d9e4f2; }
195
- .xiaozhi-answer pre { overflow-x: auto; max-width: 100%; padding: .65em .8em; border-radius: 6px; background: #e6eefb; }
196
- .xiaozhi-answer code { font-family: Consolas, monospace; font-size: .93em; }
197
- .xiaozhi-answer :not(pre) > code { padding: .08em .27em; border-radius: 3px; background: #e6eefb; }
198
- .xiaozhi-answer .markdown-table-scroll > table { width: max-content; font-size: .94em; line-height: 1.55; }
199
- .xiaozhi-answer .markdown-table-scroll :is(th,td) { min-width: 5em; max-width: 24em; overflow-wrap: anywhere; }
200
- .xiaozhi-answer .markdown-table-scroll :is(th,td):first-child { min-width: 2.6em; }
201
- .xiaozhi-status { color: #566987; }
202
- .xiaozhi-error { color: #9b2a26; }
203
- .xiaozhi-sources { margin-top: 8px; }
204
- .xiaozhi-sources > summary { width: fit-content; color: #265ba9; font-size: 12px; cursor: pointer; }
205
- .xiaozhi-sources > ol { list-style: none; display: grid; gap: 6px; margin-top: 6px; }
206
- .xiaozhi-source { padding: 7px 9px; border: 1px solid #e2eaf5; border-radius: 7px; line-height: 1.5; }
207
- .xiaozhi-source a, .xiaozhi-source button { color: #174d9f; }
208
- .xiaozhi-source button { background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
209
- .xiaozhi-source small { display: block; color: #566987; }
210
- .xiaozhi-source p { margin-top: 4px; white-space: pre-wrap; color: #3f5676; font-size: 12px; }
211
- .xiaozhi-pending { margin-top: 6px; font-size: 12px; color: #815017; }
212
- .xiaozhi-compose { padding: 12px 14px; border-top: 1px solid #e6edf6; background: #fff; }
213
- .xiaozhi-compose textarea {
214
- display: block;
215
- width: 100%;
216
- min-height: 64px;
217
- max-height: 160px;
218
- resize: vertical;
219
- padding: 9px 11px;
220
- border: 1px solid #ccd9ed;
221
- border-radius: 8px;
222
- color: inherit;
223
- font: inherit;
224
- line-height: 1.6;
225
- }
226
- .xiaozhi-compose-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 7px; }
227
- .xz-photo-tray { margin-bottom:8px; padding:8px 9px; border:1px solid #dce7f8; border-radius:8px; background:#f6f9ff; color:#334e75; }
228
- .xz-photo-tray p { font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
229
- .xz-photo-policy { margin-inline-start:7px; color:#506787; font-size:11px; }
230
- .xz-photo-strip { display:flex; gap:8px; padding:6px 0; overflow-x:auto; }
231
- .xz-photo { position:relative; flex:0 0 58px; }
232
- .xz-photo button { border:0; padding:0; cursor:pointer; }
233
- .xz-photo img { display:block; width:58px; height:48px; border-radius:6px; object-fit:cover; background:#e9effa; }
234
- .xz-photo .xz-photo-remove { position:absolute; top:0; right:0; min-width:25px; height:25px; border-radius:3px 5px 3px 5px; background:#203654; color:#fff; }
235
- .xz-photo-large { display:block; max-width:100%; max-height:64vh; margin:auto; object-fit:contain; }
236
- .xiaozhi-shortcut { margin-right: auto; color: #566987; font-size: 11px; }
237
- .xiaozhi-voice-status { flex: 1; min-width: 0; color: #456486; font-size: 11px; line-height: 1.45; }
238
- .xiaozhi-voice-status:empty, .xiaozhi-compose-actions:has(.xiaozhi-voice-status:not(:empty)) .xiaozhi-shortcut { display: none; }
239
- .xiaozhi-voice {
240
- flex: 0 0 auto;
241
- display: grid;
242
- width: 33px;
243
- height: 33px;
244
- place-items: center;
245
- border: 1px solid transparent;
246
- border-radius: 8px;
247
- background: transparent;
248
- color: #456486;
249
- cursor: pointer;
250
- }
251
- .xiaozhi-voice:not(:disabled):hover { color: #154ebe; background: #edf3ff; border-color: #dbe7fa; }
252
- .xiaozhi-voice:disabled { opacity: .46; cursor: default; }
253
- .xz-voice-mic { width: 18px; height: 18px; }
254
- .xz-voice-stop, .xz-voice-wait { display: none; }
255
- .xiaozhi-voice[data-phase=recording] { background: #fdeeee; border-color: #f4d0d0; color: #ad3037; }
256
- .xiaozhi-voice:is([data-phase=opening], [data-phase=recording], [data-phase=processing]) .xz-voice-mic { display: none; }
257
- .xiaozhi-voice[data-phase=recording] .xz-voice-stop { display: block; width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
258
- .xiaozhi-voice:is([data-phase=opening], [data-phase=processing]) .xz-voice-wait {
259
- display: block;
260
- width: 14px;
261
- height: 14px;
262
- border: 2px solid #d5e1f6;
263
- border-top-color: currentColor;
264
- border-radius: 50%;
265
- animation: xz-voice-spin .8s linear infinite;
266
- }
267
- @keyframes xz-voice-spin { to { transform: rotate(360deg); } }
268
- @media (prefers-reduced-motion: reduce) { .xz-voice-wait { animation: none !important; } }
269
- .xiaozhi-pane :focus-visible, #xiaozhiToggle:focus-visible { outline: 2px solid #2763d9; outline-offset: 2px; }
270
- .xiaozhi-pane .xiaozhi-divider:focus-visible { outline: none; }
271
- .xiaozhi-divider:focus-visible::before { background: #2763d9; }
272
- .xiaozhi-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
273
- @container workspace (max-width: 620px) {
274
- .workspace .topbar { padding-inline: 12px; }
275
- .tz-grid { grid-template-columns: minmax(0, 1fr); }
276
- .grid > * { min-width: 0; }
277
- .ai-strip { flex-wrap: wrap; }
278
- .ai-strip .ai-txt { flex: 1 1 210px; min-width: 0; }
279
- }
280
- @media (max-width: 760px) {
281
- .app { height: 100dvh; }
282
- .xiaozhi-pane { position: absolute; inset: var(--page-bar-height) 0 0; z-index: 4; border-left: 0; min-width: 0; max-width: none; }
283
- .xiaozhi-divider { display: none; }
284
- .xiaozhi-shortcut { display: none; }
285
- .xiaozhi-compose-actions { flex-wrap:wrap; gap:5px; }
286
- .xiaozhi-voice-status:not(:empty) { flex:1 0 100%; }
287
- }
288
- @media (max-height: 480px) {
289
- .xiaozhi-compose { padding-block: 6px; }
290
- .xiaozhi-compose textarea { min-height: 42px; max-height: 88px; }
291
- }
292
- @media print { .xiaozhi-pane { display: none; } }
1
+ .workspace {
2
+ --page-bar-height: 52px;
3
+ --xiaozhi-min: 300px;
4
+ --xiaozhi-main-min: 440px;
5
+ position: relative;
6
+ display: flex;
7
+ flex: 1;
8
+ min-height: 0;
9
+ }
10
+ .workspace > .main { min-width: 0; container: workspace / inline-size; }
11
+ .workspace .topbar { height: var(--page-bar-height); }
12
+ .workspace .topbar > :first-child { min-width: 0; }
13
+ .topbar-title, .topbar-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
14
+ .xiaozhi-menu { width: 100%; border: 0; background: transparent; font-family: inherit; }
15
+ #xiaozhiToggle { border: 1px solid transparent; flex: none; font-family: inherit; }
16
+ #xiaozhiToggle[aria-expanded="true"] { color: #154baa; background: #eaf2ff; border-color: #cbdcf9; }
17
+ .xiaozhi-pane {
18
+ position: relative;
19
+ flex: 0 0 var(--xiaozhi-width, clamp(330px, 31vw, 500px));
20
+ min-width: var(--xiaozhi-min);
21
+ max-width: calc(100% - var(--xiaozhi-main-min));
22
+ display: grid;
23
+ grid-template-rows: auto minmax(0, 1fr) auto;
24
+ border-left: 1px solid #dbe4f1;
25
+ background: #fff;
26
+ color: #182a47;
27
+ }
28
+ .xiaozhi-pane[hidden], .xiaozhi-pane [hidden] { display: none; }
29
+ .xiaozhi-divider {
30
+ position: absolute;
31
+ inset-block: 0;
32
+ left: -6px;
33
+ width: 11px;
34
+ z-index: 2;
35
+ cursor: col-resize;
36
+ touch-action: none;
37
+ }
38
+ .xiaozhi-divider::before {
39
+ content: "";
40
+ position: absolute;
41
+ inset: 0 4px;
42
+ border-radius: 2px;
43
+ }
44
+ .xiaozhi-divider::after {
45
+ content: "";
46
+ position: absolute;
47
+ top: 50%;
48
+ left: 50%;
49
+ width: 5px;
50
+ height: 32px;
51
+ border-radius: 4px;
52
+ background: #a9bcda;
53
+ transform: translate(-50%, -50%);
54
+ }
55
+ .xiaozhi-divider:hover::before,
56
+ .xiaozhi-divider:focus-visible::before,
57
+ .workspace.xiaozhi-resizing .xiaozhi-divider::before { background: #c2d6fb; }
58
+ .xiaozhi-divider:hover::after,
59
+ .xiaozhi-divider:focus-visible::after,
60
+ .workspace.xiaozhi-resizing .xiaozhi-divider::after { background: #2763d9; }
61
+ .workspace.xiaozhi-resizing,
62
+ .workspace.xiaozhi-resizing * { cursor: col-resize !important; user-select: none; }
63
+ .xiaozhi-header {
64
+ display: flex;
65
+ align-items: center;
66
+ gap: 10px;
67
+ min-height: var(--page-bar-height);
68
+ padding: 8px 14px;
69
+ border-bottom: 1px solid #e6edf6;
70
+ }
71
+ .xiaozhi-mark {
72
+ display: grid;
73
+ width: 32px;
74
+ height: 32px;
75
+ place-items: center;
76
+ flex: none;
77
+ border-radius: 9px;
78
+ background: linear-gradient(135deg, #123d9f, #316ce6);
79
+ color: #fff;
80
+ font-size: 14px;
81
+ font-weight: 700;
82
+ }
83
+ .xiaozhi-title { flex: 1; min-width: 0; }
84
+ .xiaozhi-title h2 { font-size: 15px; }
85
+ .xiaozhi-title p { color: #566987; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
86
+ .xiaozhi-close {
87
+ width: 32px;
88
+ height: 32px;
89
+ flex: none;
90
+ border: 0;
91
+ border-radius: 7px;
92
+ background: transparent;
93
+ color: #385373;
94
+ cursor: pointer;
95
+ font-family: inherit;
96
+ font-size: 23px;
97
+ line-height: 1;
98
+ }
99
+ .xiaozhi-close:hover { background: #edf3fe; }
100
+ .xiaozhi-messages {
101
+ overflow: auto;
102
+ overscroll-behavior: contain;
103
+ padding: 16px 14px;
104
+ scrollbar-gutter: stable;
105
+ }
106
+ .xiaozhi-history {
107
+ grid-row: 2 / 4;
108
+ overflow: auto;
109
+ overscroll-behavior: contain;
110
+ padding: 12px 14px;
111
+ scrollbar-gutter: stable;
112
+ }
113
+ .xiaozhi-history-list { list-style: none; display: grid; gap: 6px; padding: 0; margin: 0; }
114
+ .xiaozhi-history-row {
115
+ display: flex;
116
+ align-items: center;
117
+ border: 1px solid #e2eaf5;
118
+ border-radius: 8px;
119
+ background: #fff;
120
+ }
121
+ .xiaozhi-history-row:hover, .xiaozhi-history-row:has([aria-current="true"]) {
122
+ background: #edf4ff;
123
+ border-color: #cbdcf9;
124
+ }
125
+ .xiaozhi-history-open, .xiaozhi-history-delete {
126
+ border: 0;
127
+ background: transparent;
128
+ font-family: inherit;
129
+ cursor: pointer;
130
+ }
131
+ .xiaozhi-history-open {
132
+ display: grid;
133
+ flex: 1;
134
+ min-width: 0;
135
+ gap: 4px;
136
+ padding: 10px 12px;
137
+ text-align: left;
138
+ color: #182a47;
139
+ border-radius: 8px;
140
+ }
141
+ .xiaozhi-history-row strong { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
142
+ .xiaozhi-history-delete { flex: none; margin-right: 6px; padding: 7px 8px; border-radius: 6px; color: #9b2a26; font-size: 12px; }
143
+ .xiaozhi-history-delete:hover, .xiaozhi-history-delete:focus-visible { background: #fff0ef; }
144
+ @media (hover: hover) and (pointer: fine) {
145
+ .xiaozhi-history-row:not(:hover):not(:focus-within):not(:has([aria-current="true"])) .xiaozhi-history-delete { opacity: 0; }
146
+ }
147
+ .xiaozhi-history-row small, .xiaozhi-history-note { color: #566987; font-size: 12px; }
148
+ .xiaozhi-history-note { margin: 0 0 10px; }
149
+ .xiaozhi-header > .btn { flex: none; white-space: nowrap; }
150
+ #xiaozhiHistoryToggle[aria-expanded="true"] { background: #edf4ff; border-color: #cbdcf9; color: #154baa; }
151
+ .xiaozhi-welcome {
152
+ padding: 16px;
153
+ border: 1px solid #dce8fa;
154
+ border-radius: 11px;
155
+ background: #f4f8ff;
156
+ }
157
+ .xiaozhi-welcome h3 { margin-bottom: 5px; font-size: 15px; }
158
+ .xiaozhi-welcome p { color: #4c6284; line-height: 1.65; }
159
+ .xiaozhi-prompts { display: grid; gap: 8px; margin-top: 12px; }
160
+ .xiaozhi-prompts button {
161
+ width: 100%;
162
+ padding: 9px 11px;
163
+ border: 1px solid #dde6f3;
164
+ border-radius: 8px;
165
+ background: #fff;
166
+ color: #244878;
167
+ font: inherit;
168
+ text-align: left;
169
+ cursor: pointer;
170
+ }
171
+ .xiaozhi-prompts button:hover { background: #f3f7ff; border-color: #adc8f6; }
172
+ .xiaozhi-message { max-width: 100%; margin-bottom: 14px; overflow-wrap: anywhere; }
173
+ .xiaozhi-answer, .xiaozhi-user {
174
+ width: fit-content;
175
+ max-width: 100%;
176
+ border-radius: 11px;
177
+ padding: 10px 12px;
178
+ line-height: 1.75;
179
+ }
180
+ .xiaozhi-answer { min-width: 0; background: #f2f6fd; }
181
+ .xiaozhi-answer:has(.markdown-table-scroll) { width: 100%; }
182
+ .xiaozhi-user { margin-left: auto; max-width: 90%; background: #1b54ce; color: #fff; white-space: pre-wrap; }
183
+ .xiaozhi-answer > :first-child { margin-top: 0; }
184
+ .xiaozhi-answer > :last-child { margin-bottom: 0; }
185
+ .xiaozhi-answer :is(h1,h2,h3,h4,h5,h6) { margin: 1em 0 .38em; color: #173657; line-height: 1.45; }
186
+ .xiaozhi-answer h1 { font-size: 1.28em; }
187
+ .xiaozhi-answer h2 { font-size: 1.16em; }
188
+ .xiaozhi-answer :is(h3,h4,h5,h6) { font-size: 1.05em; }
189
+ .xiaozhi-answer :is(p,ul,ol,pre,blockquote) { margin: .6em 0; }
190
+ .xiaozhi-answer :is(ul,ol) { padding-inline-start: 1.5em; }
191
+ .xiaozhi-answer li + li { margin-top: .35em; }
192
+ .xiaozhi-answer li > p { margin: 0 0 .2em; }
193
+ .xiaozhi-answer blockquote { padding: .35em .8em; border-inline-start: 3px solid #baccea; color: #425879; }
194
+ .xiaozhi-answer hr { margin: 1em 0; border: 0; border-top: 1px solid #d9e4f2; }
195
+ .xiaozhi-answer pre { overflow-x: auto; max-width: 100%; padding: .65em .8em; border-radius: 6px; background: #e6eefb; }
196
+ .xiaozhi-answer code { font-family: Consolas, monospace; font-size: .93em; }
197
+ .xiaozhi-answer :not(pre) > code { padding: .08em .27em; border-radius: 3px; background: #e6eefb; }
198
+ .xiaozhi-answer .markdown-table-scroll > table { width: max-content; font-size: .94em; line-height: 1.55; }
199
+ .xiaozhi-answer .markdown-table-scroll :is(th,td) { min-width: 5em; max-width: 24em; overflow-wrap: anywhere; }
200
+ .xiaozhi-answer .markdown-table-scroll :is(th,td):first-child { min-width: 2.6em; }
201
+ .xiaozhi-status { color: #566987; }
202
+ .xiaozhi-error { color: #9b2a26; }
203
+ .xiaozhi-sources { margin-top: 8px; }
204
+ .xiaozhi-sources > summary { width: fit-content; color: #265ba9; font-size: 12px; cursor: pointer; }
205
+ .xiaozhi-sources > ol { list-style: none; display: grid; gap: 6px; margin-top: 6px; }
206
+ .xiaozhi-source { padding: 7px 9px; border: 1px solid #e2eaf5; border-radius: 7px; line-height: 1.5; }
207
+ .xiaozhi-source a, .xiaozhi-source button { color: #174d9f; }
208
+ .xiaozhi-source button { background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
209
+ .xiaozhi-source small { display: block; color: #566987; }
210
+ .xiaozhi-source p { margin-top: 4px; white-space: pre-wrap; color: #3f5676; font-size: 12px; }
211
+ .xiaozhi-pending { margin-top: 6px; font-size: 12px; color: #815017; }
212
+ .xiaozhi-compose { padding: 12px 14px; border-top: 1px solid #e6edf6; background: #fff; }
213
+ .xiaozhi-compose textarea {
214
+ display: block;
215
+ width: 100%;
216
+ min-height: 64px;
217
+ max-height: 160px;
218
+ resize: vertical;
219
+ padding: 9px 11px;
220
+ border: 1px solid #ccd9ed;
221
+ border-radius: 8px;
222
+ color: inherit;
223
+ font: inherit;
224
+ line-height: 1.6;
225
+ }
226
+ .xiaozhi-compose-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 7px; }
227
+ .xz-photo-tray { margin-bottom:8px; padding:8px 9px; border:1px solid #dce7f8; border-radius:8px; background:#f6f9ff; color:#334e75; }
228
+ .xz-photo-tray p { font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
229
+ .xz-photo-policy { margin-inline-start:7px; color:#506787; font-size:11px; }
230
+ .xz-photo-strip { display:flex; gap:8px; padding:6px 0; overflow-x:auto; }
231
+ .xz-photo { position:relative; flex:0 0 58px; }
232
+ .xz-photo button { border:0; padding:0; cursor:pointer; }
233
+ .xz-photo img { display:block; width:58px; height:48px; border-radius:6px; object-fit:cover; background:#e9effa; }
234
+ .xz-photo .xz-photo-remove { position:absolute; top:0; right:0; min-width:25px; height:25px; border-radius:3px 5px 3px 5px; background:#203654; color:#fff; }
235
+ .xz-photo-large { display:block; max-width:100%; max-height:64vh; margin:auto; object-fit:contain; }
236
+ .xiaozhi-shortcut { margin-right: auto; color: #566987; font-size: 11px; }
237
+ .xiaozhi-voice-status { flex: 1; min-width: 0; color: #456486; font-size: 11px; line-height: 1.45; }
238
+ .xiaozhi-voice-status:empty, .xiaozhi-compose-actions:has(.xiaozhi-voice-status:not(:empty)) .xiaozhi-shortcut { display: none; }
239
+ .xiaozhi-voice {
240
+ flex: 0 0 auto;
241
+ display: grid;
242
+ width: 33px;
243
+ height: 33px;
244
+ place-items: center;
245
+ border: 1px solid transparent;
246
+ border-radius: 8px;
247
+ background: transparent;
248
+ color: #456486;
249
+ cursor: pointer;
250
+ }
251
+ .xiaozhi-voice:not(:disabled):hover { color: #154ebe; background: #edf3ff; border-color: #dbe7fa; }
252
+ .xiaozhi-voice:disabled { opacity: .46; cursor: default; }
253
+ .xz-voice-mic { width: 18px; height: 18px; }
254
+ .xz-voice-stop, .xz-voice-wait { display: none; }
255
+ .xiaozhi-voice[data-phase=recording] { background: #fdeeee; border-color: #f4d0d0; color: #ad3037; }
256
+ .xiaozhi-voice:is([data-phase=opening], [data-phase=recording], [data-phase=processing]) .xz-voice-mic { display: none; }
257
+ .xiaozhi-voice[data-phase=recording] .xz-voice-stop { display: block; width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
258
+ .xiaozhi-voice:is([data-phase=opening], [data-phase=processing]) .xz-voice-wait {
259
+ display: block;
260
+ width: 14px;
261
+ height: 14px;
262
+ border: 2px solid #d5e1f6;
263
+ border-top-color: currentColor;
264
+ border-radius: 50%;
265
+ animation: xz-voice-spin .8s linear infinite;
266
+ }
267
+ @keyframes xz-voice-spin { to { transform: rotate(360deg); } }
268
+ @media (prefers-reduced-motion: reduce) { .xz-voice-wait { animation: none !important; } }
269
+ .xiaozhi-pane :focus-visible, #xiaozhiToggle:focus-visible { outline: 2px solid #2763d9; outline-offset: 2px; }
270
+ .xiaozhi-pane .xiaozhi-divider:focus-visible { outline: none; }
271
+ .xiaozhi-divider:focus-visible::before { background: #2763d9; }
272
+ .xiaozhi-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
273
+ @container workspace (max-width: 620px) {
274
+ .workspace .topbar { padding-inline: 12px; }
275
+ .tz-grid { grid-template-columns: minmax(0, 1fr); }
276
+ .grid > * { min-width: 0; }
277
+ .ai-strip { flex-wrap: wrap; }
278
+ .ai-strip .ai-txt { flex: 1 1 210px; min-width: 0; }
279
+ }
280
+ @media (max-width: 760px) {
281
+ .app { height: 100dvh; }
282
+ .xiaozhi-pane { position: absolute; inset: var(--page-bar-height) 0 0; z-index: 4; border-left: 0; min-width: 0; max-width: none; }
283
+ .xiaozhi-divider { display: none; }
284
+ .xiaozhi-shortcut { display: none; }
285
+ .xiaozhi-compose-actions { flex-wrap:wrap; gap:5px; }
286
+ .xiaozhi-voice-status:not(:empty) { flex:1 0 100%; }
287
+ }
288
+ @media (max-height: 480px) {
289
+ .xiaozhi-compose { padding-block: 6px; }
290
+ .xiaozhi-compose textarea { min-height: 42px; max-height: 88px; }
291
+ }
292
+ @media print { .xiaozhi-pane { display: none; } }