From 5fbf0cbf31ef4b567f57c22d322b58b18f0f2bf5 Mon Sep 17 00:00:00 2001 From: Ls <2391972606@qq.com> Date: Sat, 25 Apr 2026 17:12:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 122 ++++++++++++++++++++++++ Web/src/app.vue | 4 +- Web/src/assets/css/style.css | 123 ++++++++++++++++++++++++ Web/src/extends/MessageExtend.ts | 102 ++++++++++++++++++++ Web/src/pages/auth/login.vue | 51 +++------- Web/src/pages/index.vue | 156 ++++++++++++++++--------------- 6 files changed, 445 insertions(+), 113 deletions(-) create mode 100644 AGENTS.md create mode 100644 Web/src/extends/MessageExtend.ts diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..eab94a2 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,122 @@ +# AGENTS.md + +Guidelines for AI agents working in this SeaTime (航海时代) codebase. + +## Project Structure + +Full-stack web game with two components: +- **Web/**: Nuxt 4 (Vue 3 + TypeScript) frontend +- **Service/**: .NET 10 Web API backend using Photon.Core framework + +## Build Commands + +### Web (Frontend) + +```bash +cd Web +npm install # Install dependencies +npm run dev # Start dev server on port 5068 +npm run build # Production build +npm run generate # Static site generation +npm run preview # Preview production build +npm run postinstall # Nuxt prepare (runs automatically after install) +``` + +### Service (Backend) + +```bash +cd Service +dotnet build # Build solution +dotnet run --project Application.Web # Run web API +dotnet watch --project Application.Web # Run with hot reload +``` + +## Testing Commands + +**No test framework configured yet.** To add tests: + +- **Web**: Install Vitest or Jest for unit tests +- **Service**: Use `dotnet test` after adding xUnit/NUnit test projects + +When tests are added, run them with: +```bash +# Web (Vitest example) +npm run test # Run all tests +npm run test:unit # Run unit tests only +npm run test -- # Run single test file + +# Service +dotnet test # Run all tests +dotnet test --filter "FullyQualifiedName~ClassName" # Run specific test class +``` + +## Code Style Guidelines + +### TypeScript / Vue (Web) + +- **Imports**: Use `~/` alias for src directory imports (e.g., `import type { IUserInfo } from '~/types/user'`) +- **Vue SFCs**: Use `