Skip to content

Commit fc313a9

Browse files
committed
feat(nav): 添加Turn状态机、Token计费系统和会话持久化导航项
feat(pages): 新增Tool开发者指南、Turn状态机和会话持久化页面 新增三个核心功能页面: 1. Tool开发者指南 - 提供工具开发的完整文档和示例 2. Turn状态机 - 展示AI响应周期的状态流转和设计原理 3. 会话持久化 - 实现对话记录、上下文压缩和恢复功能 这些页面为开发者提供了系统核心模块的详细文档和可视化展示
1 parent 9ace885 commit fc313a9

6 files changed

Lines changed: 2964 additions & 0 deletions

File tree

src/App.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ const StreamingJsonParserAnimation = lazy(() => import('./pages/StreamingJsonPar
106106
const VimCompositeActionsAnimation = lazy(() => import('./pages/VimCompositeActionsAnimation'));
107107
const PromptProcessingPipelineAnimation = lazy(() => import('./pages/PromptProcessingPipelineAnimation'));
108108
const SlashCommandExecutionAnimation = lazy(() => import('./pages/SlashCommandExecutionAnimation'));
109+
const TurnStateMachine = lazy(() => import('./pages/TurnStateMachine').then(m => ({ default: m.TurnStateMachine })));
110+
const TokenAccountingSystem = lazy(() => import('./pages/TokenAccountingSystem').then(m => ({ default: m.TokenAccountingSystem })));
111+
const SessionPersistence = lazy(() => import('./pages/SessionPersistence').then(m => ({ default: m.SessionPersistence })));
112+
const ToolDeveloperGuide = lazy(() => import('./pages/ToolDeveloperGuide').then(m => ({ default: m.ToolDeveloperGuide })));
109113
const CoreCode = lazy(() => import('./pages/CoreCode').then(m => ({ default: m.CoreCode })));
110114
const LoopMechanism = lazy(() => import('./pages/LoopMechanism').then(m => ({ default: m.LoopMechanism })));
111115

@@ -216,6 +220,12 @@ function App() {
216220
return <InteractionLoop />;
217221
case 'gemini-chat':
218222
return <GeminiChatCore />;
223+
case 'turn-state-machine':
224+
return <TurnStateMachine />;
225+
case 'token-accounting':
226+
return <TokenAccountingSystem />;
227+
case 'session-persistence':
228+
return <SessionPersistence />;
219229
case 'services-arch':
220230
return <ServicesArchitecture />;
221231
case 'system-prompt':
@@ -230,6 +240,8 @@ function App() {
230240
return <MemoryManagement />;
231241
case 'tool-ref':
232242
return <ToolReference />;
243+
case 'tool-dev-guide':
244+
return <ToolDeveloperGuide />;
233245
case 'tool-scheduler':
234246
return <ToolSchedulerDetails />;
235247
case 'tool-arch':

src/nav.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export const navGroups: NavGroup[] = [
3434
{ id: 'lifecycle', label: '请求生命周期', highlight: true },
3535
{ id: 'interaction-loop', label: '交互主循环', highlight: true },
3636
{ id: 'gemini-chat', label: '核心循环' },
37+
{ id: 'turn-state-machine', label: 'Turn状态机', highlight: true },
38+
{ id: 'token-accounting', label: 'Token计费系统', highlight: true },
39+
{ id: 'session-persistence', label: '会话持久化', highlight: true },
3740
{ id: 'services-arch', label: '服务层架构', highlight: true },
3841
{ id: 'system-prompt', label: 'Prompt构建' },
3942
{ id: 'content-gen', label: 'API调用层' },
@@ -49,6 +52,7 @@ export const navGroups: NavGroup[] = [
4952
defaultOpen: false,
5053
items: [
5154
{ id: 'tool-ref', label: '工具参考', highlight: true },
55+
{ id: 'tool-dev-guide', label: '工具开发指南', highlight: true },
5256
{ id: 'tool-scheduler', label: '工具调度详解', highlight: true },
5357
{ id: 'tool-arch', label: '工具架构' },
5458
{ id: 'tool-detail', label: '工具执行' },

0 commit comments

Comments
 (0)