clay-server 5.1.0-beta.1 → 5.1.0-beta.2

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 (157) hide show
  1. package/LICENSES/README.md +4 -0
  2. package/LICENSES/dicebear-avatars.md +16 -0
  3. package/lib/daemon-project-access.js +7 -1
  4. package/lib/daemon.js +2 -0
  5. package/lib/dicebear-avatar.js +62 -0
  6. package/lib/knowledge-db-service.js +175 -0
  7. package/lib/knowledge-db-validation.js +0 -0
  8. package/lib/knowledge-document-index.js +49 -0
  9. package/lib/knowledge-draft-store.js +56 -0
  10. package/lib/knowledge-file-store.js +199 -0
  11. package/lib/knowledge-markdown.js +128 -0
  12. package/lib/mate-knowledge-mcp-server.js +29 -6
  13. package/lib/mate-knowledge-service.js +23 -2
  14. package/lib/mate-knowledge-sync.js +36 -21
  15. package/lib/mate-workspace-color.js +4 -0
  16. package/lib/mates.js +18 -0
  17. package/lib/project-connection.js +36 -2
  18. package/lib/project-debate-proposal.js +6 -0
  19. package/lib/project-debate-workspace.js +43 -0
  20. package/lib/project-debate.js +1 -0
  21. package/lib/project-knowledge.js +315 -136
  22. package/lib/project-mate-creation-proposal.js +1 -0
  23. package/lib/project-sessions.js +39 -2
  24. package/lib/project-user-knowledge.js +60 -0
  25. package/lib/project.js +59 -18
  26. package/lib/public/app.js +73 -34
  27. package/lib/public/clay-studio-wordmark-bold.svg +20 -0
  28. package/lib/public/css/clay-workspace.css +105 -0
  29. package/lib/public/css/debates-workbench.css +47 -0
  30. package/lib/public/css/home-debate-live.css +26 -0
  31. package/lib/public/css/home-hub.css +3 -1
  32. package/lib/public/css/home-mate-model-picker.css +15 -131
  33. package/lib/public/css/home-mate-settings.css +168 -16
  34. package/lib/public/css/icon-strip.css +249 -32
  35. package/lib/public/css/mate-conversation.css +176 -0
  36. package/lib/public/css/mate-knowledge-workbench.css +118 -0
  37. package/lib/public/css/mate-workspace-color.css +16 -0
  38. package/lib/public/css/mates.css +28 -28
  39. package/lib/public/css/messages.css +1 -114
  40. package/lib/public/css/mobile-nav.css +16 -16
  41. package/lib/public/css/overlays.css +8 -0
  42. package/lib/public/css/project-logs.css +7 -0
  43. package/lib/public/css/project-mate-creation.css +105 -0
  44. package/lib/public/css/right-workbench.css +3 -3
  45. package/lib/public/css/session-folders.css +80 -21
  46. package/lib/public/css/sidebar.css +183 -107
  47. package/lib/public/css/title-bar.css +151 -0
  48. package/lib/public/css/worker-delegation.css +47 -0
  49. package/lib/public/css/worker-proposal.css +72 -150
  50. package/lib/public/css/you.css +74 -0
  51. package/lib/public/index.html +33 -101
  52. package/lib/public/modules/account-island.js +230 -0
  53. package/lib/public/modules/app-cursors.js +19 -43
  54. package/lib/public/modules/app-debate-ui.js +4 -3
  55. package/lib/public/modules/app-header.js +106 -0
  56. package/lib/public/modules/app-message-router.js +12 -3
  57. package/lib/public/modules/app-messages.js +34 -9
  58. package/lib/public/modules/app-notifications.js +4 -7
  59. package/lib/public/modules/app-projects.js +5 -38
  60. package/lib/public/modules/app-rendering.js +12 -13
  61. package/lib/public/modules/avatar.js +25 -9
  62. package/lib/public/modules/chat-render-runtime.js +16 -4
  63. package/lib/public/modules/command-palette.js +2 -15
  64. package/lib/public/modules/cursor-sharing-preference.js +3 -3
  65. package/lib/public/modules/debate-controls.js +299 -0
  66. package/lib/public/modules/debate.js +2 -0
  67. package/lib/public/modules/debates-workbench.js +339 -0
  68. package/lib/public/modules/default-ai.js +81 -65
  69. package/lib/public/modules/home-debate-controls.js +18 -289
  70. package/lib/public/modules/home-mate-avatar-editor.js +228 -0
  71. package/lib/public/modules/home-mate-color-picker.js +66 -0
  72. package/lib/public/modules/home-mate-creation.js +1 -1
  73. package/lib/public/modules/home-mate-instructions.js +90 -0
  74. package/lib/public/modules/home-mate-model-picker.js +80 -271
  75. package/lib/public/modules/home-mate-profile-editor.js +72 -0
  76. package/lib/public/modules/home-mate-settings.js +118 -125
  77. package/lib/public/modules/home-shell.js +3 -0
  78. package/lib/public/modules/home-surface-boot.js +1 -9
  79. package/lib/public/modules/icon-strip-tooltip.js +95 -0
  80. package/lib/public/modules/knowledge-db-edit-state.js +35 -0
  81. package/lib/public/modules/knowledge-db-workbench.js +234 -0
  82. package/lib/public/modules/knowledge-history-state.js +55 -0
  83. package/lib/public/modules/knowledge-markdown-editor.js +57 -0
  84. package/lib/public/modules/knowledge-preview-links.js +70 -0
  85. package/lib/public/modules/knowledge-workbench-shell.js +21 -0
  86. package/lib/public/modules/mate-knowledge-workbench-state.js +174 -0
  87. package/lib/public/modules/mate-knowledge-workbench.js +500 -0
  88. package/lib/public/modules/mate-knowledge.js +11 -3
  89. package/lib/public/modules/mate-management.js +54 -10
  90. package/lib/public/modules/mate-sidebar.js +11 -1
  91. package/lib/public/modules/mate-workspace-color.js +33 -0
  92. package/lib/public/modules/mention.js +5 -13
  93. package/lib/public/modules/profile.js +51 -18
  94. package/lib/public/modules/project-chat-identity.js +79 -0
  95. package/lib/public/modules/project-debate-planning-workspace.js +250 -0
  96. package/lib/public/modules/project-debate-workspace.js +185 -0
  97. package/lib/public/modules/project-header-identity.js +127 -0
  98. package/lib/public/modules/project-logs-render.js +9 -4
  99. package/lib/public/modules/project-mate-creation-workspace.js +414 -0
  100. package/lib/public/modules/project-mate-navigation.js +238 -0
  101. package/lib/public/modules/project-session-navigation.js +29 -0
  102. package/lib/public/modules/project-switcher.js +6 -8
  103. package/lib/public/modules/projects-hub-view.js +5 -6
  104. package/lib/public/modules/projects-hub.js +2 -6
  105. package/lib/public/modules/qrcode.js +27 -8
  106. package/lib/public/modules/search-clay-chat.js +8 -11
  107. package/lib/public/modules/session-activity-tooltip.js +12 -0
  108. package/lib/public/modules/session-create-form.js +86 -14
  109. package/lib/public/modules/session-create.js +50 -7
  110. package/lib/public/modules/session-list-visibility.js +41 -0
  111. package/lib/public/modules/session-presence-ui.js +4 -1
  112. package/lib/public/modules/session-title-marquee.js +51 -0
  113. package/lib/public/modules/sidebar-mates.js +3 -50
  114. package/lib/public/modules/sidebar-mobile.js +63 -60
  115. package/lib/public/modules/sidebar-projects.js +84 -97
  116. package/lib/public/modules/sidebar-session-folders-ui.js +2 -2
  117. package/lib/public/modules/sidebar-session-hierarchy.js +149 -70
  118. package/lib/public/modules/sidebar-sessions.js +49 -50
  119. package/lib/public/modules/sidebar.js +11 -13
  120. package/lib/public/modules/thinking-lifecycle.js +7 -6
  121. package/lib/public/modules/tool-palette-order.js +4 -3
  122. package/lib/public/modules/tool-palette.js +13 -3
  123. package/lib/public/modules/tools.js +22 -22
  124. package/lib/public/modules/worker-proposal.js +42 -8
  125. package/lib/public/modules/worker-runtime-picker.js +115 -0
  126. package/lib/public/modules/you-activity.js +121 -0
  127. package/lib/public/modules/you.js +251 -0
  128. package/lib/public/style.css +16 -8
  129. package/lib/public/vendor/codemirror/LICENSE +21 -0
  130. package/lib/public/vendor/codemirror/codemirror.css +344 -0
  131. package/lib/public/vendor/codemirror/codemirror.js +9884 -0
  132. package/lib/public/vendor/codemirror/continuelist.js +101 -0
  133. package/lib/public/vendor/codemirror/markdown.js +886 -0
  134. package/lib/public/vendor/codemirror/show-hint.css +37 -0
  135. package/lib/public/vendor/codemirror/show-hint.js +523 -0
  136. package/lib/sdk-bridge.js +15 -3
  137. package/lib/server-admin.js +11 -0
  138. package/lib/server-home-chat-events.js +1 -1
  139. package/lib/server-home-chat.js +25 -3
  140. package/lib/server-home-debate-planning.js +4 -1
  141. package/lib/server-home-debates.js +2 -0
  142. package/lib/server-home-mate-creation.js +4 -1
  143. package/lib/server-mate-instructions.js +44 -0
  144. package/lib/server-mates.js +12 -3
  145. package/lib/server-palette.js +1 -1
  146. package/lib/server-settings.js +65 -1
  147. package/lib/server-user-knowledge.js +119 -0
  148. package/lib/server.js +21 -1
  149. package/lib/session-visibility.js +7 -2
  150. package/lib/sessions.js +32 -6
  151. package/lib/user-knowledge-service.js +167 -0
  152. package/lib/users-permissions.js +7 -0
  153. package/lib/users-project-mate-filter-preferences.js +39 -0
  154. package/lib/users.js +6 -0
  155. package/lib/workspace-query-access.js +4 -1
  156. package/lib/ws-schema.js +50 -0
  157. package/package.json +10 -1
@@ -2,6 +2,16 @@
2
2
  Icon Strip — Discord-style vertical server/project bar
3
3
  ========================================================================== */
4
4
 
5
+ #layout-body {
6
+ --account-rail-bottom: 12px;
7
+ --account-rail-avatar-target: 44px;
8
+ --account-rail-control-gap: 4px;
9
+ --account-rail-cursor-target: 28px;
10
+ --account-rail-clearance: 8px;
11
+ --account-rail-strip-fixed-top: calc(48px + 58px + 48px);
12
+ --account-rail-footer-height: calc(var(--account-rail-bottom) + var(--account-rail-avatar-target) + var(--account-rail-control-gap) + var(--account-rail-cursor-target) + var(--account-rail-clearance));
13
+ }
14
+
5
15
  #icon-strip {
6
16
  position: relative;
7
17
  width: 72px;
@@ -10,7 +20,7 @@
10
20
  display: flex;
11
21
  flex-direction: column;
12
22
  align-items: center;
13
- padding: 0 0 80px;
23
+ padding: 0 0 var(--account-rail-footer-height, 100px);
14
24
  overflow: hidden;
15
25
  z-index: 2;
16
26
  }
@@ -59,6 +69,16 @@
59
69
  opacity: 1;
60
70
  }
61
71
 
72
+ .icon-strip-brand {
73
+ cursor: default;
74
+ }
75
+
76
+ .icon-strip-brand:hover::before,
77
+ .icon-strip-brand.active::before {
78
+ background: var(--bg-alt);
79
+ box-shadow: 0 1px 2px rgba(var(--shadow-rgb), 0.08);
80
+ }
81
+
62
82
  .icon-strip-home.active::before {
63
83
  background: var(--bg);
64
84
  box-shadow: 0 1px 3px rgba(var(--shadow-rgb), 0.14);
@@ -149,6 +169,7 @@
149
169
  /* --- Scrollable project list area --- */
150
170
  .icon-strip-projects {
151
171
  width: 100%;
172
+ flex: 1 1 0;
152
173
  min-height: 0;
153
174
  overflow-y: auto;
154
175
  overflow-x: hidden;
@@ -164,6 +185,133 @@
164
185
  display: none;
165
186
  }
166
187
 
188
+ /* --- Project / Mate rotary filter --- */
189
+ .icon-strip-filter {
190
+ width: 100%;
191
+ height: 58px;
192
+ flex: 0 0 58px;
193
+ display: flex;
194
+ align-items: center;
195
+ justify-content: center;
196
+ }
197
+
198
+ .icon-strip-filter-knob {
199
+ width: 48px;
200
+ height: 56px;
201
+ padding: 3px 0 2px;
202
+ border: 0;
203
+ background: transparent;
204
+ color: var(--text-dimmer);
205
+ font: inherit;
206
+ cursor: pointer;
207
+ display: flex;
208
+ flex-direction: column;
209
+ align-items: center;
210
+ justify-content: center;
211
+ gap: 2px;
212
+ }
213
+
214
+ .icon-strip-filter-face {
215
+ position: relative;
216
+ width: 34px;
217
+ height: 34px;
218
+ border-radius: 50%;
219
+ background: var(--bg);
220
+ box-shadow:
221
+ inset 0 1px 0 color-mix(in srgb, white 42%, transparent),
222
+ 0 1px 2px rgba(var(--shadow-rgb), 0.1);
223
+ transition: background 0.2s ease, box-shadow 0.2s ease;
224
+ }
225
+
226
+ .icon-strip-filter-pointer {
227
+ position: absolute;
228
+ inset: 2px;
229
+ border-radius: 50%;
230
+ transition: transform 180ms cubic-bezier(0.2, 0.75, 0.3, 1);
231
+ }
232
+
233
+ .icon-strip-filter-pointer::before {
234
+ content: "";
235
+ position: absolute;
236
+ left: 50%;
237
+ top: 2px;
238
+ width: 5px;
239
+ height: 2px;
240
+ border-radius: 2px;
241
+ background: color-mix(in srgb, var(--accent) 72%, var(--text-dimmer));
242
+ box-shadow: inset 0 1px 1px rgba(var(--shadow-rgb), 0.28);
243
+ transform: translateX(-50%);
244
+ }
245
+
246
+ .icon-strip-filter-category {
247
+ position: absolute;
248
+ inset: 0;
249
+ z-index: 1;
250
+ display: none;
251
+ align-items: center;
252
+ justify-content: center;
253
+ color: var(--text-secondary);
254
+ pointer-events: none;
255
+ }
256
+
257
+ .icon-strip-filter-category .lucide {
258
+ width: 14px;
259
+ height: 14px;
260
+ stroke-width: 1.8;
261
+ }
262
+
263
+ .icon-strip-filter-knob[data-mode="all"] [data-filter-icon="all"],
264
+ .icon-strip-filter-knob[data-mode="projects"] [data-filter-icon="projects"],
265
+ .icon-strip-filter-knob[data-mode="mates"] [data-filter-icon="mates"] {
266
+ display: flex;
267
+ }
268
+
269
+ .icon-strip-filter-label {
270
+ max-width: 48px;
271
+ overflow: hidden;
272
+ color: var(--text-muted);
273
+ font-size: 9px;
274
+ font-weight: 700;
275
+ line-height: 11px;
276
+ letter-spacing: 0.01em;
277
+ text-overflow: ellipsis;
278
+ white-space: nowrap;
279
+ }
280
+
281
+ .icon-strip-filter-knob:hover .icon-strip-filter-face {
282
+ background: var(--bg-alt);
283
+ box-shadow:
284
+ inset 0 1px 0 color-mix(in srgb, white 48%, transparent),
285
+ 0 2px 6px rgba(var(--shadow-rgb), 0.14);
286
+ }
287
+
288
+ .icon-strip-filter-knob:focus-visible {
289
+ outline: 2px solid var(--accent);
290
+ outline-offset: -2px;
291
+ border-radius: 13px;
292
+ }
293
+
294
+ .icon-strip-projects[data-filter-mode="projects"] > [data-mate-id],
295
+ .icon-strip-projects[data-filter-mode="mates"] > .icon-strip-item[data-slug],
296
+ .icon-strip-projects[data-filter-mode="mates"] > .icon-strip-group,
297
+ .icon-strip-projects:not([data-filter-mode="all"]) > .icon-strip-peer-separator {
298
+ display: none;
299
+ }
300
+
301
+ .icon-strip-peer-separator {
302
+ width: 24px;
303
+ height: 1px;
304
+ margin: 4px 0;
305
+ flex: 0 0 1px;
306
+ background: color-mix(in srgb, var(--border) 72%, transparent);
307
+ }
308
+
309
+ @media (prefers-reduced-motion: reduce) {
310
+ .icon-strip-filter-pointer {
311
+ transition-duration: 0.01ms;
312
+ }
313
+ }
314
+
167
315
  /* --- Project icon item (48px hit-box, 38px visible bg) --- */
168
316
  .icon-strip-item {
169
317
  position: relative;
@@ -217,6 +365,29 @@
217
365
  }
218
366
 
219
367
  /* --- Socket status indicator on icon (top-left dot) --- */
368
+ .icon-strip-project-mate {
369
+ border: 0;
370
+ padding: 0;
371
+ font: inherit;
372
+ }
373
+
374
+ .icon-strip-mate-avatar {
375
+ width: 34px;
376
+ height: 34px;
377
+ border-radius: 10px;
378
+ object-fit: cover;
379
+ }
380
+
381
+ .icon-strip-project-mate:focus-visible {
382
+ outline: 2px solid var(--accent);
383
+ outline-offset: -3px;
384
+ border-radius: 12px;
385
+ }
386
+
387
+ .icon-strip-project-mate.active .icon-strip-mate-avatar {
388
+ box-shadow: 0 0 0 2px var(--accent);
389
+ }
390
+
220
391
  .icon-strip-status {
221
392
  position: absolute;
222
393
  top: 3px;
@@ -363,6 +534,37 @@
363
534
  box-shadow: 0 4px 12px rgba(var(--shadow-rgb), 0.5);
364
535
  }
365
536
 
537
+ .icon-strip-tooltip-mate {
538
+ padding: 6px 10px 6px 7px;
539
+ border: 1px solid var(--border);
540
+ border-left: 3px solid var(--accent);
541
+ border-radius: 9px;
542
+ background: var(--sidebar-bg);
543
+ }
544
+
545
+ .icon-strip-tooltip-mate-identity {
546
+ display: flex;
547
+ align-items: center;
548
+ gap: 7px;
549
+ }
550
+
551
+ .icon-strip-tooltip-mate-avatar {
552
+ width: 18px;
553
+ height: 18px;
554
+ flex: none;
555
+ border-radius: 50%;
556
+ object-fit: cover;
557
+ box-shadow: 0 0 0 1px var(--border);
558
+ }
559
+
560
+ .icon-strip-tooltip-label {
561
+ min-width: 0;
562
+ max-width: 220px;
563
+ overflow: hidden;
564
+ text-overflow: ellipsis;
565
+ white-space: nowrap;
566
+ }
567
+
366
568
  .icon-strip-tooltip.visible {
367
569
  opacity: 1;
368
570
  transform: translateX(0);
@@ -379,6 +581,10 @@
379
581
  border-left: none;
380
582
  }
381
583
 
584
+ .icon-strip-tooltip-mate::before {
585
+ border-right-color: var(--sidebar-bg);
586
+ }
587
+
382
588
  /* --- Drag-and-drop reordering --- */
383
589
  .icon-strip-item.dragging {
384
590
  opacity: 0.3;
@@ -546,6 +752,12 @@
546
752
 
547
753
  .project-ctx-item .lucide { width: 15px; height: 15px; flex-shrink: 0; }
548
754
  .project-ctx-item:hover { background: rgba(var(--overlay-rgb), 0.06); color: var(--text); }
755
+ .project-ctx-item:focus-visible {
756
+ color: var(--text);
757
+ background: rgba(var(--overlay-rgb), 0.06);
758
+ outline: 2px solid var(--accent);
759
+ outline-offset: -2px;
760
+ }
549
761
  .project-ctx-item:first-child { border-radius: 6px 6px 0 0; }
550
762
  .project-ctx-item:last-child { border-radius: 0 0 6px 6px; }
551
763
 
@@ -845,20 +1057,20 @@
845
1057
  height: 22px;
846
1058
  }
847
1059
 
848
- /* Mate section wrapper — pinned just above the user-island at the
849
- bottom of the strip. Groups the \u2318M hint pill with the users
850
- list so the hint sits directly above the mate avatars rather than
851
- floating up in the project section's flex flow. */
1060
+ /* Mate section wrapper — an in-flow footer above the user-island.
1061
+ Its rendered height is reserved after Add project, while the project
1062
+ and Mate icon region takes and scrolls within the remaining space. */
852
1063
  .icon-strip-mate-section {
853
- position: absolute;
854
- bottom: 74px; /* above user-island (58px + 8px bottom + 8px gap) */
855
- left: 50%;
856
- transform: translateX(-50%);
1064
+ flex: 0 0 auto;
1065
+ max-height: max(0px, calc(100vh - var(--account-rail-footer-height, 116px) - var(--account-rail-strip-fixed-top, 154px)));
1066
+ overflow-y: auto;
1067
+ scrollbar-width: none;
857
1068
  display: flex;
858
1069
  flex-direction: column;
859
1070
  align-items: center;
860
1071
  gap: 4px;
861
1072
  }
1073
+ .icon-strip-mate-section::-webkit-scrollbar { display: none; }
862
1074
 
863
1075
  /* --- User avatars (circle, inside the mate section) --- */
864
1076
  .icon-strip-users {
@@ -1024,29 +1236,6 @@
1024
1236
 
1025
1237
  /* DM mode: keep same position (user-island gone but layout stays) */
1026
1238
 
1027
- /* --- My avatar at bottom of icon strip (always present, behind user-island) --- */
1028
- /* Positioned to align with icon-strip center (72px / 2 = 36px) */
1029
- /* Matches user-island avatar center: left:8px + padding:10px + 18px = 36px */
1030
- .icon-strip-me {
1031
- position: absolute;
1032
- bottom: 19px; /* vertically center with user-island (bottom:8px + height:58px/2 - 16px) */
1033
- left: 36px;
1034
- transform: translateX(-50%);
1035
- display: flex;
1036
- align-items: center;
1037
- justify-content: center;
1038
- width: 32px;
1039
- height: 32px;
1040
- z-index: 1; /* below user-island z-index: 15 */
1041
- }
1042
-
1043
- .icon-strip-me-avatar {
1044
- width: 32px;
1045
- height: 32px;
1046
- border-radius: 50%;
1047
- object-fit: cover;
1048
- }
1049
-
1050
1239
  /* --- DM user picker popup --- */
1051
1240
  .dm-user-picker {
1052
1241
  position: fixed;
@@ -1547,3 +1736,31 @@ select.wt-modal-input {
1547
1736
  display: none;
1548
1737
  }
1549
1738
  }
1739
+
1740
+ /* Mate workspaces omit repository, filesystem, and terminal controls. */
1741
+ body.mate-workspace-active #session-actions {
1742
+ grid-template-columns: repeat(3, minmax(0, 1fr));
1743
+ }
1744
+ /* Use the full column for captions at the 192px sidebar minimum, keeping
1745
+ words such as Knowledge intact without enlarging the icon face. */
1746
+ body.mate-workspace-active #session-actions .palette-tile {
1747
+ padding-inline: 0;
1748
+ }
1749
+ body.mate-workspace-active #git-placard,
1750
+ body.mate-workspace-active #sidebar-panel-git,
1751
+ body.mate-workspace-active #file-browser-btn,
1752
+ body.mate-workspace-active #terminal-sidebar-btn,
1753
+ body.mate-workspace-active #project-logs-btn,
1754
+ body.mate-workspace-active #issues-btn,
1755
+ body.mate-workspace-active #terminal-toggle-btn,
1756
+ body.mate-workspace-active #shell-command-btn,
1757
+ body.mate-workspace-active #input-more-shell,
1758
+ body.mate-workspace-active #loop-interview-btn,
1759
+ body.mate-workspace-active #composer-handoff-btn {
1760
+ display: none !important;
1761
+ }
1762
+
1763
+ #knowledge-workbench-btn { display: none !important; }
1764
+ body.mate-workspace-active #knowledge-workbench-btn { display: flex !important; }
1765
+ #mate-project-debates-btn { display: none !important; }
1766
+ body.mate-workspace-active #mate-project-debates-btn { display: flex !important; }
@@ -0,0 +1,176 @@
1
+ /* Restore the Home conversation's reading measure inside Mate projects.
2
+ The existing project renderer, queue and composer still own behavior. */
3
+ body.mate-workspace-active { --content-width: 720px; }
4
+ body.mate-workspace-active #messages { padding-inline: max(0px, calc((100% - 720px) / 2)); }
5
+ body.mate-workspace-active #messages > .msg-assistant,
6
+ body.mate-workspace-active #messages > .msg-user {
7
+ width: 100%;
8
+ max-width: 720px;
9
+ box-sizing: border-box;
10
+ margin: 0 auto 12px;
11
+ padding: 4px 20px;
12
+ border-radius: 0;
13
+ }
14
+ body.mate-workspace-active #messages > .msg-assistant {
15
+ display: grid;
16
+ grid-template-columns: 34px minmax(0, 1fr);
17
+ gap: 9px;
18
+ align-items: start;
19
+ }
20
+ body.mate-workspace-active .msg-assistant > .dm-bubble-avatar {
21
+ display: block;
22
+ width: 34px;
23
+ height: 34px;
24
+ margin-top: 1px;
25
+ border-radius: 8px;
26
+ }
27
+ body.mate-workspace-active .msg-assistant > .dm-bubble-content { min-width: 0; }
28
+ body.mate-workspace-active .msg-assistant .dm-bubble-header {
29
+ display: flex;
30
+ align-items: baseline;
31
+ min-height: 19px;
32
+ gap: 7px;
33
+ margin-bottom: 2px;
34
+ }
35
+ body.mate-workspace-active .msg-assistant .dm-bubble-name { font-size: 13px; font-weight: 650; }
36
+ body.mate-workspace-active .msg-assistant .dm-bubble-time { font-size: 10px; color: var(--text-dimmer); }
37
+ body.mate-workspace-active .msg-assistant .md-content { line-height: 1.58; }
38
+ body.mate-workspace-active #messages > .msg-user:not(.msg-user-other):not(.msg-user-delegated) {
39
+ display: flex;
40
+ flex-direction: column;
41
+ align-items: flex-end;
42
+ justify-content: flex-start;
43
+ }
44
+ body.mate-workspace-active .msg-user:not(.msg-user-other):not(.msg-user-delegated) > .msg-actions {
45
+ align-self: flex-end;
46
+ margin-left: 0;
47
+ padding-top: 2px;
48
+ }
49
+ body.mate-workspace-active .msg-user:not(.msg-user-other):not(.msg-user-delegated) > .dm-bubble-avatar,
50
+ body.mate-workspace-active .msg-user:not(.msg-user-other):not(.msg-user-delegated) .dm-bubble-header { display: none; }
51
+ body.mate-workspace-active .msg-user:not(.msg-user-other):not(.msg-user-delegated) > .dm-bubble-content {
52
+ flex: 0 1 auto;
53
+ min-width: 0;
54
+ max-width: min(560px, 100%);
55
+ align-items: flex-end;
56
+ }
57
+ body.mate-workspace-active .msg-user:not(.msg-user-other):not(.msg-user-delegated) .bubble {
58
+ background: var(--bg-alt);
59
+ border: 1px solid var(--border-subtle);
60
+ border-radius: 10px;
61
+ padding: 8px 11px;
62
+ max-width: 100%;
63
+ font-size: 14px;
64
+ line-height: 1.5;
65
+ }
66
+
67
+ /* One writing row, with secondary tools and model selection underneath.
68
+ Display contents preserves the live controls and their event handlers. */
69
+ body.mate-workspace-active #input-wrapper { max-width: 720px; }
70
+ body.mate-workspace-active #input-row,
71
+ body.mate-workspace-active #input-row:focus-within {
72
+ display: grid;
73
+ grid-template-columns: minmax(0, 1fr) auto auto auto;
74
+ gap: 6px 4px;
75
+ padding: 0;
76
+ background: transparent;
77
+ box-shadow: none;
78
+ transform: none;
79
+ border-radius: 0;
80
+ }
81
+ body.mate-workspace-active #input-row::before {
82
+ content: "";
83
+ grid-area: 4 / 1 / 5 / -1;
84
+ align-self: stretch;
85
+ background: var(--bg);
86
+ border: 1px solid var(--border-subtle);
87
+ border-radius: 22px;
88
+ box-shadow: 0 2px 8px rgba(var(--shadow-rgb), .09);
89
+ pointer-events: none;
90
+ transition: border-color 150ms ease, box-shadow 150ms ease;
91
+ }
92
+ body.mate-workspace-active #input-row:focus-within::before {
93
+ border-color: color-mix(in srgb, var(--brand-indigo) 65%, var(--border-subtle));
94
+ box-shadow: 0 2px 6px rgba(var(--shadow-rgb), .12);
95
+ }
96
+ @media (prefers-reduced-motion: reduce) {
97
+ body.mate-workspace-active #input-row::before { transition: none; }
98
+ }
99
+ body.mate-workspace-active #input-bottom,
100
+ body.mate-workspace-active #input-bottom-right { display: contents; }
101
+ body.mate-workspace-active #image-preview-bar { grid-area: 2 / 1 / 3 / -1; }
102
+ body.mate-workspace-active #suggestion-chips { grid-area: 3 / 1 / 4 / -1; }
103
+ body.mate-workspace-active #input-textarea-wrap { grid-area: 4 / 1 / 5 / 2; align-self: center; }
104
+ body.mate-workspace-active #input,
105
+ body.mate-workspace-active #ghost-suggestion {
106
+ display: block;
107
+ font-size: 16px;
108
+ line-height: 1.45;
109
+ padding: 12px 0 12px 15px;
110
+ }
111
+ body.mate-workspace-active #ghost-suggestion.hidden { display: none; }
112
+ body.mate-workspace-active #send-btn,
113
+ body.mate-workspace-active #stt-btn,
114
+ body.mate-workspace-active #input-bottom-right > #generation-stop {
115
+ position: relative;
116
+ align-self: end;
117
+ margin: 7px 0;
118
+ width: 34px;
119
+ height: 34px;
120
+ border-radius: 50%;
121
+ }
122
+ body.mate-workspace-active #send-btn { grid-area: 4 / 4 / 5 / 5; margin-right: 8px; }
123
+ body.mate-workspace-active #input-bottom-right > .stt-controls { grid-area: 4 / 3 / 5 / 4; position: relative; align-self: end; }
124
+ body.mate-workspace-active #input-row .stt-progress { grid-area: 6 / 1 / 7 / -1; }
125
+ body.mate-workspace-active #input-bottom-right > #generation-stop { grid-area: 4 / 2 / 5 / 3; }
126
+ body.mate-workspace-active #attach-wrap { grid-area: 5 / 1 / 6 / 3; min-width: 0; flex-wrap: wrap; }
127
+ body.mate-workspace-active #config-chip-wrap { grid-area: 5 / 3 / 6 / 5; align-self: start; justify-self: end; }
128
+ body.mate-workspace-active #active-vendor-indicator,
129
+ body.mate-workspace-active #attach-wrap .composer-tool-group-collaboration,
130
+ body.mate-workspace-active #attach-wrap .composer-tool-group-execution { display: none; }
131
+ @media (max-width: 768px) {
132
+ /* The rail is absent here; its floating footer must not cover writing tools. */
133
+ body.mate-workspace-active #user-island { display: none; }
134
+ body.mate-workspace-active #messages > .msg-assistant,
135
+ body.mate-workspace-active #messages > .msg-user { padding-inline: 12px; }
136
+ body.mate-workspace-active #input-area { padding-inline: 12px; }
137
+ }
138
+
139
+ body.mate-workspace-active #context-mini { grid-area: 1 / 1 / 2 / -1; }
140
+
141
+ /* Keep the restored conversational action rows aligned with Mate replies. */
142
+ body.mate-workspace-active #messages > .mate-tool-group,
143
+ body.mate-workspace-active #messages > .mate-thinking,
144
+ body.mate-workspace-active #messages > .mate-permission,
145
+ body.mate-workspace-active #messages > .mate-ask-user {
146
+ box-sizing: border-box;
147
+ max-width: 720px;
148
+ margin: 0 auto 12px;
149
+ padding: 4px 20px;
150
+ gap: 9px;
151
+ }
152
+ body.mate-workspace-active .mate-tool-group > .dm-bubble-avatar,
153
+ body.mate-workspace-active .mate-thinking > .dm-bubble-avatar,
154
+ body.mate-workspace-active .mate-permission > .dm-bubble-avatar,
155
+ body.mate-workspace-active .mate-ask-user > .dm-bubble-avatar {
156
+ width: 34px;
157
+ height: 34px;
158
+ border-radius: 8px;
159
+ }
160
+ @media (max-width: 768px) {
161
+ body.mate-workspace-active #messages > .mate-tool-group,
162
+ body.mate-workspace-active #messages > .mate-thinking,
163
+ body.mate-workspace-active #messages > .mate-permission,
164
+ body.mate-workspace-active #messages > .mate-ask-user { padding-inline: 12px; }
165
+ }
166
+
167
+ /* Action summaries belong to the reply's text lane, without repeated identity. */
168
+ body.mate-workspace-active .mate-tool-group > .dm-bubble-avatar { display: none; }
169
+ body.mate-workspace-active #messages > .mate-tool-group {
170
+ padding: 2px 20px 2px 63px;
171
+ margin-bottom: 8px;
172
+ }
173
+ body.mate-workspace-active .mate-tool-group > .dm-bubble-content { padding-top: 0; }
174
+ @media (max-width: 768px) {
175
+ body.mate-workspace-active #messages > .mate-tool-group { padding-inline: 55px 12px; }
176
+ }
@@ -0,0 +1,118 @@
1
+ #mate-knowledge-workbench { position: relative; width: 68%; max-width: 1120px; min-width: 620px; height: calc(100% - 16px); margin: 8px; display: flex; flex-direction: column; flex: 0 0 auto; overflow: hidden; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; font-family: var(--font-sans); }
2
+ #mate-knowledge-workbench.hidden { display: none; }
3
+ #mate-knowledge-workbench [hidden] { display: none !important; }
4
+ #mate-knowledge-workbench.knowledge-wide { width: 82%; max-width: 1440px; }
5
+ #mate-knowledge-workbench.panel-fullscreen { width: 100%; max-width: none; min-width: 0; height: 100%; margin: 0; border: 0; border-radius: 0; }
6
+ .knowledge-topbar { height: 48px; display: flex; align-items: center; gap: 7px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--border-subtle); flex: 0 0 auto; }
7
+ .knowledge-title { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
8
+ .knowledge-title .lucide { width: 15px; color: var(--accent); }
9
+ .knowledge-subtitle { flex: 1; color: var(--text-dimmer); font-size: 11px; }
10
+ .knowledge-topbar > button, .knowledge-document-toolbar > button { height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; color: var(--text-secondary); background: var(--bg-alt); border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 11px; cursor: pointer; }
11
+ .knowledge-topbar > button { width: 30px; padding: 0; }
12
+ .knowledge-topbar .lucide, .knowledge-document-toolbar .lucide { width: 14px; }
13
+ .knowledge-topbar > button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
14
+ .knowledge-status { min-height: 0; padding: 0 14px; color: var(--danger); font-size: 11px; line-height: 0; transition: min-height .16s ease, padding .16s ease, line-height .16s ease; }
15
+ .knowledge-status:not(:empty) { min-height: 30px; padding-block: 7px; line-height: 16px; border-bottom: 1px solid color-mix(in srgb, var(--danger) 25%, var(--border)); }
16
+ .knowledge-status button { margin-left: 5px; padding: 0; color: inherit; background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer; }
17
+ .knowledge-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 178px minmax(0, 1fr) 170px; }
18
+ .knowledge-explorer, .knowledge-details { min-width: 0; background: color-mix(in srgb, var(--bg-alt) 74%, var(--bg)); }
19
+ .knowledge-explorer { display: flex; flex-direction: column; border-right: 1px solid var(--border-subtle); }
20
+ .knowledge-search { height: 32px; margin: 8px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text-dimmer); }
21
+ .knowledge-search .lucide { width: 13px; }
22
+ .knowledge-search input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 11px; }
23
+ .knowledge-explorer-heading { height: 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 11px; color: var(--text-dimmer); font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
24
+ .knowledge-explorer-list { flex: 1; min-height: 0; overflow: auto; padding: 2px 6px 12px; }
25
+ .knowledge-file-row { width: 100%; height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 7px; color: var(--text-secondary); background: transparent; border: 0; border-radius: 6px; text-align: left; cursor: pointer; }
26
+ .knowledge-folder-row { height: 24px; display: flex; align-items: center; gap: 6px; padding: 4px 7px 0; color: var(--text-dimmer); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
27
+ .knowledge-folder-row .lucide { width: 11px; }
28
+ .knowledge-file-row { padding-left: calc(7px + var(--knowledge-depth, 0) * 9px); }
29
+ .knowledge-file-row:hover { color: var(--text); background: var(--bg-hover); }
30
+ .knowledge-file-row[aria-current="true"] { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }
31
+ .knowledge-file-row .lucide { width: 14px; flex: 0 0 auto; }
32
+ .knowledge-file-row span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
33
+ .knowledge-file-row span em { display: block; overflow: hidden; color: var(--text-dimmer); font-size: 9px; font-style: normal; text-overflow: ellipsis; }
34
+ .knowledge-file-row:has(em) { height: 42px; }
35
+ .knowledge-file-row small { color: var(--text-dimmer); font-size: 9px; }
36
+ .knowledge-search-more { width: calc(100% - 14px); margin: 5px 7px; padding: 6px; color: var(--text-secondary); background: var(--bg-hover); border: 0; border-radius: 6px; font-size: 10px; cursor: pointer; }
37
+ .knowledge-search-more:disabled { cursor: default; opacity: .65; }
38
+ .knowledge-empty { margin: 18px 8px; color: var(--text-dimmer); font-size: 11px; line-height: 1.55; }
39
+ .knowledge-document { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
40
+ .knowledge-tabs { height: 34px; display: flex; align-items: end; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--border-subtle); background: var(--bg-alt); }
41
+ .knowledge-tab-shell { height: 30px; max-width: 190px; display: flex; align-items: center; border-right: 1px solid var(--border-subtle); background: transparent; }
42
+ .knowledge-tab-shell:has(.knowledge-tab[aria-selected="true"]) { background: var(--bg); box-shadow: inset 0 2px 0 var(--accent); }
43
+ .knowledge-tab { min-width: 0; height: 30px; flex: 1; display: flex; align-items: center; padding: 0 4px 0 10px; color: var(--text-dimmer); background: transparent; border: 0; font: inherit; font-size: 11px; cursor: pointer; }
44
+ .knowledge-tab[aria-selected="true"] { color: var(--text); }
45
+ .knowledge-tab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
46
+ .knowledge-tab-close { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; margin-right: 4px; padding: 0; color: var(--text-dimmer); background: transparent; border: 0; border-radius: 4px; font: inherit; font-size: 15px; cursor: pointer; }
47
+ .knowledge-tab-close:hover { color: var(--text); background: var(--bg-hover); }
48
+ .knowledge-document-toolbar { min-height: 42px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 5px 8px; border-bottom: 1px solid var(--border-subtle); }
49
+ .knowledge-preview-name { min-width: 0; flex: 1; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
50
+ .knowledge-save-state { margin-right: auto; color: var(--text-dimmer); font-size: 10px; }
51
+ .knowledge-name { min-width: 110px; max-width: 260px; flex: 1; display: flex; align-items: center; border: 1px solid transparent; border-radius: 6px; }
52
+ .knowledge-name:focus-within { border-color: var(--accent); }
53
+ .knowledge-name input { min-width: 0; width: 100%; height: 28px; padding: 0 2px 0 7px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 12px; }
54
+ .knowledge-name span { padding-right: 7px; color: var(--text-dimmer); font-size: 11px; }
55
+ .knowledge-view-toggle { display: flex; padding: 2px; background: var(--bg-alt); border-radius: 7px; }
56
+ .knowledge-view-toggle button { height: 24px; padding: 0 7px; color: var(--text-dimmer); background: transparent; border: 0; border-radius: 5px; font: inherit; font-size: 10px; cursor: pointer; }
57
+ .knowledge-view-toggle button[aria-pressed="true"] { color: var(--text); background: var(--bg); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .12); }
58
+ .knowledge-document-toolbar > button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
59
+ .knowledge-document-toolbar > button.danger { color: var(--danger); background: transparent; }
60
+ .knowledge-document-toolbar button:disabled { opacity: .45; cursor: default; }
61
+ .knowledge-readonly { color: var(--text-dimmer); font-size: 10px; }
62
+ .knowledge-inline-error { flex-basis: 100%; color: var(--danger); font-size: 10px; }
63
+ .knowledge-inline-error button { padding: 0; color: inherit; background: none; border: 0; text-decoration: underline; cursor: pointer; }
64
+ .knowledge-document-body { flex: 1; min-height: 0; position: relative; }
65
+ .knowledge-editor-split { width: 100%; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
66
+ .knowledge-editor-host, .knowledge-live-preview { min-width: 0; min-height: 0; }
67
+ .knowledge-editor-host { border-right: 1px solid var(--border-subtle); overflow: hidden; }
68
+ .knowledge-editor-host .CodeMirror { height: 100%; color: var(--text); background: var(--bg); font-family: var(--font-mono); font-size: 13px; line-height: 1.7; }
69
+ .knowledge-editor-host .CodeMirror-scroll { padding: 24px clamp(18px, 4vw, 64px) 70px; box-sizing: border-box; }
70
+ .knowledge-editor-host .CodeMirror-cursor { border-left-color: var(--text); }
71
+ .knowledge-editor-host .CodeMirror-selected { background: color-mix(in srgb, var(--accent) 22%, transparent); }
72
+ .knowledge-editor-host .cm-header { color: var(--text); font-weight: 700; }.knowledge-editor-host .cm-link { color: var(--accent); }.knowledge-editor-host .cm-comment { color: var(--text-dimmer); }
73
+ .knowledge-live-preview { overflow: auto; padding: 24px clamp(18px, 4vw, 64px) 70px; font-size: 14px; line-height: 1.75; }
74
+ .knowledge-editor-fallback { box-sizing: border-box; width: 100%; height: 100%; resize: none; padding: 24px; border: 0; background: var(--bg); color: var(--text); font: 13px/1.7 var(--font-mono); }
75
+ .knowledge-editor { box-sizing: border-box; width: 100%; height: 100%; resize: none; padding: 30px clamp(24px, 6vw, 76px); color: var(--text); background: var(--bg); border: 0; outline: 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; tab-size: 2; }
76
+ .knowledge-preview { box-sizing: border-box; height: 100%; overflow: auto; padding: 30px clamp(24px, 6vw, 76px) 80px; font-size: 14px; line-height: 1.75; }
77
+ .knowledge-inline-link { display: inline; padding: 0; color: var(--accent); background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer; }
78
+ .knowledge-welcome { max-width: 340px; margin: 18vh auto 0; padding: 0 24px; color: var(--text-dimmer); text-align: center; }
79
+ .knowledge-welcome .lucide { width: 28px; }
80
+ .knowledge-welcome h2 { margin: 12px 0 6px; color: var(--text); font-family: var(--font-display); font-size: 22px; }
81
+ .knowledge-welcome p { font-size: 12px; line-height: 1.6; }
82
+ .knowledge-details { overflow: auto; border-left: 1px solid var(--border-subtle); }
83
+ .knowledge-detail-section { border-bottom: 1px solid var(--border-subtle); }
84
+ .knowledge-detail-heading { width: 100%; height: 32px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; color: var(--text-secondary); background: transparent; border: 0; font: inherit; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
85
+ .knowledge-detail-heading .lucide { width: 12px; transition: transform .16s ease; }
86
+ .knowledge-detail-heading[aria-expanded="false"] .lucide { transform: rotate(-90deg); }
87
+ [data-detail-content] { padding: 3px 7px 10px; }
88
+ [data-detail-content] > p { margin: 8px 4px; color: var(--text-dimmer); font-size: 10px; line-height: 1.5; }
89
+ [data-detail-content] > small { display: block; margin: 8px 4px 4px; color: var(--text-dimmer); font-size: 8px; letter-spacing: .06em; }
90
+ .knowledge-outline-item, .knowledge-link-item { width: 100%; min-height: 25px; display: flex; align-items: center; gap: 5px; padding: 3px 5px; overflow: hidden; color: var(--text-secondary); background: transparent; border: 0; border-radius: 5px; font: inherit; font-size: 10px; text-align: left; }
91
+ .knowledge-outline-item.depth-2 { padding-left: 13px; }.knowledge-outline-item.depth-3 { padding-left: 21px; }.knowledge-outline-item.depth-4 { padding-left: 29px; }
92
+ .knowledge-link-item .lucide { width: 11px; flex: 0 0 auto; }.knowledge-link-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
93
+ .knowledge-link-item.unresolved { color: var(--text-dimmer); }.knowledge-backlink { align-items: flex-start; height: auto; }.knowledge-backlink span { white-space: normal; }.knowledge-backlink b, .knowledge-backlink em { display: block; }.knowledge-backlink em { margin-top: 2px; color: var(--text-dimmer); font-size: 9px; font-style: normal; line-height: 1.35; }
94
+ .knowledge-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px 4px 9px; }.knowledge-tags span { padding: 2px 5px; border: 1px solid var(--border-subtle); border-radius: 5px; color: var(--text-secondary); font-size: 9px; }
95
+ .knowledge-properties { display: grid; grid-template-columns: minmax(44px, auto) minmax(0, 1fr); gap: 4px 7px; margin: 3px 4px 9px; font-size: 9px; }.knowledge-properties dt { color: var(--text-dimmer); }.knowledge-properties dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }.knowledge-property-error { color: var(--danger) !important; }
96
+ #mate-knowledge-workbench.panel-fullscreen .knowledge-layout { grid-template-columns: minmax(0, 1fr); }
97
+ #mate-knowledge-workbench.panel-fullscreen .knowledge-explorer, #mate-knowledge-workbench.panel-fullscreen .knowledge-details, #mate-knowledge-workbench.panel-fullscreen .knowledge-tabs { display: none; }
98
+ button.knowledge-link-item { cursor: pointer; }.knowledge-outline-item:hover, button.knowledge-link-item:hover { color: var(--text); background: var(--bg-hover); }
99
+ .knowledge-delete-dialog { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.38); }
100
+ .knowledge-delete-dialog.hidden { display: none; }.knowledge-delete-dialog > div { width: min(360px, 100%); padding: 22px; box-sizing: border-box; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.24); }
101
+ .knowledge-delete-dialog h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 18px; }.knowledge-delete-dialog p { color: var(--text-secondary); font-size: 12px; line-height: 1.55; }.knowledge-delete-dialog > div > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }.knowledge-delete-dialog button { height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-alt); color: var(--text); }.knowledge-delete-dialog button.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
102
+ #mate-knowledge-workbench :focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
103
+ @media (max-width: 1023px) { #mate-knowledge-workbench, #mate-knowledge-workbench.knowledge-wide { position: fixed; inset: 0; z-index: 300; width: 100%; max-width: none; min-width: 0; height: 100%; margin: 0; border: 0; border-radius: 0; padding-block: var(--safe-top, 0) var(--safe-bottom, 0); box-sizing: border-box; }.knowledge-topbar [data-knowledge-wide], .knowledge-topbar [data-knowledge-full] { display: none; }.knowledge-layout { grid-template-columns: 148px minmax(0, 1fr); }.knowledge-details { display: none; }.knowledge-subtitle { display: none; } }
104
+ @media (max-width: 600px) { .knowledge-layout { grid-template-columns: 112px minmax(0, 1fr); }.knowledge-search { margin: 6px; }.knowledge-search .lucide { display: none; }.knowledge-file-row { padding-inline: 5px; }.knowledge-file-row .lucide, .knowledge-file-row small { display: none; }.knowledge-document-toolbar { flex-wrap: wrap; }.knowledge-name { flex-basis: calc(100% - 110px); }.knowledge-editor, .knowledge-preview { padding: 22px 16px 70px; }.knowledge-topbar { padding-left: 10px; }.knowledge-editor-split { grid-template-columns: minmax(0, 1fr); }.knowledge-live-preview { display: none; } }
105
+ @media (prefers-reduced-motion: reduce) { #mate-knowledge-workbench * { transition: none !important; animation: none !important; } }
106
+
107
+ .knowledge-create-menu { position: absolute; z-index: 5; top: 42px; right: 104px; width: 190px; padding: 5px; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 10px 28px rgba(0,0,0,.2); }
108
+ .knowledge-create-menu button { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 6px 8px; color: var(--text); background: transparent; border: 0; border-radius: 6px; text-align: left; cursor: pointer; }
109
+ .knowledge-create-menu button:hover { background: var(--bg-hover); }.knowledge-create-menu .lucide { width: 15px; }.knowledge-create-menu span { display: grid; gap: 1px; font-size: 11px; }.knowledge-create-menu small { color: var(--text-dimmer); font-size: 9px; }
110
+ .knowledge-db-table-wrap { height: 100%; overflow: auto; }.knowledge-db-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11px; }.knowledge-db-table th { position: sticky; top: 0; z-index: 1; height: 30px; padding: 0 9px; color: var(--text-dimmer); background: var(--bg-alt); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border-subtle); font-size: 9px; text-align: left; text-transform: uppercase; letter-spacing: .04em; }.knowledge-db-table td { min-width: 110px; max-width: 260px; height: 31px; padding: 0 9px; overflow: hidden; border-bottom: 1px solid var(--border-subtle); border-right: 1px solid var(--border-subtle); text-overflow: ellipsis; white-space: nowrap; }.knowledge-db-table tbody tr { cursor: pointer; }.knowledge-db-table tbody tr:hover td, .knowledge-db-table tbody tr:focus td { background: var(--bg-hover); }.knowledge-db-empty { color: var(--text-dimmer); }.knowledge-db-pill { display: inline-block; margin-right: 3px; padding: 1px 5px; border: 1px solid var(--border-subtle); border-radius: 8px; font-size: 9px; }
111
+ .knowledge-db-reference { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 0; overflow: hidden; color: var(--accent); background: none; border: 0; font: inherit; text-overflow: ellipsis; cursor: pointer; }.knowledge-db-reference .lucide { width: 11px; flex: 0 0 auto; }
112
+ .knowledge-db-view-select { height: 28px; max-width: 150px; padding: 0 24px 0 8px; color: var(--text); background: var(--bg-alt); border: 1px solid var(--border); border-radius: 7px; font: 10px var(--font-sans); }
113
+ .knowledge-db-record { max-width: 720px; margin: 0 auto; padding: 28px clamp(20px,5vw,64px) 70px; }.knowledge-db-record > button { display: inline-flex; align-items: center; gap: 5px; padding: 0; color: var(--text-secondary); background: none; border: 0; font: inherit; font-size: 11px; cursor: pointer; }.knowledge-db-record > button .lucide { width: 13px; }.knowledge-db-record h2 { margin: 24px 0; font: 600 24px var(--font-display); }.knowledge-db-record dl { display: grid; grid-template-columns: minmax(100px,160px) minmax(0,1fr); gap: 0; border-top: 1px solid var(--border-subtle); }.knowledge-db-record dt,.knowledge-db-record dd { min-height: 34px; box-sizing: border-box; margin: 0; padding: 8px; border-bottom: 1px solid var(--border-subtle); font-size: 11px; }.knowledge-db-record dt { color: var(--text-dimmer); }.knowledge-db-attribution { margin-top: 18px; color: var(--text-dimmer); font-size: 9px; }
114
+ .knowledge-db-form { width: min(680px,calc(100% - 40px)); margin: 0 auto; padding: 30px 0 80px; }.knowledge-db-form h2 { margin: 0 0 22px; font: 600 23px var(--font-display); }.knowledge-db-form > p { color: var(--text-dimmer); font-size: 11px; line-height: 1.55; }.knowledge-db-form > label { display: grid; gap: 6px; margin: 0 0 15px; color: var(--text-secondary); font-size: 10px; font-weight: 600; }.knowledge-db-form input:not([type=checkbox]),.knowledge-db-form select { width: 100%; min-height: 36px; box-sizing: border-box; padding: 7px 9px; color: var(--text); background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; font: 12px var(--font-sans); }.knowledge-db-form select[multiple] { min-height: 90px; }.knowledge-db-schema fieldset { display: grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:end; gap: 10px; margin: 0 0 10px; padding: 10px; border: 1px solid var(--border-subtle); border-radius: 8px; }.knowledge-db-schema legend { padding: 0 5px; color: var(--text-dimmer); font-size: 9px; text-transform: uppercase; }.knowledge-db-schema fieldset > label:first-of-type { display:grid; gap:4px; font-size:9px; }.knowledge-db-check { display:flex; align-items:center; gap:4px; min-height:36px; font-size:10px; }
115
+ .knowledge-db-dialog { position:absolute; inset:0; z-index:7; display:grid; place-items:center; background:rgba(0,0,0,.38); }.knowledge-db-dialog > div { width:min(360px,calc(100% - 36px)); padding:22px; box-sizing:border-box; background:var(--bg); border:1px solid var(--border); border-radius:10px; box-shadow:0 14px 40px rgba(0,0,0,.24); }.knowledge-db-dialog h2 { margin:0 0 8px; font:600 18px var(--font-display); }.knowledge-db-dialog p { color:var(--text-secondary); font-size:12px; }.knowledge-db-dialog > div > div { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }.knowledge-db-dialog button { height:32px; padding:0 10px; color:var(--text); background:var(--bg-alt); border:1px solid var(--border); border-radius:7px; }.knowledge-db-dialog button.danger { color:#fff; background:var(--danger); border-color:var(--danger); }
116
+ .knowledge-db-form fieldset { margin:0 0 15px; padding:10px; border:1px solid var(--border-subtle); border-radius:8px; }.knowledge-db-form fieldset legend { padding:0 5px; color:var(--text-dimmer); font-size:9px; text-transform:uppercase; }.knowledge-db-schema fieldset { grid-template-columns:minmax(0,1fr) minmax(100px,150px) auto auto; }.knowledge-db-schema fieldset > label:not(.knowledge-db-check) { display:grid; gap:4px; color:var(--text-secondary); font-size:9px; }
117
+ .knowledge-db-schema .knowledge-db-options { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; grid-column:1 / -1; align-items:stretch; }.knowledge-db-option { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; }.knowledge-db-option .knowledge-db-check { margin:0; }
118
+ @media (max-width:600px) { .knowledge-db-table td { min-width:92px; }.knowledge-db-form { width:calc(100% - 28px); }.knowledge-db-schema fieldset { grid-template-columns:minmax(0,1fr); }.knowledge-db-record dl { grid-template-columns:90px minmax(0,1fr); } }