Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

514 B
Raw Blame
import type { PlanResolutionResult } from "@pi-desktop/shared";

export type InteractionRuntime = {
  planResolutionRequests: Map<string, Promise<PlanResolutionResult>>;
  nextToastId: () => number;
};

/** Ephemeral coordination for user interactions; durable state stays in Zustand. */
export function createInteractionRuntime(): InteractionRuntime {
  let toastSequence = 0;
  return {
    planResolutionRequests: new Map<string, Promise<PlanResolutionResult>>(),
    nextToastId: () => ++toastSequence,
  };
}