opencode-gitlab-duo-agentic 0.1.18 → 0.1.19

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -838,11 +838,19 @@ function extractGoal(prompt) {
838
838
  const message = prompt[i];
839
839
  if (message.role !== "user") continue;
840
840
  const content = Array.isArray(message.content) ? message.content : [];
841
- const text2 = content.filter((part) => part.type === "text").map((part) => part.text).join("\n").trim();
841
+ const text2 = content.filter((part) => part.type === "text").map((part) => stripSystemReminders(part.text)).filter(Boolean).join("\n").trim();
842
842
  if (text2) return text2;
843
843
  }
844
844
  return "";
845
845
  }
846
+ var SYSTEM_REMINDER_RE = /<system-reminder>[\s\S]*?<\/system-reminder>/g;
847
+ var WRAPPED_USER_RE = /^<system-reminder>\s*The user sent the following message:\s*\n([\s\S]*?)\n\s*Please address this message and continue with your tasks\.\s*<\/system-reminder>$/;
848
+ function stripSystemReminders(value) {
849
+ return value.replace(SYSTEM_REMINDER_RE, (block) => {
850
+ const wrapped = WRAPPED_USER_RE.exec(block);
851
+ return wrapped?.[1]?.trim() ?? "";
852
+ }).trim();
853
+ }
846
854
  function readSessionID(options) {
847
855
  const providerBlock = readProviderBlock(options);
848
856
  if (typeof providerBlock?.workflowSessionID === "string" && providerBlock.workflowSessionID.trim()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gitlab-duo-agentic",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "OpenCode plugin and provider for GitLab Duo Agentic workflows",
5
5
  "license": "MIT",
6
6
  "type": "module",