@zhushanwen/pi-system-prompt 1.3.0 → 1.3.1
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/package.json +3 -3
- package/src/index.ts +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhushanwen/pi-system-prompt",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "System prompt injection extension for Pi — reads config and appends to system prompt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"index.ts"
|
|
25
25
|
],
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
27
|
+
"@earendil-works/pi-coding-agent": "^1.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^24.0.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"vitest": "^4.1.8"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@zhushanwen/pi-extension-logger": "0.6.
|
|
35
|
+
"@zhushanwen/pi-extension-logger": "0.6.2"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"typecheck": "npx tsc --noEmit",
|
package/src/index.ts
CHANGED
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
* 4. Reads the global instructions file `~/.agents/AGENTS.md` (candidates
|
|
14
14
|
* AGENTS.md / AGENTS.MD, exact case match) every turn and appends it
|
|
15
15
|
* under a labeled header. Modeled on pi's native `loadContextFileFromDir`
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* (pi 1.0.0 dist/core/resource-loader.js:115) but deliberately narrower:
|
|
17
|
+
* pi 1.0.0 also probes `AGENTS.override.md` (candidate list at
|
|
18
|
+
* resource-loader.js:116) and applies its candidate list to project dirs,
|
|
19
|
+
* whereas this list only targets the global agents directory and never
|
|
20
|
+
* picks up override files.
|
|
19
21
|
* Opt-in by file existence: no file → no injection. Skipped when
|
|
20
22
|
* pi was spawned with `--no-context-files` (consistent with pi's native
|
|
21
23
|
* context-file opt-out). `TAIJI_GLOBAL_AGENTS_DIR` overrides the global
|
|
@@ -66,7 +68,8 @@ function cachedReadFileSync(filePath: string): string | null {
|
|
|
66
68
|
|
|
67
69
|
/**
|
|
68
70
|
* Global instruction candidates. Modeled on pi's native loadContextFileFromDir
|
|
69
|
-
*
|
|
71
|
+
* (pi 1.0.0 dist/core/resource-loader.js:115, candidate list at :116)
|
|
72
|
+
* but deliberately not a strict mirror: pi 1.0.0 probes its own candidate
|
|
70
73
|
* list (including AGENTS.override.md) against project dirs, while these
|
|
71
74
|
* candidates apply only to the global agents directory, intentionally exclude
|
|
72
75
|
* AGENTS.override.md, and recognize only AGENTS.md case variants.
|