Repository navigation
fix: use block document vocabulary in packages - #779
Conversation
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR renames worksheet-specific terminology to block-document terminology across ai-core, ai, artifacts, mosaic, and python packages. It adds a ChangesWorksheet-to-block-document rename and tooling
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d20700bd6f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }: CreateSkillRuntimeToolPolicyOptions = {}): SkillRuntimeToolPolicy { | ||
| return { | ||
| ...DEFAULT_SKILL_RUNTIME_TOOL_POLICY, | ||
| commandTools: {...DEFAULT_SKILL_RUNTIME_TOOL_POLICY.commandTools}, |
There was a problem hiding this comment.
Clone nested command policy arrays
When a host calls createSkillRuntimeToolPolicy() and then adjusts the returned commandTools policy for its runtime (for example adding a confirmation metadata field), this shallow copy keeps allowedDiscoveryRiskLevels, confirmationRequiredRiskLevels, and confirmationMetadataFields shared with DEFAULT_SKILL_RUNTIME_TOOL_POLICY. That mutation leaks into the exported default and into later policies, even though the surrounding top-level arrays are copied independently.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/python/src/PythonBlockCommands.ts (1)
104-113: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winArtifact keywords only applied to
add-python-block; other three commands stay hardcoded.
artifactKeywords(derived fromcommandNamespace/artifactLabel) is spread only into theadd-python-blockcommand'skeywords(Line 113). Theupdate-python-block-code,run-python-block, andclear-python-block-resultcommands still use fixed keyword arrays (Lines 166, 214, 258) that never includeartifactKeywords. When a host overridesartifactLabel/commandNamespace(e.g. the documentedworksheetexample in the README), search-by-keyword for these three commands won't surface product-specific vocabulary, undermining the stated goal of the refactor.🛠️ Proposed fix
group: commandGroup, - keywords: ['python', 'block', 'code', 'update'], + keywords: ['python', 'block', 'code', 'update', ...artifactKeywords], inputSchema: UpdatePythonBlockCodeInput,group: commandGroup, - keywords: ['python', 'block', 'run', 'execute'], + keywords: ['python', 'block', 'run', 'execute', ...artifactKeywords], inputSchema: PythonBlockInput,group: commandGroup, - keywords: ['python', 'block', 'clear', 'result'], + keywords: ['python', 'block', 'clear', 'result', ...artifactKeywords], inputSchema: PythonBlockInput,Also applies to: 166-166, 214-214, 258-258
🤖 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/python/src/PythonBlockCommands.ts` around lines 104 - 113, The keyword arrays for the Python block commands are inconsistent because only add-python-block uses artifactKeywords. Update update-python-block-code, run-python-block, and clear-python-block-result in PythonBlockCommands so they also spread artifactKeywords into their keywords arrays, matching add-python-block and preserving commandNamespace/artifactLabel-driven search terms across all commands.
🤖 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.
Outside diff comments:
In `@packages/python/src/PythonBlockCommands.ts`:
- Around line 104-113: The keyword arrays for the Python block commands are
inconsistent because only add-python-block uses artifactKeywords. Update
update-python-block-code, run-python-block, and clear-python-block-result in
PythonBlockCommands so they also spread artifactKeywords into their keywords
arrays, matching add-python-block and preserving
commandNamespace/artifactLabel-driven search terms across all commands.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 63d6b0fe-01e5-4664-aa2e-e209dfe088bf
📒 Files selected for processing (13)
packages/ai-core/__tests__/AiSlice.onChatFinish.test.tspackages/ai/README.mdpackages/ai/__tests__/commandTools.test.tspackages/ai/__tests__/skillRuntimeToolPolicy.test.tspackages/ai/src/index.tspackages/ai/src/tools/commandTools.tspackages/ai/src/tools/skillRuntimeToolPolicy.tspackages/artifacts/__tests__/artifactAiSessions.test.tspackages/artifacts/src/ai/artifactTargetChange.tspackages/mosaic/README.mdpackages/mosaic/__tests__/MosaicDashboardSlice.test.tspackages/python/README.mdpackages/python/src/PythonBlockCommands.ts
Summary
@sqlrooms/pythondefault Python block commands target generic block-document artifacts instead of CLI worksheet artifacts.createSkillRuntimeToolPolicy()so hosts can substitute product-specific high-level agent tool names while package defaults useblock_document_agent.Validation
pnpm installpnpm buildpnpm --filter @sqlrooms/ai test -- skillRuntimeToolPolicy commandToolspnpm --filter @sqlrooms/artifacts test -- artifactAiSessionspnpm --filter @sqlrooms/mosaic test -- MosaicDashboardSlicepnpm --filter @sqlrooms/python typecheckpnpm --filter @sqlrooms/ai-core test -- AiSlice.onChatFinishknip,turbo typecheck, circular dependency scan,turbo testNotes
The only remaining
worksheetreferences underpackages/*are in the@sqlrooms/pythonREADME example that documents how a host can opt into worksheet-scoped command IDs.Summary by CodeRabbit
New Features
Bug Fixes
Documentation