Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
refactor(desktop): remove confirmed unused application code
vastsadec1e5584e9b
diff --git a/apps/desktop/electron/main/ipc/modes-ipc.ts b/apps/desktop/electron/main/ipc/modes-ipc.tsindex c2a35a050..6a68d58f9 100644--- a/apps/desktop/electron/main/ipc/modes-ipc.ts+++ b/apps/desktop/electron/main/ipc/modes-ipc.ts@@ -7,7 +7,6 @@import {IPC,isModeId,- type ModeBundleSettingsRequest,type ModeBundleWriteRequest,type ModeControlAction,type ModeControlRequest,diff --git a/apps/desktop/electron/main/ipc/provider-ipc.ts b/apps/desktop/electron/main/ipc/provider-ipc.tsindex 61d8f2460..4c490f43c 100644--- a/apps/desktop/electron/main/ipc/provider-ipc.ts+++ b/apps/desktop/electron/main/ipc/provider-ipc.ts@@ -94,7 +94,6 @@ export function registerProviderIpc({enrichProvider,listRuntimeProviders,enrichProviderList,- bindingForModel,onProviderInvalidated,}: ProviderIpcDependencies): void {let host: HostProcess | null = null;diff --git a/apps/desktop/electron/main/live-voice/audio-port.ts b/apps/desktop/electron/main/live-voice/audio-port.tsindex 917b808d6..03b556d1e 100644--- a/apps/desktop/electron/main/live-voice/audio-port.ts+++ b/apps/desktop/electron/main/live-voice/audio-port.ts@@ -1,4 +1,4 @@-import { MessageChannelMain, type MessagePortMain, type WebFrameMain } from "electron";+import { MessageChannelMain, type WebFrameMain } from "electron";import { randomUUID } from "node:crypto";import type { LivePlaybackCursor } from "@pi-desktop/shared";import { IPC } from "@pi-desktop/shared";diff --git a/apps/desktop/electron/main/live-voice/call-service-feedback.ts b/apps/desktop/electron/main/live-voice/call-service-feedback.tsindex 04005ead2..67b471be7 100644--- a/apps/desktop/electron/main/live-voice/call-service-feedback.ts+++ b/apps/desktop/electron/main/live-voice/call-service-feedback.ts@@ -1,5 +1,5 @@import type { LiveWorkFeedback, LiveWorkOperationView } from "@pi-desktop/shared";-import { LiveWorkFeedbackScheduler, type LiveWorkIntent, type LiveWorkPendingQuestion, type ScheduledLiveWorkFeedback } from "@pi-desktop/host-runtime";+import { type LiveWorkIntent, type LiveWorkPendingQuestion, type ScheduledLiveWorkFeedback } from "@pi-desktop/host-runtime";import type { LiveReceiptDelivery } from "./types";import { spokenQuestion } from "./spoken-answer";import type { LiveCallServiceDeps, Slot } from "./call-service-internals";diff --git a/apps/desktop/electron/main/live-voice/call-service-internals.ts b/apps/desktop/electron/main/live-voice/call-service-internals.tsindex 697d089eb..2538b515d 100644--- a/apps/desktop/electron/main/live-voice/call-service-internals.ts+++ b/apps/desktop/electron/main/live-voice/call-service-internals.ts@@ -2,13 +2,11 @@ import type {AppSettings,LiveBinding,LiveCallView,- LiveEndReason,LivePhase,LivePlaybackCursor,LivePrepareRequest,LiveWorkBinding,LiveWorkOperationView,- LiveWorkFeedback,LiveProviderReceipt,LiveVoiceSettings,LiveWorkCancelQueuedOperationResult,diff --git a/apps/desktop/electron/main/live-voice/call-service.ts b/apps/desktop/electron/main/live-voice/call-service.tsindex 9e0892f50..4a0fba930 100644--- a/apps/desktop/electron/main/live-voice/call-service.ts+++ b/apps/desktop/electron/main/live-voice/call-service.ts@@ -6,7 +6,6 @@ import {type LiveBindingReadiness,type LiveCallView,type LiveConnectRequest,- type LiveControlEvent,type LiveDelegationRequest,type LiveEndReason,type LiveEndRequest,@@ -20,11 +19,9 @@ import {type LiveWorkOperationView,type LiveWorkStopOperationResult,} from "@pi-desktop/shared";-import { LiveWorkFeedbackScheduler, liveWorkUnselectedSessionId, type LiveWorkIntent, type LiveWorkPendingQuestion } from "@pi-desktop/host-runtime";+import { liveWorkUnselectedSessionId, type LiveWorkIntent, type LiveWorkPendingQuestion } from "@pi-desktop/host-runtime";import { LIVE_WORK_TOOL_NAME, parseLiveWorkArguments, type LiveWireEvent } from "@pi-desktop/voice-runtime/live";-import { LiveAuthResolver } from "./auth-resolver";-import type { LivePcmBridge } from "./audio-port";-import type { LiveAdapter, LiveAdapterContext, LiveResolvedAuth } from "./types";+import type { LiveAdapterContext, LiveResolvedAuth } from "./types";import { createLiveWorkProfile } from "./work-profile";import {AUTH_TIMEOUT_MS,diff --git a/apps/desktop/electron/main/live-voice/gemini-adapter.ts b/apps/desktop/electron/main/live-voice/gemini-adapter.tsindex 6696503c3..91b1d1b55 100644--- a/apps/desktop/electron/main/live-voice/gemini-adapter.ts+++ b/apps/desktop/electron/main/live-voice/gemini-adapter.ts@@ -1,6 +1,6 @@import { randomUUID } from "node:crypto";import type { LiveBinding } from "@pi-desktop/shared";-import { geminiAudioEndMessage, geminiAudioMessage, geminiSetupMessage, geminiToolResponseMessage, geminiWorkFeedbackMessage, geminiWorkToolDeclaration, MAX_LIVE_AUDIO_BYTES, MAX_LIVE_JSON_BYTES, parseGeminiMessage, parseLiveWorkArguments, LIVE_WORK_TOOL_NAME } from "@pi-desktop/voice-runtime/live";+import { geminiAudioEndMessage, geminiAudioMessage, geminiSetupMessage, geminiToolResponseMessage, geminiWorkFeedbackMessage, MAX_LIVE_AUDIO_BYTES, MAX_LIVE_JSON_BYTES, parseGeminiMessage, parseLiveWorkArguments, LIVE_WORK_TOOL_NAME } from "@pi-desktop/voice-runtime/live";import type { LiveAdapter, LiveAdapterContext, LiveReceiptDelivery } from "./types";import type { LiveWorkFeedback } from "@pi-desktop/shared";import { openLiveWebSocket } from "./websocket-transport";diff --git a/apps/desktop/electron/main/live-voice/live-work-backend-port.ts b/apps/desktop/electron/main/live-voice/live-work-backend-port.tsindex 0d8944083..a720bd2d1 100644--- a/apps/desktop/electron/main/live-voice/live-work-backend-port.ts+++ b/apps/desktop/electron/main/live-voice/live-work-backend-port.ts@@ -10,7 +10,7 @@ import type { AgentHostBridge } from "../agent-host-bridge";import { DESKTOP_PRINCIPAL } from "../agent-host-bridge";import type { BackendRouter, RemoteBackend } from "../remote/backend-router";import type { RemoteHostsBoot } from "../bootstrap/remote-hosts";-import type { LiveWorkAdmission, LiveWorkPort, WorkSnapshot } from "@pi-desktop/host-runtime";+import type { LiveWorkPort, WorkSnapshot } from "@pi-desktop/host-runtime";import { localNativeProjectPaths } from "../services/session-search";export type LiveWorkSessionRecord = {@@ -141,12 +141,6 @@ function sessionStatus(status: AgentStatus, record: LiveWorkSessionRecord): Workexport function createLiveWorkBackendPort(input: LiveWorkBackendPortOptions): Pick<LiveWorkPort,"snapshot" | "observeTurnTarget" | "lookupAdmission" | "submit" | "steer" | "enqueue" | "stop" | "cancelQueued"> {- const requireHost = (): HostRpc => {- const host = input.getHost();- if (!host) throw workError("LIVE_WORK_NOT_READY", "Local Host is unavailable.");- return host;- };-return {async snapshot(sessionId) {const record = await input.requireSelectedSession(sessionId);@@ -358,31 +352,3 @@ export function createLiveWorkBackendPort(input: LiveWorkBackendPortOptions): Pi},};}--export function statusSnapshot(input: { sessionId: string; record: LiveWorkSessionRecord; status: AgentStatus; queue?: Array<{ id: string; position: number }> }): WorkSnapshot {- const state: WorkSnapshot["state"] = !input.status.isRunning- ? "idle"- : input.status.pendingToolConfirmations > 0 || input.record.status === "waiting_permission"- ? "waiting-permission"- : input.record.status === "waiting_input"- ? "waiting-input"- : "running";- return {- sessionId: input.sessionId,- mode: input.record.mode,- state,- ...(input.status.currentTurnId ? { activeTurnId: input.status.currentTurnId } : {}),- queue: (input.queue ?? []).map((entry) => ({ queueEntryId: entry.id, position: entry.position, summary: "" })),- observedAt: Date.now(),- source: input.record.source,- capabilities: {- steer: input.record.source === "desktop",- queue: input.record.source !== "pi-native",- cancelQueued: input.record.source !== "pi-native",- },- };-}--export function assertHostReady(host: HostRpc | null): HostRpc {- return host ?? (() => { throw workError("LIVE_WORK_NOT_READY", "Local Host is unavailable."); })();-}diff --git a/apps/desktop/electron/main/live-voice/work-bridge.ts b/apps/desktop/electron/main/live-voice/work-bridge.tsindex 684bcbdfd..dee233f21 100644--- a/apps/desktop/electron/main/live-voice/work-bridge.ts+++ b/apps/desktop/electron/main/live-voice/work-bridge.ts@@ -15,17 +15,13 @@ import {sessionWorkspaceIdentity,type LiveWorkOperationUpdate,type LiveWorkPort,- type LiveWorkCandidate,type LiveWorkContextMessage,type LocalReceiptDelivery,type ProviderReceipt,type LiveWorkPendingQuestion,- type WorkSnapshot,} from "@pi-desktop/host-runtime";import { buildSpokenAnswers, toPendingQuestion } from "./spoken-answer";import {- ErrorCodes,- IPC,OAUTH_AUTH_KIND,type RacpItemSummary,type LiveWorkBinding,diff --git a/apps/desktop/electron/main/models-dev-catalog.ts b/apps/desktop/electron/main/models-dev-catalog.tsindex 86474430b..7962118d4 100644--- a/apps/desktop/electron/main/models-dev-catalog.ts+++ b/apps/desktop/electron/main/models-dev-catalog.ts@@ -2,7 +2,6 @@ import { readFile } from "node:fs/promises";import {createModels,InMemoryModelsStore,- type Model as PiModel,type MutableModels,type ModelType,type ModelTypeMap,@@ -1095,66 +1094,6 @@ function medianOf(values: readonly (number | undefined)[]): number | undefined {: sorted[middle - 1];}-/**- * Record to borrow for an id the row's own catalog provider does not publish.- *- * models.dev indexes a gateway's copy of a model under the vendor that owns- * the weights, so an endpoint serving `Vendor/Model` ids can have no record of- * its own while several other publishers state the identical id. Borrowing- * that record is what keeps such a model's context window, tool support and- * vision visible instead of dropping the row to the generic 128k text-only- * shape.- *- * Two rules keep the result honest about what the endpoint will accept:- *- * - Tool support follows the majority of the publishers that state it. One- * dissenting reseller must not decide the claim for a deployment it does not- * describe, and neither may one agreeing reseller: an id a relay lists can be- * stated by a hundred publishers, which is what left whole model lists on the- * generic seed before. An even split states no majority and claims nothing.- * - Every other capability is the *intersection*, so the borrow may only- * under-claim. Reasoning, image input and image/PDF attachment are reported- * only when every publisher states them, and a user who knows the endpoint- * does more can still turn them on in Advanced. Limits are the medians the- * publishers state, so neither one host's cap nor one host's round-up- * decides them.- */-/**- * Whether two ids name one model under different spellings.- *- * A publisher-prefixed copy (`anthropic/claude-sonnet-4-5` for- * `claude-sonnet-4-5`, `mify/mimo-v2.5-pro-0731` for `mimo-v2.5-pro`) and a- * dated or variant spelling of one id are the same model, so their records may- * be compared with each other. Two unrelated routes that happen to share a leaf- * (`provider-a/foo` vs `gateway/foo`) are not: that relation is a coincidence of- * naming, and nothing may treat it as identity.- *- * `catalogModelIdsMatch` stays the matcher of record; this only decides which of- * its matches a borrow without a provider identity may average.- */-function sameModelSpelling(catalogId: string, requested: string): boolean {- const left = catalogId.trim().toLowerCase();- const right = requested.trim().toLowerCase();- if (!left || !right) return false;- if (left === right) return true;- /*- Either side may carry a route prefix the other does not: a relay lists- `test/mimo-v2.5` where the catalog publishes `mimo-v2.5`, and a catalog that- publishes a routed copy answers for the bare id. Two *different* route paths- that merely share a leaf still never match.- */- if (left.endsWith(`/${right}`) || right.endsWith(`/${left}`)) return true;- const plain = (id: string) => stripReleaseSuffix(stripVariantSuffix(id));- const plainLeft = plain(left);- const plainRight = plain(right);- if (!plainLeft || !plainRight) return false;- return (- plainLeft === plainRight ||- plainLeft.endsWith(`/${plainRight}`) ||- plainRight.endsWith(`/${plainLeft}`)- );-}-/*** Which publisher's records answer for an id the row's own publisher lacks.*@@ -1196,53 +1135,6 @@ function borrowPool(return pool.map((entry) => entry.model);}-/**- * Markers a deployment appends to a published id to name its own variant of it:- * a canary label, a context size, a preview channel. `test/mimo-v2.5-pro-test`- * and `gemini-2.5-pro-1m` are the published models with such a marker appended.- *- * Only a marker on this list is read that way. `-asr`, `-pro` or `-mini` name- * models of their own, so an unpublished id that carries one of those stays- * unknown instead of borrowing a sibling model's limits.- */-const DEPLOYMENT_MARKER_SUFFIXES: ReadonlySet<string> = new Set([- "test",- "staging",- "canary",- "dev",- "alpha",- "beta",- "rc",- "exp",- "experimental",- "preview",- "free",- "trial",- "thinking",- "think",- "agent",- "latest",- "1k",- "2k",- "4k",- "32k",- "64k",- "128k",- "200k",- "256k",- "512k",- "1m",- "2m",- "4m",-]);--/** The id without one trailing deployment marker, or the id unchanged. */-function dropDeploymentMarker(value: string): string {- const match = /^(.*)[-_:]([a-z0-9]+)$/i.exec(value);- if (!match) return value;- return DEPLOYMENT_MARKER_SUFFIXES.has(match[2].toLowerCase()) ? match[1] : value;-}-/** The last `/`-segment of a normalized id; the whole id when it has none. */function leafOf(normalized: string): string {return normalized.slice(normalized.lastIndexOf("/") + 1);@@ -1325,24 +1217,6 @@ function relayNotationCandidates(requested: string): string[] {return out;}-/**- * Published ids to read when nothing the catalog publishes matches the id the- * service serves: the id behind a route prefix, and that id without one- * deployment marker. Each is looked up as a whole published id, so nothing here- * follows a chain of aliases.- */-function fallbackLookupIds(requested: string): string[] {- const ids: string[] = [];- const push = (value: string) => {- if (value && value !== requested && !ids.includes(value)) ids.push(value);- };- const leaf = requested.slice(requested.lastIndexOf("/") + 1);- push(leaf);- push(dropDeploymentMarker(leaf));- push(dropDeploymentMarker(requested));- return ids;-}-/*** The value most entries that state one agree on, or undefined when they split.*diff --git a/apps/desktop/electron/main/pi-model-metadata.ts b/apps/desktop/electron/main/pi-model-metadata.tsindex bc2275f7a..f6f52aac2 100644--- a/apps/desktop/electron/main/pi-model-metadata.ts+++ b/apps/desktop/electron/main/pi-model-metadata.ts@@ -1,4 +1,3 @@-import type { Api, Model, Models } from "@earendil-works/pi-ai";import type { ModelInfo, ModelModality } from "@pi-desktop/shared";import operationMetadata from "./settings-operation-metadata.json" with { type: "json" };@@ -42,45 +41,6 @@ export function relayFamilyPublisher(leafId: string): string | undefined {return undefined;}const leaf = (id: string) => id.toLowerCase().split("/").at(-1);-// Only deployment-added environment/context labels are safe to remove as a-// fallback. Model variants such as `thinking`, `preview`, and dated releases-// are deliberately absent: those can name a distinct model with different-// capabilities. Exact leaves are always checked before this fallback.-const DEPLOYMENT_SUFFIXES = new Set([- "test", "staging", "canary", "dev",- "1m", "2m", "4m", "32k", "64k", "128k", "200k", "256k", "512k",-]);-function withoutDeploymentSuffix(id: string): string | undefined {- const match = /^(.*)[-_:]([a-z0-9]+)$/i.exec(id);- if (!match || !DEPLOYMENT_SUFFIXES.has(match[2].toLowerCase())) return undefined;- return match[1];-}-const capabilities = (m: Model<Api>) => JSON.stringify([m.input, m.reasoning, m.contextWindow, m.maxTokens, m.thinkingLevelMap]);--/** Match exact route leaves first, then a narrow deployment-suffix fallback. */-export function relayChatMetadata(models: Models, id: string): Model<Api> | undefined {- const requested = leaf(id.trim());- if (!requested) return undefined;- const available = models.getModelsOfType("chat");- const findHits = (candidate: string) => available.filter(model => leaf(model.id) === candidate);-- // A provider may append multiple deployment labels (`-1m-test`). Remove- // only one whitelisted trailing label at a time, stopping at the nearest- // published base ID. Never rewrite the model ID used on the wire.- let lookupId = requested;- let hits = findHits(lookupId);- while (!hits.length) {- const base = withoutDeploymentSuffix(lookupId);- if (!base) break;- lookupId = base;- hits = findHits(lookupId);- }- if (!hits.length) return undefined;- const publisher = RELAY_FAMILY_PUBLISHERS[lookupId.split(/[-.]/)[0] ?? ""];- const official = hits.filter(model => model.provider === publisher);- if (official.length === 1) return official[0];- return hits.every(model => capabilities(model) === capabilities(hits[0])) ? hits[0] : undefined;-}/*** Display-only compatibility data for speech/embedding/image settings rows thatdiff --git a/apps/desktop/electron/main/storage/ipc.ts b/apps/desktop/electron/main/storage/ipc.tsindex c75c4a87e..e7075a0d8 100644--- a/apps/desktop/electron/main/storage/ipc.ts+++ b/apps/desktop/electron/main/storage/ipc.ts@@ -1,4 +1,4 @@-import { app, dialog } from "electron";+import { dialog } from "electron";import { randomUUID } from "node:crypto";import { IPC, type StorageInfo } from "@pi-desktop/shared";import type { IpcRegistrar } from "../ipc/types";diff --git a/apps/desktop/src/components/ProjectCreateDialog.tsx b/apps/desktop/src/components/ProjectCreateDialog.tsxindex 48397651f..cde3cc7f6 100644--- a/apps/desktop/src/components/ProjectCreateDialog.tsx+++ b/apps/desktop/src/components/ProjectCreateDialog.tsx@@ -42,7 +42,6 @@ function samePath(left: string, right: string) {// The create dialog mounts its content only while open: the blocking overlay// registers with that mounted subtree, and every reopen resets the form.export function ProjectCreateDialog() {- const { t } = useTranslation();const open = useAppStore((state) => state.createProjectDialogOpen);const initialRemoteHostKey = useAppStore((state) => state.createProjectDialogRemoteHostKey);if (open) {diff --git a/apps/desktop/src/components/Sidebar.tsx b/apps/desktop/src/components/Sidebar.tsxindex d07d34cf9..f79fa6428 100644--- a/apps/desktop/src/components/Sidebar.tsx+++ b/apps/desktop/src/components/Sidebar.tsx@@ -70,7 +70,7 @@ import {ProjectRunCount,ProjectRunRail,} from "./ProjectRunIndicator";-import { ErrorCodes, formatSessionLink, sidebarModuleVisible } from "@pi-desktop/shared";+import { formatSessionLink, sidebarModuleVisible } from "@pi-desktop/shared";import type { SessionSummary } from "@pi-desktop/shared";import type {ProjectMeta,diff --git a/apps/desktop/src/components/SidebarMenuPanel.tsx b/apps/desktop/src/components/SidebarMenuPanel.tsxindex 7e6823544..0f1f3504d 100644--- a/apps/desktop/src/components/SidebarMenuPanel.tsx+++ b/apps/desktop/src/components/SidebarMenuPanel.tsx@@ -23,7 +23,6 @@ import { IconChevronRight } from "./icons";import { portalToBody } from "../lib/portal-visibility";import type {SidebarMenuActionItem,- SidebarMenuGroupItem,SidebarMenuItem,SidebarMenuPanelContent,SidebarMenuSubmenuItem,diff --git a/apps/desktop/src/components/settings/ConfigSyncPage.tsx b/apps/desktop/src/components/settings/ConfigSyncPage.tsxindex 718dde656..24809f451 100644--- a/apps/desktop/src/components/settings/ConfigSyncPage.tsx+++ b/apps/desktop/src/components/settings/ConfigSyncPage.tsx@@ -405,7 +405,6 @@ export function ConfigSyncPage() {const stateReady = state !== null;const syncing = state?.status === "syncing";const controlsBusy = busy !== null || syncing;- const categories = selection;const connectionReady = Boolean(form.endpoint.trim() && form.region.trim() && form.bucket.trim() && form.accessKeyId.trim());const vaultPasswordReady =form.backupPassword.length === 0diff --git a/apps/desktop/src/features/chat/composer/ComposerToolbar.tsx b/apps/desktop/src/features/chat/composer/ComposerToolbar.tsxindex 20bfacf7c..a9aafeea6 100644--- a/apps/desktop/src/features/chat/composer/ComposerToolbar.tsx+++ b/apps/desktop/src/features/chat/composer/ComposerToolbar.tsx@@ -113,7 +113,6 @@ export function ComposerToolbar({abort,submit,workSessionId,- workSessionLabel,}: ComposerToolbarProps) {const platform = (window.piDesktop?.platform ?? "darwin") as ShortcutPlatform;const steeringShortcut = keybindingDisplayParts("Alt+Enter", platform).join("+");diff --git a/apps/desktop/src/features/chat/composer/hooks/useComposerAttachments.ts b/apps/desktop/src/features/chat/composer/hooks/useComposerAttachments.tsindex 69e6c02bd..ac186ec9f 100644--- a/apps/desktop/src/features/chat/composer/hooks/useComposerAttachments.ts+++ b/apps/desktop/src/features/chat/composer/hooks/useComposerAttachments.ts@@ -21,7 +21,6 @@ import {hasComposerFileDrag,type ComposerDropItem,} from "../../../../lib/composer-drop";-import type { ComposerDraftSnapshot } from "../../../../lib/composer-smart-stop";import {clipboardFiles,createFileReference,diff --git a/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx b/apps/desktop/src/features/chat/transcript/ActivityGroup.tsxindex c9fe180e3..e71e2c2b7 100644--- a/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx+++ b/apps/desktop/src/features/chat/transcript/ActivityGroup.tsx@@ -28,17 +28,13 @@ import type {AssistantActivityItem,} from "../../../lib/assistant-turns";import {- messageThinking as thinkingText,subagentRunsEqual,} from "../../../lib/assistant-turns";import {- delegationRoster,- delegationRosterSummary,collectDelegationStatuses,collectDelegationTimings,delegationTimingBounds,isDelegationActivityItem,- lifecycleKindOf,summarizeSubagentActivity,type SubagentOutcome,type SubagentTiming,@@ -46,7 +42,6 @@ import {import {formatToolDuration,getToolAction,- getToolSummary,} from "../../../lib/tool-display";import { IconChevronRight, IconCircleAlert, IconSparkles, IconWorkflow } from "../../../components/icons";import {diff --git a/apps/desktop/src/features/chat/transcript/ActivityItems.tsx b/apps/desktop/src/features/chat/transcript/ActivityItems.tsxindex 75b716c98..86c5626c2 100644--- a/apps/desktop/src/features/chat/transcript/ActivityItems.tsx+++ b/apps/desktop/src/features/chat/transcript/ActivityItems.tsx@@ -38,7 +38,7 @@ type ActivityItemBlockProps = Omit<ActivityItemsProps, "items" | "delegateItems"};const ActivityItemBlock = memo(function ActivityItemBlock({- block, isActive, live, groupDelegates, topologyItem,+ block, isActive, groupDelegates, topologyItem,delegateItems, delegationStatuses, delegationTimings, onUserInteraction,collapseThinking,}: ActivityItemBlockProps) {diff --git a/apps/desktop/src/features/modes/mode-bundle-model.ts b/apps/desktop/src/features/modes/mode-bundle-model.tsindex 81418621a..0a98b0642 100644--- a/apps/desktop/src/features/modes/mode-bundle-model.ts+++ b/apps/desktop/src/features/modes/mode-bundle-model.ts@@ -22,7 +22,6 @@ import type {ModeCatalog,ModeCatalogEntry,ModeDocumentReadResult,- ModeSkillsResult,} from "@pi-desktop/shared";import { parseRoleDocument } from "./mode-role-document";@@ -232,11 +231,6 @@ export function disabledSkillsAfterToggle(source: string, id: string, enabled: breturn [...disabled];}-/** Skills the Skills tab lists, with the toggle state the map produces. */-export function skillRows(state: ModeSkillsResult | null): ModeSkillsResult["skills"] {- return state?.skills ?? [];-}-/*** What the mode selector offers: every mode the catalog can show, with the* reserved documents left out because they are reported, not loaded.@@ -253,15 +247,6 @@ export function modeSelectorEntries(catalog: ModeCatalog | null | undefined): Moreturn [...builtins, ...user];}-/**- * Label for the open document's file, or the id when the mode has no file yet.- * The page shows this line so the user can see *which* file a save writes.- */-export function openDocumentLabel(document: { id: string; filePath?: string }, format: ModeDocumentFormat): string {- if (document.filePath) return document.filePath;- return format === "bundle" ? `${document.id}/mode.yaml` : `${document.id}/mode.md`;-}-/*** Read-time snapshot of one mode, so a tab that is switched mid-read cannot* apply the previous mode's answer. `openKey` is the identity the caller guards@@ -369,11 +354,6 @@ export function putRole(draft: ModeBundleDraft, reference: string, source: strin};}-/** Point `promptFile` at a document and store that document's text. */-export function putPrompt(draft: ModeBundleDraft, reference: string, text: string): ModeBundleDraft {- return { ...draft, prompt: text, source: setBundleScalar(draft.source, "promptFile", reference) };-}-/*** A `mode.yaml` for a mode that has never been saved.*diff --git a/apps/desktop/src/features/modes/mode-role-document.ts b/apps/desktop/src/features/modes/mode-role-document.tsindex abbdcfab1..414ac8f80 100644--- a/apps/desktop/src/features/modes/mode-role-document.ts+++ b/apps/desktop/src/features/modes/mode-role-document.ts@@ -221,10 +221,3 @@ export function toggleRoleTool(tools: readonly string[], tool: string, on: boole? SUBAGENT_ASSIGNABLE_TOOLS.filter((candidate) => candidate === tool || tools.includes(candidate)): tools.filter((candidate) => candidate !== tool);}--/** A handle written into a new document's `name:` from the reference it will live at. */-export function roleHandle(reference: string, fallback: string): string {- const segment = reference.split("/").pop() ?? reference;- const [stem] = segment.split(".");- return (stem || fallback).toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);-}diff --git a/apps/desktop/src/features/scheduled/ScheduledTaskDetail.tsx b/apps/desktop/src/features/scheduled/ScheduledTaskDetail.tsxindex bb13af7ce..1479a278c 100644--- a/apps/desktop/src/features/scheduled/ScheduledTaskDetail.tsx+++ b/apps/desktop/src/features/scheduled/ScheduledTaskDetail.tsx@@ -12,7 +12,7 @@ import {formatScheduleClock,} from "./scheduled-format";import { resolveSelectedRun, runDurationMs } from "./scheduled-runs";-import { cadenceHasClock, cadenceLabel, CADENCE_I18N_KEYS, RUN_STATUS_I18N_KEYS } from "./scheduled-labels";+import { cadenceHasClock, cadenceLabel, RUN_STATUS_I18N_KEYS } from "./scheduled-labels";import { ScheduledRunHistory } from "./ScheduledRunHistory";import { ScheduledRunTranscript } from "./ScheduledRunTranscript";diff --git a/apps/desktop/src/features/scheduled/scheduled-format.ts b/apps/desktop/src/features/scheduled/scheduled-format.tsindex f157efde8..7a1e06ecf 100644--- a/apps/desktop/src/features/scheduled/scheduled-format.ts+++ b/apps/desktop/src/features/scheduled/scheduled-format.ts@@ -1,4 +1,4 @@-import type { ScheduledTask, ScheduledTaskSchedule } from "@pi-desktop/shared";+import type { ScheduledTaskSchedule } from "@pi-desktop/shared";const MINUTE_MS = 60_000;const HOUR_MS = 60 * MINUTE_MS;@@ -77,11 +77,6 @@ export function formatScheduleClock(return `${String(hour).padStart(2, "0")}:${String(minute).padStart(2, "0")}`;}-/** The newest timestamp a task row can report as "last attempt". */-export function lastAttemptAt(task: ScheduledTask): string | null {- return task.lastRunAt ?? null;-}-/*** Elapsed minutes an `interval` task waits between runs, as stored. Mirrors* `INTERVAL_MIN_MINUTES` / `INTERVAL_MAX_MINUTES` indiff --git a/apps/desktop/src/features/settings/imports/ModelConfigImportPanel.tsx b/apps/desktop/src/features/settings/imports/ModelConfigImportPanel.tsxindex aabc4c98d..9bc685d97 100644--- a/apps/desktop/src/features/settings/imports/ModelConfigImportPanel.tsx+++ b/apps/desktop/src/features/settings/imports/ModelConfigImportPanel.tsx@@ -7,7 +7,6 @@ import { Badge } from "../../../components/ui";import {ImportGroup,ImportIdle,- ImportOption,ImportResults,ImportRow,ImportToolbar,diff --git a/apps/desktop/src/features/voice/VoiceMicButton.tsx b/apps/desktop/src/features/voice/VoiceMicButton.tsxdeleted file mode 100644index c070854e5..000000000--- a/apps/desktop/src/features/voice/VoiceMicButton.tsx+++ /dev/null@@ -1,110 +0,0 @@-/**- * Microphone button for the Composer toolbar.- */--import type { TFunction } from "i18next";-import { TooltipButton } from "../../components/ui";-import type { VoicePhase } from "./useVoiceInput";--interface VoiceMicButtonProps {- t: TFunction;- phase: VoicePhase;- disabled: boolean;- onToggle: () => void;- onCancel: () => void;-}--export function VoiceMicButton({- t,- phase,- disabled,- onToggle,- onCancel,-}: VoiceMicButtonProps) {- const isActive =- phase === "starting" ||- phase === "listening" ||- phase === "transcribing";-- const tooltip = isActive- ? t("settings.voiceCancel")- : t("settings.voiceRecording").replace("…", "");-- return (- <TooltipButton- type="button"- className={`icon-btn${isActive ? " voice-active" : ""}`}- tooltip={tooltip}- ariaLabel={tooltip}- disabled={disabled && !isActive}- onClick={isActive ? onCancel : onToggle}- >- <MicIcon active={isActive} phase={phase} />- </TooltipButton>- );-}--function MicIcon({ active, phase }: { active: boolean; phase: VoicePhase }) {- return (- <svg- width="16"- height="16"- viewBox="0 0 16 16"- fill="none"- xmlns="http://www.w3.org/2000/svg"- aria-hidden="true"- className={active ? "voice-mic-active" : undefined}- >- {/* Microphone body */}- <rect- x="5.5"- y="1.5"- width="5"- height="8"- rx="2.5"- stroke="currentColor"- strokeWidth="1.2"- fill={active ? "currentColor" : "none"}- />- {/* Stand arc */}- <path- d="M3.5 7.5a4.5 4.5 0 0 0 9 0"- stroke="currentColor"- strokeWidth="1.2"- strokeLinecap="round"- fill="none"- />- {/* Stand line */}- <line- x1="8"- y1="12"- x2="8"- y2="14"- stroke="currentColor"- strokeWidth="1.2"- strokeLinecap="round"- />- {/* Base */}- <line- x1="6"- y1="14"- x2="10"- y2="14"- stroke="currentColor"- strokeWidth="1.2"- strokeLinecap="round"- />- {/* Recording indicator */}- {phase === "listening" && (- <circle cx="13" cy="3" r="2.5" fill="var(--ds-error)">- <animate- attributeName="opacity"- values="1;0.3;1"- dur="1.2s"- repeatCount="indefinite"- />- </circle>- )}- </svg>- );-}diff --git a/apps/desktop/src/features/voice/VoiceOverlay.tsx b/apps/desktop/src/features/voice/VoiceOverlay.tsxdeleted file mode 100644index e694b9ea4..000000000--- a/apps/desktop/src/features/voice/VoiceOverlay.tsx+++ /dev/null@@ -1,81 +0,0 @@-/**- * Lightweight overlay shown above the Composer during voice input.- */--import type { TFunction } from "i18next";-import type { VoiceState } from "./useVoiceInput";--interface VoiceOverlayProps {- t: TFunction;- state: VoiceState;- onCancel: () => void;-}--export function VoiceOverlay({ t, state, onCancel }: VoiceOverlayProps) {- if (- state.phase !== "starting" &&- state.phase !== "listening" &&- state.phase !== "transcribing" &&- state.phase !== "error"- ) {- return null;- }-- return (- <div className="voice-overlay" role="status" aria-live="polite">- <div className="voice-overlay-content">- <div className="voice-overlay-left">- {state.phase === "listening" && (- <>- <span className="voice-recording-dot" aria-hidden="true" />- <span>{t("settings.voiceRecording")}</span>- <span className="voice-duration">- {formatDuration(state.durationSeconds)}- </span>- </>- )}- {state.phase === "starting" && <span>{t("settings.voiceRecording")}</span>}- {state.phase === "transcribing" && (- <>- <span className="voice-spinner" aria-hidden="true" />- <span>{t("settings.voiceTranscribing")}</span>- </>- )}- {state.phase === "error" && (- <span className="voice-error">{state.error}</span>- )}- </div>- <div className="voice-overlay-right">- {state.phase === "listening" && (- <VolumeBar level={state.volumeLevel} />- )}- {(state.phase === "listening" || state.phase === "starting") && (- <button- type="button"- className="voice-cancel-btn"- onClick={onCancel}- >- {t("settings.voiceCancel")}- </button>- )}- </div>- </div>- </div>- );-}--function VolumeBar({ level }: { level: number }) {- const width = Math.min(100, Math.max(0, level * 100));- return (- <div className="voice-volume-bar" aria-hidden="true">- <div className="voice-volume-fill" style={{ width: `${width}%` }} />- </div>- );-}--function formatDuration(seconds: number): string {- const mins = Math.floor(seconds / 60);- const secs = Math.floor(seconds % 60);- const tenths = Math.floor((seconds % 1) * 10);- return `${String(mins).padStart(2, "0")}:${String(secs).padStart(2, "0")}.${tenths}`;-}diff --git a/apps/desktop/src/features/voice/live/live-call-controller.ts b/apps/desktop/src/features/voice/live/live-call-controller.tsindex 1ca861f07..6927fe2bb 100644--- a/apps/desktop/src/features/voice/live/live-call-controller.ts+++ b/apps/desktop/src/features/voice/live/live-call-controller.ts@@ -336,7 +336,7 @@ export class LiveCallController {resources.peer = peer;const channel = peer.createDataChannel("oai-events");resources.channel = channel;- channel.onmessage = (event) => this.handleCodexData(callId, resources, event.data);+ channel.onmessage = (event) => this.handleCodexData(callId, event.data);channel.onerror = () => void this.failActive(callId, liveError("LIVE_NETWORK_ERROR"));channel.onclose = () => {if (!resources.abort.signal.aborted) void this.failActive(callId, liveError("LIVE_NETWORK_ERROR"));@@ -383,7 +383,7 @@ export class LiveCallController {]);}- private handleCodexData(callId: string, resources: StartResources, raw: unknown): void {+ private handleCodexData(callId: string, raw: unknown): void {if (typeof raw !== "string" || raw.length > 2 * 1024 * 1024) {void this.failActive(callId, liveError("LIVE_PROTOCOL_ERROR"));return;diff --git a/apps/desktop/src/features/voice/live/live-pcm-session.ts b/apps/desktop/src/features/voice/live/live-pcm-session.tsindex 4c06d51b6..3acc2b3e5 100644--- a/apps/desktop/src/features/voice/live/live-pcm-session.ts+++ b/apps/desktop/src/features/voice/live/live-pcm-session.ts@@ -4,7 +4,6 @@ import { liveError } from "./live-voice-api";const MAX_INPUT_CREDITS = 10;const MAX_PCM_FRAME_SAMPLES = 2400;-const MAX_WORKLET_MESSAGE_SAMPLES = 48_000;export class LivePcmSession {private readonly callId: string;@@ -23,7 +22,6 @@ export class LivePcmSession {private captureEpoch = 0;private muted = true;private readyResolve: (() => void) | null = null;- private readyReject: ((error: Error) => void) | null = null;private releasePromise: Promise<void> | null = null;private releaseSent = false;private disposed = false;@@ -161,7 +159,6 @@ export class LivePcmSession {clearTimeout(timer);signal.removeEventListener("abort", onAbort);this.readyResolve = null;- this.readyReject = null;};const onAbort = () => {cleanup();@@ -175,10 +172,6 @@ export class LivePcmSession {cleanup();resolve();};- this.readyReject = (error) => {- cleanup();- reject(error);- };signal.addEventListener("abort", onAbort, { once: true });if (signal.aborted) onAbort();});diff --git a/apps/desktop/src/features/worktree/WorktreeSidebarParts.tsx b/apps/desktop/src/features/worktree/WorktreeSidebarParts.tsxindex 2b3459aea..bb63f3624 100644--- a/apps/desktop/src/features/worktree/WorktreeSidebarParts.tsx+++ b/apps/desktop/src/features/worktree/WorktreeSidebarParts.tsx@@ -235,107 +235,6 @@ export function useWorktreeSessionMenuItems({];}-/** Session-menu items of an isolated session; nothing for other sessions. */-export function WorktreeSessionMenuItems({- sessionId,- title,- worktree,- running,- onDone,-}: {- sessionId: string;- title: string;- worktree?: SessionWorktreeSummary;- running: boolean;- onDone: () => void;-}) {- const { t } = useTranslation();- const open = useWorktreeUi((s) => s.open);- // A conflicted session resolves first; syncing again would only report- // the same conflict.- const conflicted = worktree?.status === "conflict";- const syncable = Boolean(worktree) && worktree?.status !== "missing" && !conflicted;- // Project commits the session lacks, counted when the menu opens; `-1`- // when the count failed (syncing still reports the reason).- const [behind, setBehind] = useState<number | null>(null);- useEffect(() => {- if (!syncable) return;- let current = true;- setBehind(null);- api- .getWorktreeBehind(sessionId)- .then((count) => {- if (!current) return;- setBehind(count);- useWorktreeUi.getState().setBehindFor(sessionId, count);- })- .catch(() => current && setBehind(-1));- return () => {- current = false;- };- }, [sessionId, syncable]);- if (!worktree) return [];- const missing = worktree.status === "missing";- return [- sidebarMenuAction({- id: "worktree-merge",- label: t("worktree.merge.menu"),- icon: <IconPullRequest size={14} />,- disabled: running || missing,- onSelect: () => {- onDone();- open({ kind: "merge", sessionId, title });- },- }),- sidebarMenuAction({- id: "worktree-sync",- label:- syncable && behind !== null && behind > 0- ? t("worktree.sync.menuBehind", { count: behind })- : t("worktree.sync.menu"),- icon: <IconRefresh size={14} />,- disabled: running || !syncable || behind === null || behind === 0,- busy: behind === null && syncable,- title: conflicted- ? t("worktree.sync.resolveFirst")- : behind === 0- ? t("worktree.sync.upToDate")- : undefined,- onSelect: () => {- onDone();- void syncIsolatedSession(sessionId, t);- },- }),- sidebarMenuAction({- id: "worktree-reveal",- label: t("worktree.reveal"),- icon: <IconFolderOpen size={14} />,- disabled: missing,- onSelect: () => {- onDone();- void api.revealWorktree(sessionId).catch((error: unknown) =>- useAppStore- .getState()- .showToast(worktreeErrorMessage(error, t), { variant: "error" }),- );- },- }),- ...(worktree.setupStatus && worktree.setupStatus !== "none"- ? [- sidebarMenuAction({- id: "worktree-setup-log",- label: t("worktree.setupLog.menu"),- icon: <IconFileText size={14} />,- onSelect: () => {- onDone();- open({ kind: "setupLog", sessionId, title });- },- }),- ]- : []),- ];-}-/*** The text of the pre-delete warning for an isolated session: deleting removes* its worktree and branch, so unmerged work is named before the second clickdiff --git a/apps/desktop/src/lib/composer-models.ts b/apps/desktop/src/lib/composer-models.tsindex 9273b8bd0..074e6bbfc 100644--- a/apps/desktop/src/lib/composer-models.ts+++ b/apps/desktop/src/lib/composer-models.ts@@ -2,7 +2,6 @@ import {bindingSupportsImages,configuredChatModels,effectiveContextWindow,- isImageOnlyChatModel,type ImageGenerationBindings,modelMatchesFilter,modelWireIdsEqual,@@ -32,21 +31,6 @@ export function composerModelMetadata(return (discovered ?? []).find((model) => sameComposerModelId(model.modelId, modelId));}-/**- * One chat-eligibility answer everywhere: a model bound for image generation- * stays chat-eligible unless its discovered metadata names no text output or- * its id is a pure image-generation endpoint (#2253).- */-export function composerModelChatEligible(- imageGeneration: ImageGenerationBindings | null | undefined,- providerId: string | undefined,- modelId: string | undefined,- discovered?: readonly ModelInfo[],-): boolean {- const metadata = composerModelMetadata(discovered, modelId);- return !isImageOnlyChatModel(imageGeneration, providerId, modelId, metadata);-}-/*** Build the Composer model list from the models explicitly enabled in* provider settings. Discovery only enriches an exact configured id; it doesdiff --git a/apps/desktop/src/lib/context-usage.ts b/apps/desktop/src/lib/context-usage.tsindex 8cec9cf5b..0c555a515 100644--- a/apps/desktop/src/lib/context-usage.ts+++ b/apps/desktop/src/lib/context-usage.ts@@ -64,13 +64,6 @@ export function turnUsageBreakdown(usage?: MessageUsage): TurnUsageBreakdown {};}-export function latestMessageUsage(messages: UiMessage[]): MessageUsage | undefined {- for (let index = messages.length - 1; index >= 0; index -= 1) {- if (messages[index].usage) return messages[index].usage;- }- return undefined;-}-function modelContextWindow(model: ModelInfo | undefined): number | undefined {const value = positiveTokenCount(model?.contextWindow);return value > 0 ? value : undefined;diff --git a/apps/desktop/src/lib/sidebar-project-runs.ts b/apps/desktop/src/lib/sidebar-project-runs.tsindex 4a94d12f8..0acb91c38 100644--- a/apps/desktop/src/lib/sidebar-project-runs.ts+++ b/apps/desktop/src/lib/sidebar-project-runs.ts@@ -21,12 +21,6 @@ export type ProjectRunSummary = {total: number;};-export const EMPTY_PROJECT_RUN_SUMMARY: ProjectRunSummary = {- running: 0,- waiting: 0,- total: 0,-};-/** Minimal session shape needed to classify one row. */export type ProjectRunSession = { id: string };diff --git a/apps/desktop/src/pages/ProjectsPage.tsx b/apps/desktop/src/pages/ProjectsPage.tsxindex 5737196d1..7cad0002a 100644--- a/apps/desktop/src/pages/ProjectsPage.tsx+++ b/apps/desktop/src/pages/ProjectsPage.tsx@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";import type { ProjectGroupRecord } from "@pi-desktop/shared";import { useAppStore } from "../stores/app-store";import { api } from "../lib/api";-import { Button, TooltipButton, SegmentedControl, cx } from "../components/ui";+import { Button, TooltipButton, SegmentedControl } from "../components/ui";import {IconArchive,IconArchiveRestore,diff --git a/apps/desktop/src/stores/app-store.ts b/apps/desktop/src/stores/app-store.tsindex c28e06b3d..55573c97d 100644--- a/apps/desktop/src/stores/app-store.ts+++ b/apps/desktop/src/stores/app-store.ts@@ -44,7 +44,6 @@ import {} from "./slices/work-panel-slice";import {createInitialState,- initialSidebarPreferences,} from "./slices/initial-state";import { createSessionSlice } from "./slices/session-slice";import { createQueueSlice } from "./slices/queue-slice";@@ -66,7 +65,6 @@ import {type InteractionRuntime,} from "./runtime/interaction-runtime";import {- isDefaultSessionTitle,untitledTaskTitle,} from "../lib/session-title-utils";import { createInteractivePromptNotifier } from "./runtime/notification-runtime";diff --git a/apps/desktop/src/stores/runtime/session-runtime.ts b/apps/desktop/src/stores/runtime/session-runtime.tsindex 06399f3e1..b739beca8 100644--- a/apps/desktop/src/stores/runtime/session-runtime.ts+++ b/apps/desktop/src/stores/runtime/session-runtime.ts@@ -8,7 +8,6 @@ import { api } from "../../lib/api";import { createNavigationIntentController } from "../../lib/navigation-intent";import {dedupeSessionMessages,- durableCoversLiveSessionMessages,mergeLiveSessionMessages,projectMessageEnd,removeLiveSessionMessage,@@ -481,10 +480,3 @@ export function createSessionRuntime({ get, set }: StoreAccess): SessionRuntimeplanSyncGeneration: (sessionId) => planSyncGenerations.get(sessionId) ?? 0,};}--export function sessionMessagesCoverLiveTail(- durable: UiMessage[],- live: UiMessage[] | undefined,-): boolean {- return durableCoversLiveSessionMessages(durable, live);-}diff --git a/apps/desktop/src/styles/voice.css b/apps/desktop/src/styles/voice.cssindex 55b1606aa..9c636ea58 100644--- a/apps/desktop/src/styles/voice.css+++ b/apps/desktop/src/styles/voice.css@@ -2,10 +2,6 @@aliases never existed in tokens.css, so each value below used to fall backto a hardcoded literal that no contributed theme could reach. */-.voice-active {- color: var(--ds-error) !important;-}-.voice-mic-active {animation: voice-pulse 1.2s ease-in-out infinite;}@@ -15,54 +11,6 @@50% { opacity: 0.6; }}-/* Voice overlay */-.voice-overlay {- position: absolute;- bottom: 100%;- left: 0;- right: 0;- padding: 0 8px 4px;- z-index: 10;- pointer-events: auto;-}--.voice-overlay-content {- display: flex;- align-items: center;- justify-content: space-between;- padding: 6px 12px;- border-radius: var(--radius-xs);- background: var(--ds-bg-elevated-opaque);- border: 1px solid var(--ds-border-default);- font-size: var(--text-md);- gap: 12px;-}--.voice-overlay-left {- display: flex;- align-items: center;- gap: 8px;-}--.voice-overlay-right {- display: flex;- align-items: center;- gap: 8px;-}--.voice-recording-dot {- width: 8px;- height: 8px;- border-radius: var(--radius-round);- background: var(--ds-error);- animation: voice-pulse 1.2s ease-in-out infinite;-}--.voice-duration {- font-variant-numeric: tabular-nums;- opacity: 0.7;-}-.voice-spinner {width: 14px;height: 14px;@@ -76,40 +24,6 @@to { transform: rotate(360deg); }}-.voice-volume-bar {- width: 80px;- height: 4px;- border-radius: var(--radius-3xs);- background: var(--ds-bg-active);- overflow: hidden;-}--.voice-volume-fill {- height: 100%;- background: var(--ds-accent);- border-radius: var(--radius-3xs);- transition: width 100ms ease-out;-}--.voice-cancel-btn {- padding: 2px 8px;- border-radius: var(--radius-3xs);- font-size: var(--text-sm);- background: transparent;- color: var(--ds-text-secondary);- border: 1px solid var(--ds-border-strong);- cursor: pointer;- transition: background 150ms;-}--.voice-cancel-btn:hover {- background: var(--ds-bg-hover);-}--.voice-error {- color: var(--ds-error);-}-/* ---- Voice settings: wider control column ---- */.voice-settings .settings-row-control {max-width: none;diff --git a/apps/pi-host/src/host-operations.ts b/apps/pi-host/src/host-operations.tsindex cbbe15e87..74628e55b 100644--- a/apps/pi-host/src/host-operations.ts+++ b/apps/pi-host/src/host-operations.ts@@ -14,7 +14,6 @@ import {collectWorkspaceDiff,listDir,readWorkspaceFile,- toSessionSummary,withSessionProjectIds,type HostRpc,type HostSessionRecord,diff --git a/packages/agent-runtime/src/mode-definitions.ts b/packages/agent-runtime/src/mode-definitions.tsindex 76ada19e1..1c4d0926d 100644--- a/packages/agent-runtime/src/mode-definitions.ts+++ b/packages/agent-runtime/src/mode-definitions.ts@@ -23,7 +23,7 @@ import {type ModeDefinition,type ModeDiagnostic,} from "@pi-desktop/shared";-import { parseStrictModeYaml, splitModeDocument, type SplitDocument, type YamlResult } from "./mode-yaml.js";+import { parseStrictModeYaml, splitModeDocument } from "./mode-yaml.js";export { parseStrictModeYaml, splitModeDocument } from "./mode-yaml.js";export type { SplitDocument, YamlResult } from "./mode-yaml.js";import {diff --git a/packages/shared/src/types/agent.ts b/packages/shared/src/types/agent.tsindex f344f59e1..7f301c8d2 100644--- a/packages/shared/src/types/agent.ts+++ b/packages/shared/src/types/agent.ts@@ -5,7 +5,6 @@ import type { ContextCompactionFallback, ContextCompactionMark, ContextCompactioimport type { AgentStatus } from "./sessions.js";import type { MessageUsage, ToolTokenUsage, UiMessage, VoiceOrigin } from "./messages.js";import type { PermissionDecision, Risk } from "./permissions.js";-import type { ThinkingLevel } from "./models.js";import type { RacpPermissionMode } from "../racp.js";export type AgentPromptRequest = {