pi-cc-extensions 0.7.4 → 0.7.6

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.
@@ -20,7 +20,7 @@ import {
20
20
  sessionTitle,
21
21
  type ReferenceSessionInfo,
22
22
  type ReferenceSource,
23
- } from "./core.ts";
23
+ } from "./session-reference-core.ts";
24
24
 
25
25
  const MAX_SESSION_SUGGESTIONS = 3;
26
26
  const MAX_FILE_SUGGESTIONS = 7;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-cc-extensions",
3
- "version": "0.7.4",
3
+ "version": "0.7.6",
4
4
  "description": "Personal extensions for the Pi coding agent",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -16,7 +16,7 @@
16
16
  "extensions": [
17
17
  "./extensions/claude-code-style.ts",
18
18
  "./extensions/context.ts",
19
- "./extensions/session-reference/index.ts",
19
+ "./extensions/session-reference.ts",
20
20
  "./extensions/agent-autocomplete.ts"
21
21
  ]
22
22
  },
@@ -1,3 +0,0 @@
1
- # Extensions
2
-
3
- 扩展入口由根目录 `package.json` 的 `pi.extensions` 显式声明。辅助模块和测试文件不会被 Pi 当作独立扩展加载。
@@ -1,28 +0,0 @@
1
- # Session Reference
2
-
3
- 在 pi 编辑器中输入 `@`,从统一补全列表选择 `[Session] ...`,即可把历史 Session 绑定为:
4
-
5
- ```text
6
- @session:<session-id>
7
- ```
8
-
9
- 提交 prompt 时,扩展读取该 Session 当前有效分支(遵循分支与 compaction),以自定义上下文消息注入当前 Session。历史内容被标记为不可信背景上下文,不会切换或合并 Session。
10
-
11
- ## 行为
12
-
13
- - 搜索全部 pi 历史 Session;当前 Workspace 的 Session 优先。
14
- - Session 模糊查询默认最多显示 3 个候选。
15
- - 与 pi 原有 `@` 文件补全并存:普通查询按 1:2 交错排列 Session 与文件,路径型查询优先显示文件。
16
- - 若已加载 `pi-subagents`,`@` 补全会同时显示现有 SubAgent,并引用其当前有效上下文。
17
- - 支持一个 prompt 引用多个 Session,并自动去重;单次最多注入前 5 个。
18
- - 跳过历史 Session 中嵌套的 Session 引用,避免递归膨胀。
19
- - 上下文限制:单条消息 8 KB、单 Session 24 KB、总计 48 KB;超限保留开头和结尾。
20
- - 选择后仅插入引用标记;真正读取和注入发生在提交 prompt 时。
21
-
22
- 项目扩展可通过 `/reload` 热重载。
23
-
24
- ## 验证
25
-
26
- ```bash
27
- node --test .pi/extensions/session-reference/core.test.ts
28
- ```