-
Notifications
You must be signed in to change notification settings - Fork 190
[Experimental] Add QuickTasks: allowing fast code edits without starting new tasks #499
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?
Conversation
- introduce watch mode commands to enable, disable, and toggle the feature - implement watch mode service to monitor and process AI comments in files - add unit tests for watch mode service and comment processor - update experiments and configuration to include watch mode ✅ test(watchMode): add tests for watch mode service and comment processing - add tests for comment detection, processing, and application - include tests for watch mode service functionality and error handling 🌐 i18n(settings): add watch mode setting descriptions - provide user-facing strings for enabling watch mode feature through settings
- introduce WatchModeHighlighter class to handle AI comment highlighting with animation effects - refactor WatchModeService to use WatchModeHighlighter for AI comment animations, improving code modularity and maintainability
- Add support for customizable AI comment prefixes - Refactor comment detection and processing functions to use dynamic prefixes - Simplify and streamline logging and debug output 💄 style(watchMode): improve log messages - Update log messages for clarity and consistency - Remove redundant debug logs ✨ feat(watchMode): introduce comment prefix configuration - Allow configuration of AI comment prefixes in WatchModeConfig - Update UI and processing logic to accommodate new prefix settings
- update highlighter options for smoother animation effects - replace primary and secondary colors with baseColor and opacity parameters - implement a smooth pulsating effect using cosine wave for opacity ✨ feat(watchMode): add dynamic opacity handling for decorations - introduce methods to calculate and apply opacity for text decorations - create decorations with adjustable opacity for enhanced visuals 💄 style(watchMode): rename method for consistency - change highlightAICommentWithAnimation to highlightCommentWithAnimation in services for uniformity
…lace parsing - extend parseSearchReplaceBlocks to handle default file paths - support parsing blocks without explicit file paths when default is provided ♻️ refactor(debug): improve debug logging structure - use JSON structure for more readable console.debug logs ✨ feat(applySearchReplaceEdits): enhance fuzzy matching with line trimming - implement normalization of leading/trailing empty lines during search - improve match accuracy by considering trimmed document content ✨ feat(findUniqueSubstring): add trimmed search text handling - attempt unique substring search with trimmed search text first - increase robustness of unique substring identification ✨ feat(processAIResponse): pass current file path for better context - provide current file path to parseAIResponse for improved file path handling
- group edits by file path for efficient processing - streamline document opening and edit application - enhance fuzzy matching and error handling - add logging for debugging and tracking progress
- replace custom search and replace logic with MultiSearchReplaceDiffStrategy - simplify diff content construction for strategy compatibility - enhance error handling and logging for failed diff applications ✨ feat(commentProcessor): integrate MultiSearchReplaceDiffStrategy - add MultiSearchReplaceDiffStrategy for improved fuzzy matching and diff application - support 90% similarity threshold and 40 buffer lines for flexible matching
- introduce a new command "kilo-code.watchMode.quickCommand" for executing quick commands in watch mode - implement input box for user to input commands and process them within the active editor - enhance the WatchModeService to track and process the document initiating a quick command - update package.json to include the new command and keybindings ♻️ refactor(watchMode): improve document path handling - modify WatchModeService and commentProcessor to correctly map document paths in various scenarios - ensure "untitled" and "/dev/null" paths are replaced with the current document path during processing 🐛 fix(watchMode): address path mapping issues in AI response processing - resolve issues with incorrect file paths in AI response edits by ensuring correct mapping to current document paths during processing
- remove unused crypto import - rename directory to filePath for clarity - consolidate directory and file creation logic - improve debug content format with separators and timestamps 🐛 fix(watchMode): handle file writing errors - utilize try-catch to handle potential file writing errors - ensure append option is supported in writeDebugFile function
- comment out redundant log statements for cleaner console output - replace generic file names with actual paths in debug logs ♻️ refactor(commentProcessorTests): streamline test cases - simplify test cases by removing unnecessary mocks and fixtures - enhance readability by focusing on essential test logic ♻️ refactor(commentProcessor): improve filename handling in diffs - handle generic filenames by using the current file path - add warnings and replace with actual paths when necessaryWIP
- unify command registration by removing watchMode specific logic - update command identifiers in package.json for consistency ✅ test(watchMode): add tests for import context handling - verify AI prompt includes active files for context - ensure correct behavior when no active files are present ✅ test(importParser): implement tests for import parsing - validate parsing of ES6 and CommonJS imports - ensure transitive import handling and circular dependency prevention ✨ feat(watchMode): enhance context file collection - introduce getContextFiles function to gather relevant files - prioritize imported files and open editors for AI context These changes improve command registration consistency, enhance context handling in AI prompts, and ensure robust import parsing and testing.
- eliminate watch mode enable/disable/toggle commands from package.json - delete unused logic in registerCommands.ts and WatchModeService.ts - simplify file system watcher and document listener initialization ♻️ refactor(watchMode): enhance reflection handling - create reflectionWrapper.ts for reflection logic - introduce config.ts for reflection settings - update processAIResponse to utilize reflectionWrapper ✨ feat(watchMode): add reflection capability - implement reflection logic to handle failed AI response applications - configure reflection attempts and enable/disable through config.ts
- eliminate unnecessary comment for cleaner code readability
- eliminate recentlyProcessedFiles map and related debounce logic - streamline file change handling by removing obsolete methods ♻️ refactor(watchMode): clean up unused types - remove FileChangeData interface from types.ts - enhance code maintainability by deleting unused type definitions
- remove DocumentChangeData interface - replace isDocumentSave with shouldProcessComments for clarity ♻️ refactor(WatchModeService): streamline reflection processing - integrate active file context gathering directly into context setup - simplify reflection prompt builder functions
- eliminate quick command document tracking logic - simplify document handling in AI comment processing
- remove manual service restart in favor of window reload prompt - simplify watch mode experiment check and activation ♻️ refactor(extension): enhance watch mode service initialization - auto-start watch mode service if the experiment is enabled - remove unnecessary manual service start and stop calls ♻️ refactor(watchModeService): improve watch mode service lifecycle - consolidate service initialization and disposal logic - remove redundant active state checks and methods - relocate utility imports to utils directory ♻️ refactor(utils): relocate utility modules for better organization - move PromptDebugger and reflectionWrapper to utils directory - update import paths in related modules
- introduce ActiveFileTracker for better active file management - add dispose method to WatchModeHighlighter for resource cleanup ♻️ refactor(watchMode): improve code organization and efficiency - remove redundant active file management logic from WatchModeService - streamline document listener management and disposal process
|
- create unifiedDiffStrategy.ts to handle parsing and applying unified diffs - implement various utility functions and classes for diff handling - include error handling and logging for debugging purposes
- eliminate unused prompt debugging functions and imports - delete PromptDebugger utility file as it's no longer needed
- move highlight logic before log statement for better flow - add clear highlight on error to ensure proper cleanup
c83c6c1
to
2b30131
Compare
- introduce "WATCH_MODE" for quick tasks in various language settings - enable monitoring of files for comments to streamline quick changes - update descriptions to reflect new functionality across supported languages
This change adds a new
watchMode
experimental flag to the settings. When this mode is enabled, Kilo will look forKO!
anywhere in a code comment. When KILO recognizes a comment, it will immediately glow blue.Once the file is saved, KILO will automatically start working on editing the code to address the comment you left for it.
We even added a "quick task" keyboard shortcut (default Cmd + shift + M) will open a "command box" that you can enter your task text into directly.
This is great for short, quick changes you'd like to make in your code without triggering a full task. You can even trigger a quickTask while KILO is already working through a task.