opencode-forgekeeper 3.0.0 → 3.0.1
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 +5 -3
- package/dist/index.js +15 -10
- package/dist/tui.js +21 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -411,9 +411,11 @@ the current checkout. Select an update to open its PR/MR or comment links, press
|
|
|
411
411
|
to acknowledge it, press Ctrl+R to summarize it in its session in any delivery mode, or
|
|
412
412
|
press Ctrl+S to pause or resume review monitoring. Acknowledgement
|
|
413
413
|
only dismisses the local update; it does not reply to or resolve a remote discussion.
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
414
|
+
A session's footer shows how many of its own updates are pending. The home screen, where
|
|
415
|
+
new sessions start, shows no count. `/forge-feedback` lists the whole checkout's updates,
|
|
416
|
+
and connected CLIs in the checkout show a toast even when the session's tab has never been
|
|
417
|
+
visited. With session tabs on, those CLIs also reopen the session's tab, without leaving
|
|
418
|
+
the session you're in.
|
|
417
419
|
|
|
418
420
|
An update leaves the inbox when you acknowledge it, or when it no longer needs attention:
|
|
419
421
|
|
package/dist/index.js
CHANGED
|
@@ -4932,16 +4932,15 @@ async function setupServer(ctx, lookups, status2) {
|
|
|
4932
4932
|
});
|
|
4933
4933
|
async function writeInstructions(sessionID) {
|
|
4934
4934
|
if (closing)
|
|
4935
|
-
return
|
|
4935
|
+
return;
|
|
4936
4936
|
const state = await stateFor(sessionID);
|
|
4937
4937
|
const value = `Current session target: ${describeTargets(state.targets)}.`;
|
|
4938
4938
|
const entries = await ctx.session.instructions.entry.list({ sessionID });
|
|
4939
4939
|
if (entries.some((entry) => entry.key === TARGET_KEY && entry.value === value))
|
|
4940
|
-
return
|
|
4940
|
+
return;
|
|
4941
4941
|
if (closing)
|
|
4942
|
-
return
|
|
4942
|
+
return;
|
|
4943
4943
|
await ctx.session.instructions.entry.put({ sessionID, key: TARGET_KEY, value });
|
|
4944
|
-
return [value];
|
|
4945
4944
|
}
|
|
4946
4945
|
function instruct(sessionID) {
|
|
4947
4946
|
return instructing.run(sessionID, () => writeInstructions(sessionID));
|
|
@@ -4973,17 +4972,23 @@ async function setupServer(ctx, lookups, status2) {
|
|
|
4973
4972
|
if (event.tools)
|
|
4974
4973
|
delete event.tools[LINKED_NOTE_TOOL];
|
|
4975
4974
|
try {
|
|
4976
|
-
|
|
4977
|
-
if (session.parentID || session.location.directory !== ctx.location.directory)
|
|
4975
|
+
if (!await ownsSession(event.sessionID))
|
|
4978
4976
|
return;
|
|
4979
4977
|
event.system.push({ type: "text", text: GUIDANCE.join(`
|
|
4980
4978
|
`) });
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4979
|
+
await instruct(event.sessionID);
|
|
4980
|
+
} catch {}
|
|
4981
|
+
});
|
|
4982
|
+
await ctx.session.hook("prompt", async (event) => {
|
|
4983
|
+
try {
|
|
4984
|
+
if (await ownsSession(event.sessionID))
|
|
4985
|
+
await instruct(event.sessionID);
|
|
4985
4986
|
} catch {}
|
|
4986
4987
|
});
|
|
4988
|
+
async function ownsSession(sessionID) {
|
|
4989
|
+
const session = await ctx.session.get({ sessionID });
|
|
4990
|
+
return !session.parentID && session.location.directory === ctx.location.directory;
|
|
4991
|
+
}
|
|
4987
4992
|
const summarizing = async (sessionID) => watcher ? watcher.summarizing(sessionID) : orphaned.has(sessionID);
|
|
4988
4993
|
await ctx.tool.hook("execute.before", async (event) => {
|
|
4989
4994
|
if (watcher && event.tool === LINKED_NOTE_TOOL)
|
package/dist/tui.js
CHANGED
|
@@ -1984,6 +1984,12 @@ var formatTime = (at) => new Intl.DateTimeFormat(undefined, {
|
|
|
1984
1984
|
timeZoneName: "short"
|
|
1985
1985
|
}).format(at);
|
|
1986
1986
|
var feedbackTime = (item) => item.postedAt !== undefined ? `Latest comment: ${formatTime(item.postedAt)}` : `Detected: ${formatTime(item.at)}`;
|
|
1987
|
+
function feedbackFooter(state, sessionID) {
|
|
1988
|
+
const count = state.items.filter((item) => item.sessionID === sessionID).length;
|
|
1989
|
+
if (!sessionID || count === 0)
|
|
1990
|
+
return;
|
|
1991
|
+
return `${count} review update${count === 1 ? "" : "s"}${state.paused ? " (paused)" : ""}`;
|
|
1992
|
+
}
|
|
1987
1993
|
function feedbackLinks(item) {
|
|
1988
1994
|
return [...new Set([item.url, ...item.links])].filter((url) => {
|
|
1989
1995
|
try {
|
|
@@ -2831,39 +2837,23 @@ var tui_default = {
|
|
|
2831
2837
|
return null;
|
|
2832
2838
|
}
|
|
2833
2839
|
});
|
|
2834
|
-
context.ui.slot({
|
|
2835
|
-
append: "home.footer.status",
|
|
2836
|
-
render: () => _$createComponent(Show, {
|
|
2837
|
-
get when() {
|
|
2838
|
-
return feedback().items.length > 0 || feedback().paused;
|
|
2839
|
-
},
|
|
2840
|
-
get children() {
|
|
2841
|
-
var _el$54 = _$createElement("text"), _el$55 = _$createTextNode(` review updates`);
|
|
2842
|
-
_$insertNode(_el$54, _el$55);
|
|
2843
|
-
_$setProp(_el$54, "onMouseUp", () => void showFeedback());
|
|
2844
|
-
_$insert(_el$54, () => feedback().items.length, _el$55);
|
|
2845
|
-
_$insert(_el$54, () => feedback().paused ? " (paused)" : "", null);
|
|
2846
|
-
_$effect((_$p) => _$setProp(_el$54, "fg", context.theme.text.muted, _$p));
|
|
2847
|
-
return _el$54;
|
|
2848
|
-
}
|
|
2849
|
-
})
|
|
2850
|
-
});
|
|
2851
2840
|
context.ui.slot({
|
|
2852
2841
|
append: "prompt.footer.status",
|
|
2853
|
-
render: () =>
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2842
|
+
render: (input) => {
|
|
2843
|
+
const text = () => feedbackFooter(feedback(), input.sessionID);
|
|
2844
|
+
return _$createComponent(Show, {
|
|
2845
|
+
get when() {
|
|
2846
|
+
return text();
|
|
2847
|
+
},
|
|
2848
|
+
get children() {
|
|
2849
|
+
var _el$54 = _$createElement("text");
|
|
2850
|
+
_$setProp(_el$54, "onMouseUp", () => void showFeedback());
|
|
2851
|
+
_$insert(_el$54, text);
|
|
2852
|
+
_$effect((_$p) => _$setProp(_el$54, "fg", context.theme.text.muted, _$p));
|
|
2853
|
+
return _el$54;
|
|
2854
|
+
}
|
|
2855
|
+
});
|
|
2856
|
+
}
|
|
2867
2857
|
});
|
|
2868
2858
|
const stops = [rpc.events.on("feedbackChanged", (event) => {
|
|
2869
2859
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-forgekeeper",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
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",
|