ework-web 0.10.118 → 0.10.120
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/render/layout.ts +2 -0
- package/src/upstream-sync.ts +5 -0
package/package.json
CHANGED
package/src/render/layout.ts
CHANGED
|
@@ -189,6 +189,7 @@ export function renderLayout(props: LayoutProps, inner: string, initialItems: st
|
|
|
189
189
|
const s = props.aiStatus ?? "";
|
|
190
190
|
const map: Record<string, { cls: string; label: string }> = {
|
|
191
191
|
processing: { cls: "ai-processing", label: "🔄 AI 处理中" },
|
|
192
|
+
queued: { cls: "ai-queued", label: "⏳ 排队中" },
|
|
192
193
|
completed: { cls: "ai-completed", label: "✅ AI 已完成" },
|
|
193
194
|
failed: { cls: "ai-failed", label: "⚠️ AI 失败" },
|
|
194
195
|
halted: { cls: "ai-halted", label: "⏹ 已停止" },
|
|
@@ -312,6 +313,7 @@ export function aiStatusBadge(status: string | undefined): string {
|
|
|
312
313
|
if (!s) return "";
|
|
313
314
|
const map: Record<string, string> = {
|
|
314
315
|
processing: '<span class="ai-status-list" style="color:var(--accent)">⚙️ 处理中</span>',
|
|
316
|
+
queued: '<span class="ai-status-list" style="color:var(--accent)">⏳ 排队中</span>',
|
|
315
317
|
halted: '<span class="ai-status-list" style="color:#bf8700">⏹️ 已停止</span>',
|
|
316
318
|
dispatch_off: '<span class="ai-status-list" style="color:#6f7781">🔕 不接单</span>',
|
|
317
319
|
completed: '<span class="ai-status-list" style="color:var(--green)">✓ 已完成</span>',
|
package/src/upstream-sync.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
ensureUser,
|
|
12
12
|
postComment,
|
|
13
13
|
editIssue,
|
|
14
|
+
updateIssueAiStatus,
|
|
14
15
|
updateUpstreamSyncState,
|
|
15
16
|
listEnabledUpstreamSyncs,
|
|
16
17
|
} from "./store";
|
|
@@ -155,6 +156,10 @@ export class UpstreamSync {
|
|
|
155
156
|
const target: "open" | "closed" = gi.state === "closed" ? "closed" : "open";
|
|
156
157
|
if (existing.state === target) return false;
|
|
157
158
|
await editIssue(existing.id, { state: target });
|
|
159
|
+
// stale AI badges on closed rows read as noise on the issue list
|
|
160
|
+
if (target === "closed" && existing.ai_status && existing.ai_status !== "completed") {
|
|
161
|
+
await updateIssueAiStatus(existing.id, "");
|
|
162
|
+
}
|
|
158
163
|
if (emit) {
|
|
159
164
|
void emitIssueEvent(this.project.id, existing.id, target === "closed" ? "closed" : "reopened", this.origin);
|
|
160
165
|
}
|