Describe the bug
Zoo can crash with Provider ended the request: t.toLowerCase is not a function when the VS Code terminal default profile setting is misconfigured with a non-string value.
To Reproduce
Steps to reproduce the behavior:
- Open VS Code settings JSON.
- Set the terminal default profile to a non-string value. For example, on Windows:
{
"terminal.integrated.defaultProfile.windows": 1
}
Other invalid values such as true, [], or {} can also reproduce the issue.
- Run Zoo and trigger a request that causes Zoo to resolve the shell configuration.
- See error:
Provider ended the request: t.toLowerCase is not a function
Expected behavior
Zoo should not crash when VS Code terminal profile settings contain an invalid type.
Screenshots
N/A
Video
N/A
What version of zoo are you running
3.62.0
Additional context
This seems to be a runtime type validation issue rather than a TypeScript typing issue. config.get<string>() only affects the static type, but it does not guarantee that the actual value from user settings is a string.
The current code assumes defaultProfileName is a string before calling .toLowerCase(), which can fail when the VS Code settings JSON is manually edited or corrupted.
Describe the bug
Zoo can crash with
Provider ended the request: t.toLowerCase is not a functionwhen the VS Code terminal default profile setting is misconfigured with a non-string value.To Reproduce
Steps to reproduce the behavior:
{ "terminal.integrated.defaultProfile.windows": 1 }true,[], or{}can also reproduce the issue.Expected behavior
Zoo should not crash when VS Code terminal profile settings contain an invalid type.
Screenshots
N/A
Video
N/A
What version of zoo are you running
3.62.0
Additional context
This seems to be a runtime type validation issue rather than a TypeScript typing issue.
config.get<string>()only affects the static type, but it does not guarantee that the actual value from user settings is a string.The current code assumes
defaultProfileNameis a string before calling.toLowerCase(), which can fail when the VS Code settings JSON is manually edited or corrupted.