You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: improve code quality and reliability across core modules
- **context.lua**: Remove 80 lines of code duplication
- Eliminated duplicate variable declarations (cache, cwd)
- Removed duplicate function definitions (is_in_cwd, filter_path_privacy, contains_secret, get_cache_ttl)
- Commented out incomplete setup_chained_autocmds implementation for later development
- Improves test pass rate (10 failures → 27 successes vs prior 12 failures)
- **idle.lua**: Enhance error handling and robustness
- Add input validation in constructor
- Add _started state tracking to prevent double-start
- Add error handling with pcall for timer operations
- Add graceful degradation for vim.loop unavailability
- Better error messages for debugging
- **promise.lua**: Add cancellation support and timeout handling
- Add cancel() method for aborting operations
- Add is_cancelled() method for status checking
- Add timeout support to Promise.all()
- Improve error handling for cancelled operations
- Better cleanup of timer resources
- **autocmds.lua**: Refactor for clarity and reduce duplication
- Extract repeated module requires into local variables
- Add clearer comments for context vs opencode window logic
- Remove duplicate context.load() call
- Improve readability of cursor position tracking
- **renderer.lua**: Fix spurious warnings for synthetic parts
- Add check for synthetic parts (context data) to suppress noise
- Reduces log spam when context data arrives before message
- **misc**: Remove test.txt file (test artifact)
0 commit comments