aboutsummaryrefslogtreecommitdiff
path: root/src/state.ts
diff options
context:
space:
mode:
authoramankumarsingh77 <amankumarsingh7702@gmail.com>2026-07-28 20:31:40 +0530
committerAman Kumar <145339995+amankumarsingh77@users.noreply.github.com>2026-08-02 19:12:46 +0530
commit91a2fdeff796bae8e87d9146e2d540550f54dd74 (patch)
tree9b243c2ad6643827159ba04840bd2b3a0eaf095b /src/state.ts
parentb67faca60b21b0cf74d5c967f0f8d215ad601e93 (diff)
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) <noreply@anthropic.com>
Diffstat (limited to 'src/state.ts')
-rw-r--r--src/state.ts13
1 files changed, 0 insertions, 13 deletions
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<BrowserState>("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<BrowserState> | undefined => {
if (!isRecord(v)) return undefined;
const namespace = asString(v["namespace"]);