feat(llm): integrate GitLab DWS tool approval with permission system (#19955)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
This commit is contained in:
Vladimir Glafirov
2026-04-08 20:39:33 -05:00
committed by GitHub
co-authored by Aiden Cline
parent 8bdcc22541
commit cd8e8a9928
7 changed files with 80 additions and 10 deletions
+4 -1
View File
@@ -1371,7 +1371,10 @@ NOTE: At any point in time through this workflow you should feel free to ask the
)
// Some providers return "stop" even when the assistant message contains tool calls.
// Keep the loop running so tool results can be sent back to the model.
const hasToolCalls = lastAssistantMsg?.parts.some((part) => part.type === "tool") ?? false
// Skip provider-executed tool parts — those were fully handled within the
// provider's stream (e.g. DWS Agent Platform) and don't need a re-loop.
const hasToolCalls =
lastAssistantMsg?.parts.some((part) => part.type === "tool" && !part.metadata?.providerExecuted) ?? false
if (
lastAssistant?.finish &&