Commit Graph

3999 Commits

Author SHA1 Message Date
can1357 52719d1a7c refactor: restructured monorepo TypeScript config and build tasks for unified setup
- Migrated all package tsconfig files to extend tsconfig.workspace.json for unified TypeScript configuration across monorepo.
- Consolidated build and check scripts across 10+ packages to use biome for linting/formatting with separate type checking via tsgo.
- Renamed build scripts from build:native and build:binary to build for simplified command naming across packages/natives and packages/coding-agent.
- Refactored CI workflow to invoke bun tasks instead of inline shell scripts, reducing workflow complexity by 40+ lines.
- Removed sync-exports.ts and repro-stuck.ts scripts; deleted path aliases from tsconfig.base.json in favor of workspace-based configuration.
- Updated turbo.json with new task definitions (check:types, lint, fmt, fix) and removed build:native/embed:native tasks.
2026-04-08 17:05:20 +02:00
can1357 61dff04ab1 fix(chunk): corrected blank line insertion to preserve tight packing in sibling declarations
- Corrected blank line insertion logic to preserve tight packing for sibling declarations when editing packed containers.
- Extracted visible_child_chunks() and sibling_gap_has_blank_line() helpers to unify child filtering and gap detection logic.
- Updated VARIABLE_TRAITS to mark variables as packed and addressable_leaf for consistent spacing behavior.
- Changed Key chunk kind to use PACKED_LEAF_TRAITS for proper tight packing alignment.
- Added regression tests for TOML table and TypeScript variable packing after insertions.
2026-04-08 16:08:31 +02:00
can1357 7a3dc2963a test(coding-agent): restructured streaming abort tests with timing control for isolation
- Refactored test suite to use top-level hooks instead of describe block for improved test isolation.
- Enhanced streaming mock to support delayed delta emission via waitBeforeFirstDelta promise.
- Improved auto-generated file abort test with precise timing control to verify abort occurs before delta updates.
2026-04-08 15:28:08 +02:00
can1357 f2fceb27ad chore: bump version to 14.0.1 2026-04-08 15:07:01 +02:00
can1357 3f4384f6b1 fix(auto-generated-guard): corrected file not found handling in marker detection
- Fixed file not found error handling in auto-generated marker detection to gracefully return undefined instead of propagating errors.
- Made assertEditableFileContent function synchronous to simplify API and improve error handling consistency.
- Updated test assertions to match synchronous function behavior using toThrow instead of rejects patterns.
- Removed obsolete test case for doc comment preservation during replace operations.
2026-04-08 15:06:47 +02:00
can1357 4ca9bd9c78 refactor: migrated cloning logic to centralized utility for consistency
- Extracted `structuredCloneJSON()` utility to centralized package for consistent deep cloning with JSON fallback.
- Consolidated duplicate cloning logic across openai-responses, openai-responses-shared, and validation modules.
- Added resilience to message cloning in extension runner with try-catch fallback for non-cloneable objects.
- Optimized context emission in extension runner by skipping message cloning when no handlers exist.
- Added optional `contentIndex` field to AssistantMessageEvent variants for type consistency.
2026-04-08 14:51:35 +02:00
can1357 757bdca7a1 feat: added assistant message event interception for streaming edit abort control
- Added `onAssistantMessageEvent` callback to Agent API for inspecting and aborting assistant streaming events.
- Added `setAssistantMessageEventInterceptor()` method to dynamically update assistant message event handlers.
- Converted `checkAutoGeneratedFileContent()` from async to synchronous for improved streaming edit abort detection performance.
- Implemented LRU caching in auto-generated file detection with early path-based checks to prevent unnecessary edits.
- Refactored streaming edit pre-caching to use assistant message event interception for real-time abort capability.
- Extracted `peekFile()` utility for efficient file prefix reading with pooled buffer reuse strategy.
2026-04-08 14:51:15 +02:00
can1357 211e5369a0 refactor(coding-agent): migrated image utilities to shared pi-utils package
- Extracted image metadata detection and MIME type utilities to @oh-my-pi/pi-utils package for shared use across projects.
- Consolidated image-input.ts and mime.ts modules into image-loading.ts with simplified API removing redundant metadata parameters.
- Updated all import paths across coding-agent to use readImageMetadata from @oh-my-pi/pi-utils instead of local utilities.
- Added peek-file utility module to @oh-my-pi/pi-utils with buffer pooling for efficient file header reading.
2026-04-08 14:42:51 +02:00
can1357 78428b58b4 docs(chunk): clarified region selection guidance to prevent attribute loss
- Enhanced chunk-edit documentation with guidance on selecting narrowest regions to prevent accidental attribute/decorator loss.
2026-04-08 13:34:32 +02:00
can1357 5185d00bde refactor(chunk): simplified leading trivia handling by removing duplicate preservation logic
- Removed leading trivia preservation logic that duplicated attributes during whole-chunk replacements.
- Deleted LeadingTriviaFamily enum and related detection/matching functions (preserve_attached_leading_trivia, replacement_supplies_leading_trivia, detect_leading_trivia_family, matches_leading_trivia_family).
- Added test case verifying that whole-chunk replace operations do not duplicate attributes.
2026-04-08 13:34:14 +02:00
can1357 b2bad682d4 feat(chunk): added hierarchical tree visualization for chunk parent-child relationships
- Enhanced chunk listing output with hierarchical tree visualization showing parent-child relationships and signatures.
- Refactored chunk display logic into recursive emit_children function to support nested tree traversal.
2026-04-08 13:34:01 +02:00
can1357 2bdc80eedc fix: AsyncDrain double-allocation bug and history test singleton isolation 2026-04-08 12:52:32 +02:00
can1357 468601935c fix(test): use awaitable add() in history storage compat test 2026-04-08 12:43:36 +02:00
can1357 88595b541c fix(test): use setImmediate drain instead of sleep for history insert timing 2026-04-08 12:30:12 +02:00
can1357 edab058993 refactor: remove pi-ref lazy barrel import, fix test mocks for Bun 1.3.11
- Remove pi-ref.ts deferred barrel import (no longer needed after circular dep fix)
- Update extension/hook/custom-tool/custom-command loaders to use direct imports
- Fix warmPythonEnvironment mock return type in python tool tests (add docs field)
2026-04-08 12:21:17 +02:00
can1357 003eccce52 fix: remove unused type alias and fix test compatibility with Bun 1.3.11
- Remove unused ParsedChunkTarget type alias (lint error)
- Increase setImmediate timing in history storage compat test
- Mock warmPythonEnvironment in python tool tests
- Fix tlaplus LSP test to spy on $which instead of Bun.which
2026-04-08 12:17:37 +02:00
can1357 99fac3419b chore: bump version to 14.0.0 2026-04-08 11:51:59 +02:00
can1357 26d7783370 fix(chunk): corrected chunk boundary calculations to prevent out-of-range violations
- Added bounds clamping to prologue and epilogue byte calculations to prevent out-of-range boundary violations.
- Extended chunk boundaries for indent-based languages when epilogue exceeds calculated range with trailing newline.
- Added comprehensive test coverage for Python chunk editing operations including body/head replacement and indentation preservation.
- Extracted working directory formatting logic into reusable utility function and applied tab sanitization to bash command previews.
2026-04-08 11:50:42 +02:00
can1357 fee6b7858a refactor: restructured chunk region API and storage layer for consistency
- Renamed ChunkRegion::Inner variant to Body across Rust and TypeScript for clearer semantics.
- Renamed chunk edit tool parameter from target to sel and made op required instead of optional.
- Removed region aliases (prologue, epilogue, inner) and simplified region validation to accept only head, body, tail.
- Replaced db.exec() calls with db.run() for SQL execution in auth-storage, agent-storage, and history-storage.
- Enhanced chunk edit documentation with comprehensive examples, indentation rules, and CRC refresh guidance.
- Improved chunk statement merging logic to consolidate leaf statements into parent function bodies by default.
2026-04-08 11:49:14 +02:00
can1357 4c03bad90d feat(coding-agent): added Auto QA tool and Python environment warmup for tool reliability
- Added Auto QA tool (`report_tool_issue`) for automated tracking of unexpected tool behavior with environment variable and setting support.
- Added Python tool environment warmup on first execution to ensure prelude helpers are available before use.
- Fixed Python prelude introspection to respect execution timeout and signal options, preventing hangs.
- Refactored prelude documentation caching and loading logic into reusable helper functions with test environment awareness.
- Enhanced kernel introspection with optional timeout and signal parameters for better execution control.
- Added system prompt guidance to encourage agents to report tool issues via Auto QA when available.
2026-04-08 11:49:13 +02:00
can1357 4058582a5a refactor: restructured chunk syntax and region semantics for clarity
- Refactored chunk anchor format from bracket notation to marker-based syntax with +++ and --- delimiters.
- Renamed chunk edit regions from @container/@prologue/@body/@epilogue to @head/@inner/@tail for clearer semantics.
- Simplified line-number selector resolution to auto-convert line targets to chunk paths with checksum format.
- Removed PI_DEV debug addon loading logic; PI_DEV now only enables loader diagnostics without changing candidate filenames.
- Added full-name aliases for chunk kind patterns (decls, expr, fn, meth, mod, params, ret, stmts, var) alongside abbreviated forms.
- Refactored sanitize_node_kind() to return &str instead of String; adjusted identifier passing logic across AST modules.
2026-04-08 11:49:13 +02:00
can1357 79cbd1ed47 refactor(chunk): migrated chunk naming to type-safe ChunkKind enum
- Replaced string-based chunk naming with type-safe ChunkKind enum across 35+ AST classifier modules.
- Refactored ChunkNode to use optional identifier and ChunkKind instead of name string for semantic clarity.
- Created new kind.rs module with ChunkKind enum (150+ variants) and trait-based metadata system.
- Removed string prefix-based chunk type detection and replaced with ChunkKind enum matching throughout.
- Updated chunk API signatures to accept ChunkKind and optional identifier instead of formatted names.
2026-04-08 11:49:12 +02:00
can1357 7a4ef2b8d6 feat(ai): added OpenRouter provider with strict mode detection
- Added support for OpenRouter provider with strict mode detection.
2026-04-08 11:49:12 +02:00
can1357 bf97331311 feat(ai): added JSON healing for literal escapes and trailing junk in LLM output
- Added automatic cleaning of literal escape sequences (`\n`, `\t`, `\r`) in JSON parsing to handle LLM encoding confusion.
- Added support for healing JSON with trailing junk after balanced containers (e.g., `]\n</invoke>`).
- Implemented `cleanLiteralEscapes()` function to distinguish between literal backslash sequences outside JSON strings and actual escape sequences within strings.
- Added 2 test cases validating escape sequence cleaning and trailing junk recovery in tool argument coercion.
2026-04-08 11:49:12 +02:00
can1357 6e19642315 refactor(pi-natives): simplified NAPI naming by removing explicit js_name attributes
- Removed explicit js_name attributes from NAPI macros across all modules, relying on automatic snake_case to camelCase conversion.
- Renamed internal functions in keys.rs for clarity: parse_kitty_sequence_napi() -> parse_kitty_sequence() and parse_kitty_sequence() -> parse_kitty_sequence_bytes().
- Renamed text.rs functions for consistency: set_env_tab_width() -> set_default_tab_width() and get_env_tab_width() -> get_default_tab_width().
- Updated documentation to reflect automatic NAPI naming convention and simplified export mapping tables.
2026-04-08 11:49:12 +02:00
can1357 fb67603a88 refactor: restructured chunk regions to Head/Inner/Tail with optional targeting
- Renamed chunk region identifiers from Container/Prologue/Body/Epilogue to Head/Inner/Tail with updated semantics.
- Changed default chunk edit region behavior to omit @region suffix for full chunk targeting instead of explicit @container.
- Made trait and interface members addressable by preventing collapsing in chunk resolution logic.
- Updated chunk read and edit documentation with new region names and simplified selector examples.
- Refactored region handling to use Option<ChunkRegion> for optional region targeting across Rust and TypeScript implementations.
- Added ParsedSelector struct and is_known_region_name() validation function for improved region parsing.
2026-04-08 11:49:10 +02:00
can1357 0c351738fa feat: added auto-retry tracking and completion detection for agent settlement
- Added auto-retry event tracking and message-end event handling to improve agent completion detection.
- Implemented is_effectively_complete() method to detect agent completion based on review sections, todo state, and quiet period.
- Enhanced wait_for_settle() logic to handle auto-retry delays and graceful timeout recovery instead of immediate failure.
- Added token usage tracking from partial message updates to capture intermediate token counts.
- Refactored note_tool_end() to only update activity on error, removing redundant success case.
- Removed last_activity updates from todo reminder and auto-clear handlers to simplify state management.
2026-04-08 08:59:04 +02:00
can1357 16ad914da0 feat(coding-agent): added LSP status updates to welcome banner on warmup completion
- Added real-time LSP server status updates in welcome banner when background warmup completes.
- Changed welcome banner status icon from warning to muted pending symbol for improved visual clarity.
- Extracted LSP server conversion logic into dedicated helper methods for better maintainability.
- Added comprehensive test coverage for interactive mode LSP startup welcome banner updates.
2026-04-08 08:58:39 +02:00
can1357 a4f9464aa4 fix(chunk): corrected newline handling in prologue/epilogue replacements
- Fixed newline preservation in prologue/epilogue replacements to prevent unintended body content joining.
- Fixed markdown table pipe detection to treat pipes as content rather than gutter markers.
- Fixed region display calculation to extend to line beginning for consistent indentation handling.
- Removed unused `region` field from `ResolvedChunk` struct to simplify internal state management.
- Added test coverage for body-only content extraction, prologue indentation consistency, and container prepend operations.
2026-04-08 08:56:09 +02:00
can1357 fd1e11c4e1 feat(coding-agent): enabled async Codex websocket prewarm for faster startup
- Made Codex websocket prewarm asynchronous and non-blocking during session creation for faster startup.
- Added Codex websocket status updates in interactive mode when prewarm completes or fails.
- Introduced `getOpenAICodexTransportDetails()` to determine transport preferences before prewarm initialization.
- Refactored Codex prewarm to fire in background without awaiting, matching LSP server warmup pattern.
- Updated CHANGELOG entries for ai and coding-agent packages to reflect Codex startup event monitoring and async prewarm behavior.
2026-04-08 08:54:05 +02:00
can1357 a6589d8e8c perf(utils): eliminated xcrun spawning for macOS toolchain binary resolution
- Replaced xcrun subprocess spawning with cached directory listing for 10-100x faster macOS toolchain binary resolution.
- Introduced XCODE_BINS set and isXcodeBin() filter to fast-reject non-Xcode commands without filesystem access.
- Implemented getDeveloperDirs() to resolve active Xcode directory via $DEVELOPER_DIR and /var/db/xcode_select_link symlink without spawning processes.
- Added getMacosToolPaths() to lazily compute and cache deduplicated toolchain bin directory listings on first lookup.
2026-04-08 08:47:54 +02:00
can1357 7f88a0c24c refactor: restructured logger.time() API to accept function references with wall-clock markers
- Refactored logger.time() API to accept function references and arguments separately instead of wrapped callbacks.
- Replaced RingBuffer-based timing with wall-clock markers and async span tracking for improved timing accuracy.
- Updated 20+ call sites across executor, kernel, main, and tools modules to use new logger.time() signature.
- Removed parsePath() helper function and inlined path.split() calls in settings module.
- Added test case verifying model selection without auth validation during startup.
2026-04-08 08:47:32 +02:00
can1357 593add00fb feat(lsp): implemented async LSP server discovery with real-time startup events
- Added asynchronous LSP server discovery and warmup at startup via `discoverStartupLspServers()` function.
- Added LSP startup event channel (`lsp:startup`) for real-time server status notifications during warmup.
- Added `LspStartupServerInfo` type to track LSP server status (connecting, ready, error) throughout lifecycle.
- Changed LSP server warmup from blocking synchronous operation to non-blocking background task.
- Refactored interactive mode to subscribe to LSP startup events and display real-time server status updates.
2026-04-08 07:15:11 +02:00
can1357 53c78766f3 feat: introduced code-editing tool evaluation framework with multi-model benchmarking
- Added comprehensive code-editing tool evaluation framework with `rate-edit-tool.py` supporting multi-model benchmarking across TypeScript, Rust, Python, and Markdown.
- Enhanced chunk edit error messages to display fresh chunk context with resolved selectors and anchors for improved debugging.
- Added `--no-lsp` flag to benchmark RPC arguments for TypeScript edit task evaluation.
- Improved chunk body boundary calculation to correctly include closing line indentation in epilogue.
- Added comprehensive benchmark results dataset (`all_models_results.json`) with performance metrics for 6 AI models.
- Enhanced chunk-edit documentation with clarified `@body` selector behavior and append/prepend examples.
2026-04-08 07:11:53 +02:00
can1357 53c8d33758 feat(acp): implemented multi-session support with forking and lifecycle management
- Added multi-session support to ACP mode enabling session forking, resumption, and closure operations.
- Added session model state reporting and unstable_setSessionModel RPC command for direct model configuration.
- Added turn-level usage tracking and stable message ID tracking for assistant chunks in ACP responses.
- Added Settings.cloneForCwd() method and ExtensionRunner.getFlagValues() for configuration isolation across sessions.
- Fixed ACP session cleanup to properly cancel in-flight prompts and dispose resources on disconnect.
- Refactored AcpAgent to manage multiple concurrent sessions with per-session lifecycle instead of single session.
2026-04-08 06:54:33 +02:00
can1357 58c0d52679 refactor: restructured chunk tree initialization and extraction logic for clarity
- Refactored chunk tree initialization to use explicit prologue/epilogue byte boundaries instead of None values.
- Extracted chunk resolution logic to use split_selector_crc_and_region() helper for improved code reuse.
- Reorganized package.json exports across multiple modules (autoresearch, cli, dap, edit, modes) for better API surface clarity.
- Updated test expectations for Go receiver method rendering and chunk selector formats to match refactored output.
- Consolidated notebook conversion logic and removed unused _createErrorToolResult helper function.
- Improved leading trivia preservation in chunk edits by detecting and maintaining line prefix whitespace.
2026-04-08 06:30:50 +02:00
can1357 d1d0187859 feat(omp-rpc): introduced host tool execution framework with custom tool registration
- Added host tool execution framework with HostTool, HostToolContext, and host_tool() factory for custom tool integration.
- Added RpcConcurrencyError exception and _PromptLifecycleCoordinator to enforce single-flight constraint on prompt lifecycle methods.
- Enhanced JSON parsing with 10 validation helpers and enum frozensets for safe field extraction with detailed error messages.
- Replaced manual event/error list management with _BoundedHistory for bounded-size history with offset tracking.
- Added deep JSON cloning to prevent external mutations of stored payloads and improved UTF-8 error handling in subprocess stderr.
- Added custom_tools parameter to RpcClient and set_custom_tools() method for runtime tool registration.
2026-04-08 06:28:27 +02:00
can1357 821ec9570d feat(coding-agent): enabled bidirectional RPC tool execution with host-owned custom tools
- Added RPC host-owned custom tools framework enabling bidirectional tool execution between RPC client and host.
- Added `set_host_tools` RPC command and `refreshRpcHostTools()` method for dynamic tool registry management.
- Added RpcHostToolBridge and RpcHostToolAdapter classes with abort signal handling for cancellable tool execution.
- Added `defineRpcClientTool` helper and customTools option to RpcClient for embedding host tool definitions.
- Added comprehensive test suite covering RPC host tool execution, cancellation, and client-host communication.
2026-04-08 06:23:27 +02:00
can1357 6a0b617e55 refactor(coding-agent/edit): extracted line-hash utilities to dedicated module
- Extracted line-hash utilities into dedicated module for improved code organization.
- Moved computeLineHash, formatLineHash, and HASHLINE_NIBBLE_ALPHABET from hashline.ts to new line-hash.ts module.
- Updated import paths across 6 files to reference new line-hash module location.
- Consolidated line-hashing functionality into single-responsibility module without behavior changes.
2026-04-08 06:01:22 +02:00
can1357 a21a542afd refactor(prompt-templates): migrated prompt utilities to pi-utils package
- Extracted prompt rendering and formatting utilities from coding-agent to centralized pi-utils package with new API surface (prompt.render, prompt.format, prompt.registerHelper).
- Migrated parseFrontmatter utility from coding-agent to pi-utils package; updated 8 files to import from @oh-my-pi/pi-utils.
- Removed 170-line prompt-format.ts module and consolidated 192 lines of Handlebars helper registrations into pi-utils prompt module.
- Updated 60+ files across coding-agent and typescript-edit-benchmark to use new prompt.render() and prompt.format() API from pi-utils.
- Simplified prompt-templates.ts by delegating core functionality to pi-utils while retaining custom helper registrations (jtdToTypeScript, jsonStringify, etc.).
2026-04-08 05:47:35 +02:00
can1357 6d07944654 refactor: migrated binary detection to $which() utility across codebase
- Replaced all Bun.which() calls with $which() utility from @oh-my-pi/pi-utils across 22 files.
- Removed findBashOnPath() wrapper function from procmgr.ts, consolidating binary path resolution.
- Updated AGENTS.md documentation to reflect new $which() API usage pattern.
- Centralized binary detection logic through shared utility, reducing code duplication.
2026-04-08 05:28:22 +02:00
can1357 528d8225b7 feat(omp-rpc): added error handling and history bounds to RPC client
- Added error handling callbacks (on_protocol_error, on_listener_error) and error history tracking (protocol_errors, listener_errors properties) for RPC failures.
- Added max_event_history and max_stderr_chunks parameters to bound retained history in long-lived hosts, preventing unbounded memory growth.
- Added assistant_text_with_thinking() and message_text_with_thinking() helper functions for backward compatibility with thinking block inclusion.
- Improved error correlation for id-less parse/unknown-command failures to waiting requests and changed prompt scheduling failures to raise instead of timing out.
- Refactored event dispatch to _dispatch_listeners() with exception handling and error recording for robust listener failure management.
2026-04-08 05:21:01 +02:00
can1357 776546e09d feat(coding-agent): implemented advanced DAP debugging with breakpoints and memory introspection
- Added advanced DAP debugging capabilities including instruction breakpoints, data breakpoints, disassembly, memory introspection, and module inspection.
- Added reverse request handling in DAP client for runInTerminal and startDebugging to support child process debugging.
- Replaced Bun.which() with $which() utility providing flexible cache control and macOS Xcode toolchain fallback.
- Expanded debug tool schema with 20+ new parameters and 11 new action handlers for low-level debugging operations.
- Added instructionPointerReference field to debug session snapshots for enhanced low-level debugging context.
2026-04-08 05:20:37 +02:00
can1357 ca01e8a7a8 feat: introduced region-based chunk targeting with @container, @prologue, @body, @epilogue selectors
- Added region-based chunk targeting with @container, @prologue, @body, @epilogue selectors for precise edit operations.
- Simplified chunk edit operations from 6 variants to 5 (replace, before, after, prepend, append) with unified region parameter.
- Removed checksum requirement from insert operations; only replace operations require #CRC suffix in selector.
- Added canonical indentation normalization with normalize_indent parameter for consistent tab-based rendering across file types.
- Refactored chunk selector format from separate crc/anchor fields to unified selector#CRC@region syntax for mutations.
- Added UnsupportedRegion status to chunk read operations for explicit handling of region availability per chunk type.
2026-04-08 05:18:22 +02:00
can1357 d7261bcbeb feat(omp-rpc): introduced typed event listeners and todo phase management to RPC client
- Added typed event listeners and granular event handling for all RPC notification types.
- Added set_todos RPC command and todoPhases session state field for todo phase management.
- Added RpcClient initialization parameters (thinking, tools, no_session, rpc_defaults) for startup configuration.
- Added install_headless_ui() method and todo management methods (get_todos, set_todos, clear_todos).
- Added TodoItem and TodoPhase dataclasses with parser functions for structured todo representation.
- Added RPC mode behavior: disables session title generation by default and resets workflow settings to built-in defaults.
2026-04-08 04:52:46 +02:00
can1357 67e12b39fe feat(omp-rpc): introduced RpcClient with subprocess communication and event listeners
- Added RpcClient class with subprocess-based RPC communication, thread-safe request/response handling, and 30+ public methods for agent operations.
- Defined 65+ public API symbols including protocol types, dataclasses, parser functions, and custom exception types for RPC communication.
- Implemented event listener system with on_event, on_ui_request, and on_extension_error callbacks for asynchronous RPC event handling.
- Added comprehensive test suite with integration tests for RpcClient and unit tests for protocol parsing functions.
- Configured Python package with setuptools, PEP 561 type hints support, and documentation for usage and API reference.
2026-04-08 04:20:06 +02:00
can1357 5eeb9d54e8 chore(scripts): made 11 script files executable with 0755 permissions
- Made 11 script files executable by updating file permissions to 0755.
2026-04-08 04:19:34 +02:00
can1357 0f3cced15e refactor(edit): restructured edit tool with substring find and focused chunk rendering
- Reorganized edit tool from `patch/` to `edit/` directory with dedicated mode subdirectories (chunk, patch, hashline, replace).
- Replaced line-scoped edit operations with substring-based `find` parameter and added `replace_body` operation for preserving signatures.
- Added chunk focus modes (Expanded, Collapsed, Container) and focused rendering to display only touched chunks and adjacent siblings.
- Implemented notebook (ipynb) language support with virtual source conversion and cell-based chunk parsing.
- Enhanced chunk edit error messages with consistent checksum mismatch reporting and improved chunk selector auto-resolution.
- Extracted edit mode implementations into separate modules with improved helper functions and LSP integration for diagnostics.
2026-04-08 04:18:59 +02:00
can1357 a5fa614f1a feat(lsp): added deferred diagnostics and workspace-scoped LSP actions
- Added deferred diagnostics support in LSP writethrough: `onDeferredDiagnostics` callback and `deferredSignal` in `WritethroughOptions` allow callers to receive diagnostics that arrive after the main 5-second timeout.
- Added language detection for `.pm` (Perl modules), `.astro` (Astro framework), and special filenames `containerfile` and `justfile`.
- Added workspace-scoped diagnostics and reload actions via `*` file parameter; `diagnostics` action now supports `*` for workspace-wide diagnostics across all configured servers.
- Reduced LSP diagnostics timeout from 10 seconds to 5 seconds for faster feedback; slow diagnostics now fetch in background via deferred mechanism.
2026-04-08 04:18:15 +02:00
can1357 1e18e6a9e1 feat(ai): added automatic healing of malformed JSON bracket errors in LLM tool arguments
- Added automatic healing of malformed JSON with single-character bracket errors at the end of strings, improving LLM tool argument parsing robustness.
- Implemented tryHealMalformedJson() function to correct common LLM mistakes like misplaced or extra brackets via single-character edits.
- Added 3 test cases covering bracket healing scenarios: extra bracket, wrong bracket type, and deeply broken JSON rejection.
2026-04-08 04:17:46 +02:00