Skip to content

Codex/feat saved prior sql shortcut#22

Merged
LienJack merged 5 commits into
devfrom
codex/feat-saved-prior-sql-shortcut
Apr 25, 2026
Merged

Codex/feat saved prior sql shortcut#22
LienJack merged 5 commits into
devfrom
codex/feat-saved-prior-sql-shortcut

Conversation

@LienJack
Copy link
Copy Markdown
Owner

Summary

  • 简述本次改动范围与目标

Frontend Checklist

  • 仅使用 React + shadcn-ui 体系,未引入未批准 UI 框架
  • 业务组件未使用常规内联样式对象(style={{...}}
  • 覆盖并验证了关键状态(loading/empty/error/success)
  • 核心链路(会话创建、消息发送、SQL 预览)无回归
  • 已补充或更新必要测试

Validation

  • pnpm --filter @text2sql/frontend lint
  • pnpm --filter @text2sql/frontend test
  • pnpm --filter @text2sql/frontend build

Post-Deploy Monitoring & Validation

  • No additional operational monitoring required(前端展示层改造,无后端运行时逻辑变化)

…gent flow

- Introduced the ResolveSavedPriorSqlNode to evaluate and reuse saved SQL queries.
- Updated agent step metadata to include the new node in the analysis stage.
- Enhanced LangGraph runtime to incorporate the new node, allowing for conditional execution based on prior SQL resolution.
- Modified state management to track saved prior SQL resolutions and fallback scenarios.
- Updated delivery contract to capture saved prior SQL evidence for improved tracking and diagnostics.
- Implemented service for capturing and managing saved prior SQL records, enhancing overall SQL handling in the conversation module.
- Updated the FormatAnswerNode to provide a more detailed analysis summary, including metrics and coverage information.
- Introduced new methods for building and normalizing delivery artifacts, improving the handling of chart and validation data.
- Enhanced the ChatDeliveryEnrichmentService to integrate ChartBI artifacts and manage risk tags effectively.
- Modified the DeliveryContractMapper to support artifact overrides and additional risk tags, ensuring better delivery semantics.
- Improved the SQL inline panel and assistant message components to display artifact information, enhancing user experience.
- Added comprehensive tests to validate the new delivery contract features and ensure compatibility with existing flows.
- Added support for specifying allowed directories for SQLite file paths via the `SQLITE_ALLOWED_DIRS` environment variable.
- Refactored `AppConfigService` to include a method for resolving configured paths, improving path handling for SQLite and datasource uploads.
- Updated `SqliteExecutorService` to utilize the new path resolution logic, ensuring correct execution of SQL queries based on datasource configuration.
- Enhanced `DatasourceService` to validate SQLite paths against allowed directories, preventing unauthorized access to filesystem locations.
- Improved frontend wizard for SQLite datasource creation, enforcing absolute path requirements and providing user feedback on path validity.
- Added integration tests to validate the new SQLite handling features and ensure compliance with allowed directory restrictions.
- Added `LLM_STREAM_TIMEOUT_MS` to the configuration, allowing for customizable stream timeout settings.
- Updated `AppConfigService` to include a method for retrieving the new stream timeout value with fallback logic.
- Enabled `AGENT_PLANNING_SCAFFOLD_ENABLED` by default to improve agent planning capabilities.
- Enhanced `ChatController` and related services to support the new actor parameter for better context handling in message processing.
- Improved regex patterns in semantic evaluators to recognize count-style phrasing and customer synonyms, enhancing slot-filling accuracy.
- Updated frontend components to reflect new design elements and improve user experience in chat interactions.
- Added unit tests to validate the new features and ensure robust functionality across the application.
- Updated `SqlGenerationService` to include handling for the new error code `LLM_TOOL_CALL_EXECUTION_FAILED`, improving error management during tool execution.
- Enhanced `SqlPromptBuilder` with additional semantic guardrails to prevent querying schema system tables unless explicitly requested by the user, ensuring stricter adherence to user intent.
- Added unit tests to validate the new fallback behavior in SQL generation when tool execution fails, ensuring robustness in the conversation agent's functionality.
@LienJack LienJack merged commit b28e0df into dev Apr 25, 2026
2 of 3 checks passed
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.

1 participant