From 91a2fdeff796bae8e87d9146e2d540550f54dd74 Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Tue, 28 Jul 2026 20:31:40 +0530 Subject: refactor: strip comment noise from the root modules Removes install/command banners and comments restating the code. Keeps one-line notes for the per-session profile-pin re-read, the deliberately surviving transport on shutdown, seed-before-attach under a pin, and the starts-with-return wrap rule. src/prompt.ts is untouched. Co-Authored-By: Claude Opus 5 (1M context) --- src/state.ts | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/state.ts') diff --git a/src/state.ts b/src/state.ts index 601f7e0..05de5d3 100644 --- a/src/state.ts +++ b/src/state.ts @@ -1,9 +1,3 @@ -/** - * Session persistence for pi-browser-harness. - * - * Persists the daemon namespace and (when applicable) the remote browser ID - * across session reloads and branch navigation. - */ import type { ExtensionAPI, ExtensionContext } from "@mariozechner/pi-coding-agent"; import { asArrayOf, asNumber, asString, isRecord } from "./util/guards"; @@ -25,13 +19,6 @@ export const persistState = (pi: ExtensionAPI, state: BrowserState): void => { pi.appendEntry("browser-harness-state", state); }; -/** - * Find the last browser-harness-state entry in the current branch - * and return the restored state, merged with defaults. - * - * If `currentNamespace` is supplied (e.g. from the --browser-namespace flag), - * it overrides whatever is in the persisted entry. - */ const asPersistedState = (v: unknown): Partial | undefined => { if (!isRecord(v)) return undefined; const namespace = asString(v["namespace"]); -- cgit v1.2.3