@ryukin-dev/pi-featherless-kali 1.1.3 → 1.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/CHANGELOG.md +4 -0
- package/extensions/featherless.ts +41 -16
- package/package.json +1 -1
- package/src/models.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.4
|
|
4
|
+
|
|
5
|
+
- Das Paket wählt nach dem Speichern des Featherless-API-Keys automatisch ein Standardmodell aus, sodass kein `/model` mehr nötig ist.
|
|
6
|
+
|
|
3
7
|
## 1.1.3
|
|
4
8
|
|
|
5
9
|
- Extension wird jetzt über `pi install npm:@ryukin-dev/pi-featherless-kali` als Pi-Paket geladen.
|
|
@@ -1,16 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
|
|
2
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import { registerProvider } from "../src/handlers/provider";
|
|
4
|
+
import { registerConcurrencyTracking } from "../src/handlers/concurrency";
|
|
5
|
+
import { registerContextTracking } from "../src/handlers/context";
|
|
6
|
+
import { registerCompaction } from "../src/handlers/compaction";
|
|
7
|
+
import { registerUpdateCheck } from "../src/handlers/update-check";
|
|
8
|
+
import { PROVIDER } from "../src/handlers/shared";
|
|
9
|
+
import { DEFAULT_MODEL_ID } from "../src/models";
|
|
10
|
+
|
|
11
|
+
async function patchDefaultModel() {
|
|
12
|
+
let baseUrl: string;
|
|
13
|
+
try {
|
|
14
|
+
baseUrl = import.meta.resolve("@earendil-works/pi-coding-agent");
|
|
15
|
+
} catch {
|
|
16
|
+
baseUrl = new URL(
|
|
17
|
+
"../node_modules/@earendil-works/pi-coding-agent/dist/index.js",
|
|
18
|
+
import.meta.url,
|
|
19
|
+
).href;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const resolverUrl = new URL("./core/model-resolver.js", baseUrl).href;
|
|
23
|
+
try {
|
|
24
|
+
const mod = (await import(resolverUrl)) as {
|
|
25
|
+
defaultModelPerProvider?: Record<string, string>;
|
|
26
|
+
};
|
|
27
|
+
if (mod.defaultModelPerProvider) {
|
|
28
|
+
mod.defaultModelPerProvider[PROVIDER] = DEFAULT_MODEL_ID;
|
|
29
|
+
}
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default async function (pi: ExtensionAPI) {
|
|
35
|
+
await patchDefaultModel();
|
|
36
|
+
registerProvider(pi);
|
|
37
|
+
registerConcurrencyTracking(pi);
|
|
38
|
+
registerContextTracking(pi);
|
|
39
|
+
registerCompaction(pi);
|
|
40
|
+
registerUpdateCheck(pi);
|
|
41
|
+
}
|
package/package.json
CHANGED