This commit is contained in:
14651
2025-08-13 09:19:28 +08:00
parent cbb8dc2ba6
commit 3743c72a54
22 changed files with 1472 additions and 43 deletions

BIN
static/AI.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

1
static/add.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1754037771551" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8573" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M972.8 460.8H51.2c-28.16 0-51.2 23.04-51.2 51.2s23.04 51.2 51.2 51.2h921.6c28.16 0 51.2-23.04 51.2-51.2s-23.04-51.2-51.2-51.2z" fill="#4F46E5" p-id="8574"></path><path d="M512 0c-28.16 0-51.2 23.04-51.2 51.2v921.6c0 28.16 23.04 51.2 51.2 51.2s51.2-23.04 51.2-51.2V51.2c0-28.16-23.04-51.2-51.2-51.2z" fill="#4F46E5" p-id="8575"></path></svg>

After

Width:  |  Height:  |  Size: 673 B

1
static/good.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1753693561642" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11887" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M64 483.04V872c0 37.216 30.144 67.36 67.36 67.36H192V416.32l-60.64-0.64A67.36 67.36 0 0 0 64 483.04zM857.28 344.992l-267.808 1.696c12.576-44.256 18.944-83.584 18.944-118.208 0-78.56-68.832-155.488-137.568-145.504-60.608 8.8-67.264 61.184-67.264 126.816v59.264c0 76.064-63.84 140.864-137.856 148L256 416.96v522.4h527.552a102.72 102.72 0 0 0 100.928-83.584l73.728-388.96a102.72 102.72 0 0 0-100.928-121.824z" p-id="11888" fill="#4F46E5"></path></svg>

After

Width:  |  Height:  |  Size: 782 B

1
static/history.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1754032734502" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5374" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M0 505.135c0-0.723 0.723-2.168 0.723-2.89 3.613-18.79 13.007-33.243 29.628-42.637 7.227-4.336 15.176-5.782 23.125-6.504H961.13c20.234 0 35.41 8.672 46.973 24.57 8.671 12.285 12.285 25.293 10.84 40.469-2.891 23.124-18.79 43.359-42.637 49.14-6.504 1.445-13.008 2.168-20.234 2.168H58.535c-23.848 0-39.746-11.563-51.308-31.074-3.614-5.781-5.059-12.285-6.504-18.79 0-0.722-0.723-2.167-0.723-2.89v-11.562zM0 205.234c0-0.723 0.723-2.168 0.723-2.891 3.613-18.789 13.007-33.242 29.628-42.637 7.227-4.335 15.176-5.78 23.125-6.503H961.13c20.234 0 35.41 8.671 46.973 24.57 8.671 12.285 12.285 25.293 10.84 40.468-2.891 23.125-18.79 43.36-42.637 49.14-6.504 1.446-13.008 2.169-20.234 2.169H58.535c-23.848 0-39.746-11.563-51.308-31.074-3.614-5.782-5.059-12.285-6.504-18.79 0-1.445-0.723-2.89-0.723-3.613v-10.84zM51.308 862.848c-1.445 0-2.168-0.722-3.613-0.722-16.62-3.614-28.183-13.008-36.855-27.461-6.504-10.84-9.395-22.402-8.672-34.688 2.168-24.57 19.512-46.25 44.804-52.03 5.06-1.446 10.84-1.446 16.622-1.446h899.703c19.512 0 34.687 8.672 46.25 23.848 7.226 10.117 11.562 22.402 11.562 34.687 0 14.453-5.058 27.46-14.453 38.3-9.394 10.84-21.68 17.344-36.132 18.79-0.723 0-1.446 0-2.168 0.722H51.308zM1024 189.335c-0.723-2.168-0.723-5.058-1.445-7.226l1.445 7.226z" fill="#000000" p-id="5375"></path></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

1
static/newChat.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1754032784723" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7240" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M275.413 810.667L85.333 960V170.667A42.667 42.667 0 0 1 128 128h768a42.667 42.667 0 0 1 42.667 42.667V768A42.667 42.667 0 0 1 896 810.667H275.413z m193.92-384h-128V512h128v128h85.334V512h128v-85.333h-128v-128h-85.334v128z" fill="#2c2c2c" p-id="7241"></path></svg>

After

Width:  |  Height:  |  Size: 596 B

363
static/scss/ai_index.css Normal file
View File

@@ -0,0 +1,363 @@
/* ai_index.css */
/* ============= 整体容器 ============= */
.chat-container {
display: flex;
flex-direction: column;
min-height: 100vh;
/* 改为最小高度,允许内容撑开 */
width: 100%;
overflow: hidden;
position: relative;
background-color: #F5F5F5;
padding-top: 10px;
/* 为固定导航栏预留空间 */
box-sizing: border-box;
/* 确保padding不会增加总宽度 */
}
/* ============= 状态栏占位 ============= */
.status-bar-placeholder {
height: var(--status-bar-height);
background-color: #fff;
}
/* ============= 自定义导航栏(固定在顶部) ============= */
.custom-nav-bar {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 44px;
padding: 0 16px;
background-color: #fff;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
position: fixed;
top: 0;
left: 0;
z-index: 999;
border-bottom: 1px solid #eee;
box-sizing: border-box;
}
.nav-title {
font-size: 17px;
font-weight: 600;
color: #333;
text-align: center;
flex: 1;
}
.nav-icon {
width: 24px;
height: 24px;
}
.nav-left,
.nav-right {
width: 44px;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
}
/* ============= 消息列表(可滚动区域) ============= */
.message-list {
flex: 1;
padding: 16px 0 calc(env(safe-area-inset-bottom) + 80px) 0;
/* 增加底部内边距 */
background-color: #f5f5f5;
box-sizing: border-box;
overflow-y: auto;
/* 确保内容超出时可滚动 */
-webkit-overflow-scrolling: touch;
/* 增加iOS设备上的滚动流畅度 */
}
/* ============= 消息项 ============= */
.message-item {
display: flex;
align-items: flex-start;
margin-bottom: 16px;
max-width: 100%;
}
.user-message {
flex-direction: row-reverse;
margin-right: 20px;
}
.ai-message {
flex-direction: row;
margin-left: 20px;
}
.avatar {
width: 40px;
height: 40px;
border-radius: 8px;
margin: 0 8px;
}
.message-content {
max-width: 70%;
padding: 10px 12px;
border-radius: 10px;
word-wrap: break-word;
line-height: 1.5;
}
.user-message .message-content {
background-color: #e1f5fe;
}
.ai-message .message-content {
background-color: #fff;
border: 1px solid #eee;
}
.sent-image {
max-width: 200px;
max-height: 200px;
border-radius: 8px;
margin-top: 4px;
object-fit: cover;
}
/* ============= AI 提示区域 ============= */
.ai-hint {
margin-top: 8px;
font-size: 12px;
color: #666;
}
.quote-icon {
display: block;
margin-bottom: 4px;
color: #888;
}
.ai-actions {
display: flex;
justify-content: space-between;
align-items: center;
}
.ai-text {
color: #999;
}
.icon-group {
display: flex;
gap: 12px;
}
.btn-icon {
width: 16px;
height: 16px;
cursor: pointer;
}
/* ============= 输入框区域(固定在底部) ============= */
.input-container {
display: flex;
align-items: center;
padding: 8px 16px;
background-color: #fff;
border-top: 1px solid #eee;
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: 10;
box-sizing: border-box;
padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
.input-container input {
flex: 1;
max-width: 90%;
/* 缩短输入框 */
height: 40px;
padding: 0 16px;
background-color: #f5f5f5;
border-radius: 20px;
font-size: 14px;
margin: 0 10px;
outline: none;
}
.add-icon,
.send-icon {
width: 24px;
height: 24px;
cursor: pointer;
margin: 0 12px;
/* 增加图标之间的间距 */
}
.toggle-button {
margin-top: 10px;
color: blue;
cursor: pointer;
text-decoration: underline;
}
.reference-details {
margin-top: 10px;
padding-left: 20px;
border-left: 2px solid #ccc;
}
/* md格式 */
.markdown-content {
line-height: 1.6;
font-size: 14px;
}
.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
margin: 1em 0 0.5em;
}
.markdown-content p {
margin: 0.5em 0;
}
.markdown-content code {
background-color: #f3f4f6;
padding: 0.2em 0.4em;
border-radius: 3px;
font-family: monospace;
}
.markdown-content pre {
background-color: #f6f8fa;
border-radius: 5px;
padding: 10px;
overflow-x: auto;
margin: 10px 0;
}
.markdown-content pre code {
background-color: transparent;
padding: 0;
}
.markdown-content ul,
.markdown-content ol {
margin-left: 1em;
margin-bottom: 0.5em;
}
.markdown-content blockquote {
border-left: 4px solid #d0d7de;
color: #57606a;
margin: 1em 0;
padding-left: 1em;
}
/* 可点击文档名 */
.doc-name-link {
color: #007AFF;
text-decoration: underline;
margin-right: 16rpx;
font-size: 10rpx;
}
/* 每个引用项容器 */
.reference-item-wrapper {
margin-top: 12rpx;
}
/* ============= 引用详情 - 自适应字体 ============= */
.reference-details-item {
margin-top: 12rpx;
padding: 20rpx;
background-color: #f9f9f9;
border-radius: 8rpx;
border: 1rpx solid #e0e0e0;
font-size: clamp(12px, 2.8vw, 16px);
color: #555;
line-height: 1.6;
}
.reference-meta {
font-weight: 500;
color: #333;
display: block;
margin-bottom: 8rpx;
font-size: clamp(13px, 3.2vw, 17px);
}
.reference-content {
color: #444;
line-height: 1.7;
}
.doc-name-link {
color: #007AFF;
text-decoration: underline;
margin-right: 16rpx;
font-size: clamp(13px, 3vw, 15px);
font-weight: 500;
}
/* AI悬浮按钮样式 - 全局显示 */
.ai-hover {
position: fixed;
right: 40rpx;
bottom: 120rpx;
z-index: 9999;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #409eff;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
cursor: pointer;
transition: transform 0.2s;
}
.ai-hover-content {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.ai-hover-text {
font-size: 36rpx;
font-weight: bold;
}
.ai-hover:active {
transform: scale(0.95);
}
/* ============= 小屏设备适配 ============= */
@media (max-width: 600px) {
.message-content {
max-width: 65%;
font-size: 14px;
}
.nav-title {
font-size: 15px;
}
.btn-icon {
width: 14px;
height: 14px;
margin-left: 6px;
}
}

1
static/search.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1754534613016" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6268" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M948.48 833.92l-185.6-183.68c-3.84-3.84-8.32-6.4-13.44-7.68C801.28 580.48 832 501.76 832 416 832 221.44 674.56 64 480 64 285.44 64 128 221.44 128 416 128 610.56 285.44 768 480 768c85.76 0 163.84-30.72 225.28-81.28 1.92 4.48 4.48 8.96 8.32 12.8l185.6 183.68c14.08 13.44 35.84 13.44 49.92 0S962.56 847.36 948.48 833.92zM480 704C320.64 704 192 575.36 192 416 192 256.64 320.64 128 480 128 639.36 128 768 256.64 768 416 768 575.36 639.36 704 480 704z" p-id="6269"></path></svg>

After

Width:  |  Height:  |  Size: 806 B

1
static/send.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1754040545229" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1872" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M24.649143 399.36L965.485714 7.314286a29.257143 29.257143 0 0 1 39.643429 34.084571l-234.349714 937.472a29.257143 29.257143 0 0 1-47.104 15.36l-203.483429-169.545143a29.257143 29.257143 0 0 0-39.424 1.828572l-104.374857 104.301714a29.257143 29.257143 0 0 1-49.883429-20.626286V689.737143a29.257143 29.257143 0 0 1 8.557715-20.699429l424.448-424.448-501.101715 375.881143a29.257143 29.257143 0 0 1-36.278857-0.950857L17.188571 448.804571a29.257143 29.257143 0 0 1 7.460572-49.444571z" p-id="1873" fill="#4F46E5"></path></svg>

After

Width:  |  Height:  |  Size: 857 B

1
static/tread.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1753693581732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13840" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M611.188364 651.962182h226.56a93.090909 93.090909 0 0 0 91.834181-108.334546l-61.905454-372.689454A93.090909 93.090909 0 0 0 775.889455 93.090909H372.968727v558.871273c82.152727 81.338182 72.866909 210.571636 88.832 242.338909 15.941818 31.767273 47.616 36.119273 55.621818 36.608 39.703273 0 179.665455-32.395636 93.789091-278.946909zM313.832727 651.636364V93.090909H202.891636a93.090909 93.090909 0 0 0-92.997818 88.901818l-16.709818 372.363637A93.090909 93.090909 0 0 0 186.181818 651.636364h127.650909z" fill="#4F46E5" p-id="13841"></path></svg>

After

Width:  |  Height:  |  Size: 883 B

1
static/voice.svg Normal file
View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1753693546032" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9939" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M216.064 418.816c-50.176 0-91.136 40.96-91.136 91.136s40.96 91.136 91.136 91.136 91.136-40.96 91.136-91.136-40.96-91.136-91.136-91.136zM415.232 815.104c-21.504 0-42.496-8.704-57.344-25.6-27.648-31.744-24.064-79.36 7.168-107.52 50.176-43.52 78.848-106.496 78.848-172.032 0-64.512-27.648-125.952-75.776-168.96-31.232-28.16-33.792-76.288-5.632-107.52s76.288-33.792 107.52-5.632c79.36 71.68 125.44 174.592 125.44 281.6 0 109.568-47.616 214.016-130.56 286.208-14.336 13.312-31.744 19.456-49.664 19.456z" p-id="9940" fill="#4F46E5"></path><path d="M601.088 985.088c-30.208-29.184-31.232-77.312-2.048-107.52 95.744-99.328 148.48-229.888 148.48-367.616 0-136.192-51.2-265.216-144.896-364.544-28.672-30.72-27.648-78.848 3.072-107.52s78.848-27.648 107.52 3.072c120.32 126.976 186.368 293.888 186.368 468.48 0 177.664-67.584 345.6-190.464 473.088-14.848 15.36-35.328 23.04-54.784 23.04-19.456 1.024-38.4-6.144-53.248-20.48z" p-id="9941" fill="#4F46E5"></path></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/yonghu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB