@henryqw/pi-herdr-rename 2.1.11 → 3.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/README.md +2 -2
- package/extensions/rename.ts +10 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -41,9 +41,9 @@ A semantic branch is a Git-safe branch name made from a task type and the displa
|
|
|
41
41
|
|
|
42
42
|
### Model choice and resume
|
|
43
43
|
|
|
44
|
-
The shared [`pi-task-models` config](../pi-task-models#config) is at `~/.pi/agent/config/pi-task-models.json`. It can explicitly override the local `pi-herdr-rename/rename` declaration, which defaults to `fast`.
|
|
44
|
+
The shared [`pi-task-models` config](../pi-task-models#config) is at `~/.pi/agent/config/pi-task-models/config.json`. It can explicitly override the local `pi-herdr-rename/rename` declaration, which defaults to `fast`.
|
|
45
45
|
|
|
46
|
-
The extension tries the assigned profile primary, then fallback, while honoring the configured thinking level. It never substitutes the current session model. No viable route leaves titles unchanged.
|
|
46
|
+
The extension tries the assigned profile primary, then fallback, while honoring the configured thinking level. It never substitutes the current session model. A missing shared task-model config warns once at session start; run `/task-models` to configure rename routing. No viable route leaves titles unchanged.
|
|
47
47
|
|
|
48
48
|
Resuming a session created by this version reapplies the saved display title and semantic branch without another model request. Herdr and Git synchronization failures appear as warnings. Cancellation by a newer rename remains silent.
|
|
49
49
|
|
package/extensions/rename.ts
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "@earendil-works/pi-coding-agent";
|
|
6
6
|
import { createHerdrClient, withWorktreeLock } from "@henryqw/pi-herdr";
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
loadTaskModelsConfig,
|
|
9
9
|
registerModelTask,
|
|
10
10
|
resolveConfiguredTaskRoutes,
|
|
11
11
|
type ModelTask,
|
|
@@ -236,7 +236,7 @@ export default function herdrRenameExtension(pi: ExtensionAPI): void {
|
|
|
236
236
|
controller: AbortController,
|
|
237
237
|
): Promise<void> => {
|
|
238
238
|
const paneId = process.env.HERDR_PANE_ID;
|
|
239
|
-
if (!paneId) return;
|
|
239
|
+
if (process.env.HERDR_ENV !== "1" || !paneId) return;
|
|
240
240
|
|
|
241
241
|
if (!isCurrent(request, controller)) return;
|
|
242
242
|
await herdr.run(["pane", "rename", paneId, displayTitle], { signal: controller.signal });
|
|
@@ -349,10 +349,14 @@ export default function herdrRenameExtension(pi: ExtensionAPI): void {
|
|
|
349
349
|
automaticPending = false;
|
|
350
350
|
latestUserText = latestSessionUserText(ctx);
|
|
351
351
|
try {
|
|
352
|
-
const taskModels =
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
const taskModels = loadTaskModelsConfig();
|
|
353
|
+
if (taskModels.source === "missing") {
|
|
354
|
+
ctx.ui.notify("Task model config is missing; run /task-models to configure rename routing.", "warning");
|
|
355
|
+
} else {
|
|
356
|
+
const profileName = taskModels.value.tasks[RENAME_TASK.id] ?? RENAME_TASK.defaultProfile;
|
|
357
|
+
if (!taskModels.value.profiles[profileName]) {
|
|
358
|
+
ctx.ui.notify(`Configure rename task profile ${profileName} with /task-models.`, "warning");
|
|
359
|
+
}
|
|
356
360
|
}
|
|
357
361
|
} catch {
|
|
358
362
|
ctx.ui.notify("Couldn't read task model config. Run /task-models.", "warning");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-herdr-rename",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Generate short Pi display titles and rename the current Herdr location.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@henryqw/pi-herdr": "^0.3.0",
|
|
48
|
-
"@henryqw/pi-task-models": "^
|
|
48
|
+
"@henryqw/pi-task-models": "^4.0.0"
|
|
49
49
|
}
|
|
50
50
|
}
|