@a9n-shoji/rvw 0.11.0 → 0.12.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/CHANGELOG.md +7 -0
- package/README.md +8 -0
- package/dist/cli.mjs +76 -1
- package/dist/cli.mjs.map +2 -2
- package/dist/parser-worker.mjs.map +1 -1
- package/dist/web/assets/DocumentViewer-BZj_OavK.js +1420 -0
- package/dist/web/assets/{StructureViewer-CwBbKYKF.js → StructureViewer-vuR0upv8.js} +1 -1
- package/dist/web/assets/WalkthroughPanel-CI_-kadA.js +33 -0
- package/dist/web/assets/WalkthroughViewer-Byr2C1TN.js +43 -0
- package/dist/web/assets/{index-CCxD40fx.css → index-C_jtOk1w.css} +1 -1
- package/dist/web/assets/index-DXmVWjds.js +11 -0
- package/dist/web/index.html +3 -3
- package/package.json +1 -1
- package/dist/web/assets/DocumentViewer-CzOf3Y_e.js +0 -1420
- package/dist/web/assets/WalkthroughPanel-DvyIFY5z.js +0 -33
- package/dist/web/assets/WalkthroughViewer-Dt_IUyQ1.js +0 -43
- package/dist/web/assets/index-CbZzzSE-.js +0 -11
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -71,6 +71,14 @@ PR全体の流れを把握するために、Agentが生成した解説(Walkthr
|
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
74
|
+
## PRを横断してコメントを読む
|
|
75
|
+
|
|
76
|
+
入口の`Pull Requests / Comments`でPR単位とコメント単位を切り替えられます。CommentsではPRごとに
|
|
77
|
+
全スレッドの本文・返信を展開表示し、その場で返信、解決/再開できます。PR/スレッド/全体の折りたたみ、
|
|
78
|
+
状態・リポジトリ・PRの絞り込み、返信本文も含む検索に対応します。「PRで開く」でコメントの対象箇所へ移動し、
|
|
79
|
+
戻ると一覧の位置と下書きを保ちます。外部からの返信は自動反映され、並びや表示対象の変更は
|
|
80
|
+
「新しい更新を反映」で適用します。
|
|
81
|
+
|
|
74
82
|
## Agent連携(Codex / Claude Code)
|
|
75
83
|
|
|
76
84
|
ローカルの Agent に Skill を登録することで、PRの構成図生成や、行コメントに対する調査・返信を自動化できます。
|
package/dist/cli.mjs
CHANGED
|
@@ -18753,7 +18753,7 @@ function parseWalkthroughUri(uri) {
|
|
|
18753
18753
|
}
|
|
18754
18754
|
|
|
18755
18755
|
// src/shared/constants.ts
|
|
18756
|
-
var APP_VERSION = "0.
|
|
18756
|
+
var APP_VERSION = "0.12.0";
|
|
18757
18757
|
var PROTOCOL_VERSION = 6;
|
|
18758
18758
|
var VIEWER_ID_HEADER = "x-rvw-viewer-id";
|
|
18759
18759
|
var VIEWER_OPEN_LEASE_HEADER = "x-rvw-viewer-open-lease";
|
|
@@ -20428,6 +20428,70 @@ var RvwDatabase = class {
|
|
|
20428
20428
|
).get(id);
|
|
20429
20429
|
return row ? this.mapComment(row) : null;
|
|
20430
20430
|
}
|
|
20431
|
+
listCommentFeed(input) {
|
|
20432
|
+
const parameters = [
|
|
20433
|
+
input.status,
|
|
20434
|
+
input.status,
|
|
20435
|
+
input.hideClosedOrMerged ? 1 : 0,
|
|
20436
|
+
input.repository,
|
|
20437
|
+
input.repository,
|
|
20438
|
+
input.pullRequestId,
|
|
20439
|
+
input.pullRequestId,
|
|
20440
|
+
input.search,
|
|
20441
|
+
input.search
|
|
20442
|
+
];
|
|
20443
|
+
const matching = `WITH matching AS (
|
|
20444
|
+
SELECT c.id, c.pull_request_id,
|
|
20445
|
+
(SELECT MAX(p.created_at) FROM comment_posts p WHERE p.comment_id = c.id) AS posted_at
|
|
20446
|
+
FROM comments c JOIN pull_requests pr ON pr.id = c.pull_request_id
|
|
20447
|
+
WHERE (? = 'all' OR CASE WHEN ? = 'resolved' THEN c.resolved_at IS NOT NULL ELSE c.resolved_at IS NULL END)
|
|
20448
|
+
AND (? = 0 OR pr.github_state IS NULL OR pr.github_state = 'OPEN')
|
|
20449
|
+
AND (? = '' OR pr.owner || '/' || pr.repository = ?)
|
|
20450
|
+
AND (? = '' OR pr.id = ?)
|
|
20451
|
+
AND (? = '' OR EXISTS (SELECT 1 FROM comment_posts p WHERE p.comment_id = c.id
|
|
20452
|
+
AND instr(lower(p.body), lower(?)) > 0))
|
|
20453
|
+
)`;
|
|
20454
|
+
const totals = this.database.prepare(
|
|
20455
|
+
`${matching}
|
|
20456
|
+
SELECT COUNT(*) AS comments, COUNT(DISTINCT pull_request_id) AS groups FROM matching`
|
|
20457
|
+
).get(...parameters);
|
|
20458
|
+
const rows = this.database.prepare(
|
|
20459
|
+
`${matching}, page AS (
|
|
20460
|
+
SELECT pull_request_id, MAX(posted_at) AS posted_at FROM matching
|
|
20461
|
+
GROUP BY pull_request_id ORDER BY posted_at DESC, pull_request_id DESC LIMIT ?
|
|
20462
|
+
) SELECT m.id, m.pull_request_id FROM matching m JOIN page p ON p.pull_request_id = m.pull_request_id
|
|
20463
|
+
ORDER BY p.posted_at DESC, p.pull_request_id DESC, m.posted_at DESC, m.id DESC`
|
|
20464
|
+
).all(...parameters, input.limit);
|
|
20465
|
+
const pullRequests = this.database.prepare(
|
|
20466
|
+
`SELECT id, owner, repository, number, latest_title, github_state, github_is_draft
|
|
20467
|
+
FROM pull_requests ORDER BY owner, repository, number DESC`
|
|
20468
|
+
).all().map((row) => ({
|
|
20469
|
+
id: stringValue(row, "id"),
|
|
20470
|
+
owner: stringValue(row, "owner"),
|
|
20471
|
+
repository: stringValue(row, "repository"),
|
|
20472
|
+
number: numberValue(row, "number"),
|
|
20473
|
+
title: stringValue(row, "latest_title"),
|
|
20474
|
+
githubState: nullableString(row, "github_state"),
|
|
20475
|
+
githubIsDraft: row.github_is_draft === null ? null : row.github_is_draft === 1
|
|
20476
|
+
}));
|
|
20477
|
+
const byId = new Map(pullRequests.map((pr) => [pr.id, pr]));
|
|
20478
|
+
const groups = [];
|
|
20479
|
+
for (const row of rows) {
|
|
20480
|
+
const id = stringValue(row, "pull_request_id");
|
|
20481
|
+
let group = groups.at(-1);
|
|
20482
|
+
if (group?.pullRequest.id !== id) {
|
|
20483
|
+
group = { pullRequest: byId.get(id), commentIds: [] };
|
|
20484
|
+
groups.push(group);
|
|
20485
|
+
}
|
|
20486
|
+
group.commentIds.push(stringValue(row, "id"));
|
|
20487
|
+
}
|
|
20488
|
+
return {
|
|
20489
|
+
groups,
|
|
20490
|
+
pullRequests,
|
|
20491
|
+
totalGroups: numberValue(totals, "groups"),
|
|
20492
|
+
totalComments: numberValue(totals, "comments")
|
|
20493
|
+
};
|
|
20494
|
+
}
|
|
20431
20495
|
listComments(pullRequestId, resolved) {
|
|
20432
20496
|
const where = resolved === void 0 ? "" : resolved ? " AND c.resolved_at IS NOT NULL" : " AND c.resolved_at IS NULL";
|
|
20433
20497
|
return this.database.prepare(
|
|
@@ -50274,6 +50338,17 @@ function createApp(service, options) {
|
|
|
50274
50338
|
pullRequest: service.setPullRequestArchived(context.req.param("id"), input.archived)
|
|
50275
50339
|
});
|
|
50276
50340
|
});
|
|
50341
|
+
app.get("/api/comment-feed", (context) => {
|
|
50342
|
+
const input = external_exports.object({
|
|
50343
|
+
status: external_exports.enum(["unresolved", "resolved", "all"]).default("unresolved"),
|
|
50344
|
+
hideClosedOrMerged: external_exports.enum(["true", "false"]).default("true").transform((value) => value === "true"),
|
|
50345
|
+
repository: external_exports.string().max(300).default(""),
|
|
50346
|
+
pullRequestId: external_exports.union([external_exports.uuid(), external_exports.literal("")]).default(""),
|
|
50347
|
+
search: external_exports.string().max(500).default(""),
|
|
50348
|
+
limit: external_exports.coerce.number().int().min(1).max(1e3).default(20)
|
|
50349
|
+
}).parse(context.req.query());
|
|
50350
|
+
return context.json({ ok: true, ...service.database.listCommentFeed(input) });
|
|
50351
|
+
});
|
|
50277
50352
|
app.post(
|
|
50278
50353
|
"/api/pull-requests/refresh-statuses",
|
|
50279
50354
|
async (context) => context.json({ ok: true, ...await service.refreshPullRequestStatuses() })
|