decorated-pi 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 +42 -151
- package/extensions/extend-model.ts +1 -6
- package/extensions/lsp/client.ts +12 -1
- package/extensions/lsp/env.ts +6 -0
- package/extensions/lsp/format.ts +6 -0
- package/extensions/lsp/index.ts +6 -0
- package/extensions/lsp/prompt.ts +6 -0
- package/extensions/lsp/server-manager.ts +6 -0
- package/extensions/lsp/servers.ts +9 -1
- package/extensions/lsp/tools.ts +8 -0
- package/extensions/lsp/trust.ts +6 -0
- package/extensions/safety.ts +609 -104
- package/extensions/smart-at.ts +10 -3
- package/package.json +10 -7
package/extensions/smart-at.ts
CHANGED
|
@@ -200,9 +200,13 @@ export function setupSmartAt(pi: ExtensionAPI) {
|
|
|
200
200
|
|
|
201
201
|
const { dirs, files } = getFileAndDirList(cwd);
|
|
202
202
|
const results = smartSearch(dirs, files, prefix.slice(1));
|
|
203
|
-
ctx.ui.setWidget("smart-at", ["[2mpowered by decorated-pi[0m"]);
|
|
204
203
|
|
|
205
|
-
if (!results.length)
|
|
204
|
+
if (!results.length) {
|
|
205
|
+
ctx.ui.setWidget("smart-at", undefined);
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
ctx.ui.setWidget("smart-at", ["[2mpowered by decorated-pi[0m"]);
|
|
206
210
|
return Promise.resolve({
|
|
207
211
|
items: results.map((f: string) => ({
|
|
208
212
|
value: "@" + f,
|
|
@@ -213,7 +217,10 @@ export function setupSmartAt(pi: ExtensionAPI) {
|
|
|
213
217
|
});
|
|
214
218
|
},
|
|
215
219
|
// ⚠️ 必须 .bind(orig)
|
|
216
|
-
applyCompletion:
|
|
220
|
+
applyCompletion: (...args: any[]) => {
|
|
221
|
+
ctx.ui.setWidget("smart-at", undefined);
|
|
222
|
+
return orig.applyCompletion.apply(orig, args);
|
|
223
|
+
},
|
|
217
224
|
shouldTriggerFileCompletion: orig.shouldTriggerFileCompletion?.bind(orig),
|
|
218
225
|
}));
|
|
219
226
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "decorated-pi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Essential utilities for pi: safety gates, secret redaction, smart @ completion, dynamic AGENTS loading, image fallback, and LSP tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi",
|
|
@@ -11,20 +11,17 @@
|
|
|
11
11
|
"lsp",
|
|
12
12
|
"language-server",
|
|
13
13
|
"autocomplete",
|
|
14
|
-
"
|
|
14
|
+
"entropy",
|
|
15
|
+
"secret-detection"
|
|
15
16
|
],
|
|
16
17
|
"license": "MIT",
|
|
17
18
|
"repository": {
|
|
18
19
|
"type": "git",
|
|
19
|
-
"url": "https://github.com/lcwecker/decorated-pi.git"
|
|
20
|
+
"url": "git+https://github.com/lcwecker/decorated-pi.git"
|
|
20
21
|
},
|
|
21
22
|
"homepage": "https://github.com/lcwecker/decorated-pi#readme",
|
|
22
23
|
"bugs": "https://github.com/lcwecker/decorated-pi/issues",
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@secretlint/node": "^13.0.0",
|
|
25
|
-
"@secretlint/secretlint-rule-azure": "^13.0.0",
|
|
26
|
-
"@secretlint/secretlint-rule-preset-recommend": "^13.0.0",
|
|
27
|
-
"@secretlint/secretlint-rule-secp256k1-privatekey": "^13.0.0",
|
|
28
25
|
"@spences10/pi-child-env": "0.1.4",
|
|
29
26
|
"@spences10/pi-project-trust": "0.0.6",
|
|
30
27
|
"openai": "^6.37.0"
|
|
@@ -39,5 +36,11 @@
|
|
|
39
36
|
"extensions": [
|
|
40
37
|
"./extensions/index.ts"
|
|
41
38
|
]
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"vitest": "^4.1.6"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"test": "vitest run"
|
|
42
45
|
}
|
|
43
46
|
}
|