opencode-forgekeeper 5.0.1 → 5.1.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 +3 -2
- package/dist/gui-experimental.cjs +39 -39
- package/dist/index.js +688 -581
- package/dist/tui.js +72 -69
- package/package.json +1 -1
package/dist/tui.js
CHANGED
|
@@ -72,7 +72,7 @@ class ForgeError extends Error {
|
|
|
72
72
|
|
|
73
73
|
// packages/forgekeeper/src/graphql.ts
|
|
74
74
|
var query = (text) => text;
|
|
75
|
-
var typed = (transport) => async (host,
|
|
75
|
+
var typed = (transport) => async (host, query, variables) => await transport(host, query, variables);
|
|
76
76
|
|
|
77
77
|
// packages/forgekeeper/src/review-summary.ts
|
|
78
78
|
var MESSAGE_PREFIX = "msg_forgekeeper_";
|
|
@@ -437,7 +437,7 @@ async function fetchComments2(transport, host, project, iid) {
|
|
|
437
437
|
viewerID,
|
|
438
438
|
comments: pages.toReversed().flat()
|
|
439
439
|
});
|
|
440
|
-
for (let
|
|
440
|
+
for (let page = 0;page < MAX_COMMENT_PAGES2; page++) {
|
|
441
441
|
const variables = { project, iid };
|
|
442
442
|
if (before)
|
|
443
443
|
variables.before = before;
|
|
@@ -453,7 +453,7 @@ async function fetchComments2(transport, host, project, iid) {
|
|
|
453
453
|
viewerID ??= data.currentUser?.id ?? undefined;
|
|
454
454
|
const connection = data.project?.mergeRequest?.notes;
|
|
455
455
|
if (!connection)
|
|
456
|
-
return
|
|
456
|
+
return page === 0 ? undefined : snapshot(false);
|
|
457
457
|
pages.push(connection.nodes.flatMap((node) => toComment(node) ?? []));
|
|
458
458
|
if (!connection.pageInfo.hasPreviousPage)
|
|
459
459
|
return snapshot(true);
|
|
@@ -598,7 +598,7 @@ async function fetchReviewRequests(transport, host, project, iid, mergeRequestUr
|
|
|
598
598
|
requests: viewer ? nodes.flatMap((node) => toRequest(node, viewer.username, mergeRequestUrl) ?? []).sort((a, b) => a.order - b.order) : []
|
|
599
599
|
};
|
|
600
600
|
};
|
|
601
|
-
for (let
|
|
601
|
+
for (let page = 0;page < MAX_ACTIVITY_PAGES; page++) {
|
|
602
602
|
const variables = { project, iid };
|
|
603
603
|
if (before)
|
|
604
604
|
variables.before = before;
|
|
@@ -606,7 +606,7 @@ async function fetchReviewRequests(transport, host, project, iid, mergeRequestUr
|
|
|
606
606
|
viewer ??= data.currentUser ?? undefined;
|
|
607
607
|
const connection = data.project?.mergeRequest?.notes;
|
|
608
608
|
if (!connection)
|
|
609
|
-
return
|
|
609
|
+
return page === 0 ? undefined : history(false);
|
|
610
610
|
pages.push(connection.nodes);
|
|
611
611
|
if (!connection.pageInfo.hasPreviousPage)
|
|
612
612
|
return history(true);
|
|
@@ -974,8 +974,8 @@ function classifyError(message, code) {
|
|
|
974
974
|
}
|
|
975
975
|
var isResponse = (body) => typeof body === "object" && body !== null && (!("errors" in body) || Array.isArray(body.errors)) && (!("data" in body) || typeof body.data === "object");
|
|
976
976
|
function glabGraphQL(run, cwd) {
|
|
977
|
-
return async (host,
|
|
978
|
-
const args = ["api", "graphql", "--hostname", host, "-f", `query=${
|
|
977
|
+
return async (host, query, variables) => {
|
|
978
|
+
const args = ["api", "graphql", "--hostname", host, "-f", `query=${query}`];
|
|
979
979
|
for (const [name, value] of Object.entries(variables))
|
|
980
980
|
args.push("-f", `${name}=${value}`);
|
|
981
981
|
const result = await run("glab", args, cwd);
|
|
@@ -996,7 +996,7 @@ function glabGraphQL(run, cwd) {
|
|
|
996
996
|
return body.data;
|
|
997
997
|
};
|
|
998
998
|
}
|
|
999
|
-
var countUnresolved = (
|
|
999
|
+
var countUnresolved = (page) => page.nodes.filter((discussion) => discussion.resolvable && !discussion.resolved).length;
|
|
1000
1000
|
var gitlabTraits = {
|
|
1001
1001
|
kind: "gitlab",
|
|
1002
1002
|
noun: "MR",
|
|
@@ -1149,22 +1149,22 @@ class GitLabForge {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
async unresolvedThreads(host, node) {
|
|
1151
1151
|
let count = countUnresolved(node.discussions);
|
|
1152
|
-
let
|
|
1152
|
+
let page = node.discussions.pageInfo;
|
|
1153
1153
|
let pages = 1;
|
|
1154
|
-
while (
|
|
1154
|
+
while (page.hasNextPage && page.endCursor && pages < MAX_DISCUSSION_PAGES) {
|
|
1155
1155
|
const data = await this.graphql(host, DISCUSSIONS_QUERY, {
|
|
1156
1156
|
project: node.targetProject.fullPath,
|
|
1157
1157
|
iid: node.iid,
|
|
1158
|
-
after:
|
|
1158
|
+
after: page.endCursor
|
|
1159
1159
|
});
|
|
1160
1160
|
const next = data.project?.mergeRequest?.discussions;
|
|
1161
1161
|
if (!next)
|
|
1162
1162
|
break;
|
|
1163
1163
|
count += countUnresolved(next);
|
|
1164
|
-
|
|
1164
|
+
page = next.pageInfo;
|
|
1165
1165
|
pages++;
|
|
1166
1166
|
}
|
|
1167
|
-
return { count, complete: !
|
|
1167
|
+
return { count, complete: !page.hasNextPage };
|
|
1168
1168
|
}
|
|
1169
1169
|
async normalize(host, node) {
|
|
1170
1170
|
const threads = await this.unresolvedThreads(host, node);
|
|
@@ -1222,8 +1222,8 @@ var fields = `number title url state isDraft mergeable reviewDecision headRefOid
|
|
|
1222
1222
|
} } } } }`;
|
|
1223
1223
|
var MAX_PAGES = 50;
|
|
1224
1224
|
function ghGraphQL(run, cwd) {
|
|
1225
|
-
return async (host,
|
|
1226
|
-
const args = ["api", "graphql", "--hostname", host, "-f", `query=${
|
|
1225
|
+
return async (host, query, variables) => {
|
|
1226
|
+
const args = ["api", "graphql", "--hostname", host, "-f", `query=${query}`];
|
|
1227
1227
|
for (const [name, value] of Object.entries(variables))
|
|
1228
1228
|
args.push(typeof value === "number" ? "-F" : "-f", `${name}=${value}`);
|
|
1229
1229
|
const result = await run("gh", args, cwd);
|
|
@@ -1270,9 +1270,9 @@ var newerCheck = (node, previous) => checkTime(node) > checkTime(previous);
|
|
|
1270
1270
|
function checks(nodes, complete, url, id) {
|
|
1271
1271
|
const latest = new Map;
|
|
1272
1272
|
for (const node of nodes) {
|
|
1273
|
-
const
|
|
1273
|
+
const time = checkTime(node);
|
|
1274
1274
|
const key = checkKey(node);
|
|
1275
|
-
if (!key || !Number.isFinite(
|
|
1275
|
+
if (!key || !Number.isFinite(time))
|
|
1276
1276
|
continue;
|
|
1277
1277
|
const previous = latest.get(key);
|
|
1278
1278
|
if (!previous || newerCheck(node, previous))
|
|
@@ -1455,7 +1455,7 @@ class GitHubForge {
|
|
|
1455
1455
|
const [owner, repo] = target.path.split("/");
|
|
1456
1456
|
let after;
|
|
1457
1457
|
let complete = false;
|
|
1458
|
-
for (let
|
|
1458
|
+
for (let page = 0;page < MAX_PAGES; page++) {
|
|
1459
1459
|
const data = await this.graphql(target.host, query(`query($owner:String!,$repo:String!,$branch:String!${after ? ",$after:String!" : ""}) {
|
|
1460
1460
|
repository(owner:$owner,name:$repo) { pullRequests(first:100,states:OPEN,headRefName:$branch${after ? ",after:$after" : ""}) {
|
|
1461
1461
|
nodes { ${fields} } pageInfo { hasNextPage endCursor }
|
|
@@ -1485,21 +1485,21 @@ class GitHubForge {
|
|
|
1485
1485
|
async threads(host, node) {
|
|
1486
1486
|
const [owner, repo] = node.baseRepository.nameWithOwner.split("/");
|
|
1487
1487
|
const threads = [...node.reviewThreads.nodes];
|
|
1488
|
-
let
|
|
1489
|
-
for (let count = 1;
|
|
1488
|
+
let page = node.reviewThreads.pageInfo;
|
|
1489
|
+
for (let count = 1;page?.hasNextPage && page.endCursor && count < MAX_PAGES; count++) {
|
|
1490
1490
|
const data = await this.graphql(host, query(`query($owner:String!,$repo:String!,$number:Int!,$after:String!) {
|
|
1491
1491
|
repository(owner:$owner,name:$repo) { pullRequest(number:$number) {
|
|
1492
1492
|
reviewThreads(first:100,after:$after) { nodes { isResolved } pageInfo { hasNextPage endCursor } }
|
|
1493
|
-
} } }`), { owner, repo, number: node.number, after:
|
|
1493
|
+
} } }`), { owner, repo, number: node.number, after: page.endCursor });
|
|
1494
1494
|
const next = data.repository?.pullRequest?.reviewThreads;
|
|
1495
1495
|
if (!next)
|
|
1496
1496
|
break;
|
|
1497
1497
|
threads.push(...next.nodes);
|
|
1498
|
-
|
|
1498
|
+
page = next.pageInfo;
|
|
1499
1499
|
}
|
|
1500
1500
|
return {
|
|
1501
1501
|
unresolved: threads.filter((thread) => !thread.isResolved).length,
|
|
1502
|
-
complete: !
|
|
1502
|
+
complete: !page?.hasNextPage
|
|
1503
1503
|
};
|
|
1504
1504
|
}
|
|
1505
1505
|
async contexts(host, node) {
|
|
@@ -2030,10 +2030,10 @@ function createStatusClient(options) {
|
|
|
2030
2030
|
let visible;
|
|
2031
2031
|
let disposed = false;
|
|
2032
2032
|
const isShown = (place) => shown.get(place.directory)?.has(place.key) === true;
|
|
2033
|
-
function apply(place,
|
|
2033
|
+
function apply(place, snapshot) {
|
|
2034
2034
|
const id = placeID(place);
|
|
2035
|
-
if ((
|
|
2036
|
-
snapshots.set(id,
|
|
2035
|
+
if ((snapshot.revision ?? -1) >= (snapshots.get(id)?.revision ?? -1))
|
|
2036
|
+
snapshots.set(id, snapshot);
|
|
2037
2037
|
}
|
|
2038
2038
|
function unavailable(directory, error) {
|
|
2039
2039
|
const reason = error instanceof Error ? error.message : String(error);
|
|
@@ -2042,8 +2042,8 @@ function createStatusClient(options) {
|
|
|
2042
2042
|
message: `PR/MR status service unavailable: ${reason}`,
|
|
2043
2043
|
at: now()
|
|
2044
2044
|
};
|
|
2045
|
-
for (const
|
|
2046
|
-
const id = placeID({ directory, key
|
|
2045
|
+
for (const key of shown.get(directory) ?? []) {
|
|
2046
|
+
const id = placeID({ directory, key });
|
|
2047
2047
|
snapshots.set(id, { ...snapshots.get(id) ?? {}, loading: false, error: failure });
|
|
2048
2048
|
}
|
|
2049
2049
|
options.onChange();
|
|
@@ -2076,9 +2076,9 @@ function createStatusClient(options) {
|
|
|
2076
2076
|
return;
|
|
2077
2077
|
failures.delete(directory);
|
|
2078
2078
|
enabled.set(directory, result.enabled);
|
|
2079
|
-
for (const [
|
|
2080
|
-
if (isShown({ directory, key
|
|
2081
|
-
apply({ directory, key
|
|
2079
|
+
for (const [key, snapshot] of Object.entries(result.statuses)) {
|
|
2080
|
+
if (isShown({ directory, key }))
|
|
2081
|
+
apply({ directory, key }, snapshot);
|
|
2082
2082
|
}
|
|
2083
2083
|
options.onChange();
|
|
2084
2084
|
} catch (error) {
|
|
@@ -2103,8 +2103,8 @@ function createStatusClient(options) {
|
|
|
2103
2103
|
enabled: (directory) => enabled.get(directory) ?? true,
|
|
2104
2104
|
show(place) {
|
|
2105
2105
|
if (place.key !== HOME) {
|
|
2106
|
-
for (const [directory,
|
|
2107
|
-
if (directory === place.directory || !
|
|
2106
|
+
for (const [directory, keys] of shown) {
|
|
2107
|
+
if (directory === place.directory || !keys.delete(place.key))
|
|
2108
2108
|
continue;
|
|
2109
2109
|
snapshots.delete(placeID({ directory, key: place.key }));
|
|
2110
2110
|
if (visible && samePlace(visible, { directory, key: place.key }))
|
|
@@ -2144,10 +2144,10 @@ function createStatusClient(options) {
|
|
|
2144
2144
|
for (const directory of shown.keys())
|
|
2145
2145
|
renew(directory);
|
|
2146
2146
|
},
|
|
2147
|
-
receive(directory,
|
|
2148
|
-
if (!isShown({ directory, key
|
|
2147
|
+
receive(directory, key, snapshot) {
|
|
2148
|
+
if (!isShown({ directory, key }))
|
|
2149
2149
|
return;
|
|
2150
|
-
apply({ directory, key
|
|
2150
|
+
apply({ directory, key }, snapshot);
|
|
2151
2151
|
options.onChange();
|
|
2152
2152
|
},
|
|
2153
2153
|
hasShown: (sessionID) => [...shown.values()].some((keys) => keys.has(sessionID)),
|
|
@@ -2169,7 +2169,7 @@ function connectStatus(rpc, options) {
|
|
|
2169
2169
|
const client = createStatusClient({
|
|
2170
2170
|
clientID: options.clientID,
|
|
2171
2171
|
watch: async (directory, input) => await call.watch(input, at(directory)),
|
|
2172
|
-
refresh: async (directory,
|
|
2172
|
+
refresh: async (directory, key) => await call.refresh({ key }, at(directory)),
|
|
2173
2173
|
release: (directory, clientID) => call.release({ clientID }, at(directory)),
|
|
2174
2174
|
onChange: options.onChange
|
|
2175
2175
|
});
|
|
@@ -2178,8 +2178,8 @@ function connectStatus(rpc, options) {
|
|
|
2178
2178
|
options.heartbeat?.();
|
|
2179
2179
|
}, HEARTBEAT);
|
|
2180
2180
|
const stop = rpc.events.on("status", (event) => {
|
|
2181
|
-
const { directory, key
|
|
2182
|
-
client.receive(directory,
|
|
2181
|
+
const { directory, key, snapshot } = event.data;
|
|
2182
|
+
client.receive(directory, key, snapshot);
|
|
2183
2183
|
});
|
|
2184
2184
|
return {
|
|
2185
2185
|
client,
|
|
@@ -2193,27 +2193,28 @@ function connectStatus(rpc, options) {
|
|
|
2193
2193
|
var clientID = () => globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
2194
2194
|
|
|
2195
2195
|
// packages/forgekeeper/src/feedback-inbox.ts
|
|
2196
|
-
var formatTime = (
|
|
2196
|
+
var formatTime = (at) => new Intl.DateTimeFormat(undefined, {
|
|
2197
2197
|
year: "numeric",
|
|
2198
2198
|
month: "short",
|
|
2199
2199
|
day: "numeric",
|
|
2200
2200
|
hour: "numeric",
|
|
2201
2201
|
minute: "2-digit",
|
|
2202
2202
|
timeZoneName: "short"
|
|
2203
|
-
}).format(
|
|
2203
|
+
}).format(at);
|
|
2204
2204
|
var isReviewRequest = (item) => item.kind === "review-request";
|
|
2205
2205
|
var feedbackTime = (item) => isReviewRequest(item) ? `Requested: ${formatTime(item.postedAt ?? item.at)}` : item.postedAt !== undefined ? `Latest comment: ${formatTime(item.postedAt)}` : `Detected: ${formatTime(item.at)}`;
|
|
2206
|
+
var sessionItems = (state, sessionID) => sessionID ? state.items.filter((item) => item.sessionID === sessionID) : [];
|
|
2206
2207
|
function feedbackFooter(state, sessionID) {
|
|
2207
|
-
const count = state.
|
|
2208
|
-
if (
|
|
2208
|
+
const count = sessionItems(state, sessionID).filter((item) => !item.read).length;
|
|
2209
|
+
if (count === 0)
|
|
2209
2210
|
return;
|
|
2210
2211
|
return `${count} review update${count === 1 ? "" : "s"}${state.paused ? " (paused)" : ""}`;
|
|
2211
2212
|
}
|
|
2212
2213
|
function feedbackLinks(item) {
|
|
2213
2214
|
return [...new Set([item.url, ...item.links])].filter((url) => {
|
|
2214
2215
|
try {
|
|
2215
|
-
const
|
|
2216
|
-
return
|
|
2216
|
+
const target = new URL(url);
|
|
2217
|
+
return target.protocol === "https:" && target.origin === new URL(item.url).origin && !target.username && !target.password;
|
|
2217
2218
|
} catch {
|
|
2218
2219
|
return false;
|
|
2219
2220
|
}
|
|
@@ -2277,13 +2278,13 @@ var tui_default = {
|
|
|
2277
2278
|
};
|
|
2278
2279
|
const refresh = (place) => client.refresh(place);
|
|
2279
2280
|
const color = (tone) => {
|
|
2280
|
-
const
|
|
2281
|
+
const feedback = context.theme.text.feedback;
|
|
2281
2282
|
if (tone === "success")
|
|
2282
|
-
return
|
|
2283
|
+
return feedback.success.base;
|
|
2283
2284
|
if (tone === "warning")
|
|
2284
|
-
return
|
|
2285
|
+
return feedback.warning.base;
|
|
2285
2286
|
if (tone === "error")
|
|
2286
|
-
return
|
|
2287
|
+
return feedback.error.base;
|
|
2287
2288
|
return context.theme.text.muted;
|
|
2288
2289
|
};
|
|
2289
2290
|
function Footer(props) {
|
|
@@ -2300,10 +2301,10 @@ var tui_default = {
|
|
|
2300
2301
|
directory: place().directory
|
|
2301
2302
|
}).catch(() => {});
|
|
2302
2303
|
});
|
|
2303
|
-
const
|
|
2304
|
-
const fullWidth = createMemo(() => enabledFor(place().directory) ? segmentsWidth(footerSegments(
|
|
2304
|
+
const snapshot = createMemo(() => snapshotOf(place()));
|
|
2305
|
+
const fullWidth = createMemo(() => enabledFor(place().directory) ? segmentsWidth(footerSegments(snapshot())) : 0);
|
|
2305
2306
|
const [availableWidth, setAvailableWidth] = createSignal(0);
|
|
2306
|
-
const segments = createMemo(() => responsiveFooterSegments(
|
|
2307
|
+
const segments = createMemo(() => responsiveFooterSegments(snapshot(), availableWidth()));
|
|
2307
2308
|
return _$createComponent(Show, {
|
|
2308
2309
|
get when() {
|
|
2309
2310
|
return fullWidth() > 0;
|
|
@@ -2722,20 +2723,20 @@ var tui_default = {
|
|
|
2722
2723
|
context.renderer.on("resize", onResize);
|
|
2723
2724
|
onCleanup(() => context.renderer.off("resize", onResize));
|
|
2724
2725
|
const contentHeight = createMemo(() => Math.max(1, Math.min(24, Math.floor(terminalHeight() * 0.6) - 5)));
|
|
2725
|
-
const
|
|
2726
|
+
const snapshot = createMemo(() => snapshotOf(props.place));
|
|
2726
2727
|
const reload = () => {
|
|
2727
|
-
if (!
|
|
2728
|
+
if (!snapshot().loading)
|
|
2728
2729
|
refresh(props.place);
|
|
2729
2730
|
};
|
|
2730
2731
|
const [activeAction, setActiveAction] = createSignal("refresh");
|
|
2731
|
-
const moveAction = () => setActiveAction((action) => action === "refresh" ||
|
|
2732
|
+
const moveAction = () => setActiveAction((action) => action === "refresh" || snapshot().loading ? "close" : "refresh");
|
|
2732
2733
|
const close = () => context.ui.dialog.clear();
|
|
2733
2734
|
context.keymap.layer(() => ({
|
|
2734
2735
|
mode: "modal",
|
|
2735
2736
|
commands: [{
|
|
2736
2737
|
id: "forge.review.status.refresh",
|
|
2737
2738
|
bind: "ctrl+r",
|
|
2738
|
-
enabled: () => !
|
|
2739
|
+
enabled: () => !snapshot().loading,
|
|
2739
2740
|
run: reload
|
|
2740
2741
|
}, {
|
|
2741
2742
|
bind: "tab",
|
|
@@ -2791,7 +2792,7 @@ var tui_default = {
|
|
|
2791
2792
|
});
|
|
2792
2793
|
_$insert(_el$50, _$createComponent(StatusDetails, {
|
|
2793
2794
|
get snapshot() {
|
|
2794
|
-
return
|
|
2795
|
+
return snapshot();
|
|
2795
2796
|
}
|
|
2796
2797
|
}));
|
|
2797
2798
|
_$setProp(_el$51, "height", 1);
|
|
@@ -2801,7 +2802,7 @@ var tui_default = {
|
|
|
2801
2802
|
_$insert(_el$51, _$createComponent(For, {
|
|
2802
2803
|
each: ["close", "refresh"],
|
|
2803
2804
|
children: (action) => {
|
|
2804
|
-
const disabled = () => action === "refresh" &&
|
|
2805
|
+
const disabled = () => action === "refresh" && snapshot().loading;
|
|
2805
2806
|
const active = () => activeAction() === action && !disabled();
|
|
2806
2807
|
return (() => {
|
|
2807
2808
|
var _el$52 = _$createElement("box"), _el$53 = _$createElement("text");
|
|
@@ -2823,7 +2824,7 @@ var tui_default = {
|
|
|
2823
2824
|
close();
|
|
2824
2825
|
});
|
|
2825
2826
|
_$setProp(_el$53, "wrapMode", "none");
|
|
2826
|
-
_$insert(_el$53, () => action === "close" ? "Close" :
|
|
2827
|
+
_$insert(_el$53, () => action === "close" ? "Close" : snapshot().loading ? "Refreshing\u2026" : "Refresh");
|
|
2827
2828
|
_$effect((_p$) => {
|
|
2828
2829
|
var _v$9 = active() ? context.theme.background.action.primary.focused : undefined, _v$0 = disabled() ? context.theme.text.action.primary.disabled : active() ? context.theme.text.action.primary.focused : context.theme.text.muted;
|
|
2829
2830
|
_v$9 !== _p$.e && (_p$.e = _$setProp(_el$52, "backgroundColor", _v$9, _p$.e));
|
|
@@ -2866,14 +2867,16 @@ var tui_default = {
|
|
|
2866
2867
|
}));
|
|
2867
2868
|
}
|
|
2868
2869
|
async function showFeedback() {
|
|
2869
|
-
const
|
|
2870
|
+
const place = currentPlace();
|
|
2871
|
+
const directory = place.directory;
|
|
2870
2872
|
const state = await loadFeedback2(directory);
|
|
2873
|
+
const items = sessionItems(state, place.key || undefined);
|
|
2871
2874
|
const selected = await context.ui.dialog.select({
|
|
2872
2875
|
title: `Review feedback and PR/MR updates${state.paused ? " (monitoring paused)" : ""}`,
|
|
2873
|
-
options:
|
|
2874
|
-
title:
|
|
2875
|
-
description: [
|
|
2876
|
-
value:
|
|
2876
|
+
options: items.map((item) => ({
|
|
2877
|
+
title: item.title,
|
|
2878
|
+
description: [item.read ? "Read" : "Unread", feedbackTime(item), ...item.automation ? [`${item.automation.state}${item.automation.reason ? `: ${item.automation.reason}` : ""}`] : [], ...item.details?.length ? [`${item.details[0]}${item.details.length > 1 ? ` (+${item.details.length - 1})` : ""}`] : []].join(" \xB7 "),
|
|
2879
|
+
value: item.id
|
|
2877
2880
|
})),
|
|
2878
2881
|
actions: [{
|
|
2879
2882
|
bind: "ctrl+a",
|
|
@@ -2974,7 +2977,7 @@ var tui_default = {
|
|
|
2974
2977
|
selection: "none",
|
|
2975
2978
|
onTrigger: async () => {
|
|
2976
2979
|
await rpc.markFeedbackRead({
|
|
2977
|
-
ids:
|
|
2980
|
+
ids: items.map((item) => item.id)
|
|
2978
2981
|
}, {
|
|
2979
2982
|
location: {
|
|
2980
2983
|
directory
|
|
@@ -3000,15 +3003,15 @@ var tui_default = {
|
|
|
3000
3003
|
}
|
|
3001
3004
|
}]
|
|
3002
3005
|
});
|
|
3003
|
-
const item =
|
|
3006
|
+
const item = items.find((entry) => entry.id === selected);
|
|
3004
3007
|
if (!item)
|
|
3005
3008
|
return;
|
|
3006
|
-
const
|
|
3009
|
+
const link = await context.ui.dialog.select({
|
|
3007
3010
|
title: item.title,
|
|
3008
3011
|
options: linkOptions(item)
|
|
3009
3012
|
});
|
|
3010
|
-
if (
|
|
3011
|
-
openUrl(
|
|
3013
|
+
if (link)
|
|
3014
|
+
openUrl(link);
|
|
3012
3015
|
}
|
|
3013
3016
|
async function openRequest() {
|
|
3014
3017
|
const place = currentPlace();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-forgekeeper",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.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",
|