()
| 99 | } |
| 100 | |
| 101 | resetCodexThread(): void { |
| 102 | this.sessionId = null; |
| 103 | this.resetTranscriptPath(); |
| 104 | this.client.updateMetadata((metadata: Metadata) => { |
| 105 | // Explicit-clear sentinel: `null` instructs the hub merge to |
| 106 | // drop `codexSessionId` from the persisted blob. Plain |
| 107 | // `delete` arrives at the hub as an omitted field, which the |
| 108 | // carry-forward path then restores from the prior row — |
| 109 | // defeating the reset. See hub/src/store/sessions.ts |
| 110 | // mergeSessionMetadata. The value is `null` on the wire only; |
| 111 | // MetadataSchema parses `string().optional()`, so the |
| 112 | // post-merge persisted blob carries no key. |
| 113 | const updated: Record<string, unknown> = { ...metadata, codexSessionId: null }; |
| 114 | return updated as unknown as Metadata; |
| 115 | }); |
| 116 | } |
| 117 | |
| 118 | setPermissionMode = (mode: PermissionMode): void => { |
| 119 | this.permissionMode = mode; |
no test coverage detected