Skip to content

Commit 782b085

Browse files
authored
Merge pull request #188 from apconw/dev
fix bug
2 parents 90ef2d4 + 92cabbb commit 782b085

File tree

6 files changed

+344
-40
lines changed

6 files changed

+344
-40
lines changed

docker/Dockerfile.base

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,17 @@ RUN pnpm run build && \
3434
find . -name "*.md" -not -path "./dist/*" -delete 2>/dev/null || true
3535

3636
# ============ 阶段2: 构建 Python 依赖 ============
37+
# 从 uv 官方多架构镜像获取正确架构的 uv 二进制
38+
# 解决 Mac M1 上通过 QEMU 模拟 amd64 时 pipx install uv 获取错误架构的问题
39+
FROM ghcr.io/astral-sh/uv:0.8.0 AS uv-bin
40+
3741
FROM python:3.11-slim-bookworm AS backend-builder
3842

3943
WORKDIR /aix-db
4044

45+
# 从官方镜像复制 uv 二进制(buildx 会自动为目标架构拉取对应的镜像)
46+
COPY --from=uv-bin /uv /usr/local/bin/uv
47+
4148
# 设置镜像源和 PATH
4249
ENV PIP_INDEX_URL="https://mirrors.aliyun.com/pypi/simple" \
4350
PIP_EXTRA_INDEX_URL="https://pypi.doubanio.com/simple" \
@@ -50,30 +57,33 @@ ENV PIP_INDEX_URL="https://mirrors.aliyun.com/pypi/simple" \
5057
# 只复制依赖文件
5158
COPY pyproject.toml uv.lock* requirements.txt* ./
5259

53-
# 安装系统依赖和 Python 依赖
60+
# 安装系统编译依赖
5461
RUN set -eux; \
55-
apt-get update && \
56-
apt-get install -y --no-install-recommends \
62+
apt-get update -o Acquire::Check-Valid-Until=false -o Acquire::AllowInsecureRepositories=true && \
63+
apt-get install -y --no-install-recommends --allow-unauthenticated \
5764
gcc \
5865
g++ \
5966
python3-dev \
6067
libpq-dev \
61-
libffi-dev \
62-
&& \
63-
pip install --no-cache-dir --no-compile pipx && \
64-
pipx install "uv==0.8.0" && \
68+
libffi-dev
69+
70+
# 安装 Python 依赖
71+
RUN set -eux; \
6572
uv venv --clear && \
6673
. .venv/bin/activate && \
67-
uv sync --no-cache --index-url https://mirrors.aliyun.com/pypi/simple --extra-index-url "" && \
68-
# 只进行安全的清理(保留所有元数据和 entry points)
69-
find .venv -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true && \
70-
find .venv -type f -name "*.pyc" -delete && \
71-
find .venv -type f -name "*.pyo" -delete && \
72-
# 清理构建工具
74+
uv sync --frozen --no-cache --no-install-project \
75+
--index-url https://mirrors.aliyun.com/pypi/simple && \
76+
# 验证关键依赖安装成功
77+
python -c "import sanic; print(f'sanic {sanic.__version__} installed')"
78+
79+
# 清理缓存和构建工具
80+
RUN find .venv -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null; \
81+
find .venv -type f -name "*.pyc" -delete 2>/dev/null; \
82+
find .venv -type f -name "*.pyo" -delete 2>/dev/null; \
7383
apt-get purge -y gcc g++ python3-dev libpq-dev libffi-dev && \
7484
apt-get autoremove -y --purge && \
7585
apt-get clean && \
76-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache /root/.local/bin/uv
86+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache /usr/local/bin/uv
7787

7888
# ============ 阶段3: 基础运行镜像 ============
7989
FROM python:3.11-slim-bookworm

web/components.d.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,18 @@ declare module 'vue' {
1616
IconFontQatypeIcon: typeof import('./src/components/IconFont/qatype-icon.vue')['default']
1717
IconifyIcon: typeof import('./src/components/IconifyIcon/index.vue')['default']
1818
LayoutDefault: typeof import('./src/components/Layout/default.vue')['default']
19-
LayoutSidearPage: typeof import('./src/components/Layout/SidearPage.vue')['default']
2019
LayoutSidebarPage: typeof import('./src/components/Layout/sidebar-page.vue')['default']
2120
LayoutSlotArea: typeof import('./src/components/Layout/SlotArea.vue')['default']
2221
LayoutSlotCenterPanel: typeof import('./src/components/Layout/SlotCenterPanel.vue')['default']
2322
LayoutSlotFrame: typeof import('./src/components/Layout/SlotFrame.vue')['default']
2423
LlmForm: typeof import('./src/components/llm/llm-form.vue')['default']
25-
LLMForm: typeof import('./src/components/LLM/LLMForm.vue')['default']
2624
MarkdownPreview: typeof import('./src/components/MarkdownPreview/index.vue')['default']
2725
MarkdownPreviewHtmlReportViewer: typeof import('./src/components/MarkdownPreview/HtmlReportViewer.vue')['default']
2826
MarkdownPreviewMarkdownAntv: typeof import('./src/components/MarkdownPreview/markdown-antv.vue')['default']
29-
MarkdownPreviewMarkdownEcharts: typeof import('./src/components/MarkdownPreview/MarkdownEcharts.vue')['default']
30-
MarkdownPreviewMarkdownTable: typeof import('./src/components/MarkdownPreview/MarkdownTable.vue')['default']
3127
NavigationNavBar: typeof import('./src/components/Navigation/nav-bar.vue')['default']
3228
NavigationNavFooter: typeof import('./src/components/Navigation/nav-footer.vue')['default']
3329
NavigationNavOctocat: typeof import('./src/components/Navigation/nav-octocat.vue')['default']
3430
NavigationNavSidebar: typeof import('./src/components/Navigation/nav-sidebar.vue')['default']
35-
NavigationNavSideBar: typeof import('./src/components/Navigation/NavSideBar.vue')['default']
3631
NavigationSideBar: typeof import('./src/components/Navigation/SideBar.vue')['default']
3732
NBadge: typeof import('naive-ui')['NBadge']
3833
NButton: typeof import('naive-ui')['NButton']
@@ -43,12 +38,13 @@ declare module 'vue' {
4338
NDataTable: typeof import('naive-ui')['NDataTable']
4439
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
4540
NDivider: typeof import('naive-ui')['NDivider']
41+
NDrawer: typeof import('naive-ui')['NDrawer']
42+
NDrawerContent: typeof import('naive-ui')['NDrawerContent']
4643
NDropdown: typeof import('naive-ui')['NDropdown']
4744
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
4845
NDynamicTags: typeof import('naive-ui')['NDynamicTags']
4946
NEllipsis: typeof import('naive-ui')['NEllipsis']
5047
NEmpty: typeof import('naive-ui')['NEmpty']
51-
NFloatButton: typeof import('naive-ui')['NFloatButton']
5248
NForm: typeof import('naive-ui')['NForm']
5349
NFormItem: typeof import('naive-ui')['NFormItem']
5450
NGrid: typeof import('naive-ui')['NGrid']
@@ -58,7 +54,6 @@ declare module 'vue' {
5854
NInputNumber: typeof import('naive-ui')['NInputNumber']
5955
NLayout: typeof import('naive-ui')['NLayout']
6056
NLayoutContent: typeof import('naive-ui')['NLayoutContent']
61-
NLayoutHeader: typeof import('naive-ui')['NLayoutHeader']
6257
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
6358
NLoadingBarProvider: typeof import('naive-ui')['NLoadingBarProvider']
6459
NMessageProvider: typeof import('naive-ui')['NMessageProvider']
@@ -73,10 +68,8 @@ declare module 'vue' {
7368
NSelect: typeof import('naive-ui')['NSelect']
7469
NSpace: typeof import('naive-ui')['NSpace']
7570
NSpin: typeof import('naive-ui')['NSpin']
76-
NSplit: typeof import('naive-ui')['NSplit']
7771
NStep: typeof import('naive-ui')['NStep']
7872
NSteps: typeof import('naive-ui')['NSteps']
79-
NSwitch: typeof import('naive-ui')['NSwitch']
8073
NTag: typeof import('naive-ui')['NTag']
8174
NText: typeof import('naive-ui')['NText']
8275
NTooltip: typeof import('naive-ui')['NTooltip']

web/src/router/child-routes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
const LayoutDefault = () => import('@/components/Layout/default.vue')
22

33
const childrenRoutes: Array<RouteRecordRaw> = [
4+
{
5+
path: 'skill-center',
6+
name: 'SkillCenter',
7+
component: () => import('@/views/skill-center.vue'),
8+
meta: { requiresAuth: true },
9+
},
410
{
511
path: 'chat',
612
meta: { requiresAuth: true },

web/src/views/chat/default-page.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ const bottomIcons = [
661661
</template>
662662

663663
<style scoped lang="scss">
664+
@use "sass:color";
664665
// ============================================
665666
// 设计系统变量
666667
// ============================================
@@ -850,7 +851,7 @@ $shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
850851
851852
&:hover {
852853
box-shadow: $shadow-xl;
853-
border-color: darken($border-color, 5%);
854+
border-color: color.adjust($border-color, $lightness: -5%);
854855
transform: translateY(-2px);
855856
}
856857
@@ -958,7 +959,7 @@ $shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
958959
}
959960
960961
&:hover {
961-
background-color: darken($bg-subtle, 3%);
962+
background-color: color.adjust($bg-subtle, $lightness: -3%);
962963
color: $text-primary;
963964
border-color: $border-color;
964965
transform: translateY(-1px);
@@ -1077,7 +1078,7 @@ $shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
10771078
border-radius: 3px;
10781079
10791080
&:hover {
1080-
background: darken($border-color, 10%);
1081+
background: color.adjust($border-color, $lightness: -10%);
10811082
}
10821083
}
10831084
}
@@ -1157,7 +1158,7 @@ $shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
11571158
border-radius: 3px;
11581159
11591160
&:hover {
1160-
background: darken($border-color, 10%);
1161+
background: color.adjust($border-color, $lightness: -10%);
11611162
}
11621163
}
11631164
}

web/src/views/chat/index.vue

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ const hasMoreConversationHistory = computed(
6767
// 新增:专门用于控制转场动画的Key,避免因 currentConversationChatId 变化(如追加消息时)导致组件重载
6868
const chatTransitionKey = ref('chat-list')
6969
70+
// 技能中心:跳转独立页面
71+
function handleSkillCenterClick() {
72+
router.push({ name: 'SkillCenter' })
73+
}
74+
7075
// 管理对话
7176
const isModalOpen = ref(false)
7277
function openModal() {
@@ -1803,9 +1808,10 @@ const handleHistoryClick = async (item: any) => {
18031808

18041809
<div
18051810
class="my-space flex items-center gap-2 text-[#6A6A6A] hover:text-[#7E6BF2] cursor-pointer text-[14px] font-normal transition-colors history-item-text"
1811+
@click="handleSkillCenterClick"
18061812
>
1807-
<div class="i-hugeicons:folder-01 text-18"></div>
1808-
<span>我的空间</span>
1813+
<div class="i-hugeicons:magic-wand-01 text-18"></div>
1814+
<span>技能中心</span>
18091815
</div>
18101816
</div>
18111817
</div>
@@ -2447,6 +2453,7 @@ const handleHistoryClick = async (item: any) => {
24472453
</template>
24482454

24492455
<style lang="scss" scoped>
2456+
@use "sass:color";
24502457
// ============================================
24512458
// 设计系统变量 - 与 default-page.vue 保持一致
24522459
// ============================================
@@ -2489,6 +2496,9 @@ $shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
24892496
font-family: $font-family-base;
24902497
-webkit-font-smoothing: antialiased;
24912498
-moz-osx-font-smoothing: grayscale;
2499+
// Firefox 滚动条样式(置于嵌套规则之前,避免 mixed-decls 警告)
2500+
scrollbar-width: thin;
2501+
scrollbar-color: rgba(138, 138, 138, 0.2) transparent;
24922502
24932503
* {
24942504
font-family: $font-family-base;
@@ -2512,10 +2522,6 @@ $shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
25122522
background: rgba(138, 138, 138, 0.4);
25132523
}
25142524
}
2515-
2516-
// Firefox 滚动条样式
2517-
scrollbar-width: thin;
2518-
scrollbar-color: rgba(138, 138, 138, 0.2) transparent;
25192525
}
25202526
25212527
.new-chat-btn {
@@ -2552,7 +2558,7 @@ $shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
25522558
}
25532559
25542560
&:hover {
2555-
background-color: darken($bg-subtle, 2%);
2561+
background-color: color.adjust($bg-subtle, $lightness: -2%);
25562562
}
25572563
}
25582564
@@ -2667,7 +2673,7 @@ $shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
26672673
border-radius: 3px;
26682674
26692675
&:hover {
2670-
background: darken($border-color, 15%);
2676+
background: color.adjust($border-color, $lightness: -15%);
26712677
}
26722678
}
26732679
}
@@ -2699,7 +2705,7 @@ $shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
26992705
background: $border-color;
27002706
27012707
&:hover {
2702-
background: darken($border-color, 15%);
2708+
background: color.adjust($border-color, $lightness: -15%);
27032709
}
27042710
}
27052711
}
@@ -2819,7 +2825,7 @@ $shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
28192825
}
28202826
28212827
&:hover {
2822-
background-color: darken($bg-subtle, 3%);
2828+
background-color: color.adjust($bg-subtle, $lightness: -3%);
28232829
color: $text-primary;
28242830
border-color: $border-color;
28252831
@@ -3015,11 +3021,11 @@ $shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
30153021
}
30163022
30173023
::-webkit-scrollbar-thumb {
3018-
background: lighten($primary-color, 30%);
3024+
background: color.adjust($primary-color, $lightness: 30%);
30193025
border-radius: 3px;
30203026
30213027
&:hover {
3022-
background: lighten($primary-color, 20%);
3028+
background: color.adjust($primary-color, $lightness: 20%);
30233029
}
30243030
}
30253031
@@ -3202,7 +3208,7 @@ $shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
32023208
border-radius: 3px;
32033209
32043210
&:hover {
3205-
background-color: darken($border-color, 15%);
3211+
background-color: color.adjust($border-color, $lightness: -15%);
32063212
}
32073213
}
32083214
}

0 commit comments

Comments
 (0)