@mybricks/plugin-ai 0.0.1 → 0.0.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.
- package/package.json +7 -2
- package/src/agents/app.ts +188 -60
- package/src/agents/common.ts +428 -68
- package/src/agents/custom.ts +14 -0
- package/src/agents/index.ts +31 -1
- package/src/agents/knowledges/README.md +614 -0
- package/src/agents/knowledges/SUMMARY.md +527 -0
- package/src/agents/knowledges/index.ts +8 -0
- package/src/agents/knowledges/knowledge-base.ts +565 -0
- package/src/agents/knowledges/knowledge-node.ts +266 -0
- package/src/agents/knowledges/types.ts +208 -0
- package/src/agents/utils/config.ts +427 -0
- package/src/agents/workspace/coding-manager.ts +31 -0
- package/src/agents/workspace/components-manager.ts +124 -0
- package/src/agents/workspace/outline-focus.ts +188 -0
- package/src/agents/workspace/outline-info.ts +520 -0
- package/src/agents/workspace/page-tree-generator.ts +83 -0
- package/src/agents/workspace/workspace.ts +319 -0
- package/src/agents/workspace-by-knowledges/MIGRATION.md +568 -0
- package/src/agents/workspace-by-knowledges/README.md +521 -0
- package/src/agents/workspace-by-knowledges/index.ts +11 -0
- package/src/agents/workspace-by-knowledges/providers/component-docs-provider.ts +92 -0
- package/src/agents/workspace-by-knowledges/providers/focus-info-provider.ts +131 -0
- package/src/agents/workspace-by-knowledges/providers/index.ts +8 -0
- package/src/agents/workspace-by-knowledges/providers/project-info-provider.ts +151 -0
- package/src/agents/workspace-by-knowledges/test.ts +240 -0
- package/src/agents/workspace-by-knowledges/types.ts +56 -0
- package/src/agents/workspace-by-knowledges/utils/components-manager.ts +145 -0
- package/src/agents/workspace-by-knowledges/utils/index.ts +8 -0
- package/src/agents/workspace-by-knowledges/utils/outline-focus.ts +178 -0
- package/src/agents/workspace-by-knowledges/utils/outline-info.ts +521 -0
- package/src/agents/workspace-by-knowledges/workspace.ts +166 -0
- package/src/api/cloud-components.ts +129 -0
- package/src/api-record-replay/README.md +187 -0
- package/src/api-record-replay/index.ts +11 -0
- package/src/api-record-replay/manager.ts +168 -0
- package/src/api-record-replay/recorder.ts +117 -0
- package/src/api-record-replay/replayer.ts +148 -0
- package/src/components/attachments/index.less +117 -0
- package/src/components/attachments/index.tsx +136 -0
- package/src/components/icons/index.tsx +21 -1
- package/src/components/index.less +34 -0
- package/src/components/mention/index.less +23 -0
- package/src/components/mention/index.tsx +19 -0
- package/src/components/messages/index.less +444 -237
- package/src/components/messages/index.tsx +371 -88
- package/src/components/sender/index.less +203 -0
- package/src/components/sender/index.tsx +298 -0
- package/src/components/types.ts +31 -0
- package/src/constants/index.ts +8 -0
- package/src/context/RequestStatusTracker.ts +50 -0
- package/src/context/index.ts +68 -6
- package/src/{types.d.ts → global.d.ts} +40 -5
- package/src/index.tsx +212 -32
- package/src/preset/agents.ts +380 -0
- package/src/preset/createTemplates.ts +25 -0
- package/src/preset/index.ts +12 -0
- package/src/preset/prompts.ts +235 -0
- package/src/preset/requestAsStream.ts +246 -0
- package/src/preset/user.ts +6 -0
- package/src/startView/components/header/header.less +17 -0
- package/src/startView/components/header/header.tsx +15 -0
- package/src/startView/components/index.ts +1 -0
- package/src/startView/index.less +22 -204
- package/src/startView/index.tsx +35 -203
- package/src/tools/analyze-and-expand-prd.ts +192 -86
- package/src/tools/analyze-requirement-and-components.ts +589 -0
- package/src/tools/answer.ts +59 -0
- package/src/tools/build-process.ts +1174 -0
- package/src/tools/coding-subagent-as-tool.ts +119 -0
- package/src/tools/generate-ui-content.ts +1083 -0
- package/src/tools/index.ts +22 -19
- package/src/tools/open-dsl.ts +69 -0
- package/src/tools/refactor-ui-content.ts +801 -0
- package/src/tools/utils.ts +880 -28
- package/src/types/index.ts +4 -0
- package/src/view/components/header/header.less +36 -2
- package/src/view/components/header/header.tsx +47 -2
- package/src/view/components/index.ts +0 -2
- package/src/view/index.tsx +158 -8
- package/src/tools/answer-user.ts +0 -35
- package/src/tools/focus-element.ts +0 -47
- package/src/tools/generate-page.ts +0 -750
- package/src/tools/get-component-info-by-ids.ts +0 -166
- package/src/tools/get-component-info.ts +0 -53
- package/src/tools/get-components-doc-and-prd.ts +0 -137
- package/src/tools/get-focus-mybricks-dsl.ts +0 -26
- package/src/tools/get-mybricks-dsl.ts +0 -73
- package/src/tools/modify-component.ts +0 -385
- package/src/view/components/messages/messages.less +0 -228
- package/src/view/components/messages/messages.tsx +0 -172
- package/src/view/components/sender/sender.less +0 -44
- package/src/view/components/sender/sender.tsx +0 -62
|
@@ -1,25 +1,32 @@
|
|
|
1
|
+
@import url(../index.less);
|
|
2
|
+
|
|
1
3
|
.ai-chat-messages {
|
|
2
4
|
font-size: 12px;
|
|
3
|
-
overflow: auto;
|
|
5
|
+
overflow: hidden auto;
|
|
4
6
|
flex-grow: 1;
|
|
5
7
|
display: flex;
|
|
6
8
|
flex-direction: column;
|
|
7
|
-
scroll-snap-type: y proximity;
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
height: 0;
|
|
12
|
-
background-color: transparent
|
|
10
|
+
> .chat-bubble-container:nth-last-child(2) {
|
|
11
|
+
display: table;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
background-color: transparent
|
|
17
|
-
}
|
|
14
|
+
.scroll-bar();
|
|
18
15
|
|
|
19
|
-
&::-webkit-scrollbar
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
// &::-webkit-scrollbar {
|
|
17
|
+
// width: 6px;
|
|
18
|
+
// height: 0;
|
|
19
|
+
// background-color: transparent
|
|
20
|
+
// }
|
|
21
|
+
|
|
22
|
+
// &::-webkit-scrollbar-track {
|
|
23
|
+
// background-color: transparent
|
|
24
|
+
// }
|
|
25
|
+
|
|
26
|
+
// &::-webkit-scrollbar-thumb {
|
|
27
|
+
// background-color: #c5c5c5;
|
|
28
|
+
// border-radius: 6px
|
|
29
|
+
// }
|
|
23
30
|
|
|
24
31
|
&:has(.ai-chat-messages-skeleton) {
|
|
25
32
|
padding: 16px
|
|
@@ -46,13 +53,18 @@
|
|
|
46
53
|
width: 100%
|
|
47
54
|
}
|
|
48
55
|
|
|
56
|
+
.chat-bubble-container {
|
|
57
|
+
width: 100%;
|
|
58
|
+
}
|
|
59
|
+
|
|
49
60
|
.chat-bubble {
|
|
50
61
|
display: flex;
|
|
51
62
|
flex-direction: column;
|
|
52
63
|
color: #333;
|
|
53
|
-
border-radius:
|
|
64
|
+
border-radius: 6px;
|
|
54
65
|
border: 1px solid transparent;
|
|
55
|
-
padding: 16px 16px 0;
|
|
66
|
+
// padding: 16px 16px 0;
|
|
67
|
+
padding: 8px 13px 0;
|
|
56
68
|
|
|
57
69
|
&:has(.has-popover),
|
|
58
70
|
&:hover {
|
|
@@ -62,25 +74,53 @@
|
|
|
62
74
|
}
|
|
63
75
|
|
|
64
76
|
.chat-message-container:has(.user-message) {
|
|
65
|
-
padding: 8px
|
|
77
|
+
padding: 8px 13px
|
|
66
78
|
}
|
|
67
79
|
|
|
68
|
-
.user-message img {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
80
|
+
// .user-message img {
|
|
81
|
+
// display: inline-block;
|
|
82
|
+
// flex-shrink: 0;
|
|
83
|
+
// width: auto;
|
|
84
|
+
// height: 60px;
|
|
85
|
+
// margin: 0;
|
|
86
|
+
// object-fit: cover;
|
|
75
87
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
88
|
+
// +& {
|
|
89
|
+
// margin-left: 8px
|
|
90
|
+
// }
|
|
91
|
+
// }
|
|
92
|
+
|
|
93
|
+
// .user-message p:has(img) {
|
|
94
|
+
// display: flex;
|
|
95
|
+
// align-items: center
|
|
96
|
+
// }
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.chat-bubble-action {
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
color: #AAA;
|
|
103
|
+
border-radius: 6px;
|
|
104
|
+
border: 1px solid transparent;
|
|
105
|
+
padding: 0 13px;
|
|
106
|
+
|
|
107
|
+
svg {
|
|
108
|
+
width: 14px;
|
|
109
|
+
height: 14px;
|
|
79
110
|
}
|
|
80
111
|
|
|
81
|
-
.
|
|
82
|
-
|
|
83
|
-
|
|
112
|
+
.chat-bubble-action-chat {
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
width: 14px;
|
|
115
|
+
height: 14px;
|
|
116
|
+
|
|
117
|
+
&.focus {
|
|
118
|
+
color: var(--mybricks-color-primary, #FA6400);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
color: var(--mybricks-color-primary, #FA6400);
|
|
123
|
+
}
|
|
84
124
|
}
|
|
85
125
|
}
|
|
86
126
|
|
|
@@ -99,7 +139,8 @@
|
|
|
99
139
|
width: 20px;
|
|
100
140
|
height: 20px;
|
|
101
141
|
box-sizing: content-box;
|
|
102
|
-
border: 2px solid #ffffff;
|
|
142
|
+
// border: 2px solid #ffffff;
|
|
143
|
+
border: 2px solid transparent;
|
|
103
144
|
|
|
104
145
|
.copilot-avatar {
|
|
105
146
|
.user-avatar();
|
|
@@ -127,7 +168,7 @@
|
|
|
127
168
|
user-select: text;
|
|
128
169
|
width: 100%;
|
|
129
170
|
font-size: 12px;
|
|
130
|
-
border-radius:
|
|
171
|
+
border-radius: 6px;
|
|
131
172
|
padding: 0;
|
|
132
173
|
|
|
133
174
|
+& {
|
|
@@ -189,7 +230,7 @@
|
|
|
189
230
|
align-items: center;
|
|
190
231
|
padding: 4px 8px;
|
|
191
232
|
border: 1px solid #eeeeee;
|
|
192
|
-
border-radius:
|
|
233
|
+
border-radius: 6px;
|
|
193
234
|
color: #666;
|
|
194
235
|
background-color: #f3f3f3;
|
|
195
236
|
|
|
@@ -206,7 +247,7 @@
|
|
|
206
247
|
margin-right: 8px;
|
|
207
248
|
font-size: 12px;
|
|
208
249
|
background: #666;
|
|
209
|
-
border-radius:
|
|
250
|
+
border-radius: 6px
|
|
210
251
|
}
|
|
211
252
|
|
|
212
253
|
&.shortcuts-theme-blue {
|
|
@@ -242,7 +283,7 @@
|
|
|
242
283
|
|
|
243
284
|
&.shortcuts-theme-gray {
|
|
244
285
|
border-color: transparent;
|
|
245
|
-
transition: .3s;
|
|
286
|
+
// transition: .3s;
|
|
246
287
|
|
|
247
288
|
&:hover {
|
|
248
289
|
background-color: #f7f7f7
|
|
@@ -257,14 +298,42 @@
|
|
|
257
298
|
max-width: calc(100% - 16px);
|
|
258
299
|
align-self: flex-end;
|
|
259
300
|
align-items: end;
|
|
260
|
-
background: #ecf4ff;
|
|
261
|
-
|
|
301
|
+
// background: #ecf4ff;
|
|
302
|
+
background: #fff;
|
|
303
|
+
border-radius: 6px;
|
|
262
304
|
padding: 8px;
|
|
263
305
|
border-color: transparent;
|
|
264
306
|
|
|
265
307
|
.chat-bubble-option-container {
|
|
266
308
|
justify-content: end
|
|
267
309
|
}
|
|
310
|
+
|
|
311
|
+
.mentions-container {
|
|
312
|
+
display: inline-flex;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
span {
|
|
316
|
+
font-size: 12px;
|
|
317
|
+
line-height: 20px;
|
|
318
|
+
white-space: pre-wrap;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
&:has(.mentions-container) {
|
|
322
|
+
span {
|
|
323
|
+
margin-left: 4px;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.attachments-list {
|
|
328
|
+
padding-top: 8px;
|
|
329
|
+
justify-content: flex-end;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.mention {
|
|
334
|
+
> :first-child {
|
|
335
|
+
margin-right: 4px;
|
|
336
|
+
}
|
|
268
337
|
}
|
|
269
338
|
|
|
270
339
|
.ai-message {
|
|
@@ -342,7 +411,7 @@
|
|
|
342
411
|
max-width: 100%;
|
|
343
412
|
height: auto;
|
|
344
413
|
margin: 10px 0;
|
|
345
|
-
border-radius:
|
|
414
|
+
border-radius: 6px;
|
|
346
415
|
display: block
|
|
347
416
|
}
|
|
348
417
|
|
|
@@ -363,7 +432,7 @@
|
|
|
363
432
|
color: #666;
|
|
364
433
|
background-color: #f3f3f3;
|
|
365
434
|
border: 1px dashed #ccc;
|
|
366
|
-
border-radius:
|
|
435
|
+
border-radius: 6px;
|
|
367
436
|
padding: 8px 12px;
|
|
368
437
|
display: inline-block;
|
|
369
438
|
margin: 10px 0
|
|
@@ -389,7 +458,7 @@
|
|
|
389
458
|
overflow-x: auto;
|
|
390
459
|
display: block;
|
|
391
460
|
font-size: 12px;
|
|
392
|
-
border-radius:
|
|
461
|
+
border-radius: 6px;
|
|
393
462
|
background-color: #fff;
|
|
394
463
|
border: 1px solid #eaeaea
|
|
395
464
|
}
|
|
@@ -439,7 +508,7 @@
|
|
|
439
508
|
}
|
|
440
509
|
|
|
441
510
|
table tr {
|
|
442
|
-
transition: background-color .2s ease
|
|
511
|
+
// transition: background-color .2s ease
|
|
443
512
|
}
|
|
444
513
|
|
|
445
514
|
table tr:hover {
|
|
@@ -513,7 +582,7 @@
|
|
|
513
582
|
code {
|
|
514
583
|
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
|
515
584
|
background-color: #1b1f230d;
|
|
516
|
-
border-radius:
|
|
585
|
+
border-radius: 6px;
|
|
517
586
|
font-size: 85%;
|
|
518
587
|
padding: .2em .4em;
|
|
519
588
|
text-wrap: auto;
|
|
@@ -521,7 +590,7 @@
|
|
|
521
590
|
|
|
522
591
|
pre {
|
|
523
592
|
margin: 0;
|
|
524
|
-
overflow: auto;
|
|
593
|
+
overflow: hidden auto;
|
|
525
594
|
white-space: pre-wrap;
|
|
526
595
|
word-break: break-word;
|
|
527
596
|
|
|
@@ -541,266 +610,404 @@
|
|
|
541
610
|
margin: 16px 0
|
|
542
611
|
}
|
|
543
612
|
|
|
544
|
-
.
|
|
545
|
-
|
|
546
|
-
align-items: center;
|
|
547
|
-
justify-content: space-between;
|
|
548
|
-
color: #0366d6;
|
|
549
|
-
background-color: #e3f2fd85;
|
|
550
|
-
border-radius: 4px;
|
|
551
|
-
padding: 4px 8px;
|
|
552
|
-
font-size: 12px
|
|
613
|
+
.indent-2 {
|
|
614
|
+
margin-left: 1rem
|
|
553
615
|
}
|
|
554
616
|
|
|
555
|
-
.
|
|
556
|
-
|
|
557
|
-
align-items: center;
|
|
558
|
-
gap: 4px
|
|
617
|
+
.indent-4 {
|
|
618
|
+
margin-left: 2rem
|
|
559
619
|
}
|
|
560
620
|
|
|
561
|
-
.
|
|
562
|
-
|
|
563
|
-
align-items: center;
|
|
564
|
-
justify-content: center;
|
|
565
|
-
gap: 4px;
|
|
566
|
-
cursor: pointer
|
|
621
|
+
.indent-6 {
|
|
622
|
+
margin-left: 3rem
|
|
567
623
|
}
|
|
568
624
|
|
|
569
|
-
.
|
|
570
|
-
|
|
571
|
-
color: #05aa2d
|
|
625
|
+
.indent-8 {
|
|
626
|
+
margin-left: 4rem
|
|
572
627
|
}
|
|
573
628
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
color: #d54941
|
|
629
|
+
li {
|
|
630
|
+
margin-bottom: .25rem
|
|
577
631
|
}
|
|
578
632
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
align-items: center;
|
|
582
|
-
justify-content: space-between;
|
|
583
|
-
color: #d54941;
|
|
584
|
-
background-color: #fff0ed;
|
|
585
|
-
border-radius: 4px;
|
|
586
|
-
border: 1px solid #ffd8d2;
|
|
587
|
-
padding: 8px
|
|
633
|
+
strong {
|
|
634
|
+
font-weight: 700
|
|
588
635
|
}
|
|
589
636
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
justify-content: center;
|
|
594
|
-
gap: 4px;
|
|
595
|
-
width: 70px;
|
|
596
|
-
min-width: 62px;
|
|
597
|
-
color: #d54941;
|
|
598
|
-
background: #fff;
|
|
599
|
-
cursor: pointer;
|
|
600
|
-
font-size: 12px;
|
|
601
|
-
padding: 0 8px;
|
|
602
|
-
border: 1px solid #ffd8d2;
|
|
603
|
-
border-radius: 4px;
|
|
637
|
+
em {
|
|
638
|
+
font-style: italic
|
|
639
|
+
}
|
|
604
640
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
641
|
+
code {
|
|
642
|
+
background-color: #0000000d;
|
|
643
|
+
border-radius: 6px;
|
|
644
|
+
padding: .2em .4em;
|
|
645
|
+
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
|
646
|
+
font-size: 85%;
|
|
647
|
+
text-wrap: auto;
|
|
608
648
|
}
|
|
609
649
|
|
|
610
|
-
.
|
|
611
|
-
|
|
650
|
+
.loading-shimmer {
|
|
651
|
+
-webkit-text-fill-color: transparent;
|
|
652
|
+
animation-delay: .5s;
|
|
653
|
+
animation-duration: 3s;
|
|
654
|
+
animation-iteration-count: infinite;
|
|
655
|
+
animation-name: loading-shimmer;
|
|
656
|
+
background: #adadad linear-gradient(to right, #adadad 0, #1a1a1abf 40%, #1a1a1abf 60%, #adadad 100%);
|
|
657
|
+
-webkit-background-clip: text;
|
|
658
|
+
background-clip: text;
|
|
659
|
+
background-repeat: no-repeat;
|
|
660
|
+
background-size: 50% 200%;
|
|
661
|
+
display: inline-block
|
|
612
662
|
}
|
|
613
663
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
664
|
+
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
.ai-chat-request-resource {
|
|
668
|
+
display: flex;
|
|
669
|
+
align-items: center;
|
|
670
|
+
justify-content: space-between;
|
|
671
|
+
color: #0366d6;
|
|
672
|
+
background-color: #e3f2fd85;
|
|
673
|
+
border-radius: 6px;
|
|
674
|
+
padding: 4px 8px;
|
|
675
|
+
font-size: 12px
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.ai-chat-request-resource-message {
|
|
679
|
+
display: flex;
|
|
680
|
+
align-items: center;
|
|
681
|
+
gap: 4px
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.ai-chat-request-resource-button {
|
|
685
|
+
display: flex;
|
|
686
|
+
align-items: center;
|
|
687
|
+
justify-content: center;
|
|
688
|
+
gap: 4px;
|
|
689
|
+
cursor: pointer
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.ai-chat-request-resource-icon-success {
|
|
693
|
+
font-size: 12px;
|
|
694
|
+
color: #05aa2d
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.ai-chat-request-resource-icon-failed {
|
|
698
|
+
font-size: 12px;
|
|
699
|
+
color: #d54941
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.ai-chat-error-code-block {
|
|
703
|
+
display: flex;
|
|
704
|
+
align-items: center;
|
|
705
|
+
justify-content: space-between;
|
|
706
|
+
color: #d54941;
|
|
707
|
+
background-color: #fff0ed;
|
|
708
|
+
border-radius: 6px;
|
|
709
|
+
border: 1px solid #ffd8d2;
|
|
710
|
+
// padding: 8px;
|
|
711
|
+
padding: 4px 8px;
|
|
712
|
+
gap: 8px;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.ai-chat-error-code-block-retry {
|
|
716
|
+
display: flex;
|
|
717
|
+
align-items: center;
|
|
718
|
+
justify-content: center;
|
|
719
|
+
gap: 4px;
|
|
720
|
+
// width: 70px;
|
|
721
|
+
// min-width: 62px;
|
|
722
|
+
min-width: fit-content;
|
|
723
|
+
color: #d54941;
|
|
724
|
+
background: #fff;
|
|
725
|
+
cursor: pointer;
|
|
726
|
+
font-size: 12px;
|
|
727
|
+
padding: 0 8px;
|
|
728
|
+
border: 1px solid #ffd8d2;
|
|
729
|
+
border-radius: 6px;
|
|
730
|
+
|
|
731
|
+
span {
|
|
732
|
+
white-space: nowrap
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.ai-chat-error-code-block-retry:hover {
|
|
737
|
+
border-radius: 6px
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.ai-chat-error-code-block-message {
|
|
741
|
+
display: flex;
|
|
742
|
+
align-items: center;
|
|
743
|
+
justify-content: center;
|
|
744
|
+
gap: 8px;
|
|
745
|
+
font-size: 12px;
|
|
746
|
+
overflow: hidden;
|
|
747
|
+
|
|
748
|
+
span {
|
|
749
|
+
// line-height: 1.25;
|
|
750
|
+
text-overflow: ellipsis;
|
|
620
751
|
overflow: hidden;
|
|
752
|
+
white-space: nowrap;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
621
755
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
756
|
+
.ai-chat-collapsible-code-block {
|
|
757
|
+
cursor: pointer;
|
|
758
|
+
background-color: #f3f3f3;
|
|
759
|
+
border-radius: 6px;
|
|
760
|
+
margin-bottom: 8px;
|
|
761
|
+
padding: 6px;
|
|
762
|
+
// transition: all .4s cubic-bezier(.25, .8, .25, 1);
|
|
763
|
+
will-change: padding, height, transform;
|
|
764
|
+
transform-origin: top;
|
|
765
|
+
|
|
766
|
+
&:has(.collapsed) {
|
|
767
|
+
padding: 4px 8px;
|
|
768
|
+
transform: translateY(-1px)
|
|
627
769
|
}
|
|
628
770
|
|
|
629
|
-
.
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
771
|
+
.code-header {
|
|
772
|
+
display: flex;
|
|
773
|
+
align-items: center;
|
|
774
|
+
justify-content: space-between;
|
|
775
|
+
user-select: none;
|
|
776
|
+
border-radius: 6px;
|
|
777
|
+
min-height: 22px;
|
|
778
|
+
padding-bottom: 8px;
|
|
779
|
+
box-sizing: content-box;
|
|
780
|
+
// transition: padding .4s cubic-bezier(.25, .8, .25, 1);
|
|
637
781
|
|
|
638
782
|
&:has(.collapsed) {
|
|
639
|
-
padding:
|
|
640
|
-
transform: translateY(-1px)
|
|
783
|
+
padding-bottom: 0
|
|
641
784
|
}
|
|
642
785
|
|
|
643
|
-
.code-
|
|
786
|
+
.code-title {
|
|
787
|
+
margin: 0;
|
|
644
788
|
display: flex;
|
|
645
789
|
align-items: center;
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
790
|
+
gap: 8px;
|
|
791
|
+
color: currentColor;
|
|
792
|
+
font-weight: 400
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
.code-title-status {
|
|
796
|
+
display: inline-flex;
|
|
797
|
+
align-items: center;
|
|
798
|
+
justify-content: center;
|
|
653
799
|
|
|
654
|
-
|
|
655
|
-
|
|
800
|
+
svg {
|
|
801
|
+
width: 10px;
|
|
802
|
+
height: 10px;
|
|
656
803
|
}
|
|
657
804
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
display: flex;
|
|
661
|
-
align-items: center;
|
|
662
|
-
gap: 8px;
|
|
663
|
-
color: currentColor;
|
|
664
|
-
font-weight: 400
|
|
805
|
+
&.pending {
|
|
806
|
+
transform: translate(-2px);
|
|
665
807
|
}
|
|
666
808
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
align-items: center;
|
|
670
|
-
justify-content: center;
|
|
809
|
+
&.success {
|
|
810
|
+
color: #05aa2d;
|
|
671
811
|
|
|
672
812
|
svg {
|
|
673
|
-
width:
|
|
674
|
-
height:
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
&.pending {
|
|
678
|
-
transform: translate(-2px);
|
|
813
|
+
width: 14px;
|
|
814
|
+
height: 14px;
|
|
679
815
|
}
|
|
816
|
+
}
|
|
680
817
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
svg {
|
|
685
|
-
width: 14px;
|
|
686
|
-
height: 14px;
|
|
687
|
-
}
|
|
688
|
-
}
|
|
818
|
+
&.error {
|
|
819
|
+
color: #d54941;
|
|
689
820
|
|
|
690
|
-
|
|
691
|
-
|
|
821
|
+
svg {
|
|
822
|
+
transform: translate(-2px, 0px);
|
|
692
823
|
}
|
|
824
|
+
}
|
|
693
825
|
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
}
|
|
826
|
+
&.aborted {
|
|
827
|
+
color: #faad14;
|
|
697
828
|
}
|
|
829
|
+
}
|
|
698
830
|
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
831
|
+
.code-toggle-button {
|
|
832
|
+
display: inline-flex;
|
|
833
|
+
align-items: center;
|
|
834
|
+
justify-content: center;
|
|
835
|
+
width: 24px;
|
|
836
|
+
height: 24px;
|
|
837
|
+
cursor: pointer;
|
|
838
|
+
border: none;
|
|
839
|
+
color: #666;
|
|
840
|
+
background-color: transparent;
|
|
841
|
+
border-radius: 6px;
|
|
842
|
+
// transition: transform .4s cubic-bezier(.25, .8, .25, 1), color .2s ease;
|
|
711
843
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
844
|
+
&:hover {
|
|
845
|
+
color: #333
|
|
846
|
+
}
|
|
715
847
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
848
|
+
&.expanded {
|
|
849
|
+
transform: rotate(0)
|
|
850
|
+
}
|
|
719
851
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}
|
|
852
|
+
&.collapsed {
|
|
853
|
+
transform: rotate(-90deg)
|
|
723
854
|
}
|
|
724
855
|
}
|
|
856
|
+
}
|
|
725
857
|
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
858
|
+
.code-content {
|
|
859
|
+
background-color: #fff;
|
|
860
|
+
border-radius: 6px;
|
|
861
|
+
width: 100%;
|
|
862
|
+
// transition: height .4s cubic-bezier(.25, .8, .25, 1), opacity .3s ease, transform .4s cubic-bezier(.25, .8, .25, 1);
|
|
863
|
+
overflow: hidden;
|
|
864
|
+
transform-origin: top;
|
|
733
865
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
}
|
|
866
|
+
.code-content-inner {
|
|
867
|
+
padding: 8px 12px
|
|
737
868
|
}
|
|
738
869
|
}
|
|
870
|
+
}
|
|
739
871
|
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
872
|
+
.ai-chat-collapsible-response {
|
|
873
|
+
margin-bottom: 8px;
|
|
874
|
+
}
|
|
743
875
|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
876
|
+
.think {
|
|
877
|
+
display: flex;
|
|
878
|
+
align-items: center;
|
|
747
879
|
|
|
748
|
-
|
|
749
|
-
|
|
880
|
+
svg {
|
|
881
|
+
width: 10px;
|
|
882
|
+
height: 10px;
|
|
883
|
+
margin-left: 4px;
|
|
750
884
|
}
|
|
885
|
+
}
|
|
751
886
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
887
|
+
.markdown-body {
|
|
888
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
|
|
889
|
+
font-size: 12px;
|
|
890
|
+
line-height: 1.6;
|
|
891
|
+
color: #24292e;
|
|
892
|
+
// background-color: #fff;
|
|
893
|
+
word-wrap: break-word;
|
|
755
894
|
|
|
756
|
-
|
|
757
|
-
margin-
|
|
758
|
-
}
|
|
895
|
+
>*:first-child {
|
|
896
|
+
margin-top: 0;
|
|
759
897
|
|
|
760
|
-
|
|
761
|
-
|
|
898
|
+
>*:first-child {
|
|
899
|
+
margin-top: 0
|
|
900
|
+
}
|
|
762
901
|
}
|
|
763
902
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}
|
|
903
|
+
>*:last-child {
|
|
904
|
+
margin-bottom: 0;
|
|
767
905
|
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
padding: .2em .4em;
|
|
772
|
-
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
|
773
|
-
font-size: 85%;
|
|
774
|
-
text-wrap: auto;
|
|
906
|
+
>*:last-child {
|
|
907
|
+
margin-bottom: 0
|
|
908
|
+
}
|
|
775
909
|
}
|
|
910
|
+
}
|
|
776
911
|
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
display: inline-block
|
|
789
|
-
}
|
|
912
|
+
.markdown-body h1,
|
|
913
|
+
.markdown-body h2,
|
|
914
|
+
.markdown-body h3,
|
|
915
|
+
.markdown-body h4,
|
|
916
|
+
.markdown-body h5,
|
|
917
|
+
.markdown-body h6 {
|
|
918
|
+
margin-top: 16px;
|
|
919
|
+
margin-bottom: 8px;
|
|
920
|
+
font-weight: 600;
|
|
921
|
+
line-height: 1;
|
|
922
|
+
}
|
|
790
923
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
924
|
+
.markdown-body h1 {
|
|
925
|
+
// font-size: 2em;
|
|
926
|
+
// border-bottom: 1px solid #eaecef;
|
|
927
|
+
// padding-bottom: 0.3em;
|
|
928
|
+
font-size: 14px;
|
|
929
|
+
}
|
|
794
930
|
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
931
|
+
.markdown-body h2 {
|
|
932
|
+
// font-size: 1.5em;
|
|
933
|
+
// border-bottom: 1px solid #eaecef;
|
|
934
|
+
// padding-bottom: 0.3em;
|
|
935
|
+
font-size: 13px;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.markdown-body p {
|
|
939
|
+
margin-top: 0;
|
|
940
|
+
margin-bottom: 8px;
|
|
941
|
+
white-space: pre-wrap;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
.markdown-body code {
|
|
945
|
+
padding: 0.2em 0.4em;
|
|
946
|
+
margin: 0;
|
|
947
|
+
font-size: 12px;
|
|
948
|
+
// background-color: rgba(27,31,35,0.05);
|
|
949
|
+
border-radius: 6px;
|
|
950
|
+
text-wrap: auto;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
.markdown-body pre {
|
|
954
|
+
padding: 16px;
|
|
955
|
+
overflow: auto;
|
|
956
|
+
font-size: 12px;
|
|
957
|
+
line-height: 1.45;
|
|
958
|
+
background-color: #f6f8fa;
|
|
959
|
+
border-radius: 6px;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.markdown-body blockquote {
|
|
963
|
+
padding: 0 1em;
|
|
964
|
+
color: #6a737d;
|
|
965
|
+
border-left: 0.25em solid #dfe2e5;
|
|
966
|
+
margin: 0 0 16px 0;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
.markdown-body table {
|
|
970
|
+
border-spacing: 0;
|
|
971
|
+
border-collapse: collapse;
|
|
972
|
+
margin-top: 0;
|
|
973
|
+
margin-bottom: 8px;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
.markdown-body table th,
|
|
977
|
+
.markdown-body table td {
|
|
978
|
+
padding: 6px 13px;
|
|
979
|
+
border: 1px solid #dfe2e5;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
.markdown-body table th {
|
|
983
|
+
font-weight: 600;
|
|
984
|
+
background-color: #f6f8fa;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
.markdown-body ul,
|
|
988
|
+
.markdown-body ol {
|
|
989
|
+
padding-left: 16px;
|
|
990
|
+
margin-top: 0;
|
|
991
|
+
margin-bottom: 8px;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
.markdown-body li {
|
|
995
|
+
word-wrap: break-all;
|
|
996
|
+
list-style: outside;
|
|
997
|
+
>*:first-child {
|
|
998
|
+
margin-top: 0;
|
|
999
|
+
margin-bottom: 0;
|
|
1000
|
+
|
|
1001
|
+
>*:first-child {
|
|
1002
|
+
margin-top: 0
|
|
799
1003
|
}
|
|
800
1004
|
}
|
|
801
|
-
}
|
|
802
1005
|
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
1006
|
+
>*:last-child {
|
|
1007
|
+
margin-bottom: 0;
|
|
1008
|
+
|
|
1009
|
+
>*:last-child {
|
|
1010
|
+
margin-bottom: 0
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
806
1013
|
}
|