| Files | Last commit | Last update |
|---|---|---|
feat(cache): implement deep cache cleanup and lifecycle management - Add deep cache cleanup handler in IPC settings to clear browser session storage, caches, and indexed data - Create cacheLifecycleService for coordinated cache cleanup phases across application layers - Expose deepCleanCache API through preload bridge for renderer process access - Refactor SystemSettings cache clearing to use new lifecycle service and add separate deep clean button - Integrate cache cleanup into workspace manager lifecycle for automatic cleanup on workspace changes - Update electron type definitions to include new cache cleanup API - Consolidate cache management utilities in shared CacheService with lifecycle hooks - Improve cache clearing UX with distinct manual and deep clean options in settings UI | 6 months ago | |
feat: refactor token counting and logging mechanisms - Introduced lazy loading for the tokenizer in tokenCounter.ts to optimize initial load times. - Removed the monacoTypeService and its related functionalities to streamline the codebase. - Updated LargeFileViewer to utilize MonacoEditor for better performance and user experience. - Enhanced the Sidebar component with lazy loading for improved rendering efficiency. - Implemented a new file logging service with rotation capabilities to manage log files effectively. - Added tests for the new logging service and ensured token counting tests are aligned with the new tokenizer setup. - Cleaned up unused imports and optimized existing code for better maintainability. | 2 months ago | |
feat(tests): add comprehensive tests for streaming overlay consistency and file change handling - Introduced tests for streaming overlay consistency to ensure proper handling of assistant messages during state changes. - Added tests for file change buffering to isolate failed deletions and ensure proper handling of update failures. - Enhanced indexing service tests to verify concurrent initialization and proper handling of completed-index markers. - Implemented tests for structural index SQLite store to tolerate repeated chunk IDs without aborting the build. - Created tests for TreeSitter chunking to prevent duplicate chunk IDs and ensure correct chunk retention. - Added tests for vector store batch updates to handle deletion failures gracefully. - Implemented tests for sensitive settings to prevent access to credential keys. - Enhanced provider credential store tests to ensure non-destructive legacy OAuth migration. - Added tests for relaunch protocol to handle parent process accessibility issues. - Introduced tests for large preview write guard to prevent unintended file truncation. - Enhanced performance monitor memory tests to verify heap limit detection and provider behavior. | 2 months ago | |
feat(i18n): enhance translation key usage and locale consistency - Updated McpDependency to use TranslationKey for installNoteKey. - Refactored getRelativeTime to utilize translation functions for relative time descriptions. - Adjusted test imports to align with new shared i18n structure. - Added tests to ensure locale parity and prevent inline bilingual text. - Implemented checks to avoid inline bilingual expressions and dead fallbacks in translation calls. - Enhanced Vite configuration to include alias resolution for shared modules. | 2 months ago | |
feat:terminal performance optimization, lazy image loading, preview | 8 months ago | |
fix(agent): reject mixed edit_file batch payloads | 6 months ago | |
feat(i18n): map ErrorCode to translation keys instead of an inline copy table ERROR_MESSAGES: Record<ErrorCode, {en, zh}> was the second-largest local copy table in the repo. It is now ERROR_MESSAGE_KEYS: Record<ErrorCode, TranslationKey> and getErrorMessage is a single t() call. An exhaustive Record rather than t(errorCode.${code}): ErrorCode values are SCREAMING_SNAKE and cannot be interpolated into a camelCase key. The pattern follows PRIVILEGE_CAPABILITY_REASON_KEYS — a missing enum member is still a compile error, same as a template-literal key would be. Three codes point at error.* keys that already carried the identical copy (error.unknown, error.networkError, error.permissionDenied); the other 21 are new errorCode.* keys. error.timeout, error.apiKeyInvalid and error.rateLimited look mergeable but their copy appends advice ("Please try again."), and outside error.unknown and error.fileNotFound that whole block has no call site today — folding these into it would have been a copy rewrite wearing a merge's clothes. error.fileNotFound stays separate for a harder reason: it carries a {path} placeholder and getErrorMessage has no way to pass params. Where the merged keys' wording differed slightly, two comments quoting the old zh string were updated with it. | 2 months ago | |
feat: enhance Git diff and file change handling - Updated the Editor and EditorTabs components to improve file path handling for diffs, including support for commit and stash references. - Added new translations for Git-related messages in English and Chinese. - Introduced methods in GitService to retrieve changed files for commits and stashes, enhancing the ability to display file changes. - Implemented a utility to parse git --name-status output for structured file change representation. - Added unit tests for the new parsing utility to ensure accuracy and reliability and fix #159. | 2 months ago | |
refactor(json): one escape-aware JSON scanner and one tool-call markup vocabulary Streamed tool-call arguments are incomplete JSON by nature, so the same two questions ('where does this brace close', 'what closers are missing') were answered by four hand-written scan loops plus a naive regex counter inside experimental_repairToolCall. That counter knew nothing about strings or escapes: {"path":"a}b"} was judged short one brace, and it appended closers per bracket type rather than in stack order, so [{"a":1 was repaired into [{"a":1]} — balanced by count, still unparseable. - shared/utils/jsonScan: scanJson / findJsonValueEnd / sliceJsonValue / closeUnterminatedJson, used by the main-process adapter, the renderer argument parser and the tool-call repair path. - shared/utils/toolCallMarkup: the leaked-markup tag list both sides share, with the JSON-payload subset the main-process adapter converts spelled out next to the full list the renderer strips, so the split is documented instead of implied. - Deleted three unreferenced modules: renderer/utils/partialJson.ts, its test (named *.test.run.ts, so it never matched the vitest glob and reimplemented the function under test anyway), and shared/utils/jsonUtils.ts (375 lines, no importers outside the barrel). 19 new scanner tests. | 2 months ago | |
refactor(json): one escape-aware JSON scanner and one tool-call markup vocabulary Streamed tool-call arguments are incomplete JSON by nature, so the same two questions ('where does this brace close', 'what closers are missing') were answered by four hand-written scan loops plus a naive regex counter inside experimental_repairToolCall. That counter knew nothing about strings or escapes: {"path":"a}b"} was judged short one brace, and it appended closers per bracket type rather than in stack order, so [{"a":1 was repaired into [{"a":1]} — balanced by count, still unparseable. - shared/utils/jsonScan: scanJson / findJsonValueEnd / sliceJsonValue / closeUnterminatedJson, used by the main-process adapter, the renderer argument parser and the tool-call repair path. - shared/utils/toolCallMarkup: the leaked-markup tag list both sides share, with the JSON-payload subset the main-process adapter converts spelled out next to the full list the renderer strips, so the split is documented instead of implied. - Deleted three unreferenced modules: renderer/utils/partialJson.ts, its test (named *.test.run.ts, so it never matched the vitest glob and reimplemented the function under test anyway), and shared/utils/jsonUtils.ts (375 lines, no importers outside the barrel). 19 new scanner tests. | 2 months ago | |
perf(streaming): replace the IPC debounce with one shared leading-edge throttle The main-process sendEvent coalescer was a debounce, not a throttle: every appended event cleared and rescheduled the 30ms timer, so a continuous token stream was postponed until the stream ended and then arrived in one burst. The PTY batcher in secureTerminal.ts had the same defect in the other direction - its comment claimed "first chunk is delivered immediately" while the code was trailing-edge, making the first chunk wait a full 16ms. Extract one keyed leading-edge throttle with accumulation into src/shared/utils/keyedLeadingEdgeThrottle.ts and use it in both places. The existing generic throttle() in debounce.ts cannot be reused for streams because it keeps only the last call's arguments, which would drop tokens; accumulate is what makes it stream-safe. Three invariants are pinned by tests/shared/keyedLeadingEdgeThrottle.test.ts: first chunk has zero latency, a scheduled window is never postponed by later pushes, and an empty window resets the key so the first chunk after a pause is again immediate. flush keeps the ordering guarantee for tool-boundary events; release drops pending data without emitting. This also removes the per-request entry leak: the old eventBuffer/flushTimers maps were only pruned inside flushEvents, so abort and error paths left entries behind. Idle windows now delete the key themselves. Main bounds IPC frequency (16ms); the renderer's StreamingBuffer remains the sole authority on visual pacing (33ms, aligned to rAF). The golden test's four affected assertions were updated deliberately - the leading edge means the first buffered event now ships in its own envelope. The recorded-debounce case is replaced by two positive pacing cases: sparse tokens each ship immediately, and a token stream denser than the window coalesces into 16ms batches instead of growing without bound. | 2 months ago | |
test(streaming): pin main-process stream wire behavior and render pacing This path had zero tests. The same IPC payload shape was declared four times, the kebab->snake translation was coordinated by two hand-maintained switches plus a hardcoded string array, serializeEvent returned any with a default: return event fallthrough, and the renderer switch had no default. So moving an event from the immediate channel to the batched one put it on the wire in kebab-case and got it silently dropped -- tool calls vanish entirely while typecheck stays green. That regression happened for real and two rounds of pure static review failed to locate it. Record the current behavior on unmodified HEAD first, with zero production changes: - streamingServiceGolden: drives processStream directly (private, reached by cast). The fake result needs exactly five properties, the fake window two methods. Assertions come in two layers: the channel:type sequence first (readable at a glance, points straight at the cause), then full payload literals (catches field renames). Inline literals rather than snapshots -- a wire-protocol change is invisible in a snapshot diff, which is the exact opposite of what this test is for. - streamingServiceContract: real streamText + MockLanguageModelV3, mocking only modelFactory's two exits, entry point generate(). Assertions are deliberately coarse (channel:type only); it pins the AI SDK part names and generate()'s outer error orchestration. - streamingBufferPacing: the renderer-side display cadence invariants. Also extracts forEachStreamChunk: the golden test has to flatten "what main sent" into "what the renderer actually sees", and it must use the same implementation as preload or it isn't pinning real behavior. Rewiring preload to call it comes next (that entry has no resolve.alias, so the import must be relative). Running these confirmed four pre-existing bugs, all pinned as current behavior rather than fixed: - sendEvent debounces instead of throttling: with a token every 20ms, nothing is sent within 95ms; everything is held until done forces a flush. This is the "holds a paragraph then dumps it" symptom. - On mid-stream errors GenerationRecovery replays unconditionally, and there is no reset event on the wire, so the renderer appends the text twice. - Abort emits two llm:error events; today only stream.ts's isResolved guard absorbs the second. - StreamingBuffer makes the first token wait a full 33ms, contradicting both its own "flush the first chunk immediately" comment and its claim of using requestAnimationFrame. Typecheck passes for both tsconfigs; full suite 158 files / 988 tests green. | 2 months ago | |
feat: add hasAsciiControlCharacters utility and integrate it into file path validation | 2 months ago | |
fix: harden git status sync and privilege handling | 2 months ago | |
feat: add Node.js package manager support and enhance task discovery in TerminalPanel | 2 months ago | |
feat: Enhance read_file tool schema to merge path and paths, improving usability - Updated the read_file schema to allow both path and paths to coexist without conflict, treating them as a union. - Implemented logic to normalize input, ensuring that empty paths do not persist and that valid single or multi-file requests are processed correctly. - Added comprehensive tests to cover various scenarios, including regression tests for previously failing cases. - Introduced memory leak detection improvements in PerformanceMonitor, with new thresholds and conditions to avoid false positives during startup. - Added synchronous log flushing in Logger to ensure critical logs are not lost during process exit. - Enhanced AiAttributionService to improve commit analysis and caching of existing notes. | 2 months ago | |
feat: enhance remote file upload functionality - Updated the ElectronAPI to support uploading both files and directories, allowing users to specify the upload mode. - Enhanced the remoteShell module to handle directory uploads recursively, including tracking uploaded files and skipped symlinks. - Improved the RemoteFileBrowser component to provide user feedback during uploads and handle different upload modes. - Added utility functions for building remote upload paths and managing upload statistics. - Updated relevant tests to ensure new upload functionality is covered and behaves as expected. | 2 months ago | |
refactor: reorganize service initialization and improve code structure - Extract app initialization logic into dedicated initService module - Create electronAPI service wrapper for main process communication - Add retry utility for resilient async operations - Create shared IPC types for type-safe electron communication - Consolidate service exports in services/index.ts - Simplify App.tsx by delegating initialization to initService - Remove unused imports and clean up code organization - Improve startup metrics tracking and initialization flow - Refactor service dependencies to reduce circular imports - Enhance code maintainability by separating concerns | 10 months ago | |
refactor: replace console calls with unified Logger | 10 months ago | |
fix(main): isolate file watchers per window and add cross-platform CI with browser regression tests | 17 days ago | |
refactor(json): one escape-aware JSON scanner and one tool-call markup vocabulary Streamed tool-call arguments are incomplete JSON by nature, so the same two questions ('where does this brace close', 'what closers are missing') were answered by four hand-written scan loops plus a naive regex counter inside experimental_repairToolCall. That counter knew nothing about strings or escapes: {"path":"a}b"} was judged short one brace, and it appended closers per bracket type rather than in stack order, so [{"a":1 was repaired into [{"a":1]} — balanced by count, still unparseable. - shared/utils/jsonScan: scanJson / findJsonValueEnd / sliceJsonValue / closeUnterminatedJson, used by the main-process adapter, the renderer argument parser and the tool-call repair path. - shared/utils/toolCallMarkup: the leaked-markup tag list both sides share, with the JSON-payload subset the main-process adapter converts spelled out next to the full list the renderer strips, so the split is documented instead of implied. - Deleted three unreferenced modules: renderer/utils/partialJson.ts, its test (named *.test.run.ts, so it never matched the vitest glob and reimplemented the function under test anyway), and shared/utils/jsonUtils.ts (375 lines, no importers outside the barrel). 19 new scanner tests. | 2 months ago | |
refactor(agent): centralize tool output bounding; never cut JSON mid-structure Tool results are the only channel that pours arbitrarily large external data into the model context. The bounding logic was scattered across several places that contradicted each other, which left structured results actually broken. Adds shared/utils/toolOutput.ts as the single convergence point: - boundJsonOutput walks a degradation ladder (full -> drop bodies -> drop positions -> counts/names only); every rung is valid JSON and carries a hint telling the model how to recover what was dropped - boundTextOutput keeps the head or tail per the tool's declared signal end, surrogate-pair safe - boundFileExcerpt keeps only the head and reports the next start_line - clampOutputBudget is the sole authority on the budget Fixes: - find_symbol / get_document_symbols / find_references / get_diagnostics / navigate_symbol returned JSON that was sliced head+tail into syntactic wreckage; JSON.parse failed on both the model side and the UI side, where the symbol preview silently degraded to an empty list - read_file was truncated twice (executor at 12000, boundary at 10000). Multi file reads were worse: each file was cut to the full budget, concatenated, then sliced once more as a whole, leaving everything after the first file in fragments. The budget is now divided before concatenation, not after - search_files and symbol candidate enumeration dropped results silently, so the model could not tell "nothing found" from "not finished looking" - read_terminal_output / send_terminal_input / stop_terminal had definitions and executors but belonged to no tool group, while the background-process result text explicitly instructs the model to call them Removals (no compatibility shims): - TOOL_TRUNCATE_DEFAULTS, which never took effect: its maxLength was always overridden by maxToolResultChars. Its entries for long-removed tools go too - detectContentStrategy, which guessed head/tail ratios by regex-matching the content: a source file that merely mentioned "error" got cut from the front - maxSingleFileChars, which duplicated the boundary budget (also from defaults/types/settings and the settings UI) - partialJson.ts returns to its single responsibility: streaming JSON parsing Also: - get_document_symbols renames path to relative_path, matching the rest of the LSP family; this also fixes symbol and diagnostics cards that had been rendering <unknown path> - get_document_symbols gains max_symbols and find_references gains max_references, aligning with find_symbol's max_matches; hitting any cap now always reports the true total - find_references resolves containing symbols only for the references it will actually return, no longer paying a full file read plus documentSymbol for references it discards | 2 months ago | |
fix(lsp): persist servers and resolve project runtimes | 3 months ago |
| Files | Last commit | Last update |
|---|---|---|
| 6 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 8 months ago | ||
| 6 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 10 months ago | ||
| 10 months ago | ||
| 17 days ago | ||
| 2 months ago | ||
| 2 months ago | ||
| 3 months ago |