@zigai/pi-mention-project 0.2.0 → 0.2.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/README.md +11 -45
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@zigai/pi-mention-project)
|
|
5
5
|
[](../../LICENSE)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Type `#` to fuzzy-search your project folder. The completion inserts `#project-name`; the model receives the project's absolute path.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -12,65 +12,31 @@ This Pi extension adds fuzzy project directory mentions that default to `#`.
|
|
|
12
12
|
pi install npm:@zigai/pi-mention-project
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Config
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
- Searches only the direct child folders inside configured project roots.
|
|
19
|
-
- Defaults to Git repository folders and ignores dot-prefixed folders.
|
|
20
|
-
- Expands project mentions before the model sees the prompt so the model gets each project's absolute path.
|
|
21
|
-
|
|
22
|
-
## Usage
|
|
23
|
-
|
|
24
|
-
Configure one or more project roots, then type `#` in the prompt editor and start typing a folder name.
|
|
25
|
-
|
|
26
|
-
If `~/Projects` contains `pi-tweaks`, selecting `#pi-tweaks` adds that project mention. Before the model sees the prompt, the extension prepends project metadata with the absolute project path and removes the `#` sigil from the visible sentence.
|
|
27
|
-
|
|
28
|
-
## Configuration
|
|
29
|
-
|
|
30
|
-
Configuration lives in Pi settings: globally in `~/.pi/agent/settings.json`, or per trusted project in `.pi/settings.json`.
|
|
31
|
-
|
|
32
|
-
Project roots default to an empty list. Set `mentionProjectRoots` to the directories whose direct child folders should be mentionable:
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
{
|
|
36
|
-
"mentionProjectRoots": ["~/Projects", "~/Work"]
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Only immediate child directories are listed. For example, `~/Projects/app` is mentionable, but `~/Projects/app/packages/api` is not.
|
|
41
|
-
|
|
42
|
-
By default, a child folder is listed only when it has a `.git` directory or worktree `.git` file, and folders whose names start with `.` are hidden. To include non-Git folders, set `mentionProjectGitReposOnly` to `false`:
|
|
17
|
+
Add roots in `~/.pi/agent/settings.json` or `.pi/settings.json`:
|
|
43
18
|
|
|
44
19
|
```json
|
|
45
20
|
{
|
|
46
|
-
"
|
|
21
|
+
"mentionProjectRoots": ["~/Projects"]
|
|
47
22
|
}
|
|
48
23
|
```
|
|
49
24
|
|
|
50
|
-
|
|
25
|
+
By default it lists only direct child folders that:
|
|
51
26
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"mentionProjectIncludeDotFolders": true
|
|
55
|
-
}
|
|
56
|
-
```
|
|
27
|
+
- are Git repos (`.git` directory or worktree file)
|
|
28
|
+
- do not start with `.`
|
|
57
29
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
pi --mention-project-include-non-git --mention-project-include-dot-folders
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
The mention character defaults to `#`. To change it, set `mentionProjectTrigger` to a single non-whitespace character:
|
|
30
|
+
Optional settings:
|
|
65
31
|
|
|
66
32
|
```json
|
|
67
33
|
{
|
|
68
|
-
"mentionProjectTrigger": "
|
|
34
|
+
"mentionProjectTrigger": "#",
|
|
35
|
+
"mentionProjectGitReposOnly": true,
|
|
36
|
+
"mentionProjectIncludeDotFolders": false
|
|
69
37
|
}
|
|
70
38
|
```
|
|
71
39
|
|
|
72
|
-
Folder names should be unique across configured roots. If the same folder name exists in multiple roots, the first configured root wins.
|
|
73
|
-
|
|
74
40
|
## License
|
|
75
41
|
|
|
76
42
|
MIT
|