pi-think-anchor 1.0.16 → 1.0.17
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/README.md +2 -2
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ pi install npm:pi-think-anchor
|
|
|
35
35
|
| `lexicon.positive/negative/neutral` | 内置中文词表(专注 28 词 / 发散 18 词) | 词表覆盖 |
|
|
36
36
|
| `bands.spec/react` | `1.2 / 0.5` | 旧版兼容(无 `score` 时生效) |
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
其他:日志 `~/.pi/think-anchor.jsonl`(1 MiB 截断,保留尾部整行)。
|
|
39
39
|
|
|
40
40
|
## 命令
|
|
41
41
|
|
|
@@ -93,7 +93,7 @@ Config file `~/.pi/think-anchor.json` (optional; defaults apply, invalid JSON fa
|
|
|
93
93
|
| `lexicon.positive/negative/neutral` | built-in Chinese lexicon (28 focus / 18 drift) | Lexicon override |
|
|
94
94
|
| `bands.spec/react` | `1.2 / 0.5` | Legacy keys (used when `score` is absent) |
|
|
95
95
|
|
|
96
|
-
Also:
|
|
96
|
+
Also: log `~/.pi/think-anchor.jsonl` (1 MiB truncation, tail-preserving).
|
|
97
97
|
|
|
98
98
|
## Commands
|
|
99
99
|
|
package/index.ts
CHANGED
|
@@ -263,7 +263,7 @@ export default function thinkAnchor(pi: ExtensionAPI): void {
|
|
|
263
263
|
|
|
264
264
|
pi.on("turn_end", async (event, ctx) => {
|
|
265
265
|
try {
|
|
266
|
-
if (
|
|
266
|
+
if (!st.cfg.enabled) return;
|
|
267
267
|
void ctx;
|
|
268
268
|
const msg = (event as { message?: { role?: string; content?: unknown } } | undefined)?.message;
|
|
269
269
|
if (!msg || msg.role !== "assistant") return;
|