Repository navigation
fix: Pass AI run context into dashboard chart tool resolution - #627
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughChart tools now support optional execution context for resource resolution. A new ChangesChart Tool Execution Context
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/mosaic/README.md (1)
229-237: ⚡ Quick winConsider adding a code example for consistency.
Other sections in this README (useMosaicClient, Mosaic Profiler, Dashboard Panels, Chart Builder) include code examples. Adding a brief example showing how
createChartToolsis used and how the execution context flows throughresolveResourceswould improve consistency and help developers understand the feature.Example structure you might consider:
- Show
createChartToolswith aresolveResourcescallback- Demonstrate accessing
context.sessionIdandcontext.aiRunContext- Illustrate the fallback from execution context to explicit
params.artifactIdAs per coding guidelines: "When changing the public API of an
@sqlrooms/* package or adding new public API, update the package's README.md accordingly"—the current documentation meets this requirement, but examples are a pattern established elsewhere in this README.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/mosaic/README.md` around lines 229 - 237, Add a small code example to the "AI Chart Tools" section showing how to call createChartTools and provide a ChartToolDeps.resolveResources callback that receives (params, context), demonstrates reading context.sessionId and context.aiRunContext, and shows that an explicit params.artifactId takes precedence over any values derived from the execution context; include a brief comment or note in the example that execution-scoped context is preferred over live UI state when resolving implicit dashboard targets.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/mosaic/README.md`:
- Around line 229-237: Add a small code example to the "AI Chart Tools" section
showing how to call createChartTools and provide a
ChartToolDeps.resolveResources callback that receives (params, context),
demonstrates reading context.sessionId and context.aiRunContext, and shows that
an explicit params.artifactId takes precedence over any values derived from the
execution context; include a brief comment or note in the example that
execution-scoped context is preferred over live UI state when resolving implicit
dashboard targets.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 82c225c9-d128-44c2-b6ef-4c1a16832f9f
📒 Files selected for processing (9)
apps/sqlrooms-cli-ui/src/createChartToolDeps.tspackages/mosaic/README.mdpackages/mosaic/src/chart-types/base-types.tspackages/mosaic/src/chart-types/box-plot/tool.tspackages/mosaic/src/chart-types/bubble-chart/tool.tspackages/mosaic/src/chart-types/count-plot/tool.tspackages/mosaic/src/chart-types/heatmap/tool.tspackages/mosaic/src/chart-types/histogram/tool.tspackages/mosaic/src/chart-types/line-chart/tool.ts
Summary by CodeRabbit
New Features
Documentation