Repository navigation
chore: workspace block-document renames - #797
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 as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR renames CLI worksheet-focused AI adapter, tools, agent, commands, and store wiring in ChangesWorksheet to block-document CLI migration
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/sqlrooms-cli-ui/src/ai/createCliBlockDocumentAgentTool.ts (1)
435-450: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winInconsistent user-facing terminology in the failure path.
The success path falls back to
"Worksheet created successfully."andstore.ts's CLI instructions explicitly say to "Use the word Worksheet in user-facing replies," but the generic failurefriendlyMessagesays"Block document agent execution failed.", leaking internal naming to end users.✏️ Proposed fix
const friendlyMessage = error instanceof AiAgentError ? errorMessage - : 'Block document agent execution failed.'; + : 'Worksheet agent execution failed.';🤖 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 `@apps/sqlrooms-cli-ui/src/ai/createCliBlockDocumentAgentTool.ts` around lines 435 - 450, The failure path in createCliBlockDocumentAgentTool uses internal “Block document” terminology, which is inconsistent with the user-facing “Worksheet” wording used elsewhere. Update the friendlyMessage branch in the catch block so the generic fallback matches the CLI’s user-facing terminology and does not expose internal agent names, while keeping AiAgentError messages unchanged. Use the createCliBlockDocumentAgentTool catch path and friendlyMessage selection to locate the change.
🧹 Nitpick comments (1)
apps/sqlrooms-cli-ui/src/ai/constants.ts (1)
19-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
KnownBlockDocumentTools.list_blockshere
Keep this instruction aligned with the shared tool key instead of hardcodinglist_block_document_blocks.🤖 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 `@apps/sqlrooms-cli-ui/src/ai/constants.ts` around lines 19 - 22, Update EXPERIMENTAL_BLOCK_DOCUMENT_AGENT_INSTRUCTIONS so it refers to the shared tool key KnownBlockDocumentTools.list_blocks instead of hardcoding list_block_document_blocks. Keep the rest of the worksheet map guidance in place, and adjust the existing update-flow sentence to call the shared symbol consistently so the instruction stays aligned with the tool registry.
🤖 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 `@apps/sqlrooms-cli-ui/src/ai/createCliBlockDocumentAgentTool.ts`:
- Around line 435-450: The failure path in createCliBlockDocumentAgentTool uses
internal “Block document” terminology, which is inconsistent with the
user-facing “Worksheet” wording used elsewhere. Update the friendlyMessage
branch in the catch block so the generic fallback matches the CLI’s user-facing
terminology and does not expose internal agent names, while keeping AiAgentError
messages unchanged. Use the createCliBlockDocumentAgentTool catch path and
friendlyMessage selection to locate the change.
---
Nitpick comments:
In `@apps/sqlrooms-cli-ui/src/ai/constants.ts`:
- Around line 19-22: Update EXPERIMENTAL_BLOCK_DOCUMENT_AGENT_INSTRUCTIONS so it
refers to the shared tool key KnownBlockDocumentTools.list_blocks instead of
hardcoding list_block_document_blocks. Keep the rest of the worksheet map
guidance in place, and adjust the existing update-flow sentence to call the
shared symbol consistently so the instruction stays aligned with the tool
registry.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9105d1da-539a-4fe1-8f01-ddda85b31297
📒 Files selected for processing (11)
apps/sqlrooms-cli-ui/src/__tests__/createCliBlockDocumentAiAdapter.test.tsapps/sqlrooms-cli-ui/src/__tests__/createCliBlockDocumentCommands.test.tsapps/sqlrooms-cli-ui/src/ai/__tests__/createCliBlockDocumentAiTools.test.tsapps/sqlrooms-cli-ui/src/ai/constants.tsapps/sqlrooms-cli-ui/src/ai/createCliBlockDocumentAgentTool.tsapps/sqlrooms-cli-ui/src/ai/createCliBlockDocumentAiTools.tsapps/sqlrooms-cli-ui/src/components/useLocalFileLoader.tsapps/sqlrooms-cli-ui/src/createBlockDocumentAgent.tsapps/sqlrooms-cli-ui/src/createCliBlockDocumentAiAdapter.tsapps/sqlrooms-cli-ui/src/createCliBlockDocumentCommands.tsapps/sqlrooms-cli-ui/src/store.ts
Summary by CodeRabbit