-
Notifications
You must be signed in to change notification settings - Fork 3
fix(sandbox): reset SandboxManager singleton before re-initializing in session_start #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -396,6 +396,9 @@ export default function (pi: ExtensionAPI) { | |
| : undefined; | ||
|
|
||
| try { | ||
| // Reset any stale state from a previous session (e.g. after /new) | ||
| try { await SandboxManager.reset(); } catch {} | ||
|
|
||
| await SandboxManager.initialize( | ||
|
Comment on lines
398
to
402
|
||
| { | ||
| network: activeConfig.network, | ||
|
Comment on lines
+399
to
404
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty
catch {}blocks are likely to be flagged by the repo’s Biome linter (recommended rules) and also make it unclear that the error is intentionally ignored. Add an explanatory comment inside the catch block (or otherwise handle/log the error intentionally) to keep linting and intent consistent with the existingsession_shutdownhandler.