ework-web 0.10.52 → 0.10.54
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/package.json +1 -1
- package/src/views/issueList.ts +4 -5
- package/src/views/issues.ts +4 -5
- package/src/webhooks.ts +5 -0
package/package.json
CHANGED
package/src/views/issueList.ts
CHANGED
|
@@ -6,7 +6,7 @@ export const LIST_PAGE_SIZE = 50;
|
|
|
6
6
|
|
|
7
7
|
function labelChip(label: LabelRow, owner: string, repo: string, state: string): string {
|
|
8
8
|
const href = `/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues?state=${state}&label=${encodeURIComponent(label.name)}`;
|
|
9
|
-
return `<span class="issue-label"
|
|
9
|
+
return `<span class="issue-label" style="--lc:${escapeAttr(label.color)}" title="${escapeAttr(label.description ?? "")}" onclick="event.preventDefault();event.stopPropagation();location.href='${href}'">${escapeHtml(label.name)}</span>`;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
function issueRow(
|
|
@@ -23,10 +23,10 @@ function issueRow(
|
|
|
23
23
|
? `<span class="row-labels">${labels.map((l) => labelChip(l, owner, repo, state)).join("")}</span>`
|
|
24
24
|
: "";
|
|
25
25
|
const aiBadge = aiStatusBadge(it.ai_status);
|
|
26
|
-
return `<
|
|
26
|
+
return `<a class="row" href="${escapeAttr(href)}">
|
|
27
27
|
<div class="row-title">${title}${chips}</div>
|
|
28
28
|
<div class="row-meta">#${it.number} · 💬 ${it.comment_count} · ${relTime(it.updated_at)}${aiBadge ? ` · ${aiBadge}` : ""}</div>
|
|
29
|
-
</
|
|
29
|
+
</a>`;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export async function buildIssueList(
|
|
@@ -75,7 +75,7 @@ export async function buildIssueList(
|
|
|
75
75
|
.tabs-sub a{padding:.3rem .8rem;border-radius:6px;font-size:13px;color:var(--text-muted)}
|
|
76
76
|
.tabs-sub a.active{background:var(--bg-muted);color:var(--text);font-weight:600}
|
|
77
77
|
.new-btn{margin-left:auto;background:var(--green);color:#fff;padding:.3rem .8rem;border-radius:6px;font-size:13px;font-weight:600}
|
|
78
|
-
.row{display:block;padding:.6rem .2rem;border-bottom:1px solid var(--border);color:var(--text)}
|
|
78
|
+
.row{display:block;padding:.6rem .2rem;border-bottom:1px solid var(--border);color:var(--text);text-decoration:none}
|
|
79
79
|
.row:hover{text-decoration:none;background:var(--bg-muted)}
|
|
80
80
|
.row-title{font-weight:500;overflow-wrap:anywhere}
|
|
81
81
|
.row-meta{color:var(--text-muted);font-size:12px;margin-top:.2rem}
|
|
@@ -109,7 +109,6 @@ ${tabNavHTML("issues", viewer ? { login: viewer.login, is_admin: viewer.is_admin
|
|
|
109
109
|
</div>
|
|
110
110
|
${labelFilterHint}
|
|
111
111
|
<div class="rows">${rows}</div>
|
|
112
|
-
<script>document.addEventListener("click",function(e){var l=e.target.closest(".issue-label");if(l){e.preventDefault();e.stopPropagation();location.href=l.dataset.href;return}var r=e.target.closest(".row[data-href]");if(r){location.href=r.dataset.href}})</script>
|
|
113
112
|
</main>
|
|
114
113
|
</body></html>`;
|
|
115
114
|
}
|
package/src/views/issues.ts
CHANGED
|
@@ -6,7 +6,7 @@ export const FEED_PAGE_SIZE = 50;
|
|
|
6
6
|
|
|
7
7
|
function labelChip(label: LabelRow, owner: string, repo: string, state: string): string {
|
|
8
8
|
const href = `/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues?state=${state}&label=${encodeURIComponent(label.name)}`;
|
|
9
|
-
return `<span class="issue-label"
|
|
9
|
+
return `<span class="issue-label" style="--lc:${escapeAttr(label.color)}" title="${escapeAttr(label.description ?? "")}" onclick="event.preventDefault();event.stopPropagation();location.href='${href}'">${escapeHtml(label.name)}</span>`;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
function issueRow(it: IssueWithMeta, q: string, state: string, labels: LabelRow[]): string {
|
|
@@ -17,10 +17,10 @@ function issueRow(it: IssueWithMeta, q: string, state: string, labels: LabelRow[
|
|
|
17
17
|
? `<span class="row-labels">${labels.map((l) => labelChip(l, it.project_owner, it.project_name, state)).join("")}</span>`
|
|
18
18
|
: "";
|
|
19
19
|
const aiBadge = aiStatusBadge(it.ai_status);
|
|
20
|
-
return `<
|
|
20
|
+
return `<a class="row" href="${escapeAttr(href)}">
|
|
21
21
|
<div class="row-title">${title}${chips}</div>
|
|
22
22
|
<div class="row-meta">${projectStr} · #${it.number} · 💬 ${it.comment_count} · ${relTime(it.updated_at)}${aiBadge ? ` · ${aiBadge}` : ""}</div>
|
|
23
|
-
</
|
|
23
|
+
</a>`;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export async function buildIssuesFeed(
|
|
@@ -60,7 +60,7 @@ export async function buildIssuesFeed(
|
|
|
60
60
|
.tabs-sub{display:flex;gap:.3rem;margin-bottom:.6rem}
|
|
61
61
|
.tabs-sub a{padding:.3rem .8rem;border-radius:6px;font-size:13px;color:var(--text-muted)}
|
|
62
62
|
.tabs-sub a.active{background:var(--bg-muted);color:var(--text);font-weight:600}
|
|
63
|
-
.row{display:block;padding:.6rem .2rem;border-bottom:1px solid var(--border);color:var(--text)}
|
|
63
|
+
.row{display:block;padding:.6rem .2rem;border-bottom:1px solid var(--border);color:var(--text);text-decoration:none}
|
|
64
64
|
.row:hover{text-decoration:none;background:var(--bg-muted)}
|
|
65
65
|
.row-title{font-weight:500;overflow-wrap:anywhere}
|
|
66
66
|
.row-meta{color:var(--text-muted);font-size:12px;margin-top:.2rem}
|
|
@@ -87,7 +87,6 @@ ${tabNavHTML("issues", viewer ? { login: viewer.login, is_admin: viewer.is_admin
|
|
|
87
87
|
</div>
|
|
88
88
|
${labelFilterHint}
|
|
89
89
|
<div class="rows">${rows}</div>
|
|
90
|
-
<script>document.addEventListener("click",function(e){var l=e.target.closest(".issue-label");if(l){e.preventDefault();e.stopPropagation();location.href=l.dataset.href;return}var r=e.target.closest(".row[data-href]");if(r){location.href=r.dataset.href}})</script>
|
|
91
90
|
</main>
|
|
92
91
|
</body></html>`;
|
|
93
92
|
}
|
package/src/webhooks.ts
CHANGED
|
@@ -687,6 +687,11 @@ export async function emitCommentEvent(
|
|
|
687
687
|
if (!issue) return;
|
|
688
688
|
const comment = await getCommentByIdSafe(commentId);
|
|
689
689
|
if (!comment) return;
|
|
690
|
+
const cfg = await getConfigAll();
|
|
691
|
+
const scopeKey = `${project.owner}/${project.name}`;
|
|
692
|
+
if (cfg["dispatchEnabled"] === "false" || cfg[`dispatchOff:${scopeKey}`] === "1" || (issue as IssueRow).ai_status === "dispatch_off") {
|
|
693
|
+
log.info(`webhook: dispatch disabled but waking via comment_created (author=${comment.author}) for ${scopeKey}#${issue.number}`);
|
|
694
|
+
}
|
|
690
695
|
const commentCount = await countCommentsSafe(issueId);
|
|
691
696
|
const globalDefault = (await loadConfig()).defaultModel;
|
|
692
697
|
const model = resolveModel(project.model, globalDefault);
|