codebee 0.1.43 → 0.1.44
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 +6 -0
- package/README.md +2 -2
- package/app/core/skills.py +16 -3
- package/app/ui/app.js +1 -0
- package/app/ui/i18n.js +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -23,8 +23,8 @@ Kimi Code、MiMo Code、Grok Build、Pi、DeepSeek Harness……),提供
|
|
|
23
23
|
<!-- relnotes:start -->
|
|
24
24
|
### ✨ 新功能 · New
|
|
25
25
|
|
|
26
|
-
-
|
|
27
|
-
- The lesson library now also captures "what worked": high-scoring first-pass runs distill reusable procedures, auto-injected into similar future tasks.
|
|
26
|
+
- 经验库新增「有效做法」记忆:高分一次通过的任务会把「做对了什么」提炼成可复用步骤,下次同类任务自动注入照做;绿色「做法」徽章一眼区分。
|
|
27
|
+
- The lesson library now also captures "what worked": high-scoring first-pass runs distill reusable procedures, auto-injected into similar future tasks — marked with a green "Best practice" badge.
|
|
28
28
|
|
|
29
29
|
- 新任务类型「标书编制」:上传招标文件,AI 按评分标准逐条应答起草投标文件;资质不虚构(缺失标注待补)、应答先结论、全文自查废标风险项。
|
|
30
30
|
- New "Bid Document" task type: upload the tender file and the AI drafts point-by-point responses against scoring criteria — no fabricated credentials, conclusion-first answers, and a full disqualification-risk sweep.
|
package/app/core/skills.py
CHANGED
|
@@ -330,7 +330,10 @@ def upsert_lesson(scope, title, content, source="", category=None, dim=None):
|
|
|
330
330
|
it = {"id": lid, "scope": scope, "title": title, "content": content,
|
|
331
331
|
"source": source, "hits": 0, "seen": 1, "enabled": True,
|
|
332
332
|
"category": cat,
|
|
333
|
-
"created_at": _now(),
|
|
333
|
+
"created_at": _now(),
|
|
334
|
+
# 稳定 token(procedure=程序性做法 / lesson=规避性教训);
|
|
335
|
+
# 展示层 view() 翻译成「做法/教训」,持久层不用中文防改文案伤数据
|
|
336
|
+
"kind": ("procedure" if title.startswith("做法:") else "lesson")}
|
|
334
337
|
items.append(it)
|
|
335
338
|
_save(data)
|
|
336
339
|
return it
|
|
@@ -676,8 +679,18 @@ def learn_async(run_id):
|
|
|
676
679
|
|
|
677
680
|
def view():
|
|
678
681
|
"""经验库总览(给 UI/API)。categories:闭集枚举 + 实际出现过的分类,
|
|
679
|
-
counts 给每类条数,供 UI 下拉过滤与计数显示。
|
|
680
|
-
lessons
|
|
682
|
+
counts 给每类条数,供 UI 下拉过滤与计数显示。
|
|
683
|
+
lessons 每条带展示 kind:「做法」(程序性记忆)/「教训」(规避性)——
|
|
684
|
+
UI 用不同徽章区分(openhuman 记忆可视化借鉴)。持久层是稳定 token
|
|
685
|
+
(procedure/lesson,老数据可能缺失),此处统一翻译+派生兜底。"""
|
|
686
|
+
def _kind(x):
|
|
687
|
+
k = x.get("kind")
|
|
688
|
+
if k == "procedure":
|
|
689
|
+
return "做法"
|
|
690
|
+
if k == "lesson":
|
|
691
|
+
return "教训"
|
|
692
|
+
return "做法" if str(x.get("title") or "").startswith("做法:") else "教训"
|
|
693
|
+
lessons = [{**x, "kind": _kind(x)} for x in list_lessons()]
|
|
681
694
|
counts = {}
|
|
682
695
|
for x in lessons:
|
|
683
696
|
c = x.get("category") or LESSON_UNCATEGORIZED
|
package/app/ui/app.js
CHANGED
|
@@ -8431,6 +8431,7 @@ function renderSkills() {
|
|
|
8431
8431
|
$("skill-lessons").innerHTML = shown.map((x) =>
|
|
8432
8432
|
'<div class="card' + (x.enabled === false ? " off" : "") + '"><div class="head">' +
|
|
8433
8433
|
'<span class="name">' + esc(t(x.title)) + "</span>" +
|
|
8434
|
+
(x.kind === "做法" ? '<span class="tag ok" title="' + t("已验证有效的做法(程序性记忆)") + '">' + t("做法") + "</span>" : "") +
|
|
8434
8435
|
(x.category ? '<span class="tag cat" style="color:' + (CAT_COLOR[x.category] || "var(--muted)") + '" ' +
|
|
8435
8436
|
'onclick="skillCatFilter(\'' + esc(x.category) + '\')" title="' + t("只看该类") + '">' + esc(t(x.category)) + "</span>" : "") +
|
|
8436
8437
|
'<span class="tag">' + esc(x.scope === "*" ? t("通用") : x.scope) + "</span>" +
|
package/app/ui/i18n.js
CHANGED
|
@@ -1517,6 +1517,8 @@
|
|
|
1517
1517
|
"知道了": "Got it",
|
|
1518
1518
|
"新版本更新内容": "What's new in the new version",
|
|
1519
1519
|
"已注入 ": "injected ",
|
|
1520
|
+
"做法": "Best practice",
|
|
1521
|
+
"已验证有效的做法(程序性记忆)": "Verified working procedure (procedural memory)",
|
|
1520
1522
|
"已清除 ": "Cleared ",
|
|
1521
1523
|
"已禁用厂商 {0}:链降级自动跳过,绑定页可重新启用": "Provider {0} disabled: chain fallback skips it — re-enable on the Bindings page",
|
|
1522
1524
|
"已禁用模型 {0} · {1},链降级自动跳过;绑定页可重新启用": "Model {0} · {1} disabled: chain fallback skips it — re-enable on the Bindings page",
|
package/package.json
CHANGED