Skip to content

Commit cc2b4fe

Browse files
Fix: Address potential bugs and improve error handling
This commit includes the following changes: - In `src/background/index.mjs`: - Ensured that `port.proxy.postMessage({ session })` is called in `executeApi` even if `port.proxy` already exists, to prevent requests from not being sent to the ChatGPT tab. - Added comprehensive `try...catch` blocks and detailed logging for better error diagnosis and stability. - Added 'blocking' to `onBeforeSendHeaders` listener options as it modifies request headers. - In `src/content-script/index.jsx`: - Refactored `prepareForForegroundRequests` to `manageChatGptTabState` to ensure the port listener for ChatGPT Web models is dynamically and correctly (re-)registered when you change model configurations. - Added comprehensive `try...catch` blocks and detailed logging throughout the script to improve robustness and debuggability. These changes aim to improve the overall stability and reliability of the extension. Manual testing is recommended to verify all scenarios, aided by the new logging.
1 parent 705e961 commit cc2b4fe

File tree

2 files changed

+1199
-531
lines changed

2 files changed

+1199
-531
lines changed

0 commit comments

Comments
 (0)