Skip to content

Commit 165d96d

Browse files
committed
chore(copilot): drop call-site comments that restate the workspace-scope guard's TSDoc
1 parent f2fbf81 commit 165d96d

3 files changed

Lines changed: 0 additions & 7 deletions

File tree

apps/sim/lib/copilot/tools/handlers/deployment/custom-block.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ export async function executeDeployCustomBlock(
151151
if (!workflowRecord.workspaceId) {
152152
return { success: false, error: 'Workflow must belong to a workspace' }
153153
}
154-
// A model-supplied workflowId may only re-assert the chat's workspace — it
155-
// can never publish or unpublish a custom block in another workspace.
156154
let workspaceId: string
157155
try {
158156
workspaceId = requireCopilotWorkspace(context, workflowRecord.workspaceId)

apps/sim/lib/copilot/tools/server/user/get-credentials.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ export const getCredentialsServerTool: BaseServerTool<GetCredentialsParams, any>
5555
throw new OrchestrationError('forbidden', errorMessage)
5656
}
5757

58-
// A model-supplied workflowId may only re-assert the chat's workspace —
59-
// it can never steer the credential listing to another workspace.
6058
workspaceId = requireCopilotWorkspace(context, wId)
6159
}
6260

apps/sim/lib/copilot/tools/server/workflow/query-logs.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,6 @@ export const queryLogsServerTool: BaseServerTool<QueryLogsArgs, unknown> = {
168168
throw new Error('Unauthorized access')
169169
}
170170
const userId = context.userId
171-
// Logs are always read from the chat's delegated workspace. A model-supplied
172-
// `workspaceId` may only re-assert that workspace — it can never select a
173-
// different one, even one the acting user could otherwise access.
174171
const workspaceId = requireCopilotWorkspace(context, args.workspaceId)
175172

176173
if (args.view === 'list') {

0 commit comments

Comments
 (0)