@henryqw/pi-herdr-rename 4.1.3 → 5.0.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/extensions/rename.ts +1 -18
- package/package.json +6 -3
package/extensions/rename.ts
CHANGED
|
@@ -153,26 +153,9 @@ async function generateTitle(text: string, ctx: ExtensionContext, signal: AbortS
|
|
|
153
153
|
messages: [{ role: "user" as const, content: text.slice(0, MAX_CONTEXT_CHARS), timestamp: Date.now() }],
|
|
154
154
|
};
|
|
155
155
|
const complete = async (route: ResolvedTaskRoute) => {
|
|
156
|
-
let auth;
|
|
157
|
-
try {
|
|
158
|
-
auth = await ctx.modelRegistry.getApiKeyAndHeaders(route.model);
|
|
159
|
-
} catch (error) {
|
|
160
|
-
if (signal.aborted) throw error;
|
|
161
|
-
throw new RenameModelError("Couldn't authenticate rename task model.");
|
|
162
|
-
}
|
|
163
|
-
if (!auth.ok) throw new RenameModelError("Couldn't authenticate rename task model.");
|
|
164
|
-
|
|
165
|
-
const provider = ctx.modelRegistry.getProvider(route.model.provider);
|
|
166
|
-
if (!provider) throw new RenameModelError("Rename task model provider is unavailable.");
|
|
167
|
-
const model = auth.baseUrl ? { ...route.model, baseUrl: auth.baseUrl } : route.model;
|
|
168
|
-
|
|
169
156
|
let response;
|
|
170
157
|
try {
|
|
171
|
-
|
|
172
|
-
response = await provider.streamSimple(model, completionContext, {
|
|
173
|
-
apiKey: auth.apiKey,
|
|
174
|
-
headers: auth.headers,
|
|
175
|
-
env: auth.env,
|
|
158
|
+
response = await ctx.modelRegistry.streamSimple(route.model, completionContext, {
|
|
176
159
|
signal,
|
|
177
160
|
maxRetries: 0,
|
|
178
161
|
...(route.thinkingLevel === "off" ? {} : { reasoning: route.thinkingLevel }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-herdr-rename",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Generate short Pi display titles and rename the current Herdr location.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"pack:check": "npm pack --dry-run"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@earendil-works/pi-coding-agent": "
|
|
28
|
+
"@earendil-works/pi-coding-agent": ">=0.86.0 <0.88.0"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@henryqw/pi-herdr": "^0.4.1",
|
|
48
|
-
"@henryqw/pi-task-models": "^
|
|
48
|
+
"@henryqw/pi-task-models": "^7.0.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@earendil-works/pi-coding-agent": "0.87.0"
|
|
49
52
|
}
|
|
50
53
|
}
|