opencode-gitlab-duo-agentic 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -336,6 +336,7 @@ async function createPluginHooks(input) {
|
|
|
336
336
|
},
|
|
337
337
|
"chat.params": async (context, output) => {
|
|
338
338
|
if (!isGitLabProvider(context.model)) return;
|
|
339
|
+
if (isUtilityAgent(context.agent)) return;
|
|
339
340
|
output.options = {
|
|
340
341
|
...output.options,
|
|
341
342
|
workflowSessionID: context.sessionID
|
|
@@ -343,6 +344,7 @@ async function createPluginHooks(input) {
|
|
|
343
344
|
},
|
|
344
345
|
"chat.headers": async (context, output) => {
|
|
345
346
|
if (!isGitLabProvider(context.model)) return;
|
|
347
|
+
if (isUtilityAgent(context.agent)) return;
|
|
346
348
|
output.headers = {
|
|
347
349
|
...output.headers,
|
|
348
350
|
"x-opencode-session": context.sessionID
|
|
@@ -350,6 +352,10 @@ async function createPluginHooks(input) {
|
|
|
350
352
|
}
|
|
351
353
|
};
|
|
352
354
|
}
|
|
355
|
+
var UTILITY_AGENTS = /* @__PURE__ */ new Set(["title", "compaction"]);
|
|
356
|
+
function isUtilityAgent(agent) {
|
|
357
|
+
return UTILITY_AGENTS.has(agent.name);
|
|
358
|
+
}
|
|
353
359
|
function isGitLabProvider(model) {
|
|
354
360
|
if (model.api?.npm === "opencode-gitlab-duo-agentic") return true;
|
|
355
361
|
if (model.providerID === "gitlab" && model.api?.npm !== "@gitlab/gitlab-ai-provider") return true;
|