clay-server 2.14.0-beta.9 → 2.14.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.
@@ -795,7 +795,7 @@
795
795
  height: 16px;
796
796
  }
797
797
 
798
- /* Knowledge Panel (full screen like sticky notes) */
798
+ /* Knowledge editor/preview panel (overlays main content) */
799
799
  #mate-knowledge-container {
800
800
  position: absolute;
801
801
  inset: 0;
@@ -809,46 +809,17 @@
809
809
  display: none;
810
810
  }
811
811
 
812
- .mate-knowledge-header {
812
+ /* Header bar (matches title-bar-content height/style) */
813
+ .mate-knowledge-header-bar {
813
814
  display: flex;
814
815
  align-items: center;
816
+ gap: 8px;
815
817
  height: 48px;
816
- padding: 0 16px;
817
- flex-shrink: 0;
818
+ padding: 0 8px 0 16px;
818
819
  border-bottom: 1px solid var(--border-subtle);
819
- }
820
- .mate-knowledge-title-wrap {
821
- display: flex;
822
- align-items: baseline;
823
- gap: 6px;
824
- flex: 1;
825
- }
826
- .mate-knowledge-title-wrap .lucide {
827
- width: 15px;
828
- height: 15px;
829
- color: var(--accent);
830
820
  flex-shrink: 0;
831
- align-self: center;
832
- }
833
- .mate-knowledge-title-wrap h2 {
834
- font-size: 15px;
835
- font-weight: 700;
836
- color: var(--text);
837
- margin: 0;
838
- }
839
- .mate-knowledge-count {
840
- font-size: 11px;
841
- font-weight: 600;
842
- color: var(--text-dimmer);
843
- margin-left: 2px;
844
- }
845
- .mate-knowledge-header-actions {
846
- display: flex;
847
- align-items: center;
848
- gap: 2px;
849
- margin-left: auto;
850
821
  }
851
- .mate-knowledge-header-actions button {
822
+ .mate-knowledge-header-btn {
852
823
  display: flex;
853
824
  align-items: center;
854
825
  justify-content: center;
@@ -860,180 +831,328 @@
860
831
  color: var(--text-muted);
861
832
  cursor: pointer;
862
833
  transition: background 0.12s, color 0.12s;
834
+ flex-shrink: 0;
863
835
  }
864
- .mate-knowledge-header-actions button:hover {
836
+ .mate-knowledge-header-btn:hover {
865
837
  background: rgba(var(--overlay-rgb), 0.08);
866
838
  color: var(--text);
867
839
  }
868
- .mate-knowledge-header-actions button .lucide {
840
+ .mate-knowledge-header-btn:disabled {
841
+ opacity: 0.3;
842
+ cursor: default;
843
+ }
844
+ .mate-knowledge-header-btn:disabled:hover {
845
+ background: none;
846
+ color: var(--text-muted);
847
+ }
848
+ .mate-knowledge-header-btn .lucide {
869
849
  width: 16px;
870
850
  height: 16px;
871
851
  }
872
-
873
- .mate-knowledge-grid {
874
- flex: 1;
875
- overflow-y: auto;
876
- padding: 20px;
877
- display: grid;
878
- grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
879
- gap: 12px;
880
- align-content: start;
852
+ .mate-knowledge-header-icon {
853
+ width: 16px;
854
+ height: 16px;
855
+ color: var(--text-muted);
856
+ flex-shrink: 0;
857
+ }
858
+ #mate-knowledge-editor-delete:hover {
859
+ color: var(--error, #ff5555);
881
860
  }
882
861
 
883
- .mate-knowledge-tile {
884
- background: var(--bg-alt);
885
- border: 1px solid var(--border-subtle);
886
- border-radius: 10px;
887
- padding: 14px 16px;
888
- cursor: pointer;
889
- transition: border-color 0.15s, box-shadow 0.15s;
862
+ /* 2-panel layout: editor | preview */
863
+ .mate-knowledge-body {
864
+ flex: 1;
890
865
  display: flex;
891
- flex-direction: column;
892
- gap: 8px;
893
- min-height: 100px;
894
- max-height: 180px;
866
+ flex-direction: row;
867
+ min-height: 0;
895
868
  overflow: hidden;
896
869
  }
897
- .mate-knowledge-tile:hover {
898
- border-color: var(--border);
899
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
900
- }
901
870
 
902
- .mate-knowledge-tile-add {
903
- background: none;
904
- border: 2px dashed var(--border);
905
- align-items: center;
906
- justify-content: center;
907
- text-align: center;
908
- gap: 10px;
909
- color: var(--text-muted);
910
- transition: border-color 0.15s, color 0.15s;
871
+ /* Sidebar file list */
872
+ #mate-sidebar-knowledge.hidden,
873
+ #mate-sidebar-conversations.hidden {
874
+ display: none;
911
875
  }
912
- .mate-knowledge-tile-add:hover {
913
- border-color: var(--accent);
914
- color: var(--accent);
915
- background: none;
916
- box-shadow: none;
876
+ .mate-knowledge-file-list {
877
+ flex: 1;
878
+ overflow-y: auto;
879
+ padding: 4px 0;
917
880
  }
918
- .mate-knowledge-add-icon {
881
+ .mate-knowledge-file-item {
919
882
  display: flex;
920
883
  align-items: center;
921
- justify-content: center;
884
+ gap: 6px;
885
+ padding: 6px 12px;
886
+ cursor: pointer;
887
+ font-size: 13px;
888
+ color: var(--text-secondary);
889
+ transition: background 0.1s;
922
890
  }
923
- .mate-knowledge-add-icon svg {
924
- width: 24px;
925
- height: 24px;
891
+ .mate-knowledge-file-item:hover {
892
+ background: rgba(var(--overlay-rgb), 0.06);
926
893
  }
927
- .mate-knowledge-add-label {
928
- font-size: 13px;
894
+ .mate-knowledge-file-item.active {
895
+ background: rgba(var(--overlay-rgb), 0.1);
896
+ color: var(--text);
929
897
  font-weight: 600;
930
898
  }
931
- .mate-knowledge-tile-title {
932
- font-size: 13px;
933
- font-weight: 700;
934
- color: var(--text);
935
- white-space: nowrap;
899
+ .mate-knowledge-file-icon {
900
+ display: flex;
901
+ flex-shrink: 0;
902
+ }
903
+ .mate-knowledge-file-icon .lucide {
904
+ width: 14px;
905
+ height: 14px;
906
+ }
907
+ .mate-knowledge-file-name {
936
908
  overflow: hidden;
937
909
  text-overflow: ellipsis;
910
+ white-space: nowrap;
938
911
  }
939
- .mate-knowledge-tile-preview {
912
+ .mate-knowledge-file-badge {
913
+ font-size: 9px;
914
+ font-weight: 600;
915
+ text-transform: uppercase;
916
+ letter-spacing: 0.5px;
917
+ padding: 1px 5px;
918
+ border-radius: 3px;
919
+ background: var(--bg-alt, #2a2a3a);
920
+ color: var(--text-dimmer);
921
+ margin-left: auto;
922
+ flex-shrink: 0;
923
+ }
924
+
925
+ /* JSONL table view */
926
+ .mate-knowledge-jsonl-table {
927
+ width: 100%;
928
+ border-collapse: collapse;
940
929
  font-size: 12px;
941
- color: var(--text-muted);
942
930
  line-height: 1.5;
931
+ }
932
+ .mate-knowledge-jsonl-table th {
933
+ text-align: left;
934
+ font-weight: 600;
935
+ font-size: 10px;
936
+ text-transform: uppercase;
937
+ letter-spacing: 0.5px;
938
+ color: var(--text-dimmer);
939
+ padding: 6px 10px;
940
+ border-bottom: 1px solid var(--border);
941
+ position: sticky;
942
+ top: 0;
943
+ background: var(--bg-panel, var(--bg));
944
+ }
945
+ .mate-knowledge-jsonl-table td {
946
+ padding: 5px 10px;
947
+ border-bottom: 1px solid var(--border-subtle, rgba(128,128,128,0.1));
948
+ color: var(--text);
949
+ max-width: 260px;
943
950
  overflow: hidden;
944
- flex: 1;
945
- display: -webkit-box;
946
- -webkit-line-clamp: 5;
947
- -webkit-box-orient: vertical;
951
+ text-overflow: ellipsis;
952
+ white-space: nowrap;
953
+ }
954
+ .mate-knowledge-jsonl-table tbody tr:hover td {
955
+ background: var(--bg-hover, rgba(128,128,128,0.06));
948
956
  }
949
957
 
950
958
  .mate-knowledge-empty {
951
- grid-column: 1 / -1;
959
+ padding: 20px 12px;
952
960
  text-align: center;
953
- padding: 40px 20px;
961
+ font-size: 12px;
954
962
  color: var(--text-dimmer);
963
+ }
964
+
965
+ /* Active file name in editor toolbar */
966
+ .mate-knowledge-active-name {
955
967
  font-size: 14px;
968
+ font-weight: 600;
969
+ color: var(--text);
970
+ overflow: hidden;
971
+ text-overflow: ellipsis;
972
+ white-space: nowrap;
973
+ }
974
+ .mate-knowledge-active-name.hidden {
975
+ display: none;
956
976
  }
957
977
 
958
- /* Knowledge Editor Modal */
959
- #mate-knowledge-editor {
960
- position: fixed;
961
- inset: 0;
962
- z-index: 10000;
978
+ /* Name input group for new files */
979
+ .mate-knowledge-name-group {
963
980
  display: flex;
964
981
  align-items: center;
965
- justify-content: center;
982
+ gap: 0;
983
+ border: 1px solid var(--border-subtle);
984
+ border-radius: 6px;
985
+ padding: 4px 10px;
986
+ max-width: 280px;
987
+ }
988
+ .mate-knowledge-name-group:focus-within {
989
+ border-color: var(--accent);
966
990
  }
967
- #mate-knowledge-editor.hidden {
991
+ .mate-knowledge-name-group.hidden {
968
992
  display: none;
969
993
  }
970
- .mate-knowledge-editor-backdrop {
971
- position: absolute;
972
- inset: 0;
973
- background: rgba(0,0,0,0.5);
994
+ #mate-knowledge-editor-name {
995
+ background: none;
996
+ border: none;
997
+ padding: 0;
998
+ font-size: 14px;
999
+ font-weight: 600;
1000
+ font-family: inherit;
1001
+ color: var(--text);
1002
+ outline: none;
1003
+ min-width: 0;
1004
+ width: 160px;
974
1005
  }
975
- .mate-knowledge-editor-card {
976
- position: relative;
977
- width: 720px;
978
- max-width: 90vw;
979
- max-height: 85vh;
980
- background: var(--bg-alt);
981
- border: 1px solid var(--border);
982
- border-radius: 14px;
983
- box-shadow: 0 8px 30px rgba(0,0,0,0.35);
984
- display: flex;
985
- flex-direction: column;
986
- overflow: hidden;
1006
+ #mate-knowledge-editor-name::placeholder {
1007
+ color: var(--text-dimmer);
1008
+ font-weight: 500;
987
1009
  }
988
- .mate-knowledge-editor-header {
1010
+ .mate-knowledge-editor-ext {
1011
+ font-size: 13px;
1012
+ font-weight: 500;
1013
+ color: var(--text-dimmer);
1014
+ user-select: none;
1015
+ flex-shrink: 0;
1016
+ }
1017
+
1018
+ .mate-knowledge-toolbar-spacer {
1019
+ flex: 1;
1020
+ }
1021
+
1022
+ /* Editor pane (left) */
1023
+ .mate-knowledge-editor-pane {
1024
+ flex: 1;
989
1025
  display: flex;
990
- align-items: center;
991
- gap: 8px;
992
- padding: 12px 16px;
993
- border-bottom: 1px solid var(--border-subtle);
1026
+ flex-direction: column;
1027
+ min-width: 0;
1028
+ border-right: 1px solid var(--border-subtle);
994
1029
  }
995
- .mate-knowledge-editor-header input {
1030
+
1031
+ /* Highlight overlay container */
1032
+ .mate-editor-highlight-wrap {
996
1033
  flex: 1;
1034
+ position: relative;
1035
+ min-height: 0;
1036
+ overflow: hidden;
1037
+ }
1038
+ .mate-editor-highlight-pre {
1039
+ position: absolute;
1040
+ inset: 0;
1041
+ margin: 0;
1042
+ padding: 12px 14px;
1043
+ font-size: 13px;
1044
+ font-family: var(--font-mono, "Roboto Mono", monospace);
1045
+ line-height: 1.6;
1046
+ white-space: pre-wrap;
1047
+ word-wrap: break-word;
1048
+ overflow-y: auto;
1049
+ pointer-events: none;
1050
+ color: var(--text);
997
1051
  background: none;
998
1052
  border: none;
999
- color: var(--text);
1000
- font-size: 15px;
1001
- font-weight: 600;
1053
+ }
1054
+ .mate-editor-highlight-pre code {
1002
1055
  font-family: inherit;
1003
- outline: none;
1056
+ font-size: inherit;
1057
+ line-height: inherit;
1058
+ background: none !important;
1059
+ padding: 0;
1004
1060
  }
1005
- .mate-knowledge-editor-header button {
1061
+ #mate-knowledge-editor-content {
1062
+ position: absolute;
1063
+ inset: 0;
1064
+ width: 100%;
1065
+ height: 100%;
1066
+ padding: 12px 14px;
1006
1067
  background: none;
1007
1068
  border: none;
1008
- color: var(--text-muted);
1009
- font-size: 20px;
1010
- cursor: pointer;
1011
- padding: 2px 6px;
1012
- border-radius: 6px;
1069
+ color: transparent;
1070
+ caret-color: var(--text);
1071
+ font-size: 13px;
1072
+ font-family: var(--font-mono, "Roboto Mono", monospace);
1073
+ line-height: 1.6;
1074
+ resize: none;
1075
+ outline: none;
1076
+ overflow-y: auto;
1077
+ white-space: pre-wrap;
1078
+ word-wrap: break-word;
1079
+ z-index: 1;
1013
1080
  }
1014
- .mate-knowledge-editor-header button:hover {
1015
- color: var(--text);
1081
+ #mate-knowledge-editor-content::placeholder {
1082
+ color: var(--text-dimmer);
1016
1083
  }
1017
- #mate-knowledge-editor-content {
1084
+ #mate-knowledge-editor-content::selection {
1085
+ background: rgba(var(--overlay-rgb), 0.2);
1086
+ }
1087
+
1088
+ /* Preview pane (right) */
1089
+ .mate-knowledge-preview-pane {
1018
1090
  flex: 1;
1019
- min-height: 400px;
1020
- padding: 16px;
1021
- background: none;
1022
- border: none;
1023
- color: var(--text);
1091
+ display: flex;
1092
+ flex-direction: column;
1093
+ min-width: 0;
1094
+ }
1095
+ .mate-knowledge-preview-content {
1096
+ flex: 1;
1097
+ padding: 16px 20px;
1098
+ overflow-y: auto;
1024
1099
  font-size: 14px;
1025
- font-family: inherit;
1026
1100
  line-height: 1.7;
1027
- resize: none;
1028
- outline: none;
1101
+ color: var(--text);
1102
+ }
1103
+ .mate-knowledge-preview-content em {
1104
+ font-style: italic;
1105
+ font-synthesis: style;
1106
+ }
1107
+ .mate-knowledge-preview-content strong {
1108
+ font-weight: 700;
1109
+ }
1110
+
1111
+ /* --- Format Popover --- */
1112
+ .mate-format-popover {
1113
+ position: fixed;
1114
+ z-index: 10000;
1115
+ display: flex;
1116
+ align-items: center;
1117
+ gap: 2px;
1118
+ padding: 4px 6px;
1119
+ background: var(--bg-alt);
1120
+ border: 1px solid var(--border);
1121
+ border-radius: 8px;
1122
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
1123
+ transform: translateX(-50%) translateY(-100%);
1029
1124
  }
1030
- .mate-knowledge-editor-footer {
1125
+ .mate-format-btn {
1031
1126
  display: flex;
1032
1127
  align-items: center;
1033
- justify-content: flex-end;
1034
- gap: 8px;
1035
- padding: 12px 16px;
1036
- border-top: 1px solid var(--border-subtle);
1128
+ justify-content: center;
1129
+ width: 28px;
1130
+ height: 28px;
1131
+ border: none;
1132
+ border-radius: 5px;
1133
+ background: none;
1134
+ color: var(--text-muted);
1135
+ cursor: pointer;
1136
+ transition: background 0.1s, color 0.1s;
1137
+ }
1138
+ .mate-format-btn:hover {
1139
+ background: rgba(var(--overlay-rgb), 0.1);
1140
+ color: var(--text);
1141
+ }
1142
+ .mate-format-btn .lucide {
1143
+ width: 15px;
1144
+ height: 15px;
1145
+ }
1146
+
1147
+ /* Responsive: stack on narrow screens */
1148
+ @media (max-width: 768px) {
1149
+ .mate-knowledge-body {
1150
+ flex-direction: column;
1151
+ }
1152
+ .mate-knowledge-editor-pane {
1153
+ border-right: none;
1154
+ border-bottom: 1px solid var(--border-subtle);
1155
+ }
1037
1156
  }
1038
1157
 
1039
1158
  .mate-sidebar-sessions-header {
@@ -1137,6 +1256,65 @@
1137
1256
  right: 8px;
1138
1257
  }
1139
1258
 
1259
+ /* Session search */
1260
+ .mate-session-search {
1261
+ position: relative;
1262
+ padding: 0 8px 6px;
1263
+ }
1264
+ .mate-session-search.hidden {
1265
+ display: none;
1266
+ }
1267
+ #mate-session-search-input {
1268
+ width: 100%;
1269
+ padding: 7px 28px 7px 10px;
1270
+ border-radius: 8px;
1271
+ border: 1px solid var(--border);
1272
+ background: var(--input-bg);
1273
+ color: var(--text);
1274
+ font-size: 13px;
1275
+ font-family: inherit;
1276
+ outline: none;
1277
+ }
1278
+ #mate-session-search-input:focus {
1279
+ border-color: var(--accent);
1280
+ }
1281
+ #mate-session-search-clear {
1282
+ position: absolute;
1283
+ right: 16px;
1284
+ top: 50%;
1285
+ transform: translateY(-50%);
1286
+ width: 20px;
1287
+ height: 20px;
1288
+ display: flex;
1289
+ align-items: center;
1290
+ justify-content: center;
1291
+ border: none;
1292
+ border-radius: 4px;
1293
+ background: none;
1294
+ color: var(--text-dimmer);
1295
+ cursor: pointer;
1296
+ }
1297
+ #mate-session-search-clear:hover {
1298
+ color: var(--text);
1299
+ background: var(--sidebar-hover);
1300
+ }
1301
+ #mate-session-search-clear .lucide {
1302
+ width: 14px;
1303
+ height: 14px;
1304
+ }
1305
+ #mate-search-session-btn.active {
1306
+ color: var(--accent);
1307
+ }
1308
+ .mate-session-item.search-match {
1309
+ background: var(--accent-12, rgba(108, 92, 231, 0.12));
1310
+ }
1311
+ .mate-session-item.search-match .mate-session-item-text {
1312
+ color: var(--accent);
1313
+ }
1314
+ .mate-session-item.search-dimmed {
1315
+ opacity: 0.35;
1316
+ }
1317
+
1140
1318
  .mate-session-processing {
1141
1319
  display: inline-block;
1142
1320
  width: 6px;
@@ -1150,7 +1328,7 @@
1150
1328
  /* --- Mate color theming for panels --- */
1151
1329
 
1152
1330
  /* Match panel header heights to sidebar header (48px) */
1153
- body.mate-dm-active .mate-knowledge-header,
1331
+ body.mate-dm-active .mate-knowledge-header-bar,
1154
1332
  body.mate-dm-active .scheduler-top-bar,
1155
1333
  body.mate-dm-active .notes-archive-header {
1156
1334
  height: 48px;
@@ -1158,24 +1336,40 @@ body.mate-dm-active .notes-archive-header {
1158
1336
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
1159
1337
  }
1160
1338
 
1161
- /* Knowledge header */
1162
- body.mate-dm-active .mate-knowledge-header {
1339
+ /* Knowledge header bar */
1340
+ body.mate-dm-active .mate-knowledge-header-bar {
1163
1341
  background: var(--mate-color);
1164
1342
  color: #fff;
1343
+ border-bottom-color: transparent;
1165
1344
  }
1166
- body.mate-dm-active .mate-knowledge-header .lucide,
1167
- body.mate-dm-active .mate-knowledge-header h2 {
1345
+ body.mate-dm-active .mate-knowledge-header-bar .mate-knowledge-header-icon,
1346
+ body.mate-dm-active .mate-knowledge-header-bar .mate-knowledge-active-name {
1168
1347
  color: #fff;
1169
1348
  }
1170
- body.mate-dm-active .mate-knowledge-header-actions button {
1349
+ body.mate-dm-active .mate-knowledge-header-bar #mate-knowledge-editor-name {
1350
+ color: #fff;
1351
+ border-color: rgba(255, 255, 255, 0.3);
1352
+ }
1353
+ body.mate-dm-active .mate-knowledge-header-bar #mate-knowledge-editor-name::placeholder {
1354
+ color: rgba(255, 255, 255, 0.5);
1355
+ }
1356
+ body.mate-dm-active .mate-knowledge-header-bar .mate-knowledge-header-btn {
1171
1357
  color: rgba(255, 255, 255, 0.85);
1172
1358
  }
1173
- body.mate-dm-active .mate-knowledge-header-actions button:hover {
1359
+ body.mate-dm-active .mate-knowledge-header-bar .mate-knowledge-header-btn:hover {
1174
1360
  color: #fff;
1175
1361
  background: rgba(255, 255, 255, 0.15);
1176
1362
  }
1177
- body.mate-dm-active .mate-knowledge-count {
1178
- color: rgba(255, 255, 255, 0.7);
1363
+ body.mate-dm-active .mate-knowledge-header-bar .mate-knowledge-header-btn:disabled {
1364
+ color: rgba(255, 255, 255, 0.3);
1365
+ }
1366
+ body.mate-dm-active .mate-knowledge-header-bar .mate-knowledge-header-btn:disabled:hover {
1367
+ background: none;
1368
+ color: rgba(255, 255, 255, 0.3);
1369
+ }
1370
+ body.mate-dm-active .mate-knowledge-header-bar #mate-knowledge-editor-delete:hover {
1371
+ color: #fff;
1372
+ background: rgba(255, 80, 80, 0.4);
1179
1373
  }
1180
1374
 
1181
1375
  /* Scheduler top bar (main header) */
@@ -1327,31 +1521,40 @@ body.mate-dm-active .turn-meta {
1327
1521
  Mate DM: Humanized thinking / tools / permissions
1328
1522
  ========================================================================== */
1329
1523
 
1330
- /* --- Mate Thinking: avatar + name + bouncing dots --- */
1331
- .mate-thinking-row {
1332
- display: none;
1333
- align-items: center;
1334
- gap: 10px;
1335
- padding: 6px 0;
1336
- }
1337
- body.mate-dm-active .mate-thinking:not(.done) .mate-thinking-row {
1524
+ /* --- Mate Thinking: flex layout matching msg-assistant --- */
1525
+ body.mate-dm-active .mate-thinking {
1338
1526
  display: flex;
1527
+ flex-direction: row;
1528
+ align-items: flex-start;
1529
+ gap: 8px;
1530
+ padding: 4px 16px;
1531
+ margin: 0;
1532
+ max-width: 100%;
1339
1533
  }
1340
- .mate-thinking-avatar {
1341
- width: 28px;
1342
- height: 28px;
1534
+ body.mate-dm-active .mate-thinking:hover {
1535
+ background: var(--bg-alt);
1536
+ }
1537
+ body.mate-dm-active .mate-thinking > .dm-bubble-avatar {
1538
+ display: block;
1539
+ width: 36px;
1540
+ height: 36px;
1343
1541
  border-radius: 6px;
1344
1542
  flex-shrink: 0;
1543
+ margin-top: 2px;
1345
1544
  }
1346
- .mate-thinking-body {
1347
- display: flex;
1348
- align-items: center;
1349
- gap: 8px;
1545
+ body.mate-dm-active .mate-thinking > .dm-bubble-content {
1546
+ flex: 1;
1547
+ min-width: 0;
1350
1548
  }
1351
- .mate-thinking-name {
1352
- font-weight: 700;
1353
- font-size: 14px;
1354
- color: var(--text);
1549
+ .mate-thinking-row {
1550
+ display: none;
1551
+ flex-direction: column;
1552
+ align-items: flex-start;
1553
+ gap: 4px;
1554
+ padding: 4px 0;
1555
+ }
1556
+ body.mate-dm-active .mate-thinking:not(.done) .mate-thinking-row {
1557
+ display: flex;
1355
1558
  }
1356
1559
  .mate-thinking-dots {
1357
1560
  display: inline-flex;
@@ -1402,9 +1605,31 @@ body.mate-dm-active .mate-thinking.expanded .thinking-content {
1402
1605
  max-height: 2000px;
1403
1606
  }
1404
1607
 
1405
- /* --- Mate Tool Group: compact, always collapsed with summary header --- */
1608
+ /* --- Mate Tool Group: flex layout matching msg-assistant --- */
1406
1609
  body.mate-dm-active .mate-tool-group {
1407
- margin: 2px 0;
1610
+ display: flex;
1611
+ flex-direction: row;
1612
+ align-items: flex-start;
1613
+ gap: 8px;
1614
+ padding: 4px 16px;
1615
+ margin: 0;
1616
+ max-width: 100%;
1617
+ }
1618
+ body.mate-dm-active .mate-tool-group:hover {
1619
+ background: var(--bg-alt);
1620
+ }
1621
+ body.mate-dm-active .mate-tool-group > .dm-bubble-avatar {
1622
+ display: block;
1623
+ width: 36px;
1624
+ height: 36px;
1625
+ border-radius: 6px;
1626
+ flex-shrink: 0;
1627
+ margin-top: 2px;
1628
+ }
1629
+ body.mate-dm-active .mate-tool-group > .dm-bubble-content {
1630
+ flex: 1;
1631
+ min-width: 0;
1632
+ padding-top: 6px;
1408
1633
  }
1409
1634
  body.mate-dm-active .mate-tool-group .tool-group-header {
1410
1635
  font-size: 12px;
@@ -1431,35 +1656,53 @@ body.mate-dm-active .mate-tool-group .tool-name {
1431
1656
  color: var(--text-muted);
1432
1657
  }
1433
1658
 
1434
- /* --- Mate Permission: conversational chat bubble --- */
1659
+ /* --- Mate Permission: flex layout matching msg-assistant --- */
1435
1660
  body.mate-dm-active .mate-permission {
1661
+ display: flex;
1662
+ flex-direction: row;
1663
+ align-items: flex-start;
1664
+ gap: 8px;
1436
1665
  border: none;
1437
1666
  border-radius: 0;
1438
1667
  background: none;
1439
1668
  box-shadow: none;
1440
1669
  padding: 4px 16px;
1670
+ margin: 0;
1671
+ max-width: 100%;
1441
1672
  }
1442
1673
  body.mate-dm-active .mate-permission:hover {
1443
1674
  background: var(--bg-alt);
1444
1675
  }
1445
- .mate-permission-ask {
1676
+ body.mate-dm-active .mate-permission > .dm-bubble-avatar {
1677
+ display: block;
1678
+ width: 36px;
1679
+ height: 36px;
1680
+ border-radius: 6px;
1681
+ flex-shrink: 0;
1682
+ margin-top: 2px;
1683
+ }
1684
+ body.mate-dm-active .mate-permission > .dm-bubble-content {
1685
+ flex: 1;
1686
+ min-width: 0;
1687
+ }
1688
+ /* Permission ask text */
1689
+ .mate-perm-ask {
1446
1690
  font-size: 15px;
1447
1691
  line-height: 1.46;
1448
1692
  color: var(--text);
1449
- padding-left: 36px; /* align with name (avatar 28px + gap 8px) */
1450
- margin-bottom: 8px;
1693
+ margin-bottom: 4px;
1451
1694
  }
1452
- .mate-permission-details {
1453
- padding-left: 36px;
1695
+ /* Details toggle */
1696
+ .mate-perm-details {
1454
1697
  margin-bottom: 8px;
1455
1698
  font-size: 12px;
1456
1699
  color: var(--text-muted);
1457
1700
  }
1458
- .mate-permission-details summary {
1701
+ .mate-perm-details summary {
1459
1702
  cursor: pointer;
1460
1703
  user-select: none;
1461
1704
  }
1462
- .mate-permission-details pre {
1705
+ .mate-perm-details pre {
1463
1706
  font-size: 11px;
1464
1707
  margin: 4px 0 0;
1465
1708
  padding: 8px;
@@ -1468,11 +1711,14 @@ body.mate-dm-active .mate-permission:hover {
1468
1711
  overflow-x: auto;
1469
1712
  max-height: 200px;
1470
1713
  }
1714
+ /* Reply buttons (override rewind.css .permission-actions) */
1471
1715
  .mate-permission-actions {
1472
1716
  display: flex;
1473
1717
  gap: 6px;
1474
- padding-left: 36px;
1475
- padding-bottom: 4px;
1718
+ border: none;
1719
+ border-radius: 0;
1720
+ background: none;
1721
+ padding: 0;
1476
1722
  }
1477
1723
  .mate-permission-reply {
1478
1724
  padding: 5px 14px;
@@ -1513,7 +1759,6 @@ body.mate-dm-active .mate-permission.resolved .mate-permission-reply {
1513
1759
  body.mate-dm-active .mate-permission.resolved .permission-decision-label {
1514
1760
  font-size: 12px;
1515
1761
  color: var(--text-dimmer);
1516
- padding-left: 36px;
1517
1762
  }
1518
1763
 
1519
1764
  /* --- Mate Activity: avatar + text (hidden, dots row is enough) --- */
@@ -1521,24 +1766,45 @@ body.mate-dm-active .activity-inline {
1521
1766
  display: none;
1522
1767
  }
1523
1768
 
1524
- /* --- Mate AskUserQuestion: avatar + name header --- */
1525
- .ask-user-mate-header {
1526
- display: none;
1527
- }
1528
- body.mate-dm-active .ask-user-mate-header {
1769
+ /* --- Mate AskUserQuestion: avatar + content layout (matches msg-assistant) --- */
1770
+ body.mate-dm-active .mate-ask-user {
1529
1771
  display: flex;
1530
- align-items: center;
1772
+ flex-direction: row;
1773
+ align-items: flex-start;
1531
1774
  gap: 8px;
1532
- margin-bottom: 8px;
1775
+ padding: 4px 16px;
1776
+ margin: 0;
1777
+ max-width: 100%;
1778
+ }
1779
+ body.mate-dm-active .mate-ask-user:hover {
1780
+ background: var(--bg-alt);
1781
+ }
1782
+ body.mate-dm-active .mate-ask-user > .dm-bubble-avatar {
1783
+ display: block;
1784
+ width: 36px;
1785
+ height: 36px;
1786
+ border-radius: 6px;
1787
+ flex-shrink: 0;
1788
+ margin-top: 2px;
1789
+ }
1790
+ body.mate-dm-active .mate-ask-user > .dm-bubble-content {
1791
+ flex: 1;
1792
+ min-width: 0;
1793
+ }
1794
+
1795
+ /* --- DM / Mate DM: full-width input like Slack --- */
1796
+ body.mate-dm-active #input-wrapper,
1797
+ #main-column.dm-mode #input-wrapper {
1798
+ max-width: 100%;
1533
1799
  }
1534
1800
 
1535
1801
  /* --- Interstitial elements: indent to align with message content (16px pad + 36px avatar + 8px gap = 60px) --- */
1536
- body.mate-dm-active .thinking-item,
1802
+ body.mate-dm-active .thinking-item:not(.mate-thinking),
1537
1803
  body.mate-dm-active .tool-item,
1538
- body.mate-dm-active .tool-group,
1804
+ body.mate-dm-active .tool-group:not(.mate-tool-group),
1539
1805
  body.mate-dm-active .plan-card,
1540
- body.mate-dm-active .permission-container,
1541
- body.mate-dm-active .ask-user-container,
1806
+ body.mate-dm-active .permission-container:not(.mate-permission),
1807
+ body.mate-dm-active .ask-user-container:not(.mate-ask-user),
1542
1808
  body.mate-dm-active .subagent-log,
1543
1809
  body.mate-dm-active .conflict-msg,
1544
1810
  body.mate-dm-active .context-overflow-msg,