Skip to content

Feature/amazing feature#198

Open
xxlldd wants to merge 5 commits into
apconw:masterfrom
xxlldd:feature/AmazingFeature
Open

Feature/amazing feature#198
xxlldd wants to merge 5 commits into
apconw:masterfrom
xxlldd:feature/AmazingFeature

Conversation

@xxlldd

@xxlldd xxlldd commented Mar 9, 2026

Copy link
Copy Markdown

@xxlldd

xxlldd commented Mar 9, 2026

Copy link
Copy Markdown
Author

@apconw apconw left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢贡献,这个 PR 当前不建议直接合并,需要先调整后再重新 review。

主要阻断点:

  1. 当前分支和最新 master 存在多处冲突,包括 .env.devagent/text2sql/database/db_service.pycommon/llm_util.pycontrollers/llm_chat_api.pymodel/schemas.pyweb/src/api/index.tsweb/src/components/MarkdownPreview/index.vueweb/src/views/chat/index.vue 等文件。请先 rebase 到最新 master 并解决冲突。

  2. 新增的导出/分页接口存在 SQL 安全风险。/export/table_csv/export/table_page 由前端传入 SQL,后端再直接包装成子查询执行,但没有接入当前 master 已有的 common.sql_security.validate_read_only_sql 只读 SQL 校验。即使接口有 token,也不能允许客户端传任意 SQL 给后端执行。

  3. 导出逻辑关闭了预览限制并一次性加载全部数据到内存后生成 CSV。大表导出时容易导致接口超时、内存占用过高或拖垮数据库连接。建议增加最大导出行数限制,或改成流式导出/异步导出任务。

  4. PR 修改了 .env.dev 中的 LangFuse key。配置文件里不应提交具体密钥,请改为占位符或通过环境变量配置。

  5. 当前还有重复 PR:#193#194#198 都是同一功能方向。建议关闭旧的 #193/#194,只保留一个基于最新 master 的 PR。

我本地做了基础检查:#198 中涉及的 Python 文件可以通过 py_compile,但前端类型检查因为环境中没有 web/node_modules 未执行。另外 git diff --check 还有 trailing whitespace / EOF 空行问题需要清理。

请先处理以上问题后再提交更新。

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