opencode-forgekeeper 6.7.0 → 6.8.0
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/README.md +23 -10
- package/dist/gui-experimental.cjs +24 -24
- package/dist/index.js +2918 -2780
- package/dist/tui.js +20 -9
- package/package.json +1 -1
package/dist/tui.js
CHANGED
|
@@ -4018,7 +4018,11 @@ function createStatusClient(options) {
|
|
|
4018
4018
|
// packages/forgekeeper/src/client-core.ts
|
|
4019
4019
|
var at = (directory) => ({ location: { directory } });
|
|
4020
4020
|
var loadFeedback = async (rpc, directory) => await rpc.feedback({}, at(directory));
|
|
4021
|
+
var rpcUnavailable = (error) => typeof error === "object" && error !== null && error.type === "rpc.unavailable";
|
|
4022
|
+
var UNAVAILABLE_RETRIES = 10;
|
|
4023
|
+
var UNAVAILABLE_RETRY_DELAY = 1000;
|
|
4021
4024
|
function createFeedbackLoader(options) {
|
|
4025
|
+
const wait = options.wait ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
4022
4026
|
const requests = new Map;
|
|
4023
4027
|
let generation = 0;
|
|
4024
4028
|
const reload = async (directory) => {
|
|
@@ -4026,15 +4030,22 @@ function createFeedbackLoader(options) {
|
|
|
4026
4030
|
requests.set(directory, request);
|
|
4027
4031
|
const current = generation;
|
|
4028
4032
|
const latest = () => current === generation && requests.get(directory) === request;
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4033
|
+
for (let attempt = 0;; attempt++) {
|
|
4034
|
+
try {
|
|
4035
|
+
const state = await options.load(directory);
|
|
4036
|
+
if (latest())
|
|
4037
|
+
options.changed(directory, state);
|
|
4038
|
+
return state;
|
|
4039
|
+
} catch (error) {
|
|
4040
|
+
if (rpcUnavailable(error) && attempt < UNAVAILABLE_RETRIES && latest()) {
|
|
4041
|
+
await wait(UNAVAILABLE_RETRY_DELAY);
|
|
4042
|
+
if (latest())
|
|
4043
|
+
continue;
|
|
4044
|
+
}
|
|
4045
|
+
if (latest())
|
|
4046
|
+
options.failed(directory, errorMessage(error));
|
|
4047
|
+
return;
|
|
4048
|
+
}
|
|
4038
4049
|
}
|
|
4039
4050
|
};
|
|
4040
4051
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-forgekeeper",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.0",
|
|
4
4
|
"description": "OpenCode plugin that tracks each session's GitHub and GitLab issues and PRs/MRs: title prefixes, a PR/MR status footer, and review notifications",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Pedro Pombeiro",
|