Skip to content

Commit 6138c86

Browse files
dingJieWorkzydemailuyarn
authored
fix(chat): optimize chat reasoning style (#2085)
* feat(chat): 走查问题修复 * feat: chat-sender组件样式调整 * fix(chat): 走查问题修复 * feat: 走查样式调整 * chore: optimize markdown default style * fix(chat): 修复思维链同级content右边距 --------- Co-authored-by: zydemail <[email protected]> Co-authored-by: Uyarn <[email protected]>
1 parent c396f14 commit 6138c86

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

style/web/components/chat/_doc.less

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ div[name="DEMO"] .t-chat__text pre {
99
div[name="DEMO"] .chat-action-content {
1010
display: flex;
1111
}
12+
13+
div[name="DEMO"] .t-chat hr {
14+
opacity: .4;
15+
}

style/web/components/chat/_index.less

+25-8
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,19 @@
8282
scrollbar-width: none;
8383
}
8484

85+
.@{prefix}-textarea__inner:hover {
86+
box-shadow: @chat-input-hover;
87+
}
88+
8589
.@{prefix}-textarea__inner.@{prefix}-is-focused {
8690
border-color: @brand-color;
8791
background: @bg-color-container;
92+
box-shadow: @chat-textarea-shadow-active;
8893
}
8994

9095
.@{prefix}-textarea__inner::placeholder {
9196
color: @text-color-secondary;
9297
}
93-
94-
.@{prefix}-textarea__inner:hover {
95-
box-shadow: @chat-input-hover;
96-
}
9798
}
9899

99100
&__icon {
@@ -165,14 +166,18 @@
165166
&--focus {
166167
border-color: @brand-color;
167168
background-color: @bg-color-container;
168-
box-shadow: @shadow-1;
169+
box-shadow: @chat-textarea-shadow-active;
169170
}
170171
}
171172

172173
&__textarea:hover {
173174
border-color: @brand-color;
174175
box-shadow: @shadow-1;
175176
}
177+
178+
&__textarea--focus:hover {
179+
box-shadow: @chat-textarea-shadow-active;
180+
}
176181
.@{prefix}-textarea {
177182
width: 100%;
178183
margin-bottom: @comp-margin-m;
@@ -381,7 +386,7 @@
381386
}
382387
// 消息样式
383388
&__text {
384-
padding: @comp-paddingTB-m @comp-paddingLR-m;
389+
padding: @comp-paddingTB-m @comp-paddingLR-l;
385390
font: @font-body-large;
386391
word-break: break-all;
387392

@@ -393,6 +398,13 @@
393398

394399
&__assistant {
395400
color: @text-color-primary;
401+
line-height: 2;
402+
403+
p,
404+
ul,
405+
ol {
406+
line-height: 1.5;
407+
}
396408

397409
ol {
398410
padding-inline-start: 20px;
@@ -527,6 +539,12 @@
527539
}
528540

529541
&-reasoning {
542+
.@{prefix}-chat__text--variant--text & {
543+
padding-top: @comp-paddingTB-m;
544+
~ .@{prefix}-chat__text {
545+
padding-right: 0;
546+
}
547+
}
530548
.@{prefix}-chat__text--variant--outline & {
531549
.@{prefix}-collapse {
532550
background: none;
@@ -547,8 +565,7 @@
547565
}
548566

549567
&__header {
550-
padding: @comp-paddingTB-s @comp-paddingTB-m @comp-paddingTB-m
551-
@comp-paddingTB-m;
568+
padding: @comp-paddingTB-s @comp-paddingTB-m;
552569
font: @font-body-medium;
553570
}
554571

style/web/components/chat/_var.less

+2
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@
4646
@chat-actions-hover: rgba(238, 238, 238, 1);
4747
@chat-action-icon-padding: 3px;
4848
@chat-sender-radius: calc(@border-radius-extraLarge + @border-radius-small + @border-radius-small); // 16px的圆角
49+
//shadow
50+
@chat-textarea-shadow-active: 0 0 0 2px @brand-color-focus;

0 commit comments

Comments
 (0)