codebee 0.1.23 → 0.1.24
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 +16 -0
- package/README.md +20 -4
- package/app/core/attachments.py +117 -4
- package/app/core/dispatch.py +34 -5
- package/app/core/dispatch_log.py +113 -0
- package/app/core/errorlog.py +1 -43
- package/app/core/jobs.py +30 -4
- package/app/core/modelhub.py +2 -0
- package/app/core/paths.py +2 -2
- package/app/core/pipeline.py +119 -7
- package/app/core/portguard.py +111 -0
- package/app/core/portscan.py +188 -188
- package/app/core/redact.py +38 -0
- package/app/core/router.py +34 -8
- package/app/core/runner.py +15 -8
- package/app/core/selfupdate.py +86 -27
- package/app/core/store.py +2 -4
- package/app/core/usage.py +226 -24
- package/app/main.py +52 -21
- package/app/pet.py +34 -11
- package/app/ui/app.js +48 -1
- package/app/ui/i18n.js +2 -0
- package/app/ui/index.html +1 -0
- package/package.json +1 -1
package/app/ui/app.js
CHANGED
|
@@ -3315,6 +3315,24 @@ function setEditRetry(taskId, status, taskExists) {
|
|
|
3315
3315
|
if (bn) bn.classList.toggle("hidden", !taskExists || failedish);
|
|
3316
3316
|
}
|
|
3317
3317
|
|
|
3318
|
+
/* 详情页归档按钮:非运行中显示;已归档任务显示「取消归档」。
|
|
3319
|
+
* 点击走 archiveTask(与右键菜单同一链路:取消归档会自动恢复侧栏目录显示)。 */
|
|
3320
|
+
function syncArchBtn(task, active) {
|
|
3321
|
+
const b = $("btn-arch");
|
|
3322
|
+
if (!b) return;
|
|
3323
|
+
const show = !!task && !active;
|
|
3324
|
+
b.classList.toggle("hidden", !show);
|
|
3325
|
+
if (!show) return;
|
|
3326
|
+
const archived = !!task.archived;
|
|
3327
|
+
b.textContent = archived ? t("取消归档") : t("归档任务");
|
|
3328
|
+
b.onclick = async () => {
|
|
3329
|
+
try {
|
|
3330
|
+
await archiveTask(task.id, !archived);
|
|
3331
|
+
b.textContent = archived ? t("归档任务") : t("取消归档");
|
|
3332
|
+
} catch (e) { /* archiveTask 内部已 toast */ }
|
|
3333
|
+
};
|
|
3334
|
+
}
|
|
3335
|
+
|
|
3318
3336
|
/* 重试按钮三态:失败/取消 → 「↻ 继续任务」(断点续跑语义);连载任务完整跑完
|
|
3319
3337
|
* 但质量未达标(verdict.publishable=false)→ 「↻ 重写未达标章」——后端 retry
|
|
3320
3338
|
* 会把未过线章从继承清单剔除,只重写重评这几章(store.retry_task 未达标分支);
|
|
@@ -3346,6 +3364,7 @@ function renderTaskDetail() {
|
|
|
3346
3364
|
if (bc) bc.classList.toggle("hidden",
|
|
3347
3365
|
!(tk && tk.serial && tk.status !== "running" && tk.status !== "queued"));
|
|
3348
3366
|
setEditRetry(tk ? tk.id : "", tk ? tk.status : "", !!tk);
|
|
3367
|
+
syncArchBtn(tk, tk && (tk.status === "running" || tk.status === "queued"));
|
|
3349
3368
|
const isTask = ((S.state || {}).tasks || []).some((t2) => t2.id === key);
|
|
3350
3369
|
if (isTask) {
|
|
3351
3370
|
api("/api/tasks/" + encodeURIComponent(key) + "/runs")
|
|
@@ -3777,6 +3796,9 @@ async function renderRunDetail() {
|
|
|
3777
3796
|
S.cancelTargetRunId = active ? run.id : null;
|
|
3778
3797
|
$("btn-delete").classList.toggle("hidden", active);
|
|
3779
3798
|
$("btn-share").classList.toggle("hidden", active); // 分享页:结束后可生成自包含 HTML
|
|
3799
|
+
// 归档按钮:非运行中任务可归档/取消归档(此前只有侧栏右键菜单入口,
|
|
3800
|
+
// 用户反馈「归档按钮不见了」——补显式入口,文案随状态切换)
|
|
3801
|
+
syncArchBtn(rcTask, active);
|
|
3780
3802
|
$("btn-talk").classList.toggle("hidden", !(run.task_id && !chatEngineIsDirect(run)));
|
|
3781
3803
|
const rcTask = ((S.state || {}).tasks || []).find((x) => x.id === run.task_id);
|
|
3782
3804
|
setRetryBtn(run, rcTask);
|
|
@@ -9287,7 +9309,7 @@ function renderSu() {
|
|
|
9287
9309
|
t(" ") + "<a href=\"#\" onclick=\"event.preventDefault();suApply()\">" + t("立即升级") + "</a></b></p>";
|
|
9288
9310
|
if (SU.notes) {
|
|
9289
9311
|
html += "<div class=\"hint\"><b>" + t("新版本更新内容") + t(":") + "</b>" +
|
|
9290
|
-
|
|
9312
|
+
renderRelnotes(SU.notes) + "</div>";
|
|
9291
9313
|
}
|
|
9292
9314
|
} else if (SU.mode === "npm" && !SU.note) {
|
|
9293
9315
|
html += "<p class=\"hint\">" + t("已是最新版。") + "</p>";
|
|
@@ -9303,6 +9325,31 @@ function renderSu() {
|
|
|
9303
9325
|
renderUpdPill();
|
|
9304
9326
|
}
|
|
9305
9327
|
|
|
9328
|
+
/* 更新说明分类渲染:### 行渲染为小节标题,- 行渲染为条目(对照主流产品的
|
|
9329
|
+
* 更新日志样式:问题修复/新功能分组,一眼看懂)。全部 esc 后拼接。 */
|
|
9330
|
+
function renderRelnotes(txt) {
|
|
9331
|
+
const lines = String(txt || "").replace(/\r/g, "").split("\n");
|
|
9332
|
+
let html = "", inList = false;
|
|
9333
|
+
const closeList = () => { if (inList) { html += "</div>"; inList = false; } };
|
|
9334
|
+
for (const raw of lines) {
|
|
9335
|
+
const line = raw.trim();
|
|
9336
|
+
if (!line) continue;
|
|
9337
|
+
if (/^#{2,4}\s+/.test(line)) {
|
|
9338
|
+
closeList();
|
|
9339
|
+
html += "<p style=\"margin:6px 0 2px\"><b>" + esc(line.replace(/^#{2,4}\s+/, "")) + "</b></p>";
|
|
9340
|
+
} else if (/^[-*]\s+/.test(line)) {
|
|
9341
|
+
if (!inList) { html += "<div style=\"margin:2px 0 2px 4px\">"; inList = true; }
|
|
9342
|
+
html += "<div style=\"display:flex;gap:6px\"><span style=\"opacity:.6\">·</span>" +
|
|
9343
|
+
"<span style=\"flex:1\">" + esc(line.replace(/^[-*]\s+/, "")) + "</span></div>";
|
|
9344
|
+
} else {
|
|
9345
|
+
closeList();
|
|
9346
|
+
html += "<p style=\"margin:2px 0\">" + esc(line) + "</p>";
|
|
9347
|
+
}
|
|
9348
|
+
}
|
|
9349
|
+
closeList();
|
|
9350
|
+
return html || ("<pre class=\"su-notes\">" + esc(txt) + "</pre>");
|
|
9351
|
+
}
|
|
9352
|
+
|
|
9306
9353
|
/* 顶栏左上角常驻更新胶囊:有新版才出现(同版本被忽略后不再出现),
|
|
9307
9354
|
* 点击直达「关于与更新」,× 忽略本版本(与 su.seen 记账键同一套语义) */
|
|
9308
9355
|
function renderUpdPill() {
|
package/app/ui/i18n.js
CHANGED
|
@@ -584,6 +584,8 @@
|
|
|
584
584
|
"勾选可批量删除": "Tick to bulk delete",
|
|
585
585
|
"取消归档": "Unarchive",
|
|
586
586
|
"归档": "Archive",
|
|
587
|
+
"归档任务": "Archive Task",
|
|
588
|
+
"归档后任务从侧栏收起,可随时用左下角时钟图标找回并取消归档": "Archiving hides the task from the sidebar; use the clock icon at the bottom-left to find it back and unarchive anytime",
|
|
587
589
|
"重命名任务": "Rename task",
|
|
588
590
|
"↻ 继续任务": "↻ Resume task",
|
|
589
591
|
"↻ 重写未达标章": "↻ Rewrite unqualified chapters",
|
package/app/ui/index.html
CHANGED
|
@@ -388,6 +388,7 @@
|
|
|
388
388
|
<button data-i18n="✎ 编辑重试" id="btn-editretry" class="ghost hidden" data-i18n-title="取回原任务的目标/目录/评审设置,修改后提交即重新开跑" title="取回原任务的目标/目录/评审设置,修改后提交即重新开跑">✎ 编辑重试</button>
|
|
389
389
|
<button data-i18n="继续连载" id="btn-continue" class="ghost hidden">继续连载</button>
|
|
390
390
|
<button data-i18n="基于此任务新建" id="btn-newfrom" class="ghost hidden">基于此任务新建</button>
|
|
391
|
+
<button data-i18n="归档任务" id="btn-arch" class="ghost hidden" data-i18n-title="归档后任务从侧栏收起,可随时用左下角时钟图标找回并取消归档" title="归档后任务从侧栏收起,可随时用左下角时钟图标找回并取消归档">归档任务</button>
|
|
391
392
|
<button data-i18n="分享页" id="btn-share" class="ghost hidden" data-i18n-title="生成自包含分享页(单文件 HTML),可直接发给他人查看任务成果" title="生成自包含分享页(单文件 HTML),可直接发给他人查看任务成果">分享页</button>
|
|
392
393
|
<button data-i18n="删除记录" id="btn-delete" class="danger hidden">删除记录</button>
|
|
393
394
|
<button data-i18n="✉ 继续对话" id="btn-talk" class="ghost hidden" data-i18n-title="人工检查有问题?告诉主智能体,由它判断怎么引导执行" title="人工检查有问题?告诉主智能体,由它判断怎么引导执行">✉ 继续对话</button>
|
package/package.json
CHANGED