feat: add AI research chatbot with confirmed business tools

This commit is contained in:
yuxuanhui
2026-09-07 23:02:55 +08:00
parent 3cd280d068
commit 79ab20b4ea
44 changed files with 4647 additions and 197 deletions
+231
View File
@@ -0,0 +1,231 @@
[hidden] {
display: none !important;
}
.workspace {
padding-right: var(--chat-space, 0px);
}
.ai-chat {
position: fixed;
inset: 0 0 0 auto;
width: min(var(--chat-width, 420px), 100vw);
z-index: 1001;
display: flex;
flex-direction: column;
background: var(--surface);
border-left: 1px solid var(--line);
box-shadow: -8px 0 32px #151b2c0b;
color: var(--ink);
}
.ai-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 22px 20px 16px;
border-bottom: 1px solid var(--line);
}
.ai-header strong {
font-size: 17px;
}
.ai-header span {
display: block;
font-size: 11px;
color: var(--muted);
margin-top: 6px;
}
.ai-conversations {
display: flex;
gap: 8px;
padding: 14px 16px;
}
.ai-conversations .semi-select {
flex: 1;
min-width: 0;
}
.ai-messages {
flex: 1;
overflow-y: auto;
overscroll-behavior: contain;
padding: 12px 18px 24px;
}
.ai-message {
margin: 0 0 24px;
overflow-wrap: anywhere;
}
.ai-role {
display: block;
color: var(--muted);
font-size: 11px;
margin-bottom: 8px;
}
.ai-text {
white-space: pre-wrap;
line-height: 1.8;
}
.ai-message.user .ai-text {
background: var(--semi-color-primary-light-default);
padding: 12px 14px;
border-radius: 10px;
}
.ai-empty {
margin: 48px 8px;
color: var(--muted);
line-height: 1.8;
}
.ai-empty strong {
display: block;
color: var(--ink);
font-size: 18px;
margin-bottom: 10px;
}
.ai-empty span {
display: block;
font-size: 12px;
margin-top: 16px;
}
.ai-composer {
padding: 14px 16px;
border-top: 1px solid var(--line);
background: var(--surface);
}
.ai-context {
color: var(--muted);
font-size: 11px;
margin-bottom: 10px;
}
.ai-send {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin-top: 10px;
}
.ai-send small,
.ai-tool-card small,
.ai-run-state small {
color: var(--muted);
font-size: 11px;
}
.ai-run-state small,
.ai-tool-card small {
display: block;
margin-top: 6px;
}
.ai-tool-card {
border: 1px solid var(--line);
border-radius: 9px;
padding: 12px;
margin: 12px 0;
font-size: 12px;
}
.ai-card-title {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 12px;
}
.ai-tool-card p {
margin: 10px 0;
}
.ai-tool-card summary {
cursor: pointer;
padding: 8px 0;
}
.ai-diff {
display: grid;
gap: 6px;
margin: 8px 0 16px;
}
.ai-diff del,
.ai-diff ins {
display: block;
padding: 8px;
white-space: pre-wrap;
border-radius: 4px;
}
.ai-diff del {
background: #f5636310;
text-decoration: none;
border-left: 2px solid #c35757;
}
.ai-diff ins {
background: #32925c10;
text-decoration: none;
border-left: 2px solid #32925c;
}
.ai-alpha-results > div {
padding: 10px 0;
border-top: 1px solid var(--line);
}
.ai-alpha-results table {
width: 100%;
text-align: left;
margin-top: 10px;
border-collapse: collapse;
font-variant-numeric: tabular-nums;
}
.ai-alpha-results th {
color: var(--muted);
font-weight: 400;
font-size: 10px;
padding-bottom: 4px;
}
.ai-resize {
position: absolute;
left: -4px;
top: 0;
height: 100%;
width: 8px;
cursor: col-resize;
touch-action: none;
}
.ai-resize:hover,
.ai-resize:focus-visible {
background: var(--accent);
opacity: 0.3;
}
.ai-settings-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0 24px;
}
.ai-settings .inline-actions {
margin-top: 14px;
}
.ai-settings .panel-title {
display: flex;
justify-content: space-between;
gap: 16px;
}
.text-link {
border: none;
background: transparent;
color: var(--accent);
padding: 0 3px;
cursor: pointer;
}
@media (max-width: 1439px) {
.ai-chat {
width: min(var(--chat-width, 420px), 100vw);
box-shadow: -30px 0 120px #151b2c30;
}
}
@media (max-width: 640px) {
.ai-chat {
width: 100vw;
}
.ai-resize {
display: none;
}
.ai-settings-grid {
grid-template-columns: 1fr;
}
}
.ai-launcher {
position: fixed;
right: 20px;
bottom: 24px;
z-index: 1002;
box-shadow: 0 4px 18px #29213e24;
}