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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/index.ts +1 -1
  3. 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
- 其他:环境变量 `THINK_ANCHOR=0` 硬关闭;日志 `~/.pi/think-anchor.jsonl`(1 MiB 截断,保留尾部整行)。
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: `THINK_ANCHOR=0` hard off; log `~/.pi/think-anchor.jsonl` (1 MiB truncation, tail-preserving).
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 (process.env.THINK_ANCHOR === "0" || !st.cfg.enabled) return;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-think-anchor",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Monitors thinking focus drift and nudges the model back on track.",
5
5
  "type": "module",
6
6
  "license": "MIT",