@danypops/pi-papyrus 0.53.2 → 0.54.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.
|
@@ -29,8 +29,12 @@ export function filterArtifactRows(rows: Artifact[], query: string): Artifact[]
|
|
|
29
29
|
const needle = query.trim().toLowerCase();
|
|
30
30
|
if (!needle) return [...rows];
|
|
31
31
|
return rows.filter((row) =>
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
// List operations commonly hand back ArtifactSummary rows (body/extra omitted for cheap
|
|
33
|
+
// listing) rather than the full Artifact this type declares -- body/subtype/extra can be
|
|
34
|
+
// undefined at runtime here despite the type saying string, so every value is normalized
|
|
35
|
+
// to "" before lowercasing instead of assuming it's always a real string.
|
|
36
|
+
[row.id, row.title, row.body, row.subtype, row.labels.join(" "), row.extra ? JSON.stringify(row.extra) : undefined].some((value) =>
|
|
37
|
+
(value ?? "").toLowerCase().includes(needle),
|
|
34
38
|
),
|
|
35
39
|
);
|
|
36
40
|
}
|
package/extension/src/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
NOTE_LIST_MAX_LIMIT,
|
|
16
16
|
NOTE_WIDGET_POLL_INTERVAL_MS,
|
|
17
17
|
PAPYRUS_CONTEXT_INJECTION_CHANNEL,
|
|
18
|
+
PAPYRUS_VEHICLE_NAME,
|
|
18
19
|
TASK_DRIVER_MAX_TURNS,
|
|
19
20
|
TASK_DRIVER_MAX_UNCHANGED_TURNS,
|
|
20
21
|
TASK_WIDGET_POLL_INTERVAL_MS,
|
|
@@ -22,6 +23,7 @@ import {
|
|
|
22
23
|
type TaskStatus,
|
|
23
24
|
} from "@danypops/papyrus";
|
|
24
25
|
import type { PushChannelClient } from "@danypops/vehicle-client/daemon-client";
|
|
26
|
+
import { vehicleWidgetTitle } from "@danypops/vehicle-client-pi/widget-header";
|
|
25
27
|
import type { ExtensionAPI, ExtensionContext, ExtensionUIContext, Theme } from "@earendil-works/pi-coding-agent";
|
|
26
28
|
import { truncateToWidth } from "@earendil-works/pi-tui";
|
|
27
29
|
import { Type } from "typebox";
|
|
@@ -96,7 +98,8 @@ const WIDGET_KEY = "pi-papyrus";
|
|
|
96
98
|
|
|
97
99
|
export function renderTaskWidgetLines(theme: Theme, projection: TaskWidgetProjection, width: number): string[] {
|
|
98
100
|
if (projection.openTotal === 0) return [];
|
|
99
|
-
const
|
|
101
|
+
const header = truncateToWidth(theme.fg("muted", vehicleWidgetTitle(PAPYRUS_VEHICLE_NAME, "Tasks", projection.scopeLabel)), width, "…");
|
|
102
|
+
const lines: string[] = [header];
|
|
100
103
|
for (let index = 0; index < projection.rows.length; index++) {
|
|
101
104
|
const row = projection.rows[index]!;
|
|
102
105
|
const laterSibling = projection.rows.slice(index + 1).some((candidate) => candidate.depth === row.depth);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { PAPYRUS_VEHICLE_NAME } from "@danypops/papyrus";
|
|
2
|
+
import { vehicleWidgetTitle } from "@danypops/vehicle-client-pi/widget-header";
|
|
1
3
|
import type { Theme } from "@earendil-works/pi-coding-agent";
|
|
2
4
|
import { truncateToWidth } from "@earendil-works/pi-tui";
|
|
3
5
|
|
|
4
6
|
/** Hidden at 0, matching TaskOverlay's own "nothing open" hiding rule. */
|
|
5
7
|
export function renderNoteWidgetLines(theme: Theme, openCount: number, width: number): string[] {
|
|
6
8
|
if (openCount === 0) return [];
|
|
7
|
-
|
|
9
|
+
const header = theme.fg("muted", vehicleWidgetTitle(PAPYRUS_VEHICLE_NAME, "Notes"));
|
|
10
|
+
return [truncateToWidth(`${header} ${theme.fg("accent", String(openCount))}`, width, "…")];
|
|
8
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danypops/pi-papyrus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.1",
|
|
4
4
|
"description": "Pi host extension for Papyrus: native tools, TUI panels, and context injection over the daemon-backed graph store",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": ["pi-package"],
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@danypops/jittor": "^0.14.0",
|
|
21
|
-
"@danypops/papyrus": "^0.
|
|
21
|
+
"@danypops/papyrus": "^0.54.2",
|
|
22
22
|
"@danypops/vehicle-client": "^0.7.0",
|
|
23
|
-
"@danypops/vehicle-client-pi": "^0.
|
|
23
|
+
"@danypops/vehicle-client-pi": "^0.34.0",
|
|
24
24
|
"@danypops/vehicle-core": "^0.12.3",
|
|
25
25
|
"@danypops/vehicle-server": "^0.18.1",
|
|
26
26
|
"beautiful-mermaid": "1.1.3",
|