opencode-gitlab-duo-agentic 0.1.4 → 0.1.5
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 +16 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1192,12 +1192,6 @@ function duoLog(...args) {
|
|
|
1192
1192
|
} catch {
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
|
-
function duoLogReset() {
|
|
1196
|
-
try {
|
|
1197
|
-
writeFileSync(LOG_PATH, "");
|
|
1198
|
-
} catch {
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
1195
|
|
|
1202
1196
|
// src/provider/application/model.ts
|
|
1203
1197
|
var GitLabDuoAgenticLanguageModel = class {
|
|
@@ -1245,8 +1239,7 @@ var GitLabDuoAgenticLanguageModel = class {
|
|
|
1245
1239
|
const workflowType = "chat";
|
|
1246
1240
|
const promptText = extractLastUserText(options.prompt);
|
|
1247
1241
|
const toolResults = extractToolResults(options.prompt);
|
|
1248
|
-
|
|
1249
|
-
duoLog("doStream", "hasStarted=" + this.#runtime.hasStarted, "prompt=" + (promptText?.slice(0, 60) ?? "null"), "toolResults=" + toolResults.length);
|
|
1242
|
+
duoLog("--- doStream", "hasStarted=" + this.#runtime.hasStarted, "prompt=" + (promptText?.slice(0, 60) ?? "null"), "toolResults=" + toolResults.length);
|
|
1250
1243
|
this.#runtime.resetMapperState();
|
|
1251
1244
|
if (!this.#runtime.hasStarted) {
|
|
1252
1245
|
this.#sentToolCallIds.clear();
|
|
@@ -1880,6 +1873,7 @@ var GitLabAgenticRuntime = class {
|
|
|
1880
1873
|
#mapper = new WorkflowEventMapper();
|
|
1881
1874
|
#containerParams;
|
|
1882
1875
|
#startRequestSent = false;
|
|
1876
|
+
#connectingPromise;
|
|
1883
1877
|
constructor(options, dependencies) {
|
|
1884
1878
|
this.#options = options;
|
|
1885
1879
|
this.#dependencies = dependencies;
|
|
@@ -1902,11 +1896,24 @@ var GitLabAgenticRuntime = class {
|
|
|
1902
1896
|
// Connection lifecycle
|
|
1903
1897
|
// ---------------------------------------------------------------------------
|
|
1904
1898
|
async ensureConnected(goal, workflowType) {
|
|
1905
|
-
duoLog("ensureConnected", "stream=" + !!this.#stream, "wfId=" + !!this.#workflowId, "queue=" + !!this.#queue);
|
|
1899
|
+
duoLog("ensureConnected", "stream=" + !!this.#stream, "wfId=" + !!this.#workflowId, "queue=" + !!this.#queue, "connecting=" + !!this.#connectingPromise);
|
|
1900
|
+
if (this.#connectingPromise) {
|
|
1901
|
+
duoLog("ensureConnected", "awaiting in-flight connection");
|
|
1902
|
+
await this.#connectingPromise;
|
|
1903
|
+
return;
|
|
1904
|
+
}
|
|
1906
1905
|
if (this.#stream && this.#workflowId && this.#queue) {
|
|
1907
1906
|
duoLog("ensureConnected", "skip (connected)");
|
|
1908
1907
|
return;
|
|
1909
1908
|
}
|
|
1909
|
+
this.#connectingPromise = this.#doConnect(goal, workflowType);
|
|
1910
|
+
try {
|
|
1911
|
+
await this.#connectingPromise;
|
|
1912
|
+
} finally {
|
|
1913
|
+
this.#connectingPromise = void 0;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
async #doConnect(goal, workflowType) {
|
|
1910
1917
|
if (!this.#containerParams) {
|
|
1911
1918
|
this.#containerParams = await this.#resolveContainerParams();
|
|
1912
1919
|
}
|