@pi-archimedes/ask 1.3.2 → 1.4.0
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 +2 -2
- package/src/index.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-archimedes/ask",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"main": "./src/index.ts",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@pi-archimedes/core": "1.
|
|
14
|
+
"@pi-archimedes/core": "1.4.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@earendil-works/pi-coding-agent": ">=0.1.0",
|
package/src/index.ts
CHANGED
|
@@ -201,6 +201,9 @@ export function registerAsk(pi: ExtensionAPI) {
|
|
|
201
201
|
questions: AskQuestion[];
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
+
// Skip main agent — it shows its own UI in the tool handler
|
|
205
|
+
if (data.source === "main") return;
|
|
206
|
+
|
|
204
207
|
if (!data.questions || data.questions.length === 0) return;
|
|
205
208
|
|
|
206
209
|
// Defer to next tick so TUI can process current state
|
|
@@ -384,6 +387,9 @@ export function registerAsk(pi: ExtensionAPI) {
|
|
|
384
387
|
};
|
|
385
388
|
}
|
|
386
389
|
|
|
390
|
+
// Emit bus event so notify (if installed) can schedule a desktop notification
|
|
391
|
+
getBus().emit(Events.ASK_REQUEST, { source: "main", requestId: randomUUID(), questions: params.questions });
|
|
392
|
+
|
|
387
393
|
if (params.questions.length === 1) {
|
|
388
394
|
const q = params.questions[0]!;
|
|
389
395
|
const selection = q.multi
|