Commit Graph
18 Commits
Author SHA1 Message Date
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