pi-sdk-web 0.3.6 → 0.3.8
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/dist/server.js +9 -4
- package/dist/static/app.js +11 -2
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -693,16 +693,21 @@ export class PiWebServer {
|
|
|
693
693
|
unsubscribe();
|
|
694
694
|
}
|
|
695
695
|
// Show command output as a modal (TUI-like). The session entry remains
|
|
696
|
-
// for history; the modal is the transient presentation.
|
|
696
|
+
// for history; the modal is the transient presentation. Only entries
|
|
697
|
+
// carrying a text payload are shown as modals — entries without
|
|
698
|
+
// data.text are status traces (e.g. minimode-status) and stay
|
|
699
|
+
// file/event-stream only, matching TUI, which renders nothing for them.
|
|
697
700
|
for (const entry of captured) {
|
|
698
701
|
const data = entry.data;
|
|
699
|
-
|
|
702
|
+
if (!data || typeof data.text !== "string" || data.text.trim().length === 0) {
|
|
703
|
+
continue;
|
|
704
|
+
}
|
|
700
705
|
this.broadcast({
|
|
701
706
|
type: "extension_ui_request",
|
|
702
707
|
id: crypto.randomUUID(),
|
|
703
708
|
method: "notify",
|
|
704
|
-
title: data
|
|
705
|
-
message,
|
|
709
|
+
title: data.title ?? `/${name}`,
|
|
710
|
+
message: data.text,
|
|
706
711
|
notifyType: "info",
|
|
707
712
|
});
|
|
708
713
|
}
|
package/dist/static/app.js
CHANGED
|
@@ -554,6 +554,12 @@ class PiWebClient {
|
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
renderCustom(entry) {
|
|
557
|
+
// Status traces (appendEntry entries without data.text, e.g.
|
|
558
|
+
// minimode-status {mode, tools}) are file/event-stream only — TUI
|
|
559
|
+
// renders nothing for them, so neither do we.
|
|
560
|
+
if (entry.type === 'custom' && !(entry.data && typeof entry.data.text === 'string' && entry.data.text.trim().length > 0)) {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
557
563
|
const customType = entry.customType || 'custom';
|
|
558
564
|
const label = `[${customType}]`;
|
|
559
565
|
const content = this.customEntryText(entry);
|
|
@@ -1767,7 +1773,10 @@ class PiWebClient {
|
|
|
1767
1773
|
];
|
|
1768
1774
|
const filtered = commands
|
|
1769
1775
|
.filter((c) => {
|
|
1770
|
-
|
|
1776
|
+
// Match against the raw command name (with skill:/prompt prefixes, e.g.
|
|
1777
|
+
// "skill:meeting-discuss") so typing "/skill" surfaces every skill
|
|
1778
|
+
// command instead of only ones whose bare name contains "skill".
|
|
1779
|
+
const name = (c.name || '').toLowerCase();
|
|
1771
1780
|
const desc = (c.description || c.source || '').toLowerCase();
|
|
1772
1781
|
return name.includes(query) || desc.includes(query);
|
|
1773
1782
|
})
|
|
@@ -1775,7 +1784,7 @@ class PiWebClient {
|
|
|
1775
1784
|
// Exact-name match first, then name-prefix, then name-contains,
|
|
1776
1785
|
// then description-contains (avoids unrelated commands flooding the list)
|
|
1777
1786
|
const score = (c) => {
|
|
1778
|
-
const name = (c.name || '').
|
|
1787
|
+
const name = (c.name || '').toLowerCase();
|
|
1779
1788
|
if (name === query) return 0;
|
|
1780
1789
|
if (name.startsWith(query)) return 1;
|
|
1781
1790
|
if (name.includes(query)) return 2;
|