Files
agent-desktop/scripts
Pine 440f4ae246 企业管理功能 - 桌面端核心实现
API模块:
- compute.ts:算力多级折扣与余额API(运营/载体/企业/个人/内部接口)
- ent.ts:企业管理API(信息/成员/转园/余额)

企业管理页面:
- Layout.tsx:企业管理布局组件(自动加载企业上下文,未绑定显示提示)
- Info.tsx:企业信息页面(展示/编辑企业资料、员工统计)
- Members.tsx:成员管理页面(成员列表、添加成员、移除成员)
- Compute.tsx:算力余额页面(余额总览、充值、成员分配/回收、记录)

菜单和路由:
- 新增企业管理菜单分组(企业信息/成员管理/算力余额)
- 新增3个企业管理路由
- 所有登录用户可见菜单,页面内部检查企业管理员权限

设计规范:
- 毛玻璃材质卡片
- 苹果风格按钮
- 渐变配色
- TypeScript类型检查通过
2026-09-06 18:07:04 +08:00
..

Scripts

Run from repo root.

Build wheel (with latest console)

bash scripts/wheel_build.sh
  • Builds the console frontend (console/), copies console/dist to src/pineagents/console/dist, then builds the wheel. Output: dist/*.whl.

Build website

bash scripts/website_build.sh
  • Installs dependencies (pnpm or npm) and runs the Vite build. Output: website/dist/.

Build Docker image

bash scripts/docker_build.sh [IMAGE_TAG] [EXTRA_ARGS...]
  • Default tag: qwenpaw:latest. Uses deploy/Dockerfile (multi-stage: builds console then Python app).
  • Example: bash scripts/docker_build.sh myreg/qwenpaw:v1 --no-cache.

Run Test

# Run all tests
python scripts/run_tests.py

# Run all unit tests
python scripts/run_tests.py -u

# Run unit tests for a specific module
python scripts/run_tests.py -u providers

# Run integration tests
python scripts/run_tests.py -i

# Run all tests and generate a coverage report
python scripts/run_tests.py -a -c

# Run tests in parallel (requires pytest-xdist)
python scripts/run_tests.py -p

# Show help
python scripts/run_tests.py -h