From 206bd0857282729b09220232a2b8b97d40c71e25 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 7 May 2026 18:53:29 +0200 Subject: [PATCH] fix(release): restore linux binary build --- package-lock.json | 57 +++++++++++++++++++++++++++++ packages/web-ui/example/src/main.ts | 14 +++---- 2 files changed, 64 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 452934d18..28fdc3b00 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1720,6 +1720,27 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz", + "integrity": "sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/@parcel/watcher/node_modules/picomatch": { "version": "4.0.4", "dev": true, @@ -2418,6 +2439,22 @@ "node": ">= 20" } }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.2.4.tgz", + "integrity": "sha512-7Mx25E4WTfnht0TVRTyC00j3i0M+EeFe7wguMDTlX4mRxafznw0CA8WJkFjWYH5BlgELd1kSjuU2JiPnNZbJDA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, "node_modules/@tailwindcss/vite": { "version": "4.2.4", "license": "MIT", @@ -4173,6 +4210,26 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/lit": { "version": "3.3.2", "license": "BSD-3-Clause", diff --git a/packages/web-ui/example/src/main.ts b/packages/web-ui/example/src/main.ts index 5eb59cf0f..3efcd73c4 100644 --- a/packages/web-ui/example/src/main.ts +++ b/packages/web-ui/example/src/main.ts @@ -1,6 +1,6 @@ import "@mariozechner/mini-lit/dist/ThemeToggle.js"; import { Agent, type AgentMessage } from "@earendil-works/pi-agent-core"; -import { getModel } from "@earendil-works/pi-ai"; +import { getModel, type TextContent } from "@earendil-works/pi-ai"; import { type AgentState, ApiKeyPromptDialog, @@ -70,8 +70,8 @@ let chatPanel: ChatPanel; let agentUnsubscribe: (() => void) | undefined; const generateTitle = (messages: AgentMessage[]): string => { - const firstUserMsg = messages.find((m) => m.role === "user" || m.role === "user-with-attachments"); - if (!firstUserMsg || (firstUserMsg.role !== "user" && firstUserMsg.role !== "user-with-attachments")) return ""; + const firstUserMsg = messages.find((m) => m.role === "user"); + if (!firstUserMsg) return ""; let text = ""; const content = firstUserMsg.content; @@ -79,8 +79,8 @@ const generateTitle = (messages: AgentMessage[]): string => { if (typeof content === "string") { text = content; } else { - const textBlocks = content.filter((c: any) => c.type === "text"); - text = textBlocks.map((c: any) => c.text || "").join(" "); + const textBlocks = content.filter((c): c is TextContent => c.type === "text"); + text = textBlocks.map((c) => c.text || "").join(" "); } text = text.trim(); @@ -94,8 +94,8 @@ const generateTitle = (messages: AgentMessage[]): string => { }; const shouldSaveSession = (messages: AgentMessage[]): boolean => { - const hasUserMsg = messages.some((m: any) => m.role === "user" || m.role === "user-with-attachments"); - const hasAssistantMsg = messages.some((m: any) => m.role === "assistant"); + const hasUserMsg = messages.some((m) => m.role === "user"); + const hasAssistantMsg = messages.some((m) => m.role === "assistant"); return hasUserMsg && hasAssistantMsg; };