Commit 1285217
committed
Improve Terminal memory usage and prevent crashing
fix(terminal): Ensure TerminalProcess respects user line limit setting
This commit fixes the terminal output line limiting functionality in TerminalProcess.ts:
1. Fixed the implementation to properly access the user's configured terminal output line limit through the sidebarProvider state
2. Added graceful fallback to default limit (1000 lines) when user settings are unavailable
3. Added detailed debug logging to help diagnose state access issues
4. Modified tests to focus on validating line limiting behavior
5. Added comprehensive documentation to explain how line limit settings are accessed and applied
The fix ensures the terminal output window properly respects user settings for line limits, preventing excessive memory usage while maintaining the exact number of lines configured by the user.
Signed-off-by: Rob Sherman <[email protected]>1 parent 931af8f commit 1285217
File tree
5 files changed
+489
-369
lines changed- src
- core
- integrations/terminal
- __tests__
5 files changed
+489
-369
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
855 | | - | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
856 | 858 | | |
857 | 859 | | |
858 | 860 | | |
| |||
0 commit comments