Skip to content

Commit a5275e5

Browse files
authored
Merge pull request #422 from Yumiue/codex/upstream-pages-followup
style(www): 更新官网品牌视觉主题
2 parents cc0b0e7 + 3a04fe5 commit a5275e5

22 files changed

Lines changed: 1619 additions & 396 deletions

www/.vitepress/config.mts

Lines changed: 156 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,197 @@
1-
import { defineConfig } from 'vitepress'
1+
import { defineConfig } from "vitepress";
22

3-
const repoUrl = 'https://github.com/1024XEngineer/neo-code'
3+
const repoUrl = "https://github.com/1024XEngineer/neo-code";
4+
const docsBase = `${repoUrl}/blob/main/docs`;
5+
const siteUrl = "https://1024xengineer.github.io/neo-code/";
6+
const brandImageUrl = `${siteUrl}brand/neocode-mark.png`;
47

58
export default defineConfig({
6-
title: 'NeoCode',
7-
description: '基于 Go + Bubble Tea 的本地 Coding Agent',
8-
lang: 'zh-CN',
9-
base: '/neo-code/',
9+
title: "NeoCode",
10+
description: "基于 Go + Bubble Tea 的本地 Coding Agent 用户指南",
11+
lang: "zh-CN",
12+
base: "/neo-code/",
1013
cleanUrls: true,
1114
lastUpdated: true,
1215
head: [
13-
['meta', { name: 'theme-color', content: '#0f766e' }],
14-
['meta', { property: 'og:title', content: 'NeoCode' }],
16+
["meta", { name: "theme-color", content: "#090B1A" }],
17+
["meta", { property: "og:title", content: "NeoCode 用户指南" }],
1518
[
16-
'meta',
19+
"meta",
1720
{
18-
property: 'og:description',
19-
content: '一个围绕 ReAct 主链路构建的本地 Go + Bubble Tea Coding Agent。'
20-
}
21+
property: "og:description",
22+
content:
23+
"围绕真实命令、配置与 Gateway 使用场景整理的 NeoCode 用户指导网站。",
24+
},
2125
],
22-
['meta', { property: 'og:type', content: 'website' }],
23-
['link', { rel: 'icon', href: '/neo-code/brand/neocode-mark.svg' }]
26+
["meta", { property: "og:type", content: "website" }],
27+
[
28+
"meta",
29+
{
30+
property: "og:image",
31+
content: brandImageUrl,
32+
},
33+
],
34+
["meta", { name: "twitter:card", content: "summary" }],
35+
["link", { rel: "icon", href: "/neo-code/brand/neocode-mark.png" }],
2436
],
37+
markdown: {
38+
config(md) {
39+
md.linkify.set({ fuzzyLink: false });
40+
},
41+
},
2542
themeConfig: {
26-
logo: '/brand/neocode-mark.svg',
27-
siteTitle: 'NeoCode',
43+
logo: "/brand/neocode-mark.png",
44+
siteTitle: "NeoCode",
2845
search: {
29-
provider: 'local'
46+
provider: "local",
3047
},
31-
socialLinks: [
32-
{ icon: 'github', link: repoUrl }
33-
]
48+
socialLinks: [{ icon: "github", link: repoUrl }],
3449
},
3550
locales: {
3651
root: {
37-
label: '简体中文',
38-
lang: 'zh-CN',
39-
link: '/',
52+
label: "简体中文",
53+
lang: "zh-CN",
54+
link: "/",
4055
themeConfig: {
4156
nav: [
42-
{ text: '文档', link: '/docs/quick-start' },
43-
{ text: 'GitHub', link: repoUrl }
57+
{ text: "开始使用", link: "/guide/" },
58+
{ text: "配置", link: "/guide/configuration" },
59+
{ text: "命令与会话", link: "/guide/quick-start" },
60+
{ text: "Gateway", link: "/guide/gateway" },
61+
{ text: "深入阅读", link: "/reference/" },
62+
{ text: "GitHub", link: repoUrl },
4463
],
4564
sidebar: {
46-
'/docs/': [
47-
{ text: '快速开始', link: '/docs/quick-start' },
65+
"/guide/": [
4866
{
49-
text: '使用指南',
67+
text: "开始使用",
5068
items: [
51-
{ text: '配置', link: '/docs/guides/configuration' },
52-
{ text: '切换模型', link: '/docs/guides/providers' },
53-
{ text: 'MCP 配置', link: '/docs/guides/mcp' },
54-
{ text: '更新升级', link: '/docs/guides/update' }
55-
]
69+
{ text: "总览", link: "/guide/" },
70+
{ text: "NeoCode 是什么", link: "/guide/getting-started" },
71+
{ text: "安装与运行", link: "/guide/install" },
72+
{ text: "首次上手", link: "/guide/quick-start" },
73+
],
5674
},
5775
{
58-
text: '参考',
76+
text: "日常使用",
5977
items: [
60-
{ text: '架构概览', link: '/docs/reference/architecture' }
61-
]
62-
}
63-
]
64-
},
65-
footer: {
66-
message: '围绕可验证主链路构建的本地 Coding Agent。',
67-
copyright: 'MIT Licensed'
78+
{ text: "配置入口", link: "/guide/configuration" },
79+
{ text: "工作区与会话", link: "/guide/workspace-session" },
80+
{ text: "记忆与 Skills", link: "/guide/memo-skills" },
81+
{ text: "Gateway 与 URL Dispatch", link: "/guide/gateway" },
82+
{ text: "升级与版本检查", link: "/guide/update" },
83+
],
84+
},
85+
],
86+
"/reference/": [
87+
{
88+
text: "深入阅读",
89+
items: [
90+
{ text: "文档导航", link: "/reference/" },
91+
{ text: "旧入口兼容页", link: "/docs/" },
92+
],
93+
},
94+
],
95+
"/docs/": [
96+
{
97+
text: "文档入口",
98+
items: [
99+
{ text: "总览", link: "/docs/" },
100+
{ text: "开始使用", link: "/guide/" },
101+
{ text: "深入阅读", link: "/reference/" },
102+
],
103+
},
104+
],
105+
"/": [
106+
{
107+
text: "快速导航",
108+
items: [
109+
{ text: "开始使用", link: "/guide/" },
110+
{ text: "安装与运行", link: "/guide/install" },
111+
{ text: "首次上手", link: "/guide/quick-start" },
112+
{ text: "配置入口", link: "/guide/configuration" },
113+
],
114+
},
115+
],
68116
},
69117
outline: {
70-
label: '本页目录'
118+
level: [2, 3],
119+
label: "本页目录",
71120
},
72-
returnToTopLabel: '返回顶部',
73-
sidebarMenuLabel: '菜单',
74-
darkModeSwitchLabel: '主题',
75-
lightModeSwitchTitle: '切换到浅色模式',
76-
darkModeSwitchTitle: '切换到深色模式'
77-
}
121+
docFooter: {
122+
prev: "上一页",
123+
next: "下一页",
124+
},
125+
editLink: {
126+
pattern: `${repoUrl}/edit/main/www/:path`,
127+
text: "在 GitHub 上编辑此页",
128+
},
129+
footer: {
130+
message: "围绕真实命令、配置与主链路整理的 NeoCode 用户指南。",
131+
copyright: "MIT Licensed",
132+
},
133+
returnToTopLabel: "返回顶部",
134+
sidebarMenuLabel: "菜单",
135+
darkModeSwitchLabel: "主题",
136+
lightModeSwitchTitle: "切换到浅色模式",
137+
darkModeSwitchTitle: "切换到深色模式",
138+
},
78139
},
79140
en: {
80-
label: 'English',
81-
lang: 'en-US',
82-
link: '/en/',
83-
description: 'A local Go + Bubble Tea coding agent built around a verifiable ReAct loop.',
141+
label: "English",
142+
lang: "en-US",
143+
link: "/en/",
144+
description:
145+
"A compact NeoCode docs entrypoint focused on current, verifiable behavior.",
84146
themeConfig: {
85147
nav: [
86-
{ text: 'Docs', link: '/en/docs/quick-start' },
87-
{ text: 'GitHub', link: repoUrl }
148+
{ text: "Home", link: "/en/" },
149+
{ text: "Docs", link: "/en/docs/" },
150+
{ text: "GitHub", link: repoUrl },
88151
],
89152
sidebar: {
90-
'/en/docs/': [
91-
{ text: 'Quick Start', link: '/en/docs/quick-start' },
153+
"/en/docs/": [
92154
{
93-
text: 'Guides',
155+
text: "Overview",
94156
items: [
95-
{ text: 'Configuration', link: '/en/docs/guides/configuration' },
96-
{ text: 'Switching Models', link: '/en/docs/guides/providers' },
97-
{ text: 'MCP Configuration', link: '/en/docs/guides/mcp' },
98-
{ text: 'Updating', link: '/en/docs/guides/update' }
99-
]
157+
{ text: "Docs Index", link: "/en/docs/" },
158+
{ text: "Chinese Guide", link: "/guide/" },
159+
{ text: "Architecture Notes", link: "/reference/" },
160+
],
100161
},
101-
{
102-
text: 'Reference',
103-
items: [
104-
{ text: 'Architecture', link: '/en/docs/reference/architecture' }
105-
]
106-
}
107-
]
108-
},
109-
footer: {
110-
message: 'A local coding agent shaped around a verifiable execution loop.',
111-
copyright: 'MIT Licensed'
162+
],
112163
},
113164
outline: {
114-
label: 'On this page'
165+
level: [2, 3],
166+
label: "On this page",
167+
},
168+
docFooter: {
169+
prev: "Previous page",
170+
next: "Next page",
115171
},
116-
returnToTopLabel: 'Back to top',
117-
sidebarMenuLabel: 'Menu',
118-
darkModeSwitchLabel: 'Appearance',
119-
lightModeSwitchTitle: 'Switch to light theme',
120-
darkModeSwitchTitle: 'Switch to dark theme'
121-
}
122-
}
172+
editLink: {
173+
pattern: `${repoUrl}/edit/main/www/:path`,
174+
text: "Edit this page on GitHub",
175+
},
176+
footer: {
177+
message:
178+
"A compact docs entrypoint built from NeoCode's current implementation.",
179+
copyright: "MIT Licensed",
180+
},
181+
returnToTopLabel: "Back to top",
182+
sidebarMenuLabel: "Menu",
183+
darkModeSwitchLabel: "Appearance",
184+
lightModeSwitchTitle: "Switch to light theme",
185+
darkModeSwitchTitle: "Switch to dark theme",
186+
},
187+
},
123188
},
124-
markdown: {
125-
config(md) {
126-
md.linkify.set({ fuzzyLink: false })
127-
}
128-
}
129-
})
189+
sitemap: {
190+
hostname: siteUrl,
191+
},
192+
vite: {
193+
define: {
194+
__NEOCODE_DOCS_BASE__: JSON.stringify(docsBase),
195+
},
196+
},
197+
});

www/.vitepress/theme/components/ArchitectureGrid.vue

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,43 @@
11
<script setup lang="ts">
22
defineProps<{
3-
locale?: 'zh' | 'en'
3+
locale?: 'zh' | 'en'
44
}>()
5+
6+
const layeringCode = 'TUI -> Gateway -> Runtime -> Provider / Tool Manager'
57
</script>
68

79
<template>
810
<div class="info-grid">
911
<div class="info-card architecture-block">
10-
<h3>{{ locale === 'en' ? 'Core layering' : '核心分层' }}</h3>
11-
<pre><code>TUI -&gt; Runtime -&gt; Provider / Tool Manager</code></pre>
12+
<h3>{{ locale === 'en' ? 'Main execution path' : '主执行链路' }}</h3>
13+
<CodePanel
14+
:code="layeringCode"
15+
language="text"
16+
:copy-label="locale === 'en' ? 'Copy' : '复制'"
17+
:copied-label="locale === 'en' ? 'Copied' : '已复制'"
18+
:failed-label="locale === 'en' ? 'Failed' : '复制失败'"
19+
/>
1220
<p v-if="locale === 'en'">
13-
New capabilities are expected to join the main path, not bypass it with ad-hoc UI logic or direct tool execution.
21+
NeoCode keeps the terminal UI, gateway relay, runtime orchestration, and tool/provider integration on one explicit path.
1422
</p>
1523
<p v-else>
16-
新能力默认沿主链路接入,不在 TUI 或 runtime 里直接写工具执行逻辑
24+
NeoCode 把终端 UI、网关中继、Runtime 编排与 Tool/Provider 能力固定在一条清晰主链路里
1725
</p>
1826
</div>
1927

2028
<div class="info-card">
21-
<h3>{{ locale === 'en' ? 'Key modules' : '关键模块' }}</h3>
29+
<h3>{{ locale === 'en' ? 'What each layer owns' : '各层负责什么' }}</h3>
2230
<div class="info-lines" v-if="locale === 'en'">
23-
<p><code>internal/runtime</code>: ReAct loop, event stream, tool-call orchestration</p>
24-
<p><code>internal/tools</code>: tool contracts, validation, execution, and result normalization</p>
25-
<p><code>internal/provider</code>: model protocol differences, request shaping, response parsing</p>
26-
<p><code>internal/tui</code>: Bubble Tea state machine and runtime event rendering</p>
31+
<p><code>internal/tui</code>: renders runtime events and slash-command interactions</p>
32+
<p><code>internal/gateway</code>: relays IPC and network requests, auth, and streaming events</p>
33+
<p><code>internal/runtime</code>: owns the ReAct loop, tool orchestration, session flow, and stop conditions</p>
34+
<p><code>internal/provider</code> / <code>internal/tools</code>: isolate model protocol differences and executable tools</p>
2735
</div>
2836
<div class="info-lines" v-else>
29-
<p><code>internal/runtime</code>:ReAct 主循环、事件流、tool call 编排</p>
30-
<p><code>internal/tools</code>:工具契约、参数校验、执行与结果收敛</p>
31-
<p><code>internal/provider</code>:模型协议差异、请求组装与响应解析</p>
32-
<p><code>internal/tui</code>:Bubble Tea 状态机与 runtime 事件展示</p>
37+
<p><code>internal/tui</code>:渲染 runtime 事件、Slash 命令和会话界面</p>
38+
<p><code>internal/gateway</code>:负责 IPC / 网络请求接入、鉴权与流式事件中继</p>
39+
<p><code>internal/runtime</code>:负责 ReAct 主循环、tool 编排、会话流转与停止条件</p>
40+
<p><code>internal/provider</code> / <code>internal/tools</code>:隔离模型协议差异并统一可执行工具能力</p>
3341
</div>
3442
</div>
3543
</div>

0 commit comments

Comments
 (0)