@agimon-ai/po-git 0.0.0-alpha.25 → 0.0.0-alpha.26
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/extensions/native.mjs +1631 -537
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/server.cjs +7 -3
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.mjs +7 -3
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +1372 -1285
- package/dist/extensions/web.mjs.map +1 -1
- package/package.json +8 -8
|
@@ -1853,11 +1853,15 @@ function parseCommand(payload) {
|
|
|
1853
1853
|
/**
|
|
1854
1854
|
* What the reader is told when a command fails.
|
|
1855
1855
|
*
|
|
1856
|
-
* An expected failure explains itself
|
|
1857
|
-
*
|
|
1856
|
+
* An expected failure explains itself, minus the `[code]` tag and recovery line
|
|
1857
|
+
* written for the agent's tool result. A dirty close is said in the person's
|
|
1858
|
+
* terms, because its message tells the agent to pass `force`. Anything else is
|
|
1859
|
+
* summarised, never echoed: a git error can carry a remote URL with a token in it.
|
|
1858
1860
|
*/
|
|
1859
1861
|
function failureText(error) {
|
|
1860
|
-
|
|
1862
|
+
if (!(error instanceof PoGitExpectedError)) return "The worktree operation failed.";
|
|
1863
|
+
if (error.code === "worktree_dirty") return "The worktree has uncommitted changes.";
|
|
1864
|
+
return error.message.replace(/^\[[a-z_]+\] /u, "").split("\nRecovery:")[0] ?? error.message;
|
|
1861
1865
|
}
|
|
1862
1866
|
/** Starts one direct-event subscription per managed session. */
|
|
1863
1867
|
function createWorktreesChannel(options = {}) {
|