47 Commits
Author SHA1 Message Date
adnaan 73facbf536 feat: Improve worktree lane creation and error handling for uncommitted changes 2026-09-09 23:39:59 +08:00
adnaan c7390cdf82 feat: Enhance ConfigurationToolProvider and settings management
- Updated ConfigurationToolProvider to support new settings kind and validation for configuration_prepare.
- Improved error handling and response structure for configuration discovery, including partial results and warnings.
- Added new settings schema and validation logic for agent settings, including nested settings and scalar values.
- Introduced syncFromSettings method in ThemeManager to apply persisted changes without IPC loops.
- Enhanced persistent preference handling to restore defaults when keys are deleted.
- Added comprehensive tests for setting value parsing and configuration tool behavior.
2026-09-09 22:07:48 +08:00
adnaan cb97b376cc feat: Refactor extension handling to configuration management and add skill source parsing tests 2026-09-09 12:20:56 +08:00
adnaan 28756f7ff4 feat: Implement agent-managed extension transactions and credential handling
- Added new extension services and types for managing MCP and Skill extensions.
- Introduced `ConfigurationToolProvider` for handling extension-related commands.
- Enhanced `McpClient` to integrate with the new extension credential broker.
- Implemented credential management in `McpSettings` for pending credentials.
- Updated Electron API to support extension operations such as search, list, and apply.
- Added internationalization support for new extension-related UI elements and messages.
- Refactored execution policies to include extension approval scopes.
2026-09-09 12:01:52 +08:00
adnaan 8afc2f1c78 feat: introduce DecorativeAnimationScope for managing decorative animations
- Added DecorativeAnimationScope component to manage the state of decorative animations across the application.
- Updated AppContent to utilize DecorativeAnimationScope for better animation control.
- Refactored EmotionPanelSettings to clarify the purpose of decorative animations.
- Enhanced ChatMessage, ChatPanel, and other components to use chat-layered-surface for consistent styling.
- Improved performance by pausing animations when the modal is open or when decorative animations are disabled.
- Updated CSS to support new animation behaviors and ensure smooth transitions.
- Added tests for the useDecorativeAnimations hook to verify the lifecycle and shared listeners.
2026-09-06 14:09:11 +08:00
adnaan 04fea9f5fe chore: release v1.7.67
Release / get-version (push) Canceled after 0s
Release / build-windows (arm64, windows-11-arm) (push) Canceled after 0s
Release / build-windows (x64, windows-latest) (push) Canceled after 0s
Release / build-macos (arm64, macos-latest) (push) Canceled after 0s
Release / build-macos (x64, macos-15-intel) (push) Canceled after 0s
Release / build-linux (arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Release / build-linux (x64, ubuntu-latest) (push) Canceled after 0s
Release / release (push) Canceled after 0s
Release / sync-to-gitee (push) Canceled after 0s
2026-09-06 01:06:08 +08:00
adnaan b8c6fffc60 feat: Implement message center for notifications and background task management
- Added a new Notification Center to manage and display messages from the editor and task events.
- Introduced InlineToastAnchor and GlobalToastContainer components for better toast management.
- Enhanced background task handling with MCP connection checks and improved performance diagnostics.
- Implemented notification history management with hooks and integrated system notifications.
- Updated internationalization files for new message center features.
- Added tests for background connection checks to ensure proper functionality.
2026-09-06 01:03:06 +08:00
adnaan 461602b94e feat(execution): Implement execution management features and settings
- Added ExecutionManager component to EditorSettings for managing execution settings.
- Enhanced TerminalManager to handle new terminal exit reasons and messages.
- Introduced execution API methods for overview and management requests.
- Added execution settings to user preferences with normalization and defaults.
- Created execution settings configuration and normalization logic.
- Developed execution presentation functions for status and reason labels.
- Expanded i18n support for execution-related terms in English and Chinese.
- Updated execution types to include new properties for better tracking.
- Implemented tests for execution lifecycle and log store functionalities.
2026-09-06 00:26:57 +08:00
adnaan a2b5b3b088 feat(i18n): update Chinese translations for notifications and settings
feat(terminal): add shell integration support with OSC 633 parsing

feat(execution): introduce execution limits and types for command management

fix(notifications): refine notification settings and API for better handling

test(execution): add comprehensive tests for execution scheduler and service

test(notifications): enhance tests for notification routing and webhook handling

test(terminal): implement tests for terminal manager and shell process management
2026-09-05 23:28:09 +08:00
adnaan 126a43421f feat: enhance notification system with new settings and event handling
- Added new settings tabs for network, data, diagnostics, background, and notifications.
- Introduced a new module for summarizing agent events and publishing notifications.
- Implemented an event bus for editor notifications to decouple event handling from the main application logic.
- Created a Zustand store for managing notification state and snapshots.
- Developed a notification bridge to handle incoming notifications and display them in the UI.
- Added support for webhooks in the notification settings, allowing users to configure external notification endpoints.
- Implemented comprehensive tests for the notification system, ensuring reliability and correctness.
- Updated localization files to include new notification-related strings in English and Chinese.
2026-09-05 21:45:12 +08:00
adnaan 1f1bd7262e refactor: migrate asset and session storage to utility process architecture
- Replaced Worker threads with UtilityProcessClient for AssetStorageWorkerClient and SessionStorageWorkerClient.
- Implemented utility server for handling requests in asset and session storage workers.
- Updated asset storage worker and session storage worker to use new request handling mechanism.
- Introduced ContentProcessClient for document reading operations with utility process support.
- Added tests for utility process lifecycle and asset service interactions.
- Enhanced error handling and request management in utility process client.
2026-09-05 20:07:10 +08:00
adnaan 0f2c6dcb21 feat: implement background task management system
- Added IPC handlers for background task updates and connection checks.
- Created BackgroundTaskService to manage task states and connections.
- Implemented connection checking logic for model endpoints.
- Developed activity projection logic to track background task states.
- Introduced persistent settings for background task preferences.
- Added UI components for managing background task settings.
- Implemented tests for background task functionality and IPC interactions.
2026-09-05 19:21:57 +08:00
adnaan d882df8606 feat(preview): enhance local preview capabilities with device configuration and session management
- Added `previewPrepareSession` and `previewConfigureDevice` methods to the Electron API for managing preview sessions and device configurations.
- Implemented `PreviewPartitionService` to handle project-specific partitions, ensuring isolation between different projects and sessions.
- Enhanced `PreviewBrowserService` to support device emulation, allowing for dynamic configuration of device metrics based on user selection.
- Introduced `PreviewDeviceToolbar` component for user interface to select device type and orientation in the preview tab.
- Updated `usePreviewEnvironment` hook to manage device settings and session preparation, improving the user experience in the preview feature.
- Added localization strings for new preview features in both English and Chinese.
- Implemented unit tests for IPC handlers, preview session management, and partition service to ensure reliability and correctness of the new features.
2026-09-05 18:20:45 +08:00
adnaan b3038eef26 feat(diagnostics): implement application diagnostics capture and process monitoring
- Add IPC handlers for diagnostics capture, allowing memory snapshots and performance tracing.
- Introduce ApplicationDiagnostics and ProcessDiagnostics services for managing diagnostics data.
- Implement UI components for diagnostics settings, enabling users to initiate diagnostics captures.
- Enhance memory and process monitoring with detailed reporting and history tracking.
- Add localization support for diagnostics-related messages in English and Chinese.
- Create tests for diagnostics IPC handling and service functionality to ensure reliability.
2026-09-05 17:51:20 +08:00
adnaan 0b774399fa feat: add browser automation tools for enhanced web interaction
- Introduced `browser_open`, `browser_inspect`, and `browser_action` tools for managing browser sessions and interactions.
- Implemented schemas for input validation using Zod in `browserAutomation.ts`.
- Enhanced `executors.ts` to integrate new browser tool executors.
- Created `browser.ts` to handle browser-specific actions and responses.
- Updated `BrowserPreviewTab.tsx` to support new browser URL validation.
- Added configuration for browser tools in `browserTools.ts`.
- Implemented tests for browser tool functionality and integration.
- Updated localization files for new tool descriptions and error messages.
- Ensured that browser tools respect execution context and prevent unauthorized actions in sub-agent mode.
2026-09-04 19:28:20 +08:00
adnaan 7baf572481 feat: upgrade Electron to 43.6.0, replace extract-zip with @electron-internal/extract-zip, and remove obsolete patches 2026-09-04 18:21:22 +08:00
adnaan f66ae0b349 feat: replace extract-zip with @electron-internal/extract-zip and update related patches and tests 2026-09-04 18:04:23 +08:00
adnaan 955ffa5319 feat: add markup text extraction service and tests
- Implemented `htmlToText` and `stripXmlTags` functions for extracting plain text from HTML and XML.
- Added unit tests for markup text extraction to ensure proper functionality and handling of edge cases.

refactor: change McpAuthStore to use IIFE pattern

- Refactored `McpAuthStore` from a namespace to an IIFE for better encapsulation and clarity.
- Updated all function exports to be private within the IIFE.

fix: improve type handling in McpClient and McpOAuthCallback

- Adjusted type casting for accessing private properties in `McpClient`.
- Refactored `McpOAuthCallback` to use IIFE pattern for better structure.

fix: enhance error handling in EmotionAdapter and TerminalManager

- Added comments to catch blocks to clarify error handling intentions.
- Improved error handling in terminal-related classes to ensure graceful degradation.

style: clean up variable declarations and improve readability

- Changed `let` to `const` where applicable for better immutability.
- Removed unnecessary semicolons and improved formatting for consistency.

test: add tests for security patches and post-install scripts

- Created tests for dependency security patches to ensure proper handling of symlinks.
- Added tests for Visual Studio environment activation to validate shell command execution.

chore: update various components for better performance and maintainability

- Refactored components and services to improve code quality and maintainability.
- Updated comments and documentation for clarity and better understanding.
2026-09-04 17:32:30 +08:00
adnaan d5214260eb Add comprehensive tests for asset services and configurations
- Introduced tests for asset configuration assistant, ensuring proper handling of JSON responses and redaction of sensitive information.
- Added tests for asset error handling, focusing on extracting actionable error messages while redacting sensitive data.
- Implemented tests for local media streaming, validating byte-range requests and error handling for invalid ranges.
- Created extensive tests for asset service, covering capability contracts, job submissions, and error handling in various scenarios.
- Developed tests for asset SQLite worker to ensure persistence across worker restarts and proper handling of database operations.
- Added tests for configuration asset repository, verifying migration of settings and protection of sensitive credentials.
- Updated Vite configuration to include asset storage worker for proper bundling and resolution of dependencies.
2026-09-04 16:49:20 +08:00
adnaan 6ea4babc41 Add tests for chat viewport and conversation presentation; remove obsolete tests
- Introduced new tests for `ChatViewport` to validate scrolling behavior during collapses and user interactions.
- Added tests for `ConversationPresentation` to ensure proper lifecycle management and message handling.
- Removed outdated tests for `collapseCredit` and `disclosureMotion` that are no longer relevant.
- Created a new browser test setup for conversation motion, including HTML and TypeScript files for regression testing.
- Implemented a motion store for managing state in browser tests and configured Vite for the testing environment.
2026-09-04 10:52:12 +08:00
adnaan 57e8289c0f feat: implement worktree lane recovery and management features
- Refactor SubAgentResult to use ExecutionLaneProjection for worktree details.
- Update plan execution logic to handle lane projections and statuses.
- Introduce WorktreeLanePanel for managing lane recovery actions (retry merge/discard).
- Add LaneStatusChip component for displaying lane statuses consistently across UI.
- Enhance message handling to include lane information for system alerts.
- Implement deletion of lane branches through a dedicated service method.
- Update internationalization keys for new lane management features.
- Add tests for worktree lane service and security policies regarding lane branch deletion.
2026-09-01 23:20:42 +08:00
adnaan d171d6600b feat(i18n): update Chinese translations and add security reason texts
- Removed redundant translation keys for 'contributorGalaxy' and 'onboardingWizard.contributorGalaxy'.
- Added new translation keys for security reasons in the Chinese locale.
- Enhanced the execution policy to include detailed execution reason codes for shell and git commands.
- Introduced a new module for handling security reason texts, ensuring consistent messaging across different contexts.
- Updated tests to remove references to deprecated functions and ensure coverage for new features.
2026-09-01 20:22:52 +08:00
adnaan ff8ebcc513 feat: add dedicated Git worktree lane commands and policies
- Introduced `gitWorktreeLane` API for executing worktree commands without approval.
- Added constants for worktree lane management, including directory structure and branch naming conventions.
- Enhanced `ExecutionLaneStatus` to include new states for better tracking of lane execution.
- Updated tests for `ExecutionLaneCoordinator` and `WorktreeLaneService` to cover new functionality and edge cases.
- Implemented security policies for worktree lane commands to ensure only valid commands are accepted.
- Created comprehensive tests for Git service worktree commands and worktree lane policy assessment.
2026-08-31 21:40:11 +08:00
adnaan f5b5bcfd26 feat: update text sizes and improve UI consistency across components
- Increased font sizes in PlanWorkbenchEmpty, PlanWorkbenchProcessing, PlanWorkbenchQuestion, and PlanWorkbenchRuntime components for better readability.
- Adjusted text sizes in various elements to maintain a consistent look and feel.
- Enhanced GitExcludeService and GitService with new async methods for handling worktrees and improved error handling.
- Added new tests for ExecutionLaneCoordinator and WorktreeLaneService to ensure proper functionality and error handling.
- Introduced new types for execution lanes and updated related logic in the plan execution policy and proof graph.
2026-08-31 18:50:26 +08:00
adnaan 6c33eb6630 feat(indexing): enhance workspace index management with semantic manifest and project summary integration 2026-08-31 17:08:16 +08:00
adnaan 7e7932e3a7 feat: enhance emotion indicators and asset management
- Introduced EmotionOtterAsset component to manage emotion-specific assets and effects.
- Updated EmotionStatusIndicator to utilize EmotionOtterAsset for better visual representation of emotions.
- Refactored TaskCommandCenter to replace static assets with dynamic OtterAsset components.
- Replaced PNG assets with optimized WebP format across various components for improved performance.
- Added tests for otter asset registry to ensure all assets are accounted for and correctly linked.
- Enhanced user experience in various components by integrating new assets and improving visual feedback.
2026-08-31 16:13:56 +08:00
adnaan 0f05166df6 feat: implement thread reference system with deep linking and markdown formatting 2026-08-31 10:53:48 +08:00
adnaan cca4c36474 feat: enhance task management in agent system
- Updated ChatThread and PersistedChatThread interfaces to include new properties: origin, parentThreadId, and rootThreadId for better task lineage tracking.
- Refactored ChatPanel to replace ConversationSidebar with TaskCommandCenter for improved task handling and visualization.
- Introduced TaskCommandCenter component to manage and display agent tasks, including task status and branching.
- Implemented taskCenterProjection utility to project task data into a structured format for the TaskCommandCenter.
- Added tests for taskCenterProjection to ensure correct grouping and status reporting of tasks.
2026-08-31 10:19:12 +08:00
adnaan 231441865e refactor: improve BM25Index tests by removing unnecessary build calls
test: enhance indexServiceScheduling tests with structural watcher updates

test: extend structuralIndexStore tests for batch processing and metadata storage

test: add sessionSqliteStore tests for clean shutdowns and blob management
2026-08-26 14:32:00 +08:00
kerwin2046 fdaff0ada4 chore: update Node.js and pnpm version requirements, enforce pnpm usage, and enhance documentation
- Added .node-version and .nvmrc files to specify Node.js version 22.x.
- Updated .npmrc to enforce strict engine and package manager versions.
- Introduced mise.toml for consistent versioning across tools.
- Revised CONTRIBUTING.md, README.md, and other documentation to reflect new Node.js and pnpm requirements.
- Implemented ensure-pnpm.js script to ensure pnpm is used for installations.
- Updated CI workflows to reference .nvmrc for Node.js versioning.
2026-08-21 14:40:04 +08:00
adnaan 754abf744c feat: Refactor session storage and persistence mechanisms
- Introduced BufferedCommitQueue for efficient commit handling.
- Updated workspaceLoadService to hydrate thread messages and branches more effectively.
- Replaced adnifyDirService with workspaceFileRepository in workspaceStateRepository and workspaceStorageRuntime.
- Modified workspaceStateService to stage workspace state persistence.
- Enhanced shellRegistryService to integrate with persistenceCoordinator.
- Added new session persistence types and interfaces for better type safety.
- Implemented tests for agentSessionRepository and BufferedCommitQueue.
- Removed outdated sessionDataLossGuards and sessionFileStore tests.
- Added SQLite session store tests to ensure data integrity and migration handling.
- Updated Vite configuration to include sessionStorage.worker for better build management.
2026-08-20 11:11:54 +08:00
adnaan ca89f50b66 chore: consolidate brand assets into public/brand directory
- Reorganize brand assets into centralized public/brand/ structure with icons/, logos/, ip/, and welcome/ subdirectories
- Move app icons (app.ico, app.icns, app.png) and light variants to public/brand/icons/
- Move in-app logos to public/brand/logos/ and IP avatar to public/brand/ip/
- Move loader logo to public/brand/welcome/
- Update favicon and loader image references in index.html to new asset paths
- Update electron-builder configuration in package.json to reference new icon locations
- Remove legacy icon generation script (scripts/generate-icons.js) and old resource directories
- Add ASSET_REPLACEMENT.md documentation with directory map and replacement checklist
- Update README.md and README_EN.md build instructions to reflect new asset organization
- Simplifies brand asset management by consolidating scattered assets into a single, well-organized directory structure
2026-04-25 15:10:51 +08:00
adnaan 79b79e9111 docs: remove internal analysis and planning documents
- Remove ARCHITECTURE_AUDIT.md (internal audit report)
- Remove PROJECT_ANALYSIS.md (internal analysis document)
- Remove REFACTORING_PLAN.md (internal planning document)
- Remove blog-release.md (draft blog post)
- Remove llm-config-refactor.md (internal refactoring notes)
- Update AboutDialog.tsx to reflect documentation changes
These internal documents were used for planning and analysis purposes and are no longer needed in the repository. Keeping them clean reduces clutter and focuses documentation on user-facing content.
2026-01-03 15:28:41 +08:00
adnaan e6b50a221f fix: disable electron-builder auto publish 2025-12-29 21:34:24 +08:00
adnaan 24efeef763 refactor(llm): simplify provider configuration system and unify adapter handling
- Add comprehensive LLM configuration refactor documentation with new type definitions and routing rules
- Simplify type definitions in providers.ts with BuiltinProviderDef, UserProviderConfig, and RuntimeProviderConfig types
- Streamline settingsService configuration merging logic and unify advanced/adapterOverrides handling
- Refactor llmService provider routing to use providerId-based direct routing instead of complex isBuiltin checks
- Update AnthropicProvider to automatically handle authentication methods (x-api-key for official API, Bearer token for custom baseUrl)
- Remove isBuiltin flag from ProviderAdapterConfig as it's now determined by providerId routing
- Consolidate LLMConfig type with advanced field support for authentication and request/response overrides
- Update all provider implementations (OpenAI, Anthropic, Custom, Gemini) to work with unified configuration approach
- Enhance UI components (SettingsModal, ProviderSettings, CustomProviderEditor) to support new configuration structure
- Improve type definitions across renderer and shared modules for better type safety
- This refactor reduces configuration complexity and makes provider setup more intuitive for users
2025-12-27 21:53:25 +08:00
adnaan bede9a5cdd docs: add architecture audit report and consolidate project analysis
- Add comprehensive ARCHITECTURE_AUDIT.md documenting system design issues and optimization recommendations
- Identify critical problems: duplicate Store systems (chatSlice vs AgentStore), scattered type definitions, and redundant logging infrastructure
- Document medium-priority issues: complex Provider configuration, service initialization order, and performance optimization opportunities
- Provide prioritized refactoring roadmap (P0-P2) with specific action items and suggested directory structure
- Consolidate PROJECT_ANALYSIS.md to focus on high-level overview and reference ARCHITECTURE_AUDIT.md for detailed analysis
- Update LSP manager, LLM stream handler, and diagnostic services with improved logging and error handling
- Add diagnosticsStore service for centralized diagnostic state management
- Enhance Logger utility with better formatting and context support
- Improve StatusBar, CheckpointPanel, and ProblemsView components with updated state management
- Update custom LLM provider configuration handling
- Refactor App.tsx to use consolidated store architecture
2025-12-27 00:54:34 +08:00
adnaan 1cd7276083 chore: clean up unused code and update project analysis documentation
- Delete unused type unification scripts (unify-types.js, update-type-imports.js)
- Remove agent core compatibility layer (src/renderer/agent/core/index.ts)
- Remove unused services (codeApplyService.ts, contextService.ts)
- Delete unused prompt configuration file (src/shared/config/promptConfig.ts)
- Remove duplicate CustomProviderConfig from renderer types
- Update PROJECT_ANALYSIS.md to mark type unification as completed
- Document remaining unused code for future reference
- Consolidate type definitions and improve codebase maintainability
2025-12-27 00:27:45 +08:00
adnaan add6a53845 refactor(types): unify type definitions and consolidate LLM configuration
- Create centralized LLM type definitions in src/shared/types/llm.ts
- Move all shared types (ToolCall, LLMConfig, ToolDefinition) to src/shared/types/
- Consolidate Provider configuration into unified structure
- Update all LLM provider implementations to use unified types
- Remove duplicate type definitions from renderer and main process
- Delete src/renderer/agent/tools/types.ts in favor of shared types
- Add utility scripts for type unification and import updates
- Add comprehensive PROJECT_ANALYSIS.md documenting architecture and refactoring priorities
- Update type imports across all modules to reference single source of truth
- Improve type consistency and maintainability across codebase
2025-12-27 00:12:19 +08:00
adnaan 56fed7a0af refactor(agent): optimize data flow and enhance performance with reasoning separation and provider caching
- Separate reasoning content from message content into dedicated `reasoning` field in AssistantMessage type
- Add TokenUsage type to track prompt, completion, and total token counts independently
- Implement Provider caching with TTL (30 min) and LRU eviction (max 10 providers) in llmService
- Add dynamic tool result truncation with tool-specific strategies (search, command, definition)
- Enhance loop detection with semantic repeat and pattern matching capabilities
- Update LLMStreamHandler to independently store reasoning content and token usage
- Modify ChatMessage component to directly use message.reasoning field instead of parsing tags
- Display cumulative token usage in StatusBar with detailed hover tooltip
- Update AgentService to pass reasoning and usage data to store
- Improve provider cache key generation and add periodic cleanup mechanism
- Add LoopDetector class with multiple detection strategies (exact, semantic, pattern)
- Update documentation with Phase 7-9 refactoring completion details
2025-12-25 22:37:56 +08:00
adnaan 0c97589f17 refactor(components): reorganize component structure and fix import paths
- Add refactoring scripts to automate import path fixes and component organization
- Reorganize components into logical subdirectories (common, dialogs, editor, layout, panels, tree)
- Move 30+ components to new modular structure with proper categorization
- Update all import paths across codebase to reflect new component locations
- Fix relative imports in moved components to maintain correct module resolution
- Update documentation with refactoring progress and unified type definitions count
- Improve code organization for better maintainability and scalability
2025-12-25 22:02:45 +08:00
adnaan 4def2d2e02 refactor(agent): unify type definitions and remove duplicate schemas
- Remove duplicate `ToolStatus` and `ToolApprovalType` from `toolTypes.ts`, re-export from `core/types.ts`
- Delete redundant `src/renderer/agent/tools/schemas.ts` (duplicates `toolDefinitions.ts`)
- Remove `ToolApprovalType` from `enums.ts` (now centralized in `core/types.ts`)
- Remove `edits` approval type from `AgentConfig.autoApprove` (file editing doesn't require confirmation)
- Update `shared/types/index.ts` to remove deprecated `'edits'` approval type
- Update refactoring plan documentation with completion status
- Consolidate type definitions to single source of truth for consistency and maintainability
2025-12-25 21:35:10 +08:00
adnaan d8296d52d4 refactor(agent): remove unused modules and clean up redundant code
- Delete unused core modules: PlanManager, UndoService, toolRegistry, ElectronEnvironment, interfaces, and ContextCompression
- Remove duplicate re-export modules: src/renderer/features/agent/ and src/renderer/agent/types/
- Remove unused hooks: src/renderer/hooks/agent/ with llmClient implementation
- Remove unintegrated Plan module: src/renderer/plan/ (functionality duplicated in agent/core/types.ts)
- Update REFACTORING_PLAN.md to document all deleted unused modules and track cleanup progress
- Consolidate codebase by eliminating dead code and reducing module duplication
- Improves maintainability and reduces cognitive load for future development
2025-12-25 21:22:57 +08:00
adnaan f560fb0cc0 refactor(agent): clean up redundant code and fix TypeScript errors
- Delete MessageBuilder.ts (functionality duplicated in ContextBuilder.ts)
- Remove duplicate PlanStatus/PlanItemStatus enums from enums.ts (already defined in types.ts)
- Fix AgentStore.ts type inference with explicit type assertions for ChatMessage
- Replace string literals with enum values (PlanStatus.Draft, PlanItemStatus.Pending)
- Remove unused imports from ChatPanel.tsx, PlanPreview.tsx, and ToolCallGroup.tsx
- Update REFACTORING_PLAN.md with Phase 6 completion details and TypeScript error fixes
- Ensure all TypeScript errors resolved and codebase passes strict type checking
2025-12-25 21:10:37 +08:00
adnaan 133d179137 refactor(agent): split AgentService into modular components
- Extract configuration management into AgentConfig.ts (~90 lines)
- Centralize runtime config retrieval with getAgentConfig()
- Define AgentRuntimeConfig interface for type safety
- Move READ_TOOLS, RETRYABLE_ERROR_CODES, and error retry logic
- Extract LLM stream handling into LLMStreamHandler.ts (~350 lines)
- Implement StreamHandlerState for stream event management
- Move text chunk, reasoning, and tool call stream processing
- Consolidate XML tool call detection and streaming logic
- Extract context building into ContextBuilder.ts (~250 lines)
- Implement buildContextContent() for context assembly
- Move buildUserContent() for user message construction
- Add calculateContextStats() for context metrics
- Refactor AgentService.ts from 1656 to 705 lines (~57% reduction)
- Remove duplicate compressMessages() function
- Remove getConfig() function (moved to AgentConfig)
- Remove stream event handling logic (moved to LLMStreamHandler)
- Remove context building logic (moved to ContextBuilder)
- Update imports to use new modular structure
- Update documentation in REFACTORING_PLAN.md
- Mark Phase 5 as complete
- Document new module structure and line count reductions
- Update metrics table with AgentService refactoring results
2025-12-25 20:55:59 +08:00
adnaan 129cac1278 refactor(settings): split monolithic SettingsModal into modular component structure
- Extract SettingsModal into dedicated settings directory with modular architecture
- Create shared types definition in `settings/types.ts` for settings components
- Split settings tabs into separate components:
* ProviderSettings.tsx for LLM provider configuration
* EditorSettings.tsx for editor preferences
* AgentSettings.tsx for agent behavior settings
* PromptPreviewModal.tsx for prompt template preview
* SecuritySettings.tsx for security-related configurations
* IndexSettings.tsx for indexing settings
* SystemSettings.tsx for system-level settings
- Create `settings/tabs/index.ts` for centralized tab exports
- Refactor main SettingsModal.tsx to orchestrate tab components (~180 lines)
- Update App.tsx import path to new settings module location
- Remove original monolithic SettingsModal.tsx (1936 lines)
- Update REFACTORING_PLAN.md with completion status
- Reduces component complexity and improves maintainability following established modular patterns
2025-12-25 20:38:39 +08:00
adnaan e06e07d5e7 refactor(sidebar): split monolithic Sidebar component into modular structure
- Extract Sidebar.tsx (1938 lines) into 10 focused components
- Create sidebar/panels/ directory with ExplorerView, SearchView, GitView, ProblemsView, OutlineView, and HistoryView
- Create sidebar/components/ directory with FileTreeItem and InlineCreateInput subcomponents
- Add sidebar/utils.ts for shared utility functions
- Create sidebar/index.ts for clean exports
- Implement new minimal Sidebar.tsx (30 lines) as composition root
- Add refactor scripts (split-sidebar.js, split-sidebar-full.js) for future component extraction
- Update App.tsx imports to use new sidebar module structure
- Update Logger.ts with improved logging capabilities
- Update REFACTORING_PLAN.md to mark Phase 4 complete and plan Phase 5
- Improves code maintainability, testability, and reduces cognitive complexity per file
2025-12-25 20:13:28 +08:00
adnaan 59ba40a130 feat: refactor project architecture with modular structure and unified logging
- Add comprehensive refactoring plan documentation (REFACTORING_PLAN.md)
- Create automated refactoring scripts for imports, types, and logger migration
- Reorganize renderer components into functional groups (layout, sidebar, settings, editor)
- Split large monolithic files (Sidebar.tsx, SettingsModal.tsx, AgentService.ts) into smaller modules
- Migrate all console.log/warn/error calls to centralized Logger utility across 60+ files
- Standardize import paths from relative paths to @/ alias throughout codebase
- Create shared Logger utility in src/shared/utils for cross-process logging
- Update TypeScript and Vite configurations to support new module structure
- Restructure services directory with functional categorization (lsp, completion, storage, file)
- Reorganize agent features into core, tools, context, and store subdirectories
- Improve code maintainability and reduce circular dependencies through better separation of concerns
2025-12-25 19:58:05 +08:00