feat: 集成 AI 对话与只读查询工具
This commit is contained in:
185
apps/admin/src/components/AiChat/style.css
Normal file
185
apps/admin/src/components/AiChat/style.css
Normal file
@@ -0,0 +1,185 @@
|
||||
.ai-chat-drawer .ant-drawer-body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ai-chat-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.ai-chat-layout {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.ai-chat-sidebar {
|
||||
position: relative;
|
||||
flex: 0 0 0;
|
||||
width: 0;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
background: #f7f7f8;
|
||||
border-right: 1px solid #e5e5e7;
|
||||
transition: flex-basis 180ms ease;
|
||||
}
|
||||
|
||||
.ai-chat-sidebar.is-open {
|
||||
flex-basis: 248px;
|
||||
width: 248px;
|
||||
padding: 12px 8px;
|
||||
}
|
||||
|
||||
.ai-chat-sidebar .ant-conversations {
|
||||
width: 232px;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.ai-chat-sidebar__loading {
|
||||
position: absolute;
|
||||
inset: 68px 0 auto;
|
||||
}
|
||||
|
||||
.ai-chat-main {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.ai-chat-toolbar {
|
||||
display: flex;
|
||||
flex: 0 0 48px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
padding: 0 12px;
|
||||
border-bottom: 1px solid #ededf0;
|
||||
}
|
||||
|
||||
.ai-chat-toolbar .ant-typography {
|
||||
min-width: 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ai-chat-messages {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ai-chat-messages > .ant-bubble-list {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 20px clamp(16px, 4vw, 48px);
|
||||
}
|
||||
|
||||
.ai-chat-messages .ant-bubble-content {
|
||||
max-width: min(100%, 680px);
|
||||
}
|
||||
|
||||
.ai-chat-user-text {
|
||||
max-width: 100%;
|
||||
overflow-wrap: anywhere;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.ai-chat-answer {
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ai-chat-answer .ant-space-item,
|
||||
.ai-chat-answer .ant-x-markdown {
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.ai-chat-answer pre,
|
||||
.ai-chat-answer table {
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.ai-chat-tools {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
padding: 8px 10px;
|
||||
background: #f7f7f8;
|
||||
border: 1px solid #ededf0;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.ai-chat-tool {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.ai-chat-tool .ant-tag {
|
||||
flex: 0 0 auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ai-chat-tool__summary {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ai-chat-composer {
|
||||
flex: 0 0 auto;
|
||||
padding: 12px clamp(12px, 3vw, 32px) 14px;
|
||||
background: #fff;
|
||||
border-top: 1px solid #ededf0;
|
||||
}
|
||||
|
||||
.ai-chat-composer .ant-sender-input:focus,
|
||||
.ai-chat-composer .ant-sender-input:focus-visible,
|
||||
.ai-chat-composer .ant-sender-input:focus-within {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.ai-chat-disclaimer {
|
||||
display: block;
|
||||
margin-top: 6px;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 575px) {
|
||||
.ai-chat-sidebar {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
inset: 0 auto 0 0;
|
||||
box-shadow: 8px 0 24px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.ai-chat-sidebar.is-open {
|
||||
width: min(82vw, 300px);
|
||||
flex-basis: min(82vw, 300px);
|
||||
}
|
||||
|
||||
.ai-chat-sidebar .ant-conversations {
|
||||
width: calc(min(82vw, 300px) - 16px);
|
||||
}
|
||||
|
||||
.ai-chat-messages > .ant-bubble-list {
|
||||
padding: 14px 12px;
|
||||
}
|
||||
|
||||
.ai-chat-messages .ant-bubble-content {
|
||||
max-width: 92%;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user