diff --git a/package.json b/package.json index 840d111..1059215 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,37 @@ "test:coverage": "pnpm -r test:coverage", "lint": "pnpm -r lint", "clean": "pnpm -r exec rm -rf dist node_modules", + "typecheck": "pnpm -r typecheck", + + "core:build": "pnpm --filter @ai-assistant/core build", + "core:dev": "pnpm --filter @ai-assistant/core dev", + "core:test": "pnpm --filter @ai-assistant/core test", + "core:test:watch": "pnpm --filter @ai-assistant/core test:watch", + + "server:build": "pnpm --filter @ai-assistant/server build", "server:start": "pnpm --filter @ai-assistant/server start", "server:dev": "pnpm --filter @ai-assistant/server start:dev", + "server:test": "pnpm --filter @ai-assistant/server test", + + "cli:build": "pnpm --filter @ai-assistant/cli build", + "cli:dev": "pnpm --filter @ai-assistant/cli dev", + "cli:serve": "pnpm --filter @ai-assistant/cli serve", + + "web:build": "pnpm --filter @ai-assistant/web build", "web:dev": "pnpm --filter @ai-assistant/web dev", + "web:preview": "pnpm --filter @ai-assistant/web preview", + "web:typecheck": "pnpm --filter @ai-assistant/web typecheck", + + "ui:build": "pnpm --filter @ai-assistant/ui build", + "ui:dev": "pnpm --filter @ai-assistant/ui dev", + + "desktop:build": "pnpm --filter @ai-assistant/desktop build", "desktop:dev": "pnpm --filter @ai-assistant/desktop dev", - "desktop:build": "pnpm --filter @ai-assistant/desktop build" + "desktop:build:debug": "pnpm --filter @ai-assistant/desktop build:debug", + + "website:build": "pnpm --filter @ai-assistant/website build", + "website:dev": "pnpm --filter @ai-assistant/website dev", + "website:preview": "pnpm --filter @ai-assistant/website preview" }, "keywords": [ "ai", diff --git a/packages/website/src/components/DocsSidebar.astro b/packages/website/src/components/DocsSidebar.astro new file mode 100644 index 0000000..a05cf1f --- /dev/null +++ b/packages/website/src/components/DocsSidebar.astro @@ -0,0 +1,73 @@ +--- +interface Props { + currentPath: string; +} + +const { currentPath } = Astro.props; + +const navigation = [ + { + title: '开始', + items: [ + { title: '概览', href: '/docs' }, + ], + }, + { + title: '架构设计', + items: [ + { title: 'GUI Server/Client 架构', href: '/docs/architecture' }, + ], + }, + { + title: '功能设计', + items: [ + { title: '编辑模式', href: '/docs/features/edit-modes' }, + { title: '增强型仓库地图', href: '/docs/features/repo-map' }, + { title: '多模型支持', href: '/docs/features/multi-model' }, + { title: 'Linting 集成', href: '/docs/features/linting' }, + { title: '测试集成', href: '/docs/features/testing' }, + { title: '对话历史管理', href: '/docs/features/chat-history' }, + { title: 'Watch 模式', href: '/docs/features/watch-mode' }, + { title: '语音输入', href: '/docs/features/voice-input' }, + { title: '浏览器 GUI', href: '/docs/features/browser-gui' }, + { title: '配置管理', href: '/docs/features/configuration' }, + { title: 'Checkpoint 增强', href: '/docs/features/checkpoint' }, + ], + }, +]; + +function isActive(href: string): boolean { + // 精确匹配或以 href 开头(用于子路径) + if (currentPath === href || currentPath === href + '/') { + return true; + } + return false; +} +--- + + diff --git a/packages/website/src/layouts/DocsLayout.astro b/packages/website/src/layouts/DocsLayout.astro new file mode 100644 index 0000000..d9c3506 --- /dev/null +++ b/packages/website/src/layouts/DocsLayout.astro @@ -0,0 +1,142 @@ +--- +import DocsSidebar from '../components/DocsSidebar.astro'; + +interface Props { + title: string; + description?: string; +} + +const { title, description } = Astro.props; +const currentPath = Astro.url.pathname; +--- + + + + + + + + + {title} - AI Terminal Assistant + + + + + + +
+ + + + +
+
+
+ +
+
+
+
+ + + + diff --git a/packages/website/src/pages/index.astro b/packages/website/src/pages/index.astro index 0a3060e..5681451 100644 --- a/packages/website/src/pages/index.astro +++ b/packages/website/src/pages/index.astro @@ -45,6 +45,7 @@ const features = [
功能 快速开始 + 文档