@@ -376,10 +376,7 @@ export class ClineProvider
376376 */
377377 public readonly viewId : string
378378
379- /**
380- * Stable identifier for persisted per-view state keys; binds a durable entry to the
381- * webview that wrote it through the host-minted claim token.
382- */
379+ /** Stable id for persisted per-view state keys, bound by the host-minted claim. */
383380 private viewStateId : string
384381
385382 /**
@@ -604,10 +601,7 @@ export class ClineProvider
604601 return Object . assign ( Object . create ( null ) , viewStates )
605602 }
606603
607- /**
608- * Persist the non-secret selections through the serialized write queue, re-keying a
609- * pre-launch write to the stable id once the webview registers one.
610- */
604+ /** Persist the non-secret selections through the serialized write queue. */
611605 private async savePersistedViewState ( values : Partial < PersistedViewState > ) : Promise < void > {
612606 // Capture the id at change time: a write belongs to the view that was active
613607 // when the change was made, even if a newer id is registered while it is queued.
@@ -693,10 +687,7 @@ export class ClineProvider
693687 await write
694688 }
695689
696- /**
697- * Re-bind a claim-less viewStates entry with a freshly minted claim; its unowned
698- * selections are dropped so the new token cannot re-expose them.
699- */
690+ /** Re-bind a claim-less entry with a fresh claim; unowned selections are dropped. */
700691 private async rebindUnboundViewStateEntry ( viewStateId : string ) : Promise < string | undefined > {
701692 const claimToken = crypto . randomUUID ( )
702693 let rebound = false
@@ -797,10 +788,7 @@ export class ClineProvider
797788 await write
798789 }
799790
800- /**
801- * Register the stable view id and load its persisted selections. An entry that carries a
802- * claim is loaded only when the presented host-minted token matches it.
803- */
791+ /** Register the stable view id and load its persisted selections; a claim must match. */
804792 public async setViewStateId ( viewStateId : string | undefined , presentedClaim ?: string ) : Promise < void > {
805793 // The webview generates this id on purpose - it has to survive a webview reload,
806794 // which recreates the view on both sides - so the host cannot mint it instead.
0 commit comments