feat: AI 对话支持 A2UI 表单/审查/图表与 Excel 读取

This commit is contained in:
2026-08-04 14:41:40 +08:00
parent f07ffdc64c
commit 50c44e4410
51 changed files with 11588 additions and 175 deletions

View File

@@ -8,6 +8,24 @@
gap: 8px;
}
.ai-chat-sender-header {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.ai-chat-sender-footer {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.ai-chat-sender-footer .ant-sender-switch {
margin-inline: 0;
}
.ai-chat-layout {
position: relative;
display: flex;
@@ -18,6 +36,8 @@
.ai-chat-sidebar {
position: relative;
display: flex;
flex-direction: column;
flex: 0 0 0;
width: 0;
min-width: 0;
@@ -35,7 +55,9 @@
.ai-chat-sidebar .ant-conversations {
width: 232px;
height: 100%;
flex: 1;
min-height: 0;
height: auto;
overflow-y: auto;
}
@@ -43,11 +65,98 @@
margin-bottom: 8px;
}
.ai-chat-conversation-label {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.ai-chat-conversation-label__title {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ai-chat-conversation-check {
flex: none;
pointer-events: none;
margin-inline-end: 2px;
}
/* 运行中指示:使用 antd LoadingOutlined 旋转图标 */
.ai-chat-conversation-loading {
color: #007aff;
font-size: 12px;
flex: none;
}
.ai-chat-streaming-placeholder {
display: inline-flex;
align-items: center;
color: #007aff;
font-size: 16px;
padding: 4px 2px;
}
/* 失败 / 已停止:极简状态文字,不再使用 Tag */
.ai-chat-conversation-state {
display: inline-flex;
align-items: center;
gap: 4px;
flex: none;
font-size: 12px;
line-height: 1;
}
.ai-chat-conversation-state i {
width: 5px;
height: 5px;
border-radius: 50%;
}
.ai-chat-conversation-state.is-error {
color: #ff4d4f;
}
.ai-chat-conversation-state.is-error i {
background: #ff4d4f;
}
.ai-chat-conversation-state.is-stopped {
color: #8c8c8c;
}
.ai-chat-conversation-state.is-stopped i {
background: #bfbfbf;
}
.ai-chat-sidebar__loading {
position: absolute;
inset: 68px 0 auto;
}
.ai-chat-sidebar__footer {
flex: none;
display: flex;
align-items: center;
gap: 2px;
padding-top: 8px;
margin-top: 8px;
border-top: 1px solid #f0f0f0;
min-width: 0;
}
.ai-chat-sidebar__selected-count {
margin-right: auto;
padding: 0 4px;
font-size: 12px;
color: #8c8c8c;
white-space: nowrap;
}
.ai-chat-main {
display: flex;
flex: 1 1 auto;
@@ -143,7 +252,7 @@
border-top: 1px solid #ededf0;
}
.ai-chat-composer .ant-sender {
.ai-chat-composer > .ant-sender {
max-width: 820px;
margin: 0 auto;
}
@@ -159,6 +268,16 @@
box-shadow: none;
}
.ai-chat-composer .ant-sender-prefix {
display: flex;
align-items: center;
align-self: center;
}
.ai-chat-composer .ant-sender-prefix .ant-btn {
color: #8a8f99;
}
.ai-chat-disclaimer {
display: block;
margin-top: 6px;
@@ -191,3 +310,125 @@
max-width: 92%;
}
}
.ai-chat-dynamic-form {
margin-top: 10px;
padding: 12px 14px;
border: 1px solid #e5e7eb;
border-radius: 10px;
background: #fafafa;
max-width: 420px;
}
.ai-chat-dynamic-form__desc {
font-size: 12px;
}
.ai-chat-dynamic-form .ant-form-item {
margin-bottom: 10px;
}
.ai-chat-dynamic-form__number,
.ai-chat-dynamic-form__date {
width: 100%;
}
.ai-chat-dynamic-form__error {
margin-bottom: 10px;
}
.ai-chat-review {
width: 100%;
min-width: 0;
}
.ai-chat-review-card {
margin-top: 10px;
padding: 12px 14px;
border: 1px solid #e5e7eb;
border-radius: 12px;
background: #fff;
}
.ai-chat-review-card__title {
font-size: 15px;
}
.ai-chat-review-card__summary {
margin: 4px 0 8px !important;
font-size: 12px;
}
.ai-chat-review-card__footer {
margin-top: 6px;
padding-top: 10px;
border-top: 1px dashed #e5e7eb;
}
.ai-chat-review-card__step {
margin-top: 10px;
}
.ai-chat-review-card__group {
margin-top: 12px;
padding: 10px;
border: 1px solid #e8e8e8;
border-radius: 8px;
background: #fafafa;
}
.ai-chat-review-card__sheets {
padding: 4px 0;
}
.ai-chat-review-card__sheet {
padding: 8px 10px;
border: 1px solid #f0f0f0;
border-radius: 6px;
background: #fff;
cursor: pointer;
transition: border-color 0.2s;
}
.ai-chat-review-card__sheet:hover {
border-color: #1677ff;
}
.ai-chat-review-card__step-result {
font-size: 12px;
}
.ai-chat-review-card__step-error {
margin-top: 8px;
}
.ai-chat-review__issues {
margin: 4px 0 0;
padding-left: 18px;
font-size: 12px;
}
.ai-chat-review__error {
margin-top: 8px;
}
.ai-chat-chart {
width: 100%;
min-width: 0;
}
.ai-chat-chart-card {
margin-top: 10px;
padding: 12px 14px;
border: 1px solid #e5e7eb;
border-radius: 12px;
background: #fff;
}
.ai-chat-chart-card__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 6px;
}