@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 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 it finds skills. `add_directory` reports when a reload is needed and always remains session-local.
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`. It uses Node filesystem traversal and returns at most 1,000 results per call.
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 directories and directories that overlap the current workspace remain configured but are skipped with a warning. Fix or remove them through `/dir-ls`.
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.
@@ -19,7 +19,6 @@ function parseConfig(value: unknown): AddDirConfig {
19
19
  (directory) =>
20
20
  typeof directory !== "string" ||
21
21
  !isAbsolute(directory) ||
22
- directory.length === 0 ||
23
22
  /\p{C}/u.test(directory),
24
23
  )
25
24
  ) {
@@ -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) || path.length === 0 || /\p{C}/u.test(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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-add-dir",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "Add external directories to a Pi session with context, skills, and file search.",
5
5
  "keywords": [
6
6
  "pi-package",