mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2026-01-23 22:43:28 +00:00
temp
This commit is contained in:
1
.serena/.gitignore
vendored
Normal file
1
.serena/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/cache
|
||||
27
.serena/memories/project_overview.md
Normal file
27
.serena/memories/project_overview.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# 项目概览(yys-editor)
|
||||
|
||||
目标与定位
|
||||
- yys-editor 是一个基于浏览器的可视化编辑器,用于拖拽排布素材并生成展示效果(围绕式神/御魂等要素)。
|
||||
- 适合快速制作、调整与导出展示图(如阵容/排行等)。
|
||||
|
||||
技术要点
|
||||
- Vue 3 + Vite + Element Plus + Pinia + vue-i18n
|
||||
- 入口:`index.html` -> `/src/main.js` -> `App.vue`
|
||||
- 路径别名:`@` -> `src/`
|
||||
- 资源:大量静态图片位于 `public/assets/`
|
||||
- 语言:中文、日文(从浏览器语言推断,fallback 为 `zh`)
|
||||
|
||||
当前现状
|
||||
- 包管理器:npm(存在 `package-lock.json`)
|
||||
- 脚本:`dev`/`build`/`preview`/`lint`/`format`
|
||||
- Lint/Format:ESLint + Prettier(无项目级 Prettier 配置文件,使用默认)
|
||||
- 测试:未配置自动化测试
|
||||
|
||||
典型编辑流程
|
||||
1) `npm install`
|
||||
2) `npm run dev` 在 http://localhost:5173/ 进行开发与手动验收
|
||||
3) `npm run lint` + `npm run format` 保持风格统一
|
||||
4) `npm run build` 产出 `dist/`,`npm run preview` 进行生产包预览
|
||||
|
||||
其它
|
||||
- 状态存储使用 Pinia,并通过 `localStorage` 自动保存;应用启动时支持恢复上次未保存内容。
|
||||
30
.serena/memories/project_structure.md
Normal file
30
.serena/memories/project_structure.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# yys-editor 项目结构(概要)
|
||||
|
||||
根目录
|
||||
- `index.html`:Vite 入口 HTML,挂载点 `#app`,引入 `/src/main.js`。
|
||||
- `package.json` / `package-lock.json`:npm 包与脚本;包管理器为 npm。
|
||||
- `vite.config.js`:Vite 配置,`@` -> `src/`。
|
||||
- `jsconfig.json`:编辑器路径提示(`@/*` -> `./src/*`)。
|
||||
- `.gitignore`:忽略 `node_modules/`、`dist/` 等。
|
||||
- `.vscode/`:推荐扩展(Volar)。
|
||||
- `README.md`:项目说明(中文)。
|
||||
- `public/`:静态资源目录(大量图片素材:`assets/Shikigami`, `assets/Yuhun` 等)。
|
||||
|
||||
`src/`
|
||||
- `main.js`:应用入口,注册 Element Plus、Icons、vue-i18n、Pinia、vue3-draggable-resizable;挂载 `App.vue`。
|
||||
- `App.vue`:主布局(工具栏、侧边栏、工作区 Tab),根据文件类型切换主要编辑视图。
|
||||
- `components/`:
|
||||
- 核心:`Yys.vue`, `YysRank.vue`, `Toolbar.vue`, `ProjectExplorer.vue` 等
|
||||
- 基础:`ShikigamiSelect.vue`, `YuhunSelect.vue`, `Watermark.vue`, `HelloWorld.vue` 等
|
||||
- `components/icons/`:若干图标组件
|
||||
- `assets/`:基础样式 `base.css`, `main.css` 与 logo 等
|
||||
- `data/`:若干 JSON 数据(如 `Shikigami.json`, `Yuhun.json`, `property.json`, `updateLog.json`)
|
||||
- `locales/`:多语言资源 `zh.json` 与 `ja.json`
|
||||
- `ts/`:脚本与 store
|
||||
- `files.ts`:Pinia store(文件页签、可见性、删除/重命名;含 `localStorage` 自动保存与启动恢复提示)
|
||||
- `useGlobalMessage.ts`:全局消息(Element Plus)
|
||||
- `types/`:类型定义(如后续扩展)
|
||||
|
||||
说明
|
||||
- 未见 `router` 相关文件;当前为单页多区域布局。
|
||||
- 构建产物输出到 `dist/`(`npm run build`)。
|
||||
33
.serena/memories/style_and_conventions.md
Normal file
33
.serena/memories/style_and_conventions.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# yys-editor 技术栈与风格约定
|
||||
|
||||
技术栈
|
||||
- 前端框架:Vue 3(Composition API,部分 SFC 使用 `<script setup lang="ts">`)
|
||||
- 构建与开发:Vite
|
||||
- UI 组件:Element Plus(含 `@element-plus/icons-vue`)
|
||||
- 状态管理:Pinia(示例:`src/ts/files.ts` 存储文件页签等,含本地存储自动保存)
|
||||
- 国际化:vue-i18n(`src/locales/zh.json` + `src/locales/ja.json`,默认从浏览器语言推断,fallback 为 `zh`)
|
||||
- 拖拽缩放:vue3-draggable-resizable
|
||||
- 其它依赖:`@vueup/vue-quill`(如后续使用富文本)/ `html2canvas` / `vuedraggable` 等
|
||||
|
||||
工程与路径
|
||||
- 别名:`@` 指向 `src/`(见 `vite.config.js` 与 `jsconfig.json`)。
|
||||
- 入口:`index.html` -> `/src/main.js` -> `App.vue`。
|
||||
- 静态资源:`public/`(大量图片素材位于 `public/assets/...`)。
|
||||
|
||||
代码风格
|
||||
- 代码格式:Prettier(未见项目级配置,使用默认规则;脚本仅格式化 `src/`)。
|
||||
- 语法检查:ESLint(`eslint-plugin-vue` + `@vue/eslint-config-prettier`;脚本已启用 `--fix`)。
|
||||
- 组件命名:PascalCase 单文件组件(`.vue`),按功能归档于 `src/components/`。
|
||||
- 类型:以 JS 为主,SFC 中可使用 TS(经 Vite/ESBuild 处理,无专门 `tsconfig.json`,有 `jsconfig.json` 路径提示)。
|
||||
- 国际化:新增/修改文案时,请同步维护 `zh.json` 与 `ja.json`,避免硬编码 UI 文案。
|
||||
- 状态与持久化:Pinia store 通过 `localStorage` 自动保存,注意 key 兼容;涉及 schema 变更时考虑迁移逻辑。
|
||||
|
||||
样式
|
||||
- 常规样式位于 `src/assets/*.css`,组件中常用 `<style scoped>` 以局部隔离。
|
||||
- UI 主题由 Element Plus 提供,如需自定义主题请统一约定变量来源。
|
||||
|
||||
提交与约定
|
||||
- 未发现提交规范配置(如 commitlint/husky),建议信息清晰、原子化提交。必要时中英文均可,但保持一致性。
|
||||
|
||||
测试
|
||||
- 未配置自动化测试框架;变更请重点进行手动验收(参见 `task_completion_checklist.md`)。
|
||||
26
.serena/memories/suggested_commands.md
Normal file
26
.serena/memories/suggested_commands.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# yys-editor 常用命令(Windows/PowerShell)
|
||||
|
||||
- 安装依赖:
|
||||
- `npm install`
|
||||
- 本地开发(Vite 开发服务器,默认 http://localhost:5173/):
|
||||
- `npm run dev`
|
||||
- 生产构建(输出到 `dist/`):
|
||||
- `npm run build`
|
||||
- 本地预览生产包:
|
||||
- `npm run preview`
|
||||
- 代码检查(ESLint,自动修复):
|
||||
- `npm run lint`
|
||||
- 代码格式化(Prettier,仅 `src/` 目录):
|
||||
- `npm run format`
|
||||
|
||||
辅助命令(PowerShell 常用):
|
||||
- 进入目录/查看/读取文件:`cd`, `ls` (Get-ChildItem), `cat file` (Get-Content -Raw)
|
||||
- 删除/复制/移动:`rm -r -Force path` (Remove-Item), `cp src dst` (Copy-Item), `mv src dst` (Move-Item)
|
||||
- Git:`git status`, `git add -p`, `git commit -m "msg"`, `git switch -c <branch>`, `git push`
|
||||
- 进程占用端口排查(可选):`Get-Process`、`netstat -ano | findstr 5173`
|
||||
- 快速全文搜索(若已安装):`rg "pattern"`
|
||||
|
||||
说明:
|
||||
- 包管理器使用 npm(见 `package-lock.json`)。
|
||||
- Vite 默认端口 5173,未在 `vite.config.js` 中覆写。
|
||||
- 项目未配置自动化测试命令。
|
||||
22
.serena/memories/task_completion_checklist.md
Normal file
22
.serena/memories/task_completion_checklist.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# 任务完成前检查清单(yys-editor)
|
||||
|
||||
功能与兼容
|
||||
- 本地自测通过:`npm run dev` 无报错、关键路径可用(切换 Tab、新增/删除文件、编辑视图渲染、国际化切换等)。
|
||||
- UI 走查:常用分辨率下布局正常(Toolbar、侧边栏、工作区滚动)。
|
||||
- 资源校验:新增素材放入 `public/assets/...`,路径正确;体积适中(尽量压缩)。
|
||||
- i18n:新增/修改的 UI 文案同步维护 `src/locales/zh.json` 与 `src/locales/ja.json`。
|
||||
|
||||
代码质量
|
||||
- 语法检查:`npm run lint`(包含 `--fix` 自动修复)。
|
||||
- 代码格式:`npm run format`(当前仅格式化 `src/` 目录)。
|
||||
- 引用规范:优先使用 `@/...` 别名;避免相对路径层级过深。
|
||||
- 状态与持久化:如更改 `files` store 结构,评估 `localStorage` 兼容/迁移策略。
|
||||
|
||||
构建与预览
|
||||
- 生产构建:`npm run build` 成功,产物在 `dist/`。
|
||||
- 生产预览:`npm run preview` 本地检查基础路由与功能。
|
||||
|
||||
提交
|
||||
- 更新文档(如需):`README.md` 或注释。
|
||||
- Git 提交清晰、原子:`git add -p`、`git commit -m "feat/fix: ..."`。
|
||||
- 如涉及较大静态资源,建议说明来源与 License。
|
||||
84
.serena/project.yml
Normal file
84
.serena/project.yml
Normal file
@@ -0,0 +1,84 @@
|
||||
# list of languages for which language servers are started; choose from:
|
||||
# al bash clojure cpp csharp csharp_omnisharp
|
||||
# dart elixir elm erlang fortran go
|
||||
# haskell java julia kotlin lua markdown
|
||||
# nix perl php python python_jedi r
|
||||
# rego ruby ruby_solargraph rust scala swift
|
||||
# terraform typescript typescript_vts yaml zig
|
||||
# Note:
|
||||
# - For C, use cpp
|
||||
# - For JavaScript, use typescript
|
||||
# Special requirements:
|
||||
# - csharp: Requires the presence of a .sln file in the project folder.
|
||||
# When using multiple languages, the first language server that supports a given file will be used for that file.
|
||||
# The first language is the default language and the respective language server will be used as a fallback.
|
||||
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
|
||||
languages:
|
||||
- vue
|
||||
|
||||
# the encoding used by text files in the project
|
||||
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
|
||||
encoding: "utf-8"
|
||||
|
||||
# whether to use the project's gitignore file to ignore files
|
||||
# Added on 2025-04-07
|
||||
ignore_all_files_in_gitignore: true
|
||||
|
||||
# list of additional paths to ignore
|
||||
# same syntax as gitignore, so you can use * and **
|
||||
# Was previously called `ignored_dirs`, please update your config if you are using that.
|
||||
# Added (renamed) on 2025-04-07
|
||||
ignored_paths: []
|
||||
|
||||
# whether the project is in read-only mode
|
||||
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
||||
# Added on 2025-04-18
|
||||
read_only: false
|
||||
|
||||
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
||||
# Below is the complete list of tools for convenience.
|
||||
# To make sure you have the latest list of tools, and to view their descriptions,
|
||||
# execute `uv run scripts/print_tool_overview.py`.
|
||||
#
|
||||
# * `activate_project`: Activates a project by name.
|
||||
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
|
||||
# * `create_text_file`: Creates/overwrites a file in the project directory.
|
||||
# * `delete_lines`: Deletes a range of lines within a file.
|
||||
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
|
||||
# * `execute_shell_command`: Executes a shell command.
|
||||
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
|
||||
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
|
||||
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
|
||||
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
|
||||
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
|
||||
# * `initial_instructions`: Gets the initial instructions for the current project.
|
||||
# Should only be used in settings where the system prompt cannot be set,
|
||||
# e.g. in clients you have no control over, like Claude Desktop.
|
||||
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
|
||||
# * `insert_at_line`: Inserts content at a given line in a file.
|
||||
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
|
||||
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
|
||||
# * `list_memories`: Lists memories in Serena's project-specific memory store.
|
||||
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
|
||||
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
|
||||
# * `read_file`: Reads a file within the project directory.
|
||||
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
|
||||
# * `remove_project`: Removes a project from the Serena configuration.
|
||||
# * `replace_lines`: Replaces a range of lines within a file with new content.
|
||||
# * `replace_symbol_body`: Replaces the full definition of a symbol.
|
||||
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
|
||||
# * `search_for_pattern`: Performs a search for a pattern in the project.
|
||||
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
|
||||
# * `switch_modes`: Activates modes by providing a list of their names
|
||||
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
|
||||
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
|
||||
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
|
||||
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
||||
excluded_tools: []
|
||||
|
||||
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
||||
# (contrary to the memories, which are loaded on demand).
|
||||
initial_prompt: ""
|
||||
|
||||
project_name: "yys-editor"
|
||||
included_optional_tools: []
|
||||
Reference in New Issue
Block a user