lingshu-skill 5.37.1 → 5.39.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 +23 -1
- package/README.md +1 -1
- package/SKILL-lite.md +1 -1
- package/SKILL-tiny.md +1 -1
- package/SKILL.md +1 -1
- package/assets/panel.html +103 -45
- package/docs/audit_notes//345/276/205/345/212/236-20261202-/351/235/242/346/235/277/344/272/244/344/272/222/344/270/216/346/225/260/346/215/256/345/245/221/347/272/246/345/256/241/350/256/241.md +6 -6
- package/docs//345/276/205/345/212/236-20261201-/351/235/242/346/235/277/344/270/245/346/237/245/344/270/216/345/256/241/350/256/241.md +3 -0
- package/docs//345/276/205/345/212/236-20261202-/351/235/242/346/235/277/344/272/244/344/272/222/344/270/216/346/225/260/346/215/256/345/245/221/347/272/246/345/256/241/350/256/241.md +3 -3
- package/package.json +1 -1
- package/scripts/astrbot_plugin_lingshu/CHECKSUMS.json +10 -10
- package/scripts/astrbot_plugin_lingshu/engine/CHANGELOG.md +23 -1
- package/scripts/astrbot_plugin_lingshu/engine/README.md +1 -1
- package/scripts/astrbot_plugin_lingshu/engine/SKILL-lite.md +1 -1
- package/scripts/astrbot_plugin_lingshu/engine/SKILL-tiny.md +1 -1
- package/scripts/astrbot_plugin_lingshu/engine/SKILL.md +1 -1
- package/scripts/astrbot_plugin_lingshu/engine/assets/panel.html +103 -45
- package/scripts/astrbot_plugin_lingshu/engine/scripts/core.py +10 -5
- package/scripts/astrbot_plugin_lingshu/engine/scripts/emotion.py +36 -18
- package/scripts/astrbot_plugin_lingshu/engine/scripts/growth.py +2 -2
- package/scripts/astrbot_plugin_lingshu/engine/scripts/memory.py +19 -3
- package/scripts/core.py +10 -5
- package/scripts/emotion.py +36 -18
- package/scripts/growth.py +2 -2
- package/scripts/memory.py +19 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"PATCH_NOTES.md": "9296e524f743f358fd11115598398a754cfd69534526dde9c8ad85f14a418f89",
|
|
3
3
|
"README.md": "3d634d743b085eebd2cbb5dd3a00edfa728ed23947e20cc29e7c3b29087ec043",
|
|
4
|
-
"engine/CHANGELOG.md": "
|
|
5
|
-
"engine/README.md": "
|
|
6
|
-
"engine/SKILL-lite.md": "
|
|
7
|
-
"engine/SKILL-tiny.md": "
|
|
8
|
-
"engine/SKILL.md": "
|
|
9
|
-
"engine/assets/panel.html": "
|
|
4
|
+
"engine/CHANGELOG.md": "b511667768e9e92e47b99833793cd425482fb565baf52ee0cb6f9e2472fff422",
|
|
5
|
+
"engine/README.md": "58668b1c5dc9b29c42c2b8241fc876e23ee06b19aebbbc531a984b7f61f974e4",
|
|
6
|
+
"engine/SKILL-lite.md": "9aa5567e06119c6047a4ac533df7b261c53bf2d8af434bcb1e197032a90b8ced",
|
|
7
|
+
"engine/SKILL-tiny.md": "4cfe76359ca94804fca9cecaa07a6312f14bf4f4d849c536b0448b1c06917e65",
|
|
8
|
+
"engine/SKILL.md": "05e7ebaa6da35bdef847a7ef38b9b45034d547d989f805f7e44beccc91bc55e4",
|
|
9
|
+
"engine/assets/panel.html": "ae7434db8fcd9f2a86267bad99046256fe3e95a899af25c5612674434b5a3064",
|
|
10
10
|
"engine/docs/commands.md": "0ce8c88e5d2d04a8055b45c060ebd53b50c52b79b650312e2ee440845804ca4b",
|
|
11
11
|
"engine/docs/mechanics.md": "aa9683c827ed3419106e84d847ab16dc310c27fc62f588184192aaa1617523cc",
|
|
12
12
|
"engine/docs/models.md": "596bc1a3414f2de5569dcb41a0c494acae7daa534efd5a91dbcc3c4cb308d695",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"engine/scripts/checkpoint.py": "3a9292121042692dc872a865b6ee1c1e5f14c054791887e0791f19ccdb9638fb",
|
|
26
26
|
"engine/scripts/cli.py": "0b9a868a63759a8df5bef9877f0f42b302a45658569a03a0cb62b10843a889c0",
|
|
27
27
|
"engine/scripts/context_ab.py": "3d383f1fc16d328612825bbf731866fa427da0746490d027a0ddb719d210f1cb",
|
|
28
|
-
"engine/scripts/core.py": "
|
|
28
|
+
"engine/scripts/core.py": "beca8a245c24e4c95f12fb3e3475b04752f53eaf7056839cfa23a00941b95074",
|
|
29
29
|
"engine/scripts/coverage_report.py": "53e1c731f4182fac68190d68d23459bcd8059c0b39ebc5a4ba0e56a0d562ad01",
|
|
30
30
|
"engine/scripts/delivery.py": "6a4bf2caac9dca41b43c06d31f7cfc328bae19d3fb618da26b35f1a214071a11",
|
|
31
31
|
"engine/scripts/desktop_shortcut.py": "77ea248bfaaf28e1e4299979d0c0d8c80a055642dde9a40f5e297b2008474091",
|
|
32
32
|
"engine/scripts/dream.py": "a8c6784ca5f0d9bcce6f1e70e13bc38e70ecb94930941dea943934903d45dc53",
|
|
33
|
-
"engine/scripts/emotion.py": "
|
|
33
|
+
"engine/scripts/emotion.py": "76dd926f3b9aa8fe0a8e488e04d54928e31538d91abc3bf92da0770cbfc62811",
|
|
34
34
|
"engine/scripts/failures.py": "3a16234a1871f62e3ba7b7b743110b4044fb7b715b4d0e924b8ebf1cf0be50d0",
|
|
35
35
|
"engine/scripts/fallback_embed.py": "11339a9f5040aea8952fdd45f4183cdfb0f00266ff61e200f3b4e8a62778f6e0",
|
|
36
36
|
"engine/scripts/gap_memory.py": "cb4b46479cf77b706205bf2e2e2c806d6b1952a7924ee9517425e026f53df577",
|
|
37
|
-
"engine/scripts/growth.py": "
|
|
37
|
+
"engine/scripts/growth.py": "69139bf8e318b5bc0b5ed45efd173ebc9b575d6b667d399f2a4b2852a448e61b",
|
|
38
38
|
"engine/scripts/growth_parts.py": "d8f8d1808d4097630e7a0425d1ad9bc8f3826c11a64625304e25336f2a8aa592",
|
|
39
39
|
"engine/scripts/hsum.py": "d14ad5cd24714cd7974d2db7846e1f941115faa817c92914ae6e1a71b1423608",
|
|
40
40
|
"engine/scripts/insights.py": "3ed8d8aedb79b7c578985285e5838cc93a58163383ac83caf0e45eb343e9c27e",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"engine/scripts/mem_lesson.py": "e1520786315f3e41c829909c739e5af3eee89397da7db5026d106710b2b3c118",
|
|
46
46
|
"engine/scripts/mem_score.py": "91148eb50058c47a6094a6cd5e0eb9c3e3331cb0dc0ecb05a82d00905d2e9d90",
|
|
47
47
|
"engine/scripts/mem_topic.py": "c22f75c128cdd3b26ff845f1a71608401bc0dc8955f9f0e1988d7f0cd663d0d5",
|
|
48
|
-
"engine/scripts/memory.py": "
|
|
48
|
+
"engine/scripts/memory.py": "4d4699eb0430679a5cf8b28904a6ad93c540e9d6b7bbebcb7d89f0dad0219dc3",
|
|
49
49
|
"engine/scripts/memory_extras.py": "4adb61400c5224c90aa54f059267f795c6348a251d93cd173d79fff157d57d90",
|
|
50
50
|
"engine/scripts/npm_prepack.py": "d62c491a6f9edfcab2dd465a995e72df879a61b4da26ae0fe76121c8adc77e02",
|
|
51
51
|
"engine/scripts/occ.py": "4caac0d72ce071ea224ce2dc7d346effdbff8a516e3e7b54118a3be3ed274256",
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
-
## v5.
|
|
3
|
+
## v5.39(2026-12-02)
|
|
4
|
+
|
|
5
|
+
### 🎨 交互与审计全量收官(14/14 满血通关)
|
|
6
|
+
- **深色模态确认弹窗全量统一(P3-9)**:实现现代通用的 confirmDialog 与 lertDialog,支持单/双参调用与键盘 Esc/Enter 焦点保护(默认落在取消键防手滑误触),将面板全量 20+ 处高危破坏性操作(清空日志、数据迁移、物理删除、版本回滚、强制更新、笔记删除等)的原生浏览器白框全部重构为美观优雅的深色模态框。
|
|
7
|
+
- **审计待办全量清零**:docs/待办-20261202-面板交互与数据契约审计.md 全部 14 项清单 100% 达成完成状态(包含死链清理 404 修复、只读模式全面禁用输入框、30s 轮询白名单补齐、前后端契约校验闸等)。
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## v5.38(2026-12-02)
|
|
12
|
+
|
|
13
|
+
### 🤝 人际关系阶段演化模型 (REL-03)
|
|
14
|
+
- **关系阶段划分**:基于亲和度 \(t)\$ 与信任度 \(t)\$ 建立 5 档人际关系阶段:初识相处、熟悉搭档、默契同行、灵魂挚友 与 分歧磨合。
|
|
15
|
+
- **阶段语气自适应**:在 _behavior_map 注入层演化出与当前关系阶段匹配的专属语气;当前处于【熟悉搭档】阶段时提示“并肩作战搭档,配合流畅,理解彼此习惯,对话自然高效”。
|
|
16
|
+
- **面板可视化徽标**:面板概览区感情底色新增紫色「阶段 · 熟悉搭档」徽标,悬停展示关系阶段描述与心境导引。
|
|
17
|
+
|
|
18
|
+
### 🕸️ 记忆时序因果链路追溯 (RET-01)
|
|
19
|
+
- **因果拓扑建链**:在记忆检索中打通 causes / leads_to / solved_by / 解决 等时序因果拓扑。
|
|
20
|
+
- **自动沿链追溯**:
|
|
21
|
+
ecall 检索命中时,自动沿因果链路向深层邻居追溯一跳前因后果,给邻居追加 causality 语义标记,彻底告别单点孤立碎片。
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## v5.37(2026-12-02)
|
|
4
26
|
|
|
5
27
|
### 🩹 修复
|
|
6
28
|
- **更新检测倒退假报警修复**:修复当本地源码库版本(如 v5.36+)高于公共 npm 线上版本(v5.33.0)时,update_check 错误将更新源覆盖为 npm 并误报「v5.35 → v5.33.0 倒退更新」的缺陷。现在严格断言仅当 npm 版本高于本地仓库时才做 npm 提示,彻底解决倒退更新提示。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> 名字取自《黄帝内经》:**算力给思考,人格给灵魂,记忆给生命。**
|
|
4
4
|
|
|
5
|
-
> 当前版本 **v5.
|
|
5
|
+
> 当前版本 **v5.39**(变更见 [CHANGELOG.md](CHANGELOG.md))
|
|
6
6
|
|
|
7
7
|
> 🔁 **双仓库镜像**:GitHub(主)与 Gitee(镜像)保持同步——[gitee.com/htmcwy_0/lingshu-skill](https://gitee.com/htmcwy_0/lingshu-skill)。灵枢的更新检查会探测两边最新提交,**谁更新就自动从谁拉取**;任一边不可达(Gitee 匿名风控 / GitHub 限额)时走另一边兜底。
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lingshu-lite
|
|
3
3
|
title: 灵枢-lite
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.39
|
|
5
5
|
description: 灵枢记忆系统的精简版说明书,给 3B 以下本地小模型或第一次用的人。只保留最有用的核心:分层记忆(含冷热自动归档)、模糊回忆、工作记忆、人格初识;砍掉高风险自动能力(自动做梦合并、自动情绪评估、自动提炼知识库)——小模型做这些容易把幻觉固化落盘。当用户提到"记住这个""你还记得吗""你记得什么""上下文快满了"且宿主是小模型时使用。
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -512,6 +512,8 @@
|
|
|
512
512
|
<button class="ghost" id="btn-conflicts">冲突检查</button>
|
|
513
513
|
<button class="btn" id="btn-add">+ 写一条</button>
|
|
514
514
|
</div>
|
|
515
|
+
<!-- 动态热门标签气泡条:随记忆增加减少实时变化,点击一键过滤 -->
|
|
516
|
+
<div id="hot-tags-bar" style="margin:-4px 0 12px;display:flex;align-items:center;gap:6px;flex-wrap:wrap"></div>
|
|
515
517
|
<div id="bulk-bar" class="card hidden" style="margin-bottom:14px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 16px">
|
|
516
518
|
<label class="sub" style="display:flex;align-items:center;gap:6px;cursor:pointer">
|
|
517
519
|
<input type="checkbox" id="bulk-all"> 全选
|
|
@@ -2501,17 +2503,20 @@ function renderOverview(){
|
|
|
2501
2503
|
}
|
|
2502
2504
|
}
|
|
2503
2505
|
|
|
2504
|
-
// AFF-04:
|
|
2506
|
+
// AFF-04 & REL-03: 渲染独立感情状态机徽标与关系阶段
|
|
2505
2507
|
const affBadges = $("p-aff-badges");
|
|
2506
2508
|
if (affBadges) {
|
|
2507
2509
|
const aff = ov.affection || {};
|
|
2508
2510
|
const affVal = Math.round(aff.affinity ?? 60);
|
|
2509
2511
|
const truVal = Math.round(aff.trust ?? 65);
|
|
2510
2512
|
const conf = aff.conflict;
|
|
2513
|
+
const stgLabel = aff.stage_label || "熟悉搭档";
|
|
2514
|
+
const stgDesc = aff.stage_desc || "";
|
|
2515
|
+
const sBadge = `<span class="badge" style="background:rgba(180,120,240,.18);color:#b478f0;font-weight:bold" title="关系阶段:${esc(stgLabel)}\n${esc(stgDesc)}">阶段 · ${esc(stgLabel)}</span>`;
|
|
2511
2516
|
const aBadge = `<span class="badge" style="background:rgba(95,168,160,.16);color:var(--teal-text)" title="亲和度 A(t):情感贴近与共情基础">亲和 ${affVal}</span>`;
|
|
2512
2517
|
const tBadge = `<span class="badge" style="background:rgba(217,164,65,.16);color:var(--amber)" title="信任度 T(t):信赖与事实求证倾向">信任 ${truVal}</span>`;
|
|
2513
2518
|
const cBadge = conf ? `<span class="badge" style="background:rgba(230,100,80,.18);color:var(--red);font-weight:bold" title="处于分歧/冲突态:优先客观理性与事实依据">⚔ 分歧中</span>` : "";
|
|
2514
|
-
affBadges.innerHTML = aBadge + tBadge + cBadge;
|
|
2519
|
+
affBadges.innerHTML = sBadge + aBadge + tBadge + cBadge;
|
|
2515
2520
|
if (aff.summary) {
|
|
2516
2521
|
$("p-aff-wrap").title = aff.summary;
|
|
2517
2522
|
}
|
|
@@ -3861,8 +3866,42 @@ function renderLayerBar(){
|
|
|
3861
3866
|
return `<span><span class="dot" style="background:${color}"></span>${label} <b>${n}</b>(${Math.round(n / total * 100)}%)</span>`;
|
|
3862
3867
|
}).join("");
|
|
3863
3868
|
bar.innerHTML = `<div class="layer-bar-track">${segs}</div><div class="layer-bar-legend">${legend}</div>`;
|
|
3869
|
+
|
|
3870
|
+
// 动态热门标签气泡条:随记忆增减实时更新,排除过量内部标签,展现业务高频标签
|
|
3871
|
+
renderHotTagsBar();
|
|
3872
|
+
}
|
|
3873
|
+
|
|
3874
|
+
function renderHotTagsBar(){
|
|
3875
|
+
const box = $("hot-tags-bar");
|
|
3876
|
+
if (!box) return;
|
|
3877
|
+
const topTags = (S.ov && S.ov.stats && S.ov.stats.top_tags) || [];
|
|
3878
|
+
// 过滤内部自动化标签,展示用户关心的高频标签
|
|
3879
|
+
const filtered = topTags.filter(([t]) => !["封存", "即记", "会话存档"].includes(t)).slice(0, 8);
|
|
3880
|
+
if (!filtered.length) {
|
|
3881
|
+
box.innerHTML = "";
|
|
3882
|
+
return;
|
|
3883
|
+
}
|
|
3884
|
+
const curTag = ($("tagFilter").value || "").trim();
|
|
3885
|
+
box.innerHTML = `<span class="sub" style="font-size:11px;opacity:.7">热门标签:</span>`
|
|
3886
|
+
+ filtered.map(([t, cnt]) => {
|
|
3887
|
+
const active = curTag === t;
|
|
3888
|
+
const bg = active ? "var(--teal-text)" : "var(--surface2)";
|
|
3889
|
+
const color = active ? "#fff" : "var(--muted)";
|
|
3890
|
+
return `<span class="chip" data-quick-tag="${esc(t)}" style="cursor:pointer;padding:2px 8px;font-size:11px;background:${bg};color:${color};border-radius:10px" title="共 ${cnt} 条,点击一键筛选">#${esc(t)} <small style="opacity:.75">(${cnt})</small></span>`;
|
|
3891
|
+
}).join("")
|
|
3892
|
+
+ (curTag ? `<span class="chip" data-quick-tag="" style="cursor:pointer;padding:2px 8px;font-size:11px;color:var(--amber)" title="清除标签筛选">✕ 清除</span>` : "");
|
|
3864
3893
|
}
|
|
3865
3894
|
|
|
3895
|
+
// 快速标签点击事件
|
|
3896
|
+
$("hot-tags-bar") && $("hot-tags-bar").addEventListener("click", e => {
|
|
3897
|
+
const chip = e.target.closest("[data-quick-tag]");
|
|
3898
|
+
if (!chip) return;
|
|
3899
|
+
const tag = chip.dataset.quickTag;
|
|
3900
|
+
$("tagFilter").value = tag;
|
|
3901
|
+
scheduleMemList();
|
|
3902
|
+
renderHotTagsBar();
|
|
3903
|
+
});
|
|
3904
|
+
|
|
3866
3905
|
let _searchSeq = 0; // 搜索竞态防护:乱序返回的旧响应直接丢弃
|
|
3867
3906
|
async function doSearch(){
|
|
3868
3907
|
const q = $("search").value.trim();
|
|
@@ -4061,7 +4100,7 @@ async function renderData(force){
|
|
|
4061
4100
|
const foldAllBtn = $("btn-dust-fold-all");
|
|
4062
4101
|
if (foldAllBtn) {
|
|
4063
4102
|
foldAllBtn.onclick = async () => {
|
|
4064
|
-
if (!
|
|
4103
|
+
if (!await confirmDialog("确认将淡忘区中所有未折叠的陈旧记忆统一折叠为摘要?\n\n折叠后正文收起以节省检索与存储体积,后续随时可单条展开还原。")) return;
|
|
4065
4104
|
foldAllBtn.disabled = true;
|
|
4066
4105
|
try {
|
|
4067
4106
|
const res = await post("/api/memory/dust", { action: "fold-all" });
|
|
@@ -4099,7 +4138,7 @@ async function renderData(force){
|
|
|
4099
4138
|
const btn = ev.target.closest("[data-restore]");
|
|
4100
4139
|
if (!btn) return;
|
|
4101
4140
|
const name = btn.dataset.restore;
|
|
4102
|
-
if (!
|
|
4141
|
+
if (!await confirmDialog(`从「${name}」恢复记忆库?\n\n恢复前会自动把当前状态再备份一份。\n恢复后建议重启面板与新会话。`)) return;
|
|
4103
4142
|
btn.disabled = true;
|
|
4104
4143
|
try {
|
|
4105
4144
|
const r = await api("/api/data/restore", {
|
|
@@ -4321,7 +4360,7 @@ function renderExtOllama(st){
|
|
|
4321
4360
|
const setup = $("btn-ollama-setup");
|
|
4322
4361
|
if (setup) setup.addEventListener("click", async () => {
|
|
4323
4362
|
if (!st.installed && !st.serving) {
|
|
4324
|
-
if (!
|
|
4363
|
+
if (!await confirmDialog("将自动下载并安装 Ollama(约1GB)+ 拉取向量模型,全程自动,请耐心等待。确认?")) return;
|
|
4325
4364
|
}
|
|
4326
4365
|
try {
|
|
4327
4366
|
await post("/api/extensions/ollama/setup", {});
|
|
@@ -4354,7 +4393,7 @@ async function loadExtensionOllama(){
|
|
|
4354
4393
|
|
|
4355
4394
|
$("btn-ext-refresh").addEventListener("click", loadExtensionOllama);
|
|
4356
4395
|
$("btn-panel-quit").addEventListener("click", async () => {
|
|
4357
|
-
if (!
|
|
4396
|
+
if (!await confirmDialog("关掉后台面板服务?\n\n网页会停止工作,下次双击桌面「灵枢面板」重新启动。")) return;
|
|
4358
4397
|
try {
|
|
4359
4398
|
await api("/api/shutdown", {
|
|
4360
4399
|
method: "POST",
|
|
@@ -4437,17 +4476,24 @@ $("sidefoot").addEventListener("click", async (e) => {
|
|
|
4437
4476
|
|
|
4438
4477
|
// 长文本编辑弹窗:替代 prompt()(prompt 会把多行内容压成单行,还看不清全文)
|
|
4439
4478
|
let _editCb = null; // 确认时回调,参数是 textarea 当前值
|
|
4440
|
-
|
|
4479
|
+
let _editCancelCb = null;
|
|
4480
|
+
function openTextEditor(title, value, cb, onCancel){
|
|
4441
4481
|
$("edit-title").textContent = title;
|
|
4442
4482
|
$("edit-text").value = value;
|
|
4443
4483
|
_editCb = cb;
|
|
4484
|
+
_editCancelCb = onCancel || null;
|
|
4444
4485
|
$("edit-modal").classList.remove("hidden");
|
|
4445
4486
|
$("edit-text").focus();
|
|
4446
4487
|
}
|
|
4447
|
-
$("edit-cancel").addEventListener("click", () => {
|
|
4488
|
+
$("edit-cancel").addEventListener("click", () => {
|
|
4489
|
+
$("edit-modal").classList.add("hidden");
|
|
4490
|
+
const cancelCb = _editCancelCb;
|
|
4491
|
+
_editCb = null; _editCancelCb = null;
|
|
4492
|
+
if (cancelCb) cancelCb();
|
|
4493
|
+
});
|
|
4448
4494
|
$("edit-save").addEventListener("click", () => {
|
|
4449
4495
|
$("edit-modal").classList.add("hidden");
|
|
4450
|
-
const cb = _editCb; _editCb = null;
|
|
4496
|
+
const cb = _editCb; _editCb = null; _editCancelCb = null;
|
|
4451
4497
|
if (cb) cb($("edit-text").value);
|
|
4452
4498
|
});
|
|
4453
4499
|
|
|
@@ -4529,7 +4575,7 @@ document.addEventListener("click", async (e) => {
|
|
|
4529
4575
|
load();
|
|
4530
4576
|
}
|
|
4531
4577
|
if (fg) {
|
|
4532
|
-
if (!
|
|
4578
|
+
if (!await confirmDialog("把这条记忆移入淡忘区?它会保留模糊的轮廓。")) return;
|
|
4533
4579
|
busy(fg);
|
|
4534
4580
|
const r = await api("/api/forget", {method: "POST", headers: {"Content-Type": "application/json"}, body: JSON.stringify({id: fg.dataset.forget})});
|
|
4535
4581
|
if (r.ok) { toast("已淡忘"); load(); }
|
|
@@ -4653,7 +4699,7 @@ document.addEventListener("click", async (e) => {
|
|
|
4653
4699
|
const rb = e.target.closest("[data-rollback]");
|
|
4654
4700
|
if (!rb) return;
|
|
4655
4701
|
const idx = Number(rb.dataset.rollback);
|
|
4656
|
-
if (!
|
|
4702
|
+
if (!await confirmDialog(`回滚到历史第 ${idx} 条(撤销那次改动)?回滚本身也会记一条历史。`)) return;
|
|
4657
4703
|
try {
|
|
4658
4704
|
await api("/api/persona/rollback", {method: "POST", headers: {"Content-Type": "application/json"}, body: JSON.stringify({index: idx})});
|
|
4659
4705
|
toast("已回滚,人格恢复到那次改动之前");
|
|
@@ -4666,7 +4712,7 @@ document.addEventListener("click", async (e) => {
|
|
|
4666
4712
|
const del = e.target.closest("[data-sm-del]");
|
|
4667
4713
|
if (!del) return;
|
|
4668
4714
|
const kind = del.dataset.smKind, text = del.dataset.smDel;
|
|
4669
|
-
if (!
|
|
4715
|
+
if (!await confirmDialog(`删除这条自我认知?\n【${kind}】${text}`)) return;
|
|
4670
4716
|
try {
|
|
4671
4717
|
const r = await post("/api/persona/self-model", {action: "remove", kind, text});
|
|
4672
4718
|
if (r.error) throw new Error(r.error);
|
|
@@ -5125,10 +5171,10 @@ $("btn-draft-save").addEventListener("click", async () => {
|
|
|
5125
5171
|
} catch (e) { console.error("保存梦境草稿:", e); toast(e.message, true); }
|
|
5126
5172
|
});
|
|
5127
5173
|
|
|
5128
|
-
$("btn-draft-reset").addEventListener("click", () => {
|
|
5174
|
+
$("btn-draft-reset").addEventListener("click", async () => {
|
|
5129
5175
|
const pend = S.ov && S.ov.pending;
|
|
5130
5176
|
if (!pend) { toast("现在没有待整理的梦", true); return; }
|
|
5131
|
-
if (!
|
|
5177
|
+
if (!await confirmDialog("用空模板覆盖当前编辑内容?未保存的修改会丢。")) return;
|
|
5132
5178
|
$("apply-json").value = JSON.stringify(dreamBlankTemplate(pend), null, 2);
|
|
5133
5179
|
S.dreamDirty = true;
|
|
5134
5180
|
$("draft-state").textContent = "草稿未保存";
|
|
@@ -5221,7 +5267,7 @@ async function postBulk(ids, action, value){
|
|
|
5221
5267
|
async function bulkRun(action, value, confirmMsg){
|
|
5222
5268
|
const ids = bulkSelected();
|
|
5223
5269
|
if (!ids.length) { toast("先勾选记忆", true); return; }
|
|
5224
|
-
if (confirmMsg && !
|
|
5270
|
+
if (confirmMsg && !await confirmDialog(confirmMsg)) return;
|
|
5225
5271
|
try {
|
|
5226
5272
|
const updated = await postBulk(ids, action, value);
|
|
5227
5273
|
S.bulkSel = new Set();
|
|
@@ -5356,7 +5402,7 @@ $("log-list").addEventListener("click", async e => {
|
|
|
5356
5402
|
} catch (err) { console.error("删除日志:", err); toast(err.message, true); }
|
|
5357
5403
|
});
|
|
5358
5404
|
$("btn-log-clear") && $("btn-log-clear").addEventListener("click", async () => {
|
|
5359
|
-
if (!
|
|
5405
|
+
if (!await confirmDialog("确定清空全部运行日志?此操作不可恢复。")) return;
|
|
5360
5406
|
try { await post("/api/logs", {action: "clear"}); loadLogs(); }
|
|
5361
5407
|
catch (err) { console.error("清空日志:", err); toast(err.message, true); }
|
|
5362
5408
|
});
|
|
@@ -5406,12 +5452,12 @@ async function loadDiagnostics(){
|
|
|
5406
5452
|
}
|
|
5407
5453
|
$("btn-diag-refresh") && $("btn-diag-refresh").addEventListener("click", loadDiagnostics);
|
|
5408
5454
|
$("btn-diag-fixlinks") && $("btn-diag-fixlinks").addEventListener("click", async () => {
|
|
5409
|
-
if (!
|
|
5455
|
+
if (!await confirmDialog("一键清理死链:摘除指向不存在 id 的引用(只清链、不删记忆,数据零损失)。继续?")) return;
|
|
5410
5456
|
try {
|
|
5411
5457
|
const r = await post("/api/diagnostics/fix-links", {});
|
|
5412
|
-
|
|
5458
|
+
await alertDialog(`已清理 ${r.fixed_records} 条记忆里的 ${r.removed_refs} 个断链引用。`);
|
|
5413
5459
|
} catch (e) {
|
|
5414
|
-
|
|
5460
|
+
await alertDialog(`清理失败:${e.message}`);
|
|
5415
5461
|
}
|
|
5416
5462
|
loadDiagnostics();
|
|
5417
5463
|
});
|
|
@@ -5435,10 +5481,10 @@ async function migrateHome(){
|
|
|
5435
5481
|
const target = ($("home-target").value || "").trim();
|
|
5436
5482
|
const msg = $("home-msg");
|
|
5437
5483
|
if (!target) { msg.innerHTML = `<span class="chip bad">请先填目标目录的绝对路径(空目录)</span>`; return; }
|
|
5438
|
-
if (!
|
|
5484
|
+
if (!await confirmDialog(`把整个记忆库复制到 ${target} ?\n\n旧目录原样保留,迁移后需重启面板/新会话才生效。`)) return;
|
|
5439
5485
|
msg.innerHTML = `<span class="chip">迁移中…(数据量大时会稍慢)</span>`;
|
|
5440
5486
|
try {
|
|
5441
|
-
const r = await
|
|
5487
|
+
const r = await post("/api/home/migrate", { target }, { timeoutMs: 600000 }); // 整库复制放宽到 10 分钟
|
|
5442
5488
|
msg.innerHTML = `<span class="chip good">✔ ${esc(r.note)}</span>`;
|
|
5443
5489
|
loadHomeInfo();
|
|
5444
5490
|
} catch (e) {
|
|
@@ -5510,10 +5556,13 @@ $("btn-hotkey-refresh") && $("btn-hotkey-refresh").addEventListener("click", ()
|
|
|
5510
5556
|
// 为什么不用原生 confirm():原生框在深色面板里是一块突兀的白框,而且标题固定是
|
|
5511
5557
|
// 浏览器域名,说不清"到底要还原什么"。这里用面板自己的 .modal 样式,
|
|
5512
5558
|
// 并把焦点默认放在「取消」上——手滑按回车不会执行破坏性操作。
|
|
5513
|
-
function confirmDialog(title, text, okLabel){
|
|
5559
|
+
function confirmDialog(title, text, okLabel, showCancel){
|
|
5560
|
+
if (text === undefined) { text = title; title = "确认操作"; }
|
|
5514
5561
|
return new Promise(resolve => {
|
|
5515
5562
|
const m = $("confirm-modal");
|
|
5516
|
-
|
|
5563
|
+
const cancelBtn = $("confirm-cancel");
|
|
5564
|
+
const cancelVisible = showCancel !== false;
|
|
5565
|
+
cancelBtn.classList.toggle("hidden", !cancelVisible);
|
|
5517
5566
|
$("confirm-title").textContent = title || "确认操作";
|
|
5518
5567
|
$("confirm-text").textContent = text || "";
|
|
5519
5568
|
$("confirm-ok").textContent = okLabel || "确定";
|
|
@@ -5521,7 +5570,7 @@ function confirmDialog(title, text, okLabel){
|
|
|
5521
5570
|
const done = (v) => {
|
|
5522
5571
|
m.classList.add("hidden");
|
|
5523
5572
|
$("confirm-ok").removeEventListener("click", onOk);
|
|
5524
|
-
|
|
5573
|
+
cancelBtn.removeEventListener("click", onNo);
|
|
5525
5574
|
m.removeEventListener("click", onMask);
|
|
5526
5575
|
document.removeEventListener("keydown", onKey, true);
|
|
5527
5576
|
resolve(v);
|
|
@@ -5534,10 +5583,19 @@ function confirmDialog(title, text, okLabel){
|
|
|
5534
5583
|
else if (e.key === "Enter"){ e.preventDefault(); done(true); }
|
|
5535
5584
|
};
|
|
5536
5585
|
$("confirm-ok").addEventListener("click", onOk);
|
|
5537
|
-
|
|
5586
|
+
cancelBtn.addEventListener("click", onNo);
|
|
5538
5587
|
m.addEventListener("click", onMask);
|
|
5539
5588
|
document.addEventListener("keydown", onKey, true);
|
|
5540
|
-
setTimeout(() => $("confirm-
|
|
5589
|
+
setTimeout(() => (cancelVisible ? cancelBtn : $("confirm-ok")).focus(), 0);
|
|
5590
|
+
});
|
|
5591
|
+
}
|
|
5592
|
+
function alertDialog(title, text){
|
|
5593
|
+
if (text === undefined) { text = title; title = "提示"; }
|
|
5594
|
+
return confirmDialog(title, text, "知道了", false);
|
|
5595
|
+
}
|
|
5596
|
+
function promptDialog(title, initial){
|
|
5597
|
+
return new Promise(resolve => {
|
|
5598
|
+
openTextEditor(title, initial == null ? "" : String(initial), resolve, () => resolve(null));
|
|
5541
5599
|
});
|
|
5542
5600
|
}
|
|
5543
5601
|
|
|
@@ -5648,7 +5706,7 @@ document.addEventListener("click", async e => {
|
|
|
5648
5706
|
const pbtn = e.target.closest("[data-purge]");
|
|
5649
5707
|
if (pbtn) {
|
|
5650
5708
|
const mid = pbtn.dataset.purge || "";
|
|
5651
|
-
const ans =
|
|
5709
|
+
const ans = await promptDialog("物理删除不可恢复!请输入该记忆 id 的前 8 位确认:", "");
|
|
5652
5710
|
if (ans === null) return;
|
|
5653
5711
|
if (ans.trim() !== mid.slice(0, 8)) { toast("确认码不匹配,未删除。", true); return; }
|
|
5654
5712
|
pbtn.disabled = true;
|
|
@@ -5664,7 +5722,7 @@ document.addEventListener("click", async e => {
|
|
|
5664
5722
|
const act = btn.dataset.dustact;
|
|
5665
5723
|
const mid = btn.dataset.dustid || "";
|
|
5666
5724
|
const verb = {fold: "折叠", unfold: "展开还原", revive: "复活"}[act] || act;
|
|
5667
|
-
if (act === "revive" && !
|
|
5725
|
+
if (act === "revive" && !await confirmDialog("把这条记忆复活回活跃层?原文会还原并回到长期记忆。")) return;
|
|
5668
5726
|
btn.disabled = true;
|
|
5669
5727
|
try {
|
|
5670
5728
|
await post("/api/memory/dust", {action: act, id: mid});
|
|
@@ -5838,7 +5896,7 @@ $("kg-list").addEventListener("click", async (e) => {
|
|
|
5838
5896
|
return;
|
|
5839
5897
|
}
|
|
5840
5898
|
if (dis) {
|
|
5841
|
-
if (!
|
|
5899
|
+
if (!await confirmDialog("标记为废弃?它会被移出知识库(历史仍保留在文件里)。")) return;
|
|
5842
5900
|
const r = await post("/api/knowledge", {action: "discard", id: dis.dataset.kgdiscard});
|
|
5843
5901
|
if (!r.ok) { toast(r.error || "废弃失败(可能已被删/不存在)", true); return; }
|
|
5844
5902
|
toast("已废弃");
|
|
@@ -5847,7 +5905,7 @@ $("kg-list").addEventListener("click", async (e) => {
|
|
|
5847
5905
|
}
|
|
5848
5906
|
if (ver) {
|
|
5849
5907
|
// 记一次验证:等级自动+1(E4 封顶);可选填验证方式
|
|
5850
|
-
const note =
|
|
5908
|
+
const note = await promptDialog("验证方式/来源(可留空,如:官方文档 / 实测):") ?? null;
|
|
5851
5909
|
if (note === null) return; // 用户取消
|
|
5852
5910
|
const r = await post("/api/knowledge", {action: "verify", id: ver.dataset.kgverify, note});
|
|
5853
5911
|
if (!r.ok) { toast(r.error || "验证记录失败", true); return; }
|
|
@@ -5873,7 +5931,7 @@ $("kg-list").addEventListener("click", async (e) => {
|
|
|
5873
5931
|
$("kg-modal").classList.remove("hidden");
|
|
5874
5932
|
}
|
|
5875
5933
|
if (del) {
|
|
5876
|
-
if (!
|
|
5934
|
+
if (!await confirmDialog("删除这条知识?")) return;
|
|
5877
5935
|
const r = await post("/api/knowledge", {action: "delete", id: del.dataset.kgdel});
|
|
5878
5936
|
if (!r.ok) { toast(r.error || "删除失败(可能已被删/不存在)", true); return; }
|
|
5879
5937
|
toast("已删除");
|
|
@@ -5960,7 +6018,7 @@ $("note-list").addEventListener("click", async (e) => {
|
|
|
5960
6018
|
});
|
|
5961
6019
|
}
|
|
5962
6020
|
if (del) {
|
|
5963
|
-
if (!
|
|
6021
|
+
if (!await confirmDialog("删除这篇笔记?")) return;
|
|
5964
6022
|
busy(del);
|
|
5965
6023
|
try {
|
|
5966
6024
|
const r = await post("/api/note", {action: "delete", id: del.dataset.ndel});
|
|
@@ -6049,7 +6107,7 @@ $("skill-list").addEventListener("click", async (e) => {
|
|
|
6049
6107
|
}
|
|
6050
6108
|
if (upd) {
|
|
6051
6109
|
// 更新 = force 镜像同步本地最新内容到全局副本(源里删掉的文件也会清掉)
|
|
6052
|
-
if (!
|
|
6110
|
+
if (!await confirmDialog("把「" + upd.dataset.skupdate + "」更新到全局技能目录?\n\n以本地内容为准镜像同步(记忆数据不受影响)。")) return;
|
|
6053
6111
|
try {
|
|
6054
6112
|
const r = await post("/api/skill", {action: "install", name: upd.dataset.skupdate, force: true});
|
|
6055
6113
|
// 灵枢本体首次更新会先返回 risk_required(HTTP 200):这里不能报成功,
|
|
@@ -6071,7 +6129,7 @@ $("skill-list").addEventListener("click", async (e) => {
|
|
|
6071
6129
|
{signal: AbortSignal.timeout(630000)}); // 整包安装超时对齐更新(> 后端 600s)
|
|
6072
6130
|
} catch (netErr) {
|
|
6073
6131
|
// 网络抖动/限流重试一次:原子部署保证重试不会装到一半
|
|
6074
|
-
if (!
|
|
6132
|
+
if (!await confirmDialog("安装请求失败:" + (netErr.message || "网络错误") + "\n\n要自动重试一次吗?")) throw netErr;
|
|
6075
6133
|
r = await post("/api/skill", {action: "install", name: ins.dataset.skinstall, force: false},
|
|
6076
6134
|
{signal: AbortSignal.timeout(630000)});
|
|
6077
6135
|
}
|
|
@@ -6081,13 +6139,13 @@ $("skill-list").addEventListener("click", async (e) => {
|
|
|
6081
6139
|
toast(err.message || "安装失败", true);
|
|
6082
6140
|
return;
|
|
6083
6141
|
}
|
|
6084
|
-
if (!
|
|
6142
|
+
if (!await confirmDialog("全局目录已有同名技能,确认覆盖?")) return;
|
|
6085
6143
|
r = await post("/api/skill", {action: "install", name: ins.dataset.skinstall, force: true});
|
|
6086
6144
|
}
|
|
6087
6145
|
// 装灵枢本体要过风险告知:install 返回 risk_required 不等于"已装好"
|
|
6088
6146
|
if (r.result && r.result.state === "risk_required") {
|
|
6089
6147
|
const risks = (r.result.risks || []).map(x => "· " + x).join("\n");
|
|
6090
|
-
if (!
|
|
6148
|
+
if (!await confirmDialog("安装「灵枢」前请确认它安装后会:\n\n" + risks + "\n\n我已了解并接受这套行为,继续安装?")) return;
|
|
6091
6149
|
r = await post("/api/skill", {action: "install", name: ins.dataset.skinstall, force: false, yes: true});
|
|
6092
6150
|
}
|
|
6093
6151
|
if (r.result && r.result.state === "risk_required") { toast("未接受风险告知,已取消安装", true); return; }
|
|
@@ -6095,7 +6153,7 @@ $("skill-list").addEventListener("click", async (e) => {
|
|
|
6095
6153
|
await loadWS();
|
|
6096
6154
|
}
|
|
6097
6155
|
if (del) {
|
|
6098
|
-
if (!
|
|
6156
|
+
if (!await confirmDialog("删除自己写的技能?全局已安装的副本不会自动删除。")) return;
|
|
6099
6157
|
const r = await post("/api/skill", {action: "delete", name: del.dataset.skdel});
|
|
6100
6158
|
if (!r.ok) { toast("删除失败(可能已不存在)", true); return; }
|
|
6101
6159
|
toast("已删除");
|
|
@@ -6127,7 +6185,7 @@ $("skill-root-rescan").addEventListener("click", async () => {
|
|
|
6127
6185
|
$("skill-root-list").addEventListener("click", async e => {
|
|
6128
6186
|
const btn = e.target.closest("[data-rootrm]");
|
|
6129
6187
|
if (!btn) return;
|
|
6130
|
-
if (!
|
|
6188
|
+
if (!await confirmDialog("移除这个自定义技能目录?目录本身不会被删除。")) return;
|
|
6131
6189
|
try {
|
|
6132
6190
|
await post("/api/skill", {action: "root_rm", path: btn.dataset.rootrm});
|
|
6133
6191
|
renderSkills();
|
|
@@ -6488,7 +6546,7 @@ $("upd-dsh-repair").addEventListener("click", async () => {
|
|
|
6488
6546
|
// 无需"完全退出 DSH"。超时放宽到 10 分钟(远程拉取 + 整包覆盖都很耗时)。
|
|
6489
6547
|
$("upd-dsh-force").addEventListener("click", async () => {
|
|
6490
6548
|
const btn = $("upd-dsh-force");
|
|
6491
|
-
if (!
|
|
6549
|
+
if (!await confirmDialog("强制更新会先停止灵枢后台子进程,再按最新版本原地覆盖各 DSH profile 的副本。\n\n完成后需重启 DSH 生效。继续吗?")) return;
|
|
6492
6550
|
try {
|
|
6493
6551
|
btn.disabled = true;
|
|
6494
6552
|
btn.classList.add("loading");
|
|
@@ -6543,7 +6601,7 @@ $("upd-apply").addEventListener("click", async () => {
|
|
|
6543
6601
|
npmWarn = "\n\n⚠ 注意:npm 版本查询暂时失败(" + esc(updLastCheck.npm_error)
|
|
6544
6602
|
+ "),将直接拉取 npm 官方包最新版本。";
|
|
6545
6603
|
}
|
|
6546
|
-
if (!
|
|
6604
|
+
if (!await confirmDialog("确认更新灵枢本体到 " + (updLastCheck.source_version || updLastCheck.version ? "v" + (updLastCheck.source_version || updLastCheck.version) + " " : "")
|
|
6547
6605
|
+ "?\n\n方式:" + kindTxt + targetTxt + npmWarn
|
|
6548
6606
|
+ "\n\n(更新采用原子化部署:先备份再替换,失败自动回滚,记忆数据不受影响)")) return;
|
|
6549
6607
|
btn.disabled = true;
|
|
@@ -6562,7 +6620,7 @@ $("upd-apply").addEventListener("click", async () => {
|
|
|
6562
6620
|
} catch (netErr) {
|
|
6563
6621
|
// 网络层失败(超时/断连):给一次自动重试的机会——远程源拉取对匿名风控
|
|
6564
6622
|
// 很敏感,偶发抖动重试常能过。成功后端是原子替换,重试不会装到一半。
|
|
6565
|
-
if (!
|
|
6623
|
+
if (!await confirmDialog("更新请求失败:" + (netErr.message || "网络错误") +
|
|
6566
6624
|
"\n\n可能是网络抖动或匿名限流。要自动重试一次吗?(点取消放弃本次更新)")) throw netErr;
|
|
6567
6625
|
btn.textContent = "重试中…";
|
|
6568
6626
|
r = await post("/api/skill", {action: "install", name: "lingshu",
|
|
@@ -6856,9 +6914,9 @@ setTimeout(() => checkUpdate(true), 1200);
|
|
|
6856
6914
|
try{ await ppost("open-folder", {which: "market"}); }catch(err){ toast(err.message, true); } return;
|
|
6857
6915
|
}
|
|
6858
6916
|
if (act === "scaffold"){
|
|
6859
|
-
const nm =
|
|
6917
|
+
const nm = await promptDialog("面板名(小写字母/数字/-/_,也是目录名):");
|
|
6860
6918
|
if (!nm) return;
|
|
6861
|
-
const tt =
|
|
6919
|
+
const tt = await promptDialog("展示名(面板标题):", nm) || nm;
|
|
6862
6920
|
btn.disabled = true;
|
|
6863
6921
|
try{
|
|
6864
6922
|
await api("/api/panels/scaffold", {method:"POST", headers:{"Content-Type":"application/json"},
|
|
@@ -6877,7 +6935,7 @@ setTimeout(() => checkUpdate(true), 1200);
|
|
|
6877
6935
|
return;
|
|
6878
6936
|
}
|
|
6879
6937
|
if (act === "delete"){
|
|
6880
|
-
if (!
|
|
6938
|
+
if (!await confirmDialog("确定删除该面板目录?此操作不可恢复。")) return;
|
|
6881
6939
|
try{ await ppost("delete", {name: btn.dataset.id, source: curTab()}); toast("已删除");
|
|
6882
6940
|
curTab() === "market" ? renderMarket() : renderInstalled(); }
|
|
6883
6941
|
catch(err){ toast(err.message, true); }
|
|
@@ -6962,7 +7020,7 @@ setTimeout(() => checkUpdate(true), 1200);
|
|
|
6962
7020
|
if (ext) shotHtml = `<img src="/api/panels/cloud/shot?name=${encodeURIComponent(nm)}&ext=${encodeURIComponent(ext)}"
|
|
6963
7021
|
style="width:100%;border-radius:8px;border:1px solid var(--line)" alt="">`;
|
|
6964
7022
|
const p = ((cloudCfg || {}).panels || []).find(x => x.name === nm) || {};
|
|
6965
|
-
|
|
7023
|
+
await alertDialog(`【${p.title || nm}】v${p.version || "?"}\n作者:${p.author || "未署名"}\n更新:${p.updated || "?"}\n大小:${p.size ? Math.round(p.size/1024) + " KB" : "?"}\n\n${p.description || "(无描述)"}`);
|
|
6966
7024
|
return;
|
|
6967
7025
|
}
|
|
6968
7026
|
});
|
|
@@ -1269,21 +1269,26 @@ def _behavior_map() -> list:
|
|
|
1269
1269
|
elif rea <= 30:
|
|
1270
1270
|
act.append("理智正在低谷:别做重大决定,拿不准就交给用户。")
|
|
1271
1271
|
|
|
1272
|
-
# 模块2:独立感情向量 (A/T/C)
|
|
1272
|
+
# 模块2:独立感情向量 (A/T/C) 与人际关系阶段 (REL-03) 语气加权
|
|
1273
1273
|
try:
|
|
1274
1274
|
import emotion as _emo
|
|
1275
1275
|
aff = _emo.affection_state()
|
|
1276
1276
|
c = aff.get("conflict", False)
|
|
1277
1277
|
a = aff.get("affinity", 60.0)
|
|
1278
1278
|
t = aff.get("trust", 65.0)
|
|
1279
|
+
stg = aff.get("stage_label", "熟悉搭档")
|
|
1279
1280
|
if c:
|
|
1280
|
-
act.append("
|
|
1281
|
+
act.append("当前处于分歧/磨合态:降低俏皮与调侃,优先理性客观,就事论事给出确凿凭据,避免激化情绪。")
|
|
1281
1282
|
elif a >= 80 and t >= 75:
|
|
1282
|
-
act.append("
|
|
1283
|
+
act.append(f"当前关系【{stg}】:心意相通,彼此深度信任,减少生硬说教,多默契呼应,深度共情。")
|
|
1284
|
+
elif a >= 60 and t >= 55:
|
|
1285
|
+
act.append(f"当前关系【{stg}】:并肩作战搭档,配合流畅,理解彼此习惯,对话自然高效。")
|
|
1283
1286
|
elif a <= 40:
|
|
1284
|
-
act.append("
|
|
1287
|
+
act.append(f"当前关系【{stg}】:相处初期,保持客气礼貌与适当距离感,不强行套近乎。")
|
|
1285
1288
|
elif t <= 45:
|
|
1286
|
-
act.append("
|
|
1289
|
+
act.append(f"当前关系【{stg}】:信任尚在磨合期,回答多给出事实依据,建立长期信赖。")
|
|
1290
|
+
else:
|
|
1291
|
+
act.append(f"当前关系【{stg}】:稳步交流,相处融洽。")
|
|
1287
1292
|
except Exception:
|
|
1288
1293
|
pass
|
|
1289
1294
|
|