@pi-unipi/fusion 2.20.1 → 2.20.3
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/package.json +3 -3
- package/src/index.ts +10 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/fusion",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.3",
|
|
4
4
|
"description": "Devin-style model picker, fusion presets (lead + sidekick), and Local Fusion runtime for UniPi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@pi-unipi/core": "2.20.
|
|
36
|
-
"@pi-unipi/subagents": "2.20.
|
|
35
|
+
"@pi-unipi/core": "2.20.3",
|
|
36
|
+
"@pi-unipi/subagents": "2.20.3"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@earendil-works/pi-ai": "^0.84.0",
|
package/src/index.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
17
17
|
import type { Api, Model } from "@earendil-works/pi-ai";
|
|
18
18
|
import type { AutocompleteProvider, AutocompleteSuggestions } from "@earendil-works/pi-tui";
|
|
19
|
-
import { createSpinnerLine, setSharedFusionStatus, UNIPI_PREFIX } from "@pi-unipi/core";
|
|
19
|
+
import { createSpinnerLine, setHerdrWorking, setSharedFusionStatus, UNIPI_PREFIX } from "@pi-unipi/core";
|
|
20
20
|
import { homedir } from "node:os";
|
|
21
21
|
import { join } from "node:path";
|
|
22
22
|
import {
|
|
@@ -85,6 +85,8 @@ export interface SidekickWakeLine {
|
|
|
85
85
|
export function createSidekickWakeLine(deps: {
|
|
86
86
|
isBusy: () => boolean;
|
|
87
87
|
progress: () => { toolCalls: number; startedAt: number } | undefined;
|
|
88
|
+
/** Claim hook: called with a label when the line goes up, null when it comes down. */
|
|
89
|
+
onHeld?: (label: string | null) => void;
|
|
88
90
|
}): SidekickWakeLine {
|
|
89
91
|
let installed = false;
|
|
90
92
|
|
|
@@ -102,14 +104,17 @@ export function createSidekickWakeLine(deps: {
|
|
|
102
104
|
{ placement: "aboveEditor" },
|
|
103
105
|
);
|
|
104
106
|
installed = true;
|
|
107
|
+
deps.onHeld?.("sidekick working — resumes automatically");
|
|
105
108
|
} else if (!want && installed) {
|
|
106
109
|
ctx.ui.setWidget(SIDEKICK_WAKE_WIDGET_KEY, undefined);
|
|
107
110
|
installed = false;
|
|
111
|
+
deps.onHeld?.(null);
|
|
108
112
|
}
|
|
109
113
|
},
|
|
110
114
|
clear(ctx) {
|
|
111
115
|
if (!installed) return;
|
|
112
116
|
installed = false;
|
|
117
|
+
deps.onHeld?.(null);
|
|
113
118
|
if (!removable(ctx)) return;
|
|
114
119
|
ctx.ui.setWidget(SIDEKICK_WAKE_WIDGET_KEY, undefined);
|
|
115
120
|
},
|
|
@@ -190,6 +195,10 @@ export default function fusionExtension(pi: ExtensionAPI): void {
|
|
|
190
195
|
const wakeLine = createSidekickWakeLine({
|
|
191
196
|
isBusy: () => runtime?.isBusy() === true,
|
|
192
197
|
progress: () => runtime?.progress(),
|
|
198
|
+
// While the wake line is up the pane must read `working` in herdr (the
|
|
199
|
+
// sidekick will re-invoke the lead), not `idle` — same claim the bg-tasks
|
|
200
|
+
// wake line makes.
|
|
201
|
+
onHeld: (label) => setHerdrWorking(pi, "fusion-sidekick", label),
|
|
193
202
|
});
|
|
194
203
|
|
|
195
204
|
function identity(ctx: ExtensionContext): FusionIdentity {
|