@xynogen/pix-welcome 0.1.6 → 0.1.7
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 +1 -1
- package/src/welcome.test.ts +2 -7
- package/src/welcome.ts +1 -7
package/package.json
CHANGED
package/src/welcome.test.ts
CHANGED
|
@@ -107,18 +107,13 @@ describe("summariseTools", () => {
|
|
|
107
107
|
expect(r.detail).toBe("2 loaded");
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
it("
|
|
110
|
+
it("counts total without source breakdown", () => {
|
|
111
111
|
const r = summariseTools([
|
|
112
112
|
{ sourceInfo: { source: "builtin" } },
|
|
113
113
|
{ sourceInfo: { source: "my-extension" } },
|
|
114
114
|
{ sourceInfo: { source: "sdk" } },
|
|
115
115
|
]);
|
|
116
|
-
expect(r.detail).toBe("3 loaded
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
it("treats missing sourceInfo as non-builtin", () => {
|
|
120
|
-
const r = summariseTools([{}, { sourceInfo: {} }]);
|
|
121
|
-
expect(r.detail).toBe("2 loaded (+2 ext)");
|
|
116
|
+
expect(r.detail).toBe("3 loaded");
|
|
122
117
|
});
|
|
123
118
|
});
|
|
124
119
|
|
package/src/welcome.ts
CHANGED
|
@@ -296,13 +296,7 @@ export function summariseTools(tools: ToolInfo[]): CheckResult {
|
|
|
296
296
|
if (total === 0) {
|
|
297
297
|
return { label: "Tools", status: "warn", detail: "none active" };
|
|
298
298
|
}
|
|
299
|
-
|
|
300
|
-
(t) => t.sourceInfo?.source === "builtin",
|
|
301
|
-
).length;
|
|
302
|
-
const extra = total - builtin;
|
|
303
|
-
const detail =
|
|
304
|
-
extra > 0 ? `${total} loaded (+${extra} ext)` : `${total} loaded`;
|
|
305
|
-
return { label: "Tools", status: "ok", detail };
|
|
299
|
+
return { label: "Tools", status: "ok", detail: `${total} loaded` };
|
|
306
300
|
}
|
|
307
301
|
|
|
308
302
|
function checkTools(pi: { getActiveTools?: () => ToolInfo[] }): CheckResult {
|