diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts
index 1ac7b36..c9cfbcc 100644
--- a/docs/.vitepress/config.mts
+++ b/docs/.vitepress/config.mts
@@ -35,23 +35,6 @@ export default defineConfig({
},
themeConfig: {
logo: '/favicon.svg',
- sidebarMenuLabel: '目录',
- darkModeSwitchLabel: '外观',
- lightModeSwitchTitle: '切换到浅色模式',
- darkModeSwitchTitle: '切换到深色模式',
- skipToContentLabel: '跳转到内容',
- outlineTitle: '当前页面内容',
- returnToTopLabel: '回到顶部',
- lastUpdated: {
- text: '当前页面最后更新于',
- formatOptions: {
- dateStyle: 'short',
- }
- },
- editLink: {
- pattern: 'https://github.com/AB-aboutTrans/aboutTrans/edit/main/docs/:path',
- text: '对当前页面提出修改建议',
- },
nav: [
{ text: '主页', link: 'index' },
{ text: '关于我们', link: 'about' },
@@ -73,21 +56,32 @@ export default defineConfig({
search: {
provider: 'algolia',
options: {
- appId: '116OHOGKSO',
- apiKey: 'ac690e86bfae8e8965ca0eb54624758b',
- indexName: 'index_ab_vitepress_crawls',
+ mode: 'sidePanel',
askAi: {
- assistantId: 'LPOC8VnwcNjG'
+ assistantId: 'LPOC8VnwcNjG',
+ appId: '116OHOGKSO',
+ apiKey: 'ac690e86bfae8e8965ca0eb54624758b',
+ indexName: 'index_ab_vitepress_crawls',
+ sidePanel: true,
},
searchParameters: {
- facetFilters: []
+ facetFilters: [],
+ // attributesToSnippet: [
+ // "hierarchy.lvl1:15",
+ // "hierarchy.lvl2:15",
+ // "hierarchy.lvl3:15",
+ // "hierarchy.lvl4:15",
+ // "hierarchy.lvl5:15",
+ // "hierarchy.lvl6:15",
+ // "content:50"
+ // ],
},
locales: {
root: {
placeholder: '搜索内容或向 AI 提问',
translations: {
- button: {
- buttonText: '搜索内容',
+ button: {
+ buttonText: '搜索内容',
buttonAriaLabel: '搜索内容',
},
modal: {
@@ -115,17 +109,10 @@ export default defineConfig({
recentConversationsTitle: '最近的对话',
removeRecentConversationButtonTitle: '从历史记录中删除对话',
},
- errorScreen: {
- titleText: '无法获取结果',
- helpText: '请检查网络连接',
+ newConversation: {
+ newConversationTitle: '有什么想问的吗?',
},
- noResultsScreen: {
- noResultsText: '没有找到相关结果',
- suggestedQueryText: '你可以尝试查询',
- reportMissingResultsText: '你认为该查询应该有结果?',
- reportMissingResultsLinkText: '点击反馈',
- },
- resultsScreen: {
+ resultsScreen: {
askAiPlaceholder: '向 AI 提问',
noResultsAskAiPlaceholder: '没有在文档中找到?试试向 AI 提问吧!',
},
@@ -136,6 +123,19 @@ export default defineConfig({
preToolCallText: '搜索中...',
duringToolCallText: '搜索 ',
afterToolCallText: '已搜索',
+ stoppedStreamingText: '你已停止此回复',
+ errorTitleText: '聊天错误',
+ threadDepthExceededMessage: '由于对话过长,为保持回答准确,此对话已关闭。',
+ },
+ errorScreen: {
+ titleText: '无法获取结果',
+ helpText: '请检查网络连接',
+ },
+ noResultsScreen: {
+ noResultsText: '没有找到相关结果',
+ suggestedQueryText: '你可以尝试查询',
+ reportMissingResultsText: '你认为该查询应该有结果?',
+ reportMissingResultsLinkText: '点击反馈',
},
footer: {
selectText: '选择',
@@ -148,26 +148,74 @@ export default defineConfig({
backToSearchText: '返回搜索',
closeKeyAriaLabel: 'Esc 键',
poweredByText: '搜索提供',
- }
- }
- }
- }
- }
- }
+ },
+ },
+ },
+ askAi: {
+ panel: {
+ translations: {
+ promptForm: {
+ promptPlaceholderText: '在这里输入问题',
+ promptAnsweringText: '正在回答...',
+ promptAskAnotherQuestionText: '继续向 AI 提问',
+ promptDisclaimerText: '结果由 AI 生成,请注意核查。',
+ promptLabelText: '按回车发送,Shift + 回车换行。',
+ promptAriaLabelText: '问题输入框',
+ },
+ newConversationScreen: {
+ titleText: '有什么想问的吗?',
+ },
+ conversationScreen: {
+ preToolCallText: '搜索中...',
+ searchingText: '搜索中...',
+ toolCallResultText: '已搜索',
+ conversationDisclaimer: '结果由 AI 生成,请注意核查。',
+ reasoningText: '推理中...',
+ thinkingText: '思考中...',
+ relatedSourcesText: '相关来源',
+ stoppedStreamingText: '你已停止此回复',
+ errorTitleText: '聊天错误',
+ },
+ logo: {
+ poweredByText: '搜索提供',
+ },
+ },
+ },
+ },
+ },
+ },
+ },
},
- notFound: {
- title: '页面未找到',
- quote: '但如果你不改变方向,并且继续寻找,你可能最终会到达你所前往的地方。',
- linkLabel: '返回首页',
- linkText: '返回首页',
+ editLink: {
+ pattern: 'https://github.com/AB-aboutTrans/aboutTrans/edit/main/docs/:path',
+ text: '对当前页面提出修改建议',
},
- footer: {
- message: '本站内容基于 CC BY 4.0 许可发布',
- copyright: `版权所有 © 2023-${new Date().getFullYear()} AB aboutTrans`,
+ lastUpdated: {
+ text: '当前页面最后更新于',
+ formatOptions: {
+ dateStyle: 'short',
+ },
},
docFooter: {
prev: '上一页',
next: '下一页',
},
+ footer: {
+ message: '本站内容基于 CC BY 4.0 许可发布',
+ copyright: `版权所有 © 2023-${new Date().getFullYear()} AB aboutTrans`,
+ },
+ notFound: {
+ title: '页面未找到',
+ quote: '但如果你不改变方向,并且继续寻找,你可能最终会到达你所前往的地方。',
+ linkLabel: '返回首页',
+ linkText: '返回首页',
+ },
+ sidebarMenuLabel: '目录',
+ outlineTitle: '当前页面内容',
+ darkModeSwitchLabel: '外观',
+ lightModeSwitchTitle: '切换到浅色模式',
+ darkModeSwitchTitle: '切换到深色模式',
+ skipToContentLabel: '跳转到内容',
+ returnToTopLabel: '回到顶部',
},
-})
\ No newline at end of file
+})
diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css
index 555b8c0..d819677 100644
--- a/docs/.vitepress/theme/style.css
+++ b/docs/.vitepress/theme/style.css
@@ -10,24 +10,36 @@
--vp-button-brand-active-bg: var(--vp-c-brand-2);
}
-.VPContent > .VPDoc {
- padding-top: 48px !important;
-}
-
-.VPHomeHero .image-src {
- height: unset !important;
+.DocSearch-Action[title="Conversation history"],
+.DocSearch-Action[title="Start a new conversation"],
+.DocSearch-Action.DocSearch-StopStreaming,
+.DocSearch-AskAiScreen-Answer-Footer,
+.DocSearch-AskAiScreen-MessageContent-Tool.Tool--Result,
+.DocSearch-AskAiScreen-RelatedSources,
+.DocSearch-Button-Keys,
+.DocSearch-Divider,
+.DocSearch-Help,
+.DocSearch-Menu-trigger.DocSearch-Action,
+.DocSearch-NoResults-Prefill-List-Items p,
+.DocSearch-Sidepanel-Screen--introduction,
+.DocSearch-StreamingIndicator,
+.vp-doc .header-anchor:before {
+ display: none !important;
}
-@media (max-width: 768px) {
- header > div > div.wrapper > div > div.content {
- overflow: hidden !important;
- }
+.DocSearch-Action.DocSearch-AskAi-Return,
+.DocSearch-Action.DocSearch-Close,
+.DocSearch-Action.DocSearch-Sidepanel-Action-close,
+.DocSearch-Action.DocSearch-Sidepanel-Action-expand,
+.DocSearch-Sidepanel-Prompt--submit,
+.VPNavBarAskAiButton {
+ background-color: transparent !important;
}
-.VPFeature,
-.VPSwitch,
.DocSearch-Button,
-.link {
+.link,
+.VPFeature,
+.VPSwitch {
border-color: transparent !important;
}
@@ -36,35 +48,11 @@
border-color: var(--vp-c-divider) !important;
}
-/* .VPDocFooter a.pager-link,
-.VPLocalNavOutlineDropdown > div.items,
-.custom-block {
- border-radius: 12px;
-} */
-
-.dark .VPHome .VPFeature {
- background-color: rgba(37, 37, 41, 0.5);
-}
-
-.DocSearch-Button-Keys,
-.DocSearch-Help,
-.DocSearch-NoResults-Prefill-List-Items p,
-.DocSearch-AskAiScreen-RelatedSources,
-.DocSearch-AskAiScreen-Answer-Footer,
-.DocSearch-StreamingIndicator,
-.DocSearch-Menu-trigger.DocSearch-Action,
-.DocSearch-Action.DocSearch-StopStreaming,
-.DocSearch-Divider,
-.DocSearch-AskAiScreen-MessageContent-Tool.Tool--Result,
-.vp-doc .header-anchor:before {
- display: none !important;
-}
-
-.DocSearch-Input,
-.DocSearch-Clear,
.DocSearch-AskAiScreen-Disclaimer,
-.DocSearch-Title,
-.DocSearch-Modal-heading.shimmer {
+.DocSearch-Clear,
+.DocSearch-Input,
+.DocSearch-Modal-heading.shimmer,
+.DocSearch-Title {
font-weight: 400 !important;
}
@@ -72,6 +60,11 @@
font-weight: 500 !important;
}
+.DocSearch-AskAiScreen-Disclaimer,
+.footnotes {
+ font-size: 14px !important;
+}
+
.DocSearch-AskAiScreen-Query {
line-height: 28px !important;
}
@@ -80,15 +73,14 @@
margin: -5px 0 0 5px !important;
}
-.footnotes,
-.DocSearch-AskAiScreen-Disclaimer {
- font-size: 14px !important;
-}
-
.DocSearch-Input {
padding-block-start: unset !important;
}
+.DocSearch-Sidepanel-Prompt--submit:not([aria-disabled="true"]):hover {
+ color: #e5006a !important;
+}
+
.DocSearch-Search-Icon {
--icon: url(data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke%2Dlinecap%3D%27round%27%20stroke%2Dlinejoin%3D%27round%27%20stroke%2Dwidth%3D%272%27%3E%3Cpath%20d%3D%27m21%2021l%2D4%2E34%2D4%2E34%27%2F%3E%3Ccircle%20cx%3D%2711%27%20cy%3D%2711%27%20r%3D%278%27%20stroke%2Dwidth%3D%272%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E) !important;
}
@@ -98,7 +90,28 @@
stroke-width: 2 !important;
}
-.DocSearch-Action.DocSearch-Close,
-.DocSearch-Action.DocSearch-AskAi-Return {
- background-color: transparent !important;
+.VPContent > .VPDoc {
+ padding-top: 48px !important;
+}
+
+.VPHomeHero .image-src {
+ height: unset !important;
+}
+
+.dark .DocSearch-Sidepanel-Content,
+.dark .profile,
+.dark .VPHome .VPFeature {
+ background-color: rgba(37, 37, 41, 0.5) !important;
+}
+
+/* .VPDocFooter a.pager-link,
+.VPLocalNavOutlineDropdown > div.items,
+.custom-block {
+ border-radius: 12px;
+} */
+
+@media (max-width: 768px) {
+ header > div > div.wrapper > div > div.content {
+ overflow: hidden !important;
+ }
}