feat(copilot): identify current workspace in workspace lists - #6227
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Tests cover the handler with a mocked Reviewed by Cursor Bugbot for commit debb153. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR extends
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure identified. The handler performs a non-mutating identifier comparison over the existing user-scoped workspace list, preserves prior output fields, and intentionally yields no marker when execution is unscoped.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/copilot/tools/handlers/workflow/queries.ts | Adds a derived isCurrent boolean to each accessible workspace without changing access control or workspace selection. |
| apps/sim/lib/copilot/tools/handlers/workflow/queries.test.ts | Adds coverage confirming the current workspace is marked and existing workspace fields remain intact. |
Reviews (1): Last reviewed commit: "fix(review): use absolute workspace quer..." | Re-trigger Greptile
Summary
list_user_workspacesnow identifies the request's current workspace while preserving each accessible workspace's ID, name, and effective role. The handler addsisCurrentby comparing each result with the existing tool execution context; unscoped executions returnfalsefor every workspace.This keeps workspace discovery as an on-demand tool call and adds no runtime-context plumbing.
Related: simstudioai/mothership#393
Type of Change
Testing
bun --cwd apps/sim test lib/copilot/tools/handlers/workflow/queries.test.ts lib/copilot/tools/tool-display.test.ts— 74 tests passedbun run check:api-validationbun run scripts/sync-tool-catalog.ts --check --input=../mothership/copilot/contracts/tool-catalog-v1.jsonChecklist
Screenshots/Videos
Not applicable — tool result only.
Post-Deploy Monitoring & Validation
For the first 24 hours, the Copilot owner should watch
list_user_workspacescalls for missing or multiple current-workspace markers. Healthy scoped calls return exactly oneisCurrent: true; unscoped calls return none. Roll back the focused handler commit if current-workspace marking is incorrect.