Repository navigation
Commit 68ec4cf
committed
Replace session storage with in-memory session state management
- Refactor send-prompt-content-script.ts and add-apply-response-button.ts to replace all sessionStorage calls (setItem, getItem, removeItem) with a newly created exported module-level variable (e.g. let session_state) to securely store the session data within the content script's isolated memory.
└── apps
└── browser
├── README.md
└── src
├── background
│ ├── clear-chat-init-data.ts
│ ├── main.ts
│ └── message-handler.ts
├── content-scripts
│ └── send-prompt-content-script
│ ├── chatbots
│ │ └── ai-studio.ts
│ ├── send-prompt-content-script.ts
│ └── utils
│ ├── add-apply-response-button.ts
│ └── session-state.ts
└── manifest.json1 parent 83c6cf2 commit 68ec4cf
3 files changed
Lines changed: 25 additions & 23 deletions
File tree
- apps/browser/src/content-scripts/send-prompt-content-script
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
179 | | - | |
180 | | - | |
181 | 180 | | |
182 | 181 | | |
183 | 182 | | |
| |||
235 | 234 | | |
236 | 235 | | |
237 | 236 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
246 | 242 | | |
247 | 243 | | |
248 | 244 | | |
249 | 245 | | |
250 | 246 | | |
251 | 247 | | |
252 | | - | |
| 248 | + | |
253 | 249 | | |
254 | 250 | | |
255 | | - | |
256 | | - | |
| 251 | + | |
257 | 252 | | |
258 | | - | |
259 | 253 | | |
260 | 254 | | |
261 | | - | |
262 | | - | |
263 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
264 | 258 | | |
265 | 259 | | |
266 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments