@lobehub/chat 0.111.4 → 0.111.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.i18nrc.js +7 -5
- package/CHANGELOG.md +25 -0
- package/README.md +2 -2
- package/README.zh-CN.md +3 -3
- package/docs/Deployment/Analytics.md +20 -0
- package/docs/{Analytics.zh-CN.md → Deployment/Analytics.zh-CN.md} +5 -0
- package/docs/{Docker-Deployment.md → Deployment/Docker-Deployment.md} +7 -0
- package/docs/{Docker-Deployment.zh-CN.md → Deployment/Docker-Deployment.zh-CN.md} +7 -0
- package/docs/{Environment-Variable.md → Deployment/Environment-Variable.md} +1 -1
- package/docs/{Environment-Variable.zh-CN.md → Deployment/Environment-Variable.zh-CN.md} +1 -1
- package/docs/Development/Architecture.md +47 -0
- package/docs/{Development-Guide → Development}/Architecture.zh-CN.md +11 -1
- package/docs/Development/Chat-API.md +136 -0
- package/docs/{Development-Guide → Development}/Chat-API.zh-CN.md +10 -1
- package/docs/Development/Data-Store-Selectors.md +68 -0
- package/docs/{Development-Guide/Data-Store/Selectors.zh-CN.md → Development/Data-Store-Selectors.zh-CN.md} +1 -1
- package/docs/Development/Feature-Development.md +126 -0
- package/docs/{Development-Guide → Development}/Feature-Development.zh-CN.md +9 -1
- package/docs/Development/Folder-Structure.md +40 -0
- package/docs/Development/Resources.md +19 -0
- package/docs/Development/Steup-Development.md +69 -0
- package/docs/{Development-Guide → Development}/Steup-Development.zh-CN.md +8 -1
- package/docs/Development/Test.md +87 -0
- package/docs/{Development-Guide → Development}/Test.zh-CN.md +9 -1
- package/docs/Development/index.md +43 -0
- package/docs/{Development-Guide → Development}/index.zh-CN.md +6 -1
- package/docs/Home.md +32 -19
- package/docs/_Sidebar.md +29 -19
- package/locales/en_US/chat.json +1 -1
- package/package.json +8 -1
- package/scripts/docsWorkflow/const.ts +14 -0
- package/scripts/docsWorkflow/index.ts +73 -0
- package/scripts/docsWorkflow/toc.ts +60 -0
- package/scripts/docsWorkflow/utils.ts +38 -0
- /package/docs/{Deploy-with-Azure-OpenAI.md → Deployment/Deploy-with-Azure-OpenAI.md} +0 -0
- /package/docs/{Deploy-with-Azure-OpenAI.zh-CN.md → Deployment/Deploy-with-Azure-OpenAI.zh-CN.md} +0 -0
- /package/docs/{Upstream-Sync.md → Deployment/Upstream-Sync.md} +0 -0
- /package/docs/{Upstream-Sync.zh-CN.md → Deployment/Upstream-Sync.zh-CN.md} +0 -0
- /package/docs/{Development-Guide → Development}/Folder-Structure.zh-CN.md +0 -0
- /package/docs/{Development-Guide → Development}/Resources.zh-CN.md +0 -0
- /package/docs/{Lighthouse.md → Others/Lighthouse.md} +0 -0
- /package/docs/{Lighthouse.zh-CN.md → Others/Lighthouse.zh-CN.md} +0 -0
- /package/docs/{Plugin-Development.md → Plugins/Plugin-Development.md} +0 -0
- /package/docs/{Plugin-Development.zh-CN.md → Plugins/Plugin-Development.zh-CN.md} +0 -0
- /package/docs/{Usage-Agents.md → Usage/Usage-Agents.md} +0 -0
- /package/docs/{Usage-Agents.zh-CN.md → Usage/Usage-Agents.zh-CN.md} +0 -0
- /package/docs/{Usage-Topics.md → Usage/Usage-Topics.md} +0 -0
- /package/docs/{Usage-Topics.zh-CN.md → Usage/Usage-Topics.zh-CN.md} +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
dir: 'Usage',
|
|
4
|
+
title: '🤯 LobeChat Usage',
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
dir: 'Deployment',
|
|
8
|
+
title: '🛳 Self Hosting',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
dir: 'Development',
|
|
12
|
+
title: '⌨️ Development',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
dir: 'Agents',
|
|
16
|
+
extra: [
|
|
17
|
+
{
|
|
18
|
+
links: {
|
|
19
|
+
cn: 'https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md',
|
|
20
|
+
en: 'https://github.com/lobehub/lobe-chat-agents',
|
|
21
|
+
},
|
|
22
|
+
titles: {
|
|
23
|
+
cn: '助手索引与提交',
|
|
24
|
+
en: 'Agent Index and Submit',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
title: '🤖 Agents',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
dir: 'Plugins',
|
|
32
|
+
extra: [
|
|
33
|
+
{
|
|
34
|
+
links: {
|
|
35
|
+
cn: 'https://chat-plugin-sdk.lobehub.com',
|
|
36
|
+
en: 'https://chat-plugin-sdk.lobehub.com',
|
|
37
|
+
},
|
|
38
|
+
titles: {
|
|
39
|
+
cn: '插件 SDK 文档',
|
|
40
|
+
en: 'Plugin SDK Docs',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
links: {
|
|
45
|
+
cn: 'https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md',
|
|
46
|
+
en: 'https://github.com/lobehub/lobe-chat-plugins',
|
|
47
|
+
},
|
|
48
|
+
titles: {
|
|
49
|
+
cn: '插件索引与提交',
|
|
50
|
+
en: 'Plugin Index and Submit',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
title: '🧩 Plugins',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
dir: 'Others',
|
|
58
|
+
title: '📊 Others',
|
|
59
|
+
},
|
|
60
|
+
];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import remarkGfm from 'remark-gfm';
|
|
3
|
+
import remarkParse from 'remark-parse';
|
|
4
|
+
import { unified } from 'unified';
|
|
5
|
+
import { visit } from 'unist-util-visit';
|
|
6
|
+
|
|
7
|
+
import { SPLIT } from './const';
|
|
8
|
+
|
|
9
|
+
export const updateDocs = (path: string, content: string) => {
|
|
10
|
+
const md = readFileSync(path, 'utf8');
|
|
11
|
+
const mds = md.split(SPLIT);
|
|
12
|
+
mds[1] = [' ', content, ' '].join('\n\n');
|
|
13
|
+
const result = mds.join(SPLIT);
|
|
14
|
+
writeFileSync(path, result, 'utf8');
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const convertMarkdownToMdast = async (md: string) => {
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
return unified().use(remarkParse).use(remarkGfm).parse(md.trim());
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const getTitle = async (path: string) => {
|
|
23
|
+
const md = readFileSync(path, 'utf8');
|
|
24
|
+
const mdast: any = await convertMarkdownToMdast(md);
|
|
25
|
+
|
|
26
|
+
let title = '';
|
|
27
|
+
visit(mdast, 'heading', (node) => {
|
|
28
|
+
if (node.depth !== 1) return;
|
|
29
|
+
visit(node, 'text', (heading) => {
|
|
30
|
+
title += heading.value;
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return title;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const genMdLink = (title: string, url: string) => {
|
|
37
|
+
return `[${title}](${url})`;
|
|
38
|
+
};
|
|
File without changes
|
/package/docs/{Deploy-with-Azure-OpenAI.zh-CN.md → Deployment/Deploy-with-Azure-OpenAI.zh-CN.md}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|