@henryqw/pi-add-dir 2.1.2 → 2.1.4
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 +4 -4
- package/extensions/add-dir-config.ts +0 -1
- package/extensions/add-dir.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Added directories give Pi these resources:
|
|
|
32
32
|
- Skills that Pi loads from `.pi/skills`, `.agents/skills`, and `.claude/skills`.
|
|
33
33
|
- Files in the editor's `@` autocomplete, with absolute paths.
|
|
34
34
|
|
|
35
|
-
`/dir-add` reloads when
|
|
35
|
+
`/dir-add` reloads only when the discovered external skill paths change, not merely because the directory contains skills. `add_directory` stays session-local; when its result asks for `/reload`, run it to update external skills.
|
|
36
36
|
|
|
37
37
|
## Config
|
|
38
38
|
|
|
@@ -46,12 +46,12 @@ A missing file uses the default. Invalid config stops loading and is not overwri
|
|
|
46
46
|
|
|
47
47
|
## State and storage
|
|
48
48
|
|
|
49
|
-
Session directories live in the current session branch. Project directories use the repository's repeatable local Git config key `pi-add-dir.directory`. Local Git config is shared by linked worktrees, cannot be injected by cloning a repository, and remains machine-local. `/dir-add --project` therefore requires a Git repository.
|
|
49
|
+
Session directories live in the current session branch. New session additions reject directories inside or containing the current working directory, or overlapping another active added directory. Restored session entries are not rechecked for overlap when the working directory changes. Project directories use the repository's repeatable local Git config key `pi-add-dir.directory`. Local Git config is shared by linked worktrees, cannot be injected by cloning a repository, and remains machine-local. `/dir-add --project` therefore requires a Git repository.
|
|
50
50
|
|
|
51
51
|
Persistent scopes are explicit because added directories can inject `AGENTS.md`, `CLAUDE.md`, and skills.
|
|
52
52
|
|
|
53
53
|
## Limits and recovery
|
|
54
54
|
|
|
55
|
-
Search supports basename and relative-path globs. It skips `.git` and `node_modules
|
|
55
|
+
Search supports basename and relative-path globs. It skips `.git` and `node_modules` and does not follow symbolic links. It uses Node filesystem traversal and returns at most 1,000 results per call.
|
|
56
56
|
|
|
57
|
-
Missing
|
|
57
|
+
Missing or overlapping **project and global** directories remain configured but are skipped with a warning. Restore a missing directory at its original path or resolve the overlap, then run `/dir-reload` to rescan. To change or discard a configured path, use `/dir-ls` to **remove** it from its scope, then `/dir-add` with the corrected path if needed; `/dir-ls` cannot repair paths in place.
|
package/extensions/add-dir.ts
CHANGED
|
@@ -107,7 +107,7 @@ function parseAddArgs(args: string | undefined): ParsedAddArgs {
|
|
|
107
107
|
function validateStoredPaths(paths: string[], source: DirSource): void {
|
|
108
108
|
if (
|
|
109
109
|
paths.some(
|
|
110
|
-
(path) => typeof path !== "string" || !isAbsolute(path) ||
|
|
110
|
+
(path) => typeof path !== "string" || !isAbsolute(path) || /\p{C}/u.test(path),
|
|
111
111
|
)
|
|
112
112
|
) {
|
|
113
113
|
throw new Error(`Invalid ${source} pi-add-dir configuration: expected absolute paths.`);
|
|
@@ -642,8 +642,8 @@ export default function addDirExtension(pi: ExtensionAPI, options: ExtensionOpti
|
|
|
642
642
|
}
|
|
643
643
|
if (context.skills.size > 0) {
|
|
644
644
|
response.push(`\nDiscovered skills: ${[...context.skills].join(", ")}`);
|
|
645
|
-
response.push("Run /reload to register skills as /skill:name commands.");
|
|
646
645
|
}
|
|
646
|
+
if (result.resourcesChanged) response.push("Run /reload to update external skills.");
|
|
647
647
|
response.push(`\nYou can now access files at: ${absolutePath}`);
|
|
648
648
|
|
|
649
649
|
return {
|