@kliebhan/pi-prompt-autocomplete 0.1.0
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/CHANGELOG.md +28 -0
- package/LICENSE +21 -0
- package/README.md +103 -0
- package/core.ts +1038 -0
- package/index.ts +1412 -0
- package/media/prompt-autocomplete-demo.mp4 +0 -0
- package/package.json +52 -0
- package/system-prompt.template.md +18 -0
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kliebhan/pi-prompt-autocomplete",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Privacy-conscious inline AI prompt completion for the Pi coding agent",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "KLIEBHAN",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"pi-package",
|
|
10
|
+
"pi-coding-agent",
|
|
11
|
+
"prompt",
|
|
12
|
+
"autocomplete",
|
|
13
|
+
"ai",
|
|
14
|
+
"terminal"
|
|
15
|
+
],
|
|
16
|
+
"files": [
|
|
17
|
+
"index.ts",
|
|
18
|
+
"core.ts",
|
|
19
|
+
"system-prompt.template.md",
|
|
20
|
+
"README.md",
|
|
21
|
+
"CHANGELOG.md",
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"media/prompt-autocomplete-demo.mp4"
|
|
24
|
+
],
|
|
25
|
+
"pi": {
|
|
26
|
+
"extensions": [
|
|
27
|
+
"./index.ts"
|
|
28
|
+
],
|
|
29
|
+
"video": "https://github.com/KLIEBHAN/pi-extensions/releases/download/pi-prompt-autocomplete-v0.1.0/prompt-autocomplete-demo.mp4"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=22.19.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@earendil-works/pi-ai": "*",
|
|
36
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
37
|
+
"@earendil-works/pi-tui": "*"
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/KLIEBHAN/pi-extensions.git",
|
|
42
|
+
"directory": "extensions/prompt-autocomplete"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/KLIEBHAN/pi-extensions/tree/main/extensions/prompt-autocomplete#readme",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/KLIEBHAN/pi-extensions/issues"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public",
|
|
50
|
+
"provenance": true
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
You generate inline prompt suggestions for the prompt a user is about to send to a coding agent.
|
|
2
|
+
|
|
3
|
+
Return ONLY valid JSON with exactly this shape, using the top-level key `{{RESPONSE_KEY}}`:
|
|
4
|
+
{{RESPONSE_EXAMPLE}}
|
|
5
|
+
|
|
6
|
+
Rules:
|
|
7
|
+
- Return 0 to the requested number of ranked alternatives.
|
|
8
|
+
- Strongly use the latest assistant message as primary context.
|
|
9
|
+
- Make alternatives meaningfully distinct from one another; never return near-duplicates.
|
|
10
|
+
- Keep suggestions short, concrete, high-signal, and action-oriented.
|
|
11
|
+
- Prefer direct imperative phrasing over questions when natural.
|
|
12
|
+
- Match the language and specificity of the draft and conversation.
|
|
13
|
+
- Avoid filler, politeness, hedging, repetition, meta-commentary, and unnecessary setup.
|
|
14
|
+
- Do not explain anything.
|
|
15
|
+
- Do not wrap output in code fences.
|
|
16
|
+
- If there is no strong suggestion, return {{EMPTY_RESPONSE_EXAMPLE}}.
|
|
17
|
+
|
|
18
|
+
The task message states whether to continue the current draft or to propose a complete next prompt, and how many alternatives to return.
|