✨ 跟项目能跑起来就差这一步!这次狠狠修了一波: 🩺 修复40+损坏Python文件 - 补全所有缺少的class定义头(plugin-loader-pro、code-reviewer、 http-api/ws-api/http-tcp、webui/dashboard/log-terminal 等) - 修复中文括号、字符串未闭合、缩进错乱等语法问题 🔗 创建符号链接 plugin_bridge -> plugin-bridge - 解决Python模块路径不支持连字符的问题 - 关联修复 plugin-bridge 中错误的 import 路径 🧹 清理废弃代码 - 删除 oss/tui/ 目录(已废弃) - 清理所有 __pycache__ 和 .pyc 缓存文件 ✅ 全量语法检查通过,零错误! 📋 ai.md 新增代码审计报告和分阶段修复计划 🗺️ 所有插件 use() 调用现在走统一路径
220 lines
5.4 KiB
JSON
220 lines
5.4 KiB
JSON
{
|
||
"version": "2.0.0",
|
||
"tasks": [
|
||
{
|
||
"label": "NebulaShell: 安装依赖",
|
||
"type": "shell",
|
||
"command": "pip install -r requirements.txt",
|
||
"group": {
|
||
"kind": "build",
|
||
"isDefault": true
|
||
},
|
||
"presentation": {
|
||
"echo": true,
|
||
"reveal": "always",
|
||
"focus": false,
|
||
"panel": "shared",
|
||
"showReuseMessage": true,
|
||
"clear": true
|
||
},
|
||
"problemMatcher": [],
|
||
"options": {
|
||
"cwd": "${workspaceFolder}"
|
||
}
|
||
},
|
||
{
|
||
"label": "NebulaShell: 启动开发服务器",
|
||
"type": "shell",
|
||
"command": "python -m oss.cli serve",
|
||
"group": "none",
|
||
"isBackground": true,
|
||
"presentation": {
|
||
"echo": true,
|
||
"reveal": "always",
|
||
"focus": true,
|
||
"panel": "dedicated",
|
||
"showReuseMessage": true,
|
||
"clear": false
|
||
},
|
||
"problemMatcher": [
|
||
{
|
||
"pattern": [
|
||
{
|
||
"regexp": ".",
|
||
"file": 1,
|
||
"location": 2,
|
||
"message": 3
|
||
}
|
||
],
|
||
"background": {
|
||
"activeOnStart": true,
|
||
"beginsPattern": ".*启动 NebulaShell 服务.*",
|
||
"endsPattern": ".*服务已启动.*"
|
||
}
|
||
}
|
||
],
|
||
"options": {
|
||
"cwd": "${workspaceFolder}"
|
||
}
|
||
},
|
||
{
|
||
"label": "NebulaShell: 运行测试",
|
||
"type": "shell",
|
||
"command": "pytest -v --tb=short",
|
||
"group": "test",
|
||
"presentation": {
|
||
"echo": true,
|
||
"reveal": "always",
|
||
"focus": false,
|
||
"panel": "dedicated",
|
||
"showReuseMessage": true,
|
||
"clear": true
|
||
},
|
||
"problemMatcher": [
|
||
{
|
||
"owner": "python",
|
||
"fileLocation": ["relative", "${workspaceFolder}"],
|
||
"pattern": [
|
||
{
|
||
"regexp": "^test_(.*)\\.py::(.*) (PASSED|FAILED|ERROR)$",
|
||
"file": 1,
|
||
"location": 2,
|
||
"severity": 3
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"options": {
|
||
"cwd": "${workspaceFolder}"
|
||
}
|
||
},
|
||
{
|
||
"label": "NebulaShell: 代码检查",
|
||
"type": "shell",
|
||
"command": "python -m pylint oss/ store/NebulaShell/ --rcfile=${workspaceFolder}/.pylintrc || echo 'Pylint检查完成'",
|
||
"group": "build",
|
||
"presentation": {
|
||
"echo": true,
|
||
"reveal": "always",
|
||
"focus": false,
|
||
"panel": "dedicated",
|
||
"showReuseMessage": true,
|
||
"clear": true
|
||
},
|
||
"problemMatcher": [
|
||
{
|
||
"owner": "python",
|
||
"fileLocation": ["relative", "${workspaceFolder}"],
|
||
"pattern": [
|
||
{
|
||
"regexp": "^(.*):(\\d+):(\\d+): (\\w+): (.*)$",
|
||
"file": 1,
|
||
"line": 2,
|
||
"column": 3,
|
||
"severity": 4,
|
||
"message": 5
|
||
}
|
||
]
|
||
}
|
||
],
|
||
"options": {
|
||
"cwd": "${workspaceFolder}"
|
||
}
|
||
},
|
||
{
|
||
"label": "NebulaShell: 格式化代码",
|
||
"type": "shell",
|
||
"command": "python -m black oss/ store/NebulaShell/",
|
||
"group": "build",
|
||
"presentation": {
|
||
"echo": true,
|
||
"reveal": "always",
|
||
"focus": false,
|
||
"panel": "dedicated",
|
||
"showReuseMessage": true,
|
||
"clear": true
|
||
},
|
||
"problemMatcher": [],
|
||
"options": {
|
||
"cwd": "${workspaceFolder}"
|
||
}
|
||
},
|
||
{
|
||
"label": "NebulaShell: 清理缓存文件",
|
||
"type": "shell",
|
||
"command": "find . -type f -name '*.pyc' -delete && find . -type d -name '__pycache__' -delete && find . -type f -name '.pid' -delete",
|
||
"group": "build",
|
||
"presentation": {
|
||
"echo": true,
|
||
"reveal": "always",
|
||
"focus": false,
|
||
"panel": "dedicated",
|
||
"showReuseMessage": true,
|
||
"clear": true
|
||
},
|
||
"problemMatcher": [],
|
||
"options": {
|
||
"cwd": "${workspaceFolder}"
|
||
}
|
||
},
|
||
{
|
||
"label": "NebulaShell: 查看服务状态",
|
||
"type": "shell",
|
||
"command": "if [ -f .pid ]; then echo '服务正在运行,PID: ' && cat .pid; else echo '服务未运行'; fi",
|
||
"group": "none",
|
||
"presentation": {
|
||
"echo": true,
|
||
"reveal": "always",
|
||
"focus": false,
|
||
"panel": "new",
|
||
"showReuseMessage": true,
|
||
"clear": true
|
||
},
|
||
"problemMatcher": [],
|
||
"options": {
|
||
"cwd": "${workspaceFolder}"
|
||
}
|
||
},
|
||
{
|
||
"label": "NebulaShell: 停止服务",
|
||
"type": "shell",
|
||
"command": "if [ -f .pid ]; then kill $(cat .pid) && rm -f .pid && echo '服务已停止'; else echo '服务未运行'; fi",
|
||
"group": "none",
|
||
"presentation": {
|
||
"echo": true,
|
||
"reveal": "always",
|
||
"focus": false,
|
||
"panel": "new",
|
||
"showReuseMessage": true,
|
||
"clear": true
|
||
},
|
||
"problemMatcher": [],
|
||
"options": {
|
||
"cwd": "${workspaceFolder}"
|
||
}
|
||
},
|
||
{
|
||
"label": "NebulaShell: 重启服务",
|
||
"type": "shell",
|
||
"dependsOrder": "sequence",
|
||
"dependsOn": [
|
||
"NebulaShell: 停止服务",
|
||
"NebulaShell: 启动开发服务器"
|
||
],
|
||
"group": "none",
|
||
"presentation": {
|
||
"echo": true,
|
||
"reveal": "always",
|
||
"focus": true,
|
||
"panel": "dedicated",
|
||
"showReuseMessage": true,
|
||
"clear": true
|
||
},
|
||
"problemMatcher": [],
|
||
"options": {
|
||
"cwd": "${workspaceFolder}"
|
||
}
|
||
}
|
||
]
|
||
}
|