@adhdev/daemon-core 0.9.76-rc.21 → 0.9.76-rc.22
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/git/git-types.d.ts +1 -1
- package/dist/index.js +25 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/git/git-commands.ts +5 -1
- package/src/git/git-types.ts +1 -0
- package/src/providers/cli-provider-instance.ts +26 -5
package/dist/index.mjs
CHANGED
|
@@ -4693,6 +4693,7 @@ var FAILURE_REASONS = /* @__PURE__ */ new Set([
|
|
|
4693
4693
|
"dirty_index_required",
|
|
4694
4694
|
"conflict",
|
|
4695
4695
|
"invalid_args",
|
|
4696
|
+
"nothing_to_commit",
|
|
4696
4697
|
"git_command_failed"
|
|
4697
4698
|
]);
|
|
4698
4699
|
function failure(reason, error) {
|
|
@@ -4937,7 +4938,10 @@ async function gitCheckpoint(workspace, message, includeUntracked) {
|
|
|
4937
4938
|
} catch (err) {
|
|
4938
4939
|
const output = (err?.stdout || "") + (err?.stderr || "");
|
|
4939
4940
|
if (/nothing to commit/i.test(output)) {
|
|
4940
|
-
throw new GitCommandError("
|
|
4941
|
+
throw new GitCommandError("nothing_to_commit", "Nothing to commit \u2014 working tree is clean.", {
|
|
4942
|
+
stdout: err?.stdout,
|
|
4943
|
+
stderr: err?.stderr
|
|
4944
|
+
});
|
|
4941
4945
|
}
|
|
4942
4946
|
throw err;
|
|
4943
4947
|
}
|
|
@@ -15468,10 +15472,26 @@ ${effect.notification.body || ""}`.trim();
|
|
|
15468
15472
|
}
|
|
15469
15473
|
mergeConversationMessages(parsedMessages) {
|
|
15470
15474
|
if (this.runtimeMessages.length === 0) return normalizeChatMessages(parsedMessages);
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
+
const parsedEntries = parsedMessages.map((message, index) => ({
|
|
15476
|
+
message,
|
|
15477
|
+
index,
|
|
15478
|
+
source: "parsed"
|
|
15479
|
+
}));
|
|
15480
|
+
const runtimeEntries = this.runtimeMessages.map((entry, index) => ({
|
|
15481
|
+
message: entry.message,
|
|
15482
|
+
index: parsedMessages.length + index,
|
|
15483
|
+
source: "runtime"
|
|
15484
|
+
}));
|
|
15485
|
+
const getTime = (message) => {
|
|
15486
|
+
const value = typeof message.receivedAt === "number" ? message.receivedAt : typeof message.timestamp === "number" ? message.timestamp : 0;
|
|
15487
|
+
return Number.isFinite(value) && value > 0 ? value : 0;
|
|
15488
|
+
};
|
|
15489
|
+
return normalizeChatMessages([...parsedEntries, ...runtimeEntries].sort((a, b) => {
|
|
15490
|
+
const aTime = getTime(a.message);
|
|
15491
|
+
const bTime = getTime(b.message);
|
|
15492
|
+
if (aTime && bTime && aTime !== bTime) return aTime - bTime;
|
|
15493
|
+
if (aTime && !bTime && a.source === "runtime" && b.source === "parsed") return -1;
|
|
15494
|
+
if (!aTime && bTime && a.source === "parsed" && b.source === "runtime") return 1;
|
|
15475
15495
|
return a.index - b.index;
|
|
15476
15496
|
}).map((entry) => entry.message));
|
|
15477
15497
|
}
|