feat(ui): Copilot 多轮对话、列定义预览确认与来源标识

This commit is contained in:
Jayway Liu
2026-11-01 04:44:48 +00:00
committed by jianwel
parent fb9dd2b77e
commit 661f65c593
6 changed files with 910 additions and 43 deletions
+140 -4
View File
@@ -1204,6 +1204,7 @@ dialog footer > span {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
padding: 17px 18px;
border-bottom: 1px solid var(--line);
}
@@ -1211,6 +1212,34 @@ dialog footer > span {
display: block;
margin-top: 5px;
}
.copilot-title {
flex: 1;
min-width: 0;
}
.copilot-title strong {
display: block;
overflow-wrap: anywhere;
}
.copilot-title small {
color: var(--muted);
font-size: 10px;
line-height: 1.4;
}
.copilot-actions {
display: flex;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: 4px;
}
.copilot-actions .ghost {
min-height: 0;
padding: 4px 7px;
font-size: 10px;
}
.copilot-actions .icon {
min-width: 32px;
}
.chat-messages {
flex: 1;
overflow: auto;
@@ -1232,17 +1261,106 @@ dialog footer > span {
font-size: 12px;
margin-bottom: 7px;
}
.message {
.message,
.message-user {
padding-block: 10px;
border-top: 1px solid var(--line);
font-size: 12px;
line-height: 1.9;
}
.message p {
.message > strong,
.message-user > strong {
display: block;
margin-bottom: 5px;
font-size: 10px;
color: #7b9282;
}
.message.assistant > strong {
color: #1d584a;
}
.message-user.pending .question {
opacity: 0.7;
}
.message-source {
display: block;
margin-top: 6px;
font-size: 10px;
color: #7b9282;
overflow-wrap: anywhere;
}
.message-user.pending .message-source {
color: #9a7a2e;
}
.copilot-status {
margin: 0 0 8px;
font-size: 10px;
color: var(--muted);
}
.copilot .notice,
.copilot .error {
margin: 10px 0 0;
padding: 8px 10px;
font-size: 11px;
line-height: 1.6;
}
.design-preview {
margin-top: 12px;
padding: 12px;
border: 1px solid var(--line);
border-radius: 6px;
background: #f8faf9;
font-size: 12px;
line-height: 1.7;
}
.design-preview h3 {
margin: 0 0 6px;
font-size: 13px;
overflow-wrap: anywhere;
}
.design-preview p {
margin: 0 0 6px;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.message .question {
.design-preview ul {
margin: 0 0 8px;
padding-left: 18px;
}
.design-preview li {
margin-bottom: 4px;
overflow-wrap: anywhere;
}
.design-preview dl {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
gap: 4px 10px;
margin: 8px 0 10px;
}
.design-preview dt {
color: #7b9282;
}
.design-preview dd {
margin: 0;
overflow-wrap: anywhere;
}
.design-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
}
.design-actions button {
font-size: 11px;
white-space: normal;
text-align: center;
}
.message p,
.message-user p {
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.message .question,
.message-user .question {
background: #e9f2ec;
padding: 10px 12px;
border-radius: 5px;
@@ -1258,8 +1376,17 @@ dialog footer > span {
border-top: 1px solid var(--line);
}
.copilot .check {
display: flex;
align-items: flex-start;
gap: 7px;
margin: 0 0 10px;
font-size: 10px;
margin-bottom: 10px;
line-height: 1.5;
white-space: normal;
}
.copilot .check input {
flex: none;
margin-top: 2px;
}
.chat-input {
display: flex;
@@ -1585,6 +1712,15 @@ details {
width: calc(100% - 20px);
height: calc(100dvh - 75px);
}
.copilot header {
padding: 12px 14px;
}
.copilot .chat-messages {
padding: 14px;
}
.design-actions button {
flex: 1 1 100%;
}
dialog,
.dialog.wide {
width: calc(100% - 16px);