adhdev 0.8.47 → 0.8.48
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/cli/index.js +20 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -10652,14 +10652,18 @@ var init_cli_provider_instance = __esm({
|
|
|
10652
10652
|
}
|
|
10653
10653
|
const runtime = this.adapter.getRuntimeMetadata();
|
|
10654
10654
|
this.maybeAppendRuntimeRecoveryMessage(runtime);
|
|
10655
|
-
|
|
10655
|
+
let parsedMessages = Array.isArray(parsedStatus?.messages) ? parsedStatus.messages : [];
|
|
10656
|
+
const historyMessageCount = Number.isFinite(parsedStatus?.historyMessageCount) ? Math.max(0, Number(parsedStatus.historyMessageCount)) : null;
|
|
10657
|
+
if (historyMessageCount !== null) {
|
|
10658
|
+
parsedMessages = historyMessageCount > 0 ? parsedMessages.slice(-historyMessageCount) : [];
|
|
10659
|
+
}
|
|
10656
10660
|
const controlValues = extractProviderControlValues(this.provider.controls, parsedStatus);
|
|
10657
10661
|
if (controlValues) {
|
|
10658
|
-
this.controlValues = controlValues;
|
|
10659
|
-
} else if (Object.keys(this.controlValues).length > 0) {
|
|
10660
|
-
this.controlValues = {};
|
|
10662
|
+
this.controlValues = { ...this.controlValues, ...controlValues };
|
|
10661
10663
|
}
|
|
10662
10664
|
const mergedMessages = this.mergeConversationMessages(parsedMessages);
|
|
10665
|
+
const currentModel = typeof parsedStatus?.model === "string" && parsedStatus.model.trim() ? parsedStatus.model.trim() : typeof this.controlValues.model === "string" && this.controlValues.model.trim() ? this.controlValues.model.trim() : void 0;
|
|
10666
|
+
const currentPlan = typeof parsedStatus?.mode === "string" && parsedStatus.mode.trim() ? parsedStatus.mode.trim() : typeof this.controlValues.mode === "string" && this.controlValues.mode.trim() ? this.controlValues.mode.trim() : void 0;
|
|
10663
10667
|
const dirName = this.workingDir.split("/").filter(Boolean).pop() || "session";
|
|
10664
10668
|
if (parsedMessages.length > 0) {
|
|
10665
10669
|
const shouldSkipReplayPersist = this.suppressIdleHistoryReplay && adapterStatus.status === "idle" && parsedStatus?.status === "idle";
|
|
@@ -10696,6 +10700,8 @@ var init_cli_provider_instance = __esm({
|
|
|
10696
10700
|
inputContent: ""
|
|
10697
10701
|
},
|
|
10698
10702
|
workspace: this.workingDir,
|
|
10703
|
+
currentModel,
|
|
10704
|
+
currentPlan,
|
|
10699
10705
|
instanceId: this.instanceId,
|
|
10700
10706
|
providerSessionId: this.providerSessionId,
|
|
10701
10707
|
lastUpdated: Date.now(),
|
|
@@ -10885,6 +10891,15 @@ var init_cli_provider_instance = __esm({
|
|
|
10885
10891
|
}
|
|
10886
10892
|
applyProviderResponse(data, options) {
|
|
10887
10893
|
if (!data || typeof data !== "object") return;
|
|
10894
|
+
const patchedProviderSessionId = typeof data.providerSessionId === "string" ? data.providerSessionId.trim() : "";
|
|
10895
|
+
if (patchedProviderSessionId) {
|
|
10896
|
+
this.promoteProviderSessionId(patchedProviderSessionId);
|
|
10897
|
+
}
|
|
10898
|
+
if (data.sessionEvent === "new_session") {
|
|
10899
|
+
this.runtimeMessages = [];
|
|
10900
|
+
this.suppressIdleHistoryReplay = false;
|
|
10901
|
+
this.adapter.clearHistory();
|
|
10902
|
+
}
|
|
10888
10903
|
const controlValues = extractProviderControlValues(this.provider.controls, data);
|
|
10889
10904
|
if (controlValues) {
|
|
10890
10905
|
this.controlValues = { ...this.controlValues, ...controlValues };
|
|
@@ -50092,7 +50107,7 @@ var init_adhdev_daemon = __esm({
|
|
|
50092
50107
|
import_ws3 = require("ws");
|
|
50093
50108
|
import_chalk2 = __toESM(require("chalk"));
|
|
50094
50109
|
init_version();
|
|
50095
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.
|
|
50110
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.48" });
|
|
50096
50111
|
ACTIVE_CHAT_POLL_STATUSES = /* @__PURE__ */ new Set([
|
|
50097
50112
|
"generating",
|
|
50098
50113
|
"waiting_approval",
|