mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
* fix(dashboard): add tooltip for truncated command/tool descriptions in WebUI - CommandTable.vue: add :title binding to description div - ToolTable.vue: add :title binding to description and origin_name divs Fixes #7583 - Webui中超出显示长度的指令描述无法以任何方式看到 * docs: add pre-commit setup guide to AGENTS.md Extract the pre-commit and ruff setup instructions from README.md into AGENTS.md so AI agents have a complete reference for setting up the development environment. --------- Co-authored-by: AstrBot Fixer <astrbot@fix-bot.local> Co-authored-by: AstrBot Fixer <astrbot-fixer@users.noreply.github.com>
1.6 KiB
1.6 KiB
Setup commands
Core
uv sync
uv run main.py
Exposed an API server on http://localhost:6185 by default.
Dashboard(WebUI)
cd dashboard
pnpm install # First time only. Use npm install -g pnpm if pnpm is not installed.
pnpm dev
Runs on http://localhost:3000 by default.
Pre-commit setup
AstrBot uses pre-commit hooks to automatically format and lint Python code before each commit. The hooks run ruff check, ruff format, and pyupgrade (see .pre-commit-config.yaml for details).
To set it up:
pip install pre-commit
pre-commit install
After installation, the hooks will run automatically on git commit. You can also run them manually at any time:
ruff format .
ruff check .
Note: If you use VSCode, install the
Ruffextension for real-time formatting and linting in the editor.
Dev environment tips
- When modifying the WebUI, be sure to maintain componentization and clean code. Avoid duplicate code.
- Do not add any report files such as xxx_SUMMARY.md.
- After finishing, use
ruff format .andruff check .to format and check the code. - When committing, ensure to use conventional commits messages, such as
feat: add new agent for data analysisorfix: resolve bug in provider manager. - Use English for all new comments.
- For path handling, use
pathlib.Pathinstead of string paths, and useastrbot.core.utils.path_utilsto get the AstrBot data and temp directory.
PR instructions
- Title format: use conventional commit messages
- Use English to write PR title and descriptions.