From b2b6ee773bd35932d6c554a78c6fb9cadebca71f Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Tue, 1 Sep 2026 03:32:42 +0200 Subject: [PATCH] fix(raw apps): pass the data table role the way the client takes it --- frontend/src/lib/components/copilot/chat/app/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/components/copilot/chat/app/core.ts b/frontend/src/lib/components/copilot/chat/app/core.ts index 11c2588868..9f4616efef 100644 --- a/frontend/src/lib/components/copilot/chat/app/core.ts +++ b/frontend/src/lib/components/copilot/chat/app/core.ts @@ -925,7 +925,7 @@ export function prepareAppSystemMessage(customPrompt?: string): ChatCompletionSy // and role spelled out otherwise. A role names the privileges the app's own // queries run with, so it has to be in the code the model writes. const datatableCall = policy.role - ? `wmill.datatable('${datatableName}', '${policy.role}')` + ? `wmill.datatable('${datatableName}', { role: '${policy.role}' })` : datatableName === 'main' ? 'wmill.datatable()' : `wmill.datatable('${datatableName}')`