From a42892891cbdc83765b63081481ea4e4a4d04a5d Mon Sep 17 00:00:00 2001 From: AstrBot Fixer Date: Mon, 27 Apr 2026 14:29:09 +0800 Subject: [PATCH 1/2] fix(dashboard): add tooltip for truncated command/tool descriptions in WebUI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CommandTable.vue: add :title binding to description div - ToolTable.vue: add :title binding to description and origin_name divs Fixes #7583 - Webui中超出显示长度的指令描述无法以任何方式看到 --- .../extension/componentPanel/components/CommandTable.vue | 2 +- .../extension/componentPanel/components/ToolTable.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/src/components/extension/componentPanel/components/CommandTable.vue b/dashboard/src/components/extension/componentPanel/components/CommandTable.vue index 32eebb746b..be2ae9892d 100644 --- a/dashboard/src/components/extension/componentPanel/components/CommandTable.vue +++ b/dashboard/src/components/extension/componentPanel/components/CommandTable.vue @@ -141,7 +141,7 @@ const getRowProps = ({ item }: { item: CommandItem }) => { diff --git a/dashboard/src/components/extension/componentPanel/components/ToolTable.vue b/dashboard/src/components/extension/componentPanel/components/ToolTable.vue index 9615e5ea8c..8a42f33fef 100644 --- a/dashboard/src/components/extension/componentPanel/components/ToolTable.vue +++ b/dashboard/src/components/extension/componentPanel/components/ToolTable.vue @@ -121,7 +121,7 @@ const enabledConfigTags = (tool: ToolItem): BuiltinToolConfigTag[] => { @@ -133,7 +133,7 @@ const enabledConfigTags = (tool: ToolItem): BuiltinToolConfigTag[] => { From 557ed5078d8fd7edc3033a15337e75ca3aa40bbe Mon Sep 17 00:00:00 2001 From: AstrBot Fixer Date: Mon, 27 Apr 2026 14:52:53 +0800 Subject: [PATCH 2/2] 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. --- AGENTS.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 9f3617ce9c..9e40cc0049 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,6 +19,26 @@ pnpm dev Runs on `http://localhost:3000` by default. +## Pre-commit setup + +AstrBot uses [pre-commit](https://pre-commit.com/) 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`](.pre-commit-config.yaml) for details). + +To set it up: + +```bash +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: + +```bash +ruff format . +ruff check . +``` + +> **Note:** If you use VSCode, install the `Ruff` extension for real-time formatting and linting in the editor. + ## Dev environment tips 1. When modifying the WebUI, be sure to maintain componentization and clean code. Avoid duplicate code.