This repository was archived by the owner on Apr 12, 2026. It is now read-only.
Commit 20e5ba8
refactor: improve astrbot builtin tool management (AstrBotDevs#7418)
* feat: Refactor astrbot builtin tool management
- Introduced a new registry for builtin tools to streamline their management.
- Added `SendMessageToUserTool`, `KnowledgeBaseQueryTool`, and various web search tools as builtin tools.
- Updated `FunctionToolManager` to cache and retrieve builtin tools efficiently.
- Modified `CronJobManager` to utilize the new `SendMessageToUserTool`.
- Enhanced the dashboard to display readonly status for builtin tools and prevent toggling their state.
- Added tests for builtin tool injection and retrieval to ensure proper functionality.
* fix: escape file path in shell command to prevent injection vulnerabilities1 parent d1fce99 commit 20e5ba8
20 files changed
Lines changed: 648 additions & 446 deletions
File tree
- astrbot
- core
- cron
- provider
- tools
- dashboard/routes
- dashboard/src
- components/extension/componentPanel
- components
- composables
- i18n/locales
- en-US/features
- ru-RU/features
- zh-CN/features
- tests/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
519 | 521 | | |
520 | 522 | | |
521 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | | - | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
| |||
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
| 71 | + | |
70 | 72 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
229 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
230 | 236 | | |
231 | 237 | | |
232 | 238 | | |
| |||
1054 | 1060 | | |
1055 | 1061 | | |
1056 | 1062 | | |
1057 | | - | |
| 1063 | + | |
1058 | 1064 | | |
1059 | 1065 | | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1063 | 1070 | | |
1064 | 1071 | | |
1065 | 1072 | | |
| |||
1077 | 1084 | | |
1078 | 1085 | | |
1079 | 1086 | | |
| 1087 | + | |
1080 | 1088 | | |
1081 | 1089 | | |
1082 | | - | |
1083 | | - | |
| 1090 | + | |
| 1091 | + | |
1084 | 1092 | | |
1085 | | - | |
| 1093 | + | |
1086 | 1094 | | |
1087 | | - | |
| 1095 | + | |
1088 | 1096 | | |
1089 | | - | |
| 1097 | + | |
1090 | 1098 | | |
1091 | 1099 | | |
1092 | 1100 | | |
| |||
1348 | 1356 | | |
1349 | 1357 | | |
1350 | 1358 | | |
1351 | | - | |
| 1359 | + | |
1352 | 1360 | | |
1353 | 1361 | | |
1354 | 1362 | | |
1355 | 1363 | | |
1356 | | - | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
1357 | 1369 | | |
1358 | 1370 | | |
1359 | 1371 | | |
| |||
0 commit comments