Skip to content

Feature/custom prompt#12

Merged
huhuhuhr-1 merged 9 commits intodev/v1.0.0.20260331from
feature/custom-prompt
Mar 10, 2026
Merged

Feature/custom prompt#12
huhuhuhr-1 merged 9 commits intodev/v1.0.0.20260331from
feature/custom-prompt

Conversation

@huhuhuhr-1
Copy link
Owner

自定义相关功能提交

- Add custom prompt API, model, CRUD and template prompt support
- Add is_full_template migration for custom_prompt
- Add statistics API and frontend statistics page
- Add Helm chart for K8s deployment (deploy/helm/sqlbot)
- Add build-k8s.sh and update build scripts
- Update prompt management UI and menu (i18n, router, Menu.vue)
- Add DsDetailPanel, update ChatList and Datasource views
- Integrate custom prompt in chat LLM task and template.yaml
- Add backend/logs/ to .gitignore

Made-with: Cursor
Add fixed STATISTICS_MENU_SPEC and insertStatisticsMenu() so that
「统计分析」 is always visible in the sidebar when not under /system,
following the same decoupled menu pattern as custom prompt (SET_MENU_SPEC).

Made-with: Cursor
- 新增 schemas/statistics.py 与 crud/statistics.py
- API 层仅做路由与权限,业务逻辑下沉到 CRUD
- 支持趋势、数据源 Top、失败分析、用户明细、问数记录等接口

Made-with: Cursor
- 统计 API 对接新后端接口(趋势、数据源 Top、失败分析、用户/数据源明细、记录分页)
- 统计页支持时间范围、趋势指标、排序、分页与问数明细抽屉

Made-with: Cursor
- 设置菜单由固定配置生成,自定义提示词与统计分析仅系统管理员(uid=1)可见
- 统计分析从系统管理侧栏移至「设置」下,路由增加 /set/statistics
- 增加 menu.statistics 多语言文案

Made-with: Cursor
- 更新 menu-mechanism 与 qa-custom-menu-xpack
- 新增 qa-set-menu-permission-and-xpack 说明设置菜单权限与 xpack 关系

Made-with: Cursor
- 移除 smart detect 与 sync 相关 v-if="ds.type !== 'excel'" 限制

Made-with: Cursor
…on and set routes

- custom_prompt: get_one 使用 path id 为 string 并校验,路由顺序调整避免与 export 冲突
- template_prompt: 提示词优化接口改用 ainvoke 异步调用
- statistics: get_records 改为数据库 count + offset/limit 分页,避免全量拉取
- frontend: ensureSetExtraRoutes 同时补回「自定义提示词」与「统计分析」子路由
- llm: 统一 custom_prompt 导入为 system_custom_prompt_crud

Made-with: Cursor
@cursor
Copy link

cursor bot commented Mar 10, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 9.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@huhuhuhr-1 huhuhuhr-1 merged commit 44c1eca into dev/v1.0.0.20260331 Mar 10, 2026
0 of 3 checks passed
@huhuhuhr-1 huhuhuhr-1 deleted the feature/custom-prompt branch March 12, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants