Skip to content

AVA.analysis() 方法加入分步进度报告能力,并在 site 侧新增 AnalysisSteps UI 组件实现可视化展示。 - #958

Merged
ninelcc336 merged 7 commits into
aifrom
feat_0513
May 26, 2026
Merged

Conversation

@Orcish-Y

@Orcish-Y Orcish-Y commented May 13, 2026

Copy link
Copy Markdown
Contributor
image

点击 Generate 后,只有按钮变成loading,没有其他的提示了,用户只能干等着,不清楚运行情况,加上了分析步骤

变动

分析流程改造 (src/ava.ts)

  • analysis() 方法新增 options?: AnalysisOptions 参数,支持 onProgress 回调
  • 新增 createStepEmitter 工厂函数:内部维护步骤数组,按 phase 去重(同 phase 状态更新而非新增),每次 emit 后回调传出完整的 AnalysisStep[]
  • 每个分析阶段(SQL/JS 代码生成 → 执行 → 摘要 → 图表类型检测 → 可视化生成)都有进度上报,覆盖 running / done / error 三种状态

进度组件 (site/components/AnalysisSteps.tsx)

  • 可折叠的步骤进度面板,显示步骤名称、状态图标、耗时、错误信息
  • 完成态默认收起为摘要行("分析完成 · 共 N 步 · 耗时 Xs"),可展开查看详情
  • 每个步骤的 detail(代码 / SQL / 摘要)可点击查看/收起

Site 集成 (site/components/Visualization.tsx)

  • 分析请求时传递 onProgress 回调,驱动 AnalysisSteps 实时更新

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a progress tracking system for the data analysis process, featuring a new AnalysisSteps component and core logic to emit step-by-step updates. It also replaces the previous iframe-based visualization method with a dedicated GPTVisRenderer component utilizing the @antv/gpt-vis library. Feedback includes a recommendation to ensure the GPTVis instance updates when dimensions change and a suggestion to move hardcoded Chinese labels from the core library to the UI layer to better support internationalization.

Comment thread site/components/GPTVisRenderer.tsx Outdated
Comment thread src/ava.ts
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

🎊 PR Preview bd2e0f2 has been successfully built and deployed to https://antvis-AVA-preview-pr-958.surge.sh

🕐 Build time: 0.011s

🤖 By surge-preview

Orcish-Y and others added 2 commits May 14, 2026 09:59
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ninelcc336
ninelcc336 merged commit eef9384 into ai May 26, 2026
3 checks passed
@ninelcc336
ninelcc336 deleted the feat_0513 branch May 26, 2026 08:19
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