Commit Graph

51 Commits

Author SHA1 Message Date
DEV_DSW
dd211056dd feat: refactor main and preload scripts, update window service logic, enhance TitleBar component, and adjust login page layout 2026-04-27 09:10:57 +08:00
DEV_DSW
4c61e93c3e Add unit tests for skill capabilities, skill planner, and UV setup
- Implement tests for random ID generation, ensuring preference for crypto.randomUUID.
- Create tests for runtime context capabilities, validating the injection of enabled skill capabilities.
- Add tests for skill capability parsing, including classification and command example extraction.
- Introduce tests for the skill planner, verifying tool call planning based on user requests and attachment requirements.
- Establish tests for UV setup, ensuring proper handling of Python installation scenarios and environment checks.
2026-04-24 17:02:59 +08:00
duanshuwen
df600272d6 feat: add tool status management and localization for skill installation
- Updated chat message types to include tool statuses.
- Enhanced localization files for English, Thai, and Chinese to support new tool status messages.
- Modified HomePage and SkillsPage components to handle tool statuses in chat messages.
- Implemented tool status merging and updating logic in the chat store.
- Added handling for tool status events in the gateway event processing.
- Created tests for chat message rendering with tool statuses and skill installation shortcuts.
- Improved gateway event dispatching for tool lifecycle events.
2026-04-23 20:27:54 +08:00
duanshuwen
979fb0a0f6 feat: implement browser open functionality and related tests 2026-04-23 19:27:21 +08:00
duanshuwen
c9617a3777 feat: enhance host API authentication handling and add regression tests 2026-04-23 19:09:30 +08:00
DEV_DSW
71bcc3b3c5 feat: implement telemetry system for application usage tracking
- Added telemetry utility to capture application events and metrics.
- Integrated PostHog for event tracking with distinct user identification.
- Implemented telemetry initialization, event capturing, and shutdown procedures.

feat: add UV environment setup for Python management

- Created utilities to manage Python installation and configuration.
- Implemented network optimization checks for Python installation mirrors.
- Added functions to set up managed Python environments with error handling.

feat: enhance host API communication with token management

- Introduced host API token retrieval and management for secure requests.
- Updated host API fetch functions to include token in headers.
- Added support for creating event sources with authentication.

test: add comprehensive tests for gateway protocol and startup helpers

- Implemented unit tests for gateway protocol helpers, event dispatching, and state management.
- Added tests for startup recovery strategies and process policies.
- Ensured coverage for connection monitoring and restart governance logic.
2026-04-23 17:21:57 +08:00
DEV_DSW
655e7c51d2 feat: add GitHub skill installation support
- Implemented functionality to install skills from GitHub URLs.
- Updated API to handle new installation requests from GitHub.
- Enhanced UI to allow users to input GitHub skill URLs for installation.
- Added translations for new GitHub installation features in English, Thai, and Chinese.
- Created tests for the new skill installation service and API routes to ensure proper functionality.
2026-04-23 11:41:52 +08:00
duanshuwen
bbe32f7954 feat: implement session deletion protection and enhance chat history management 2026-04-22 22:53:22 +08:00
duanshuwen
ea1fd18e6f feat: enhance after-pack script to copy OpenClaw runtime dependencies
- Added a new script `bundle-openclaw.mjs` to bundle OpenClaw runtime dependencies.
- Updated `after-pack.cjs` to copy bundled OpenClaw runtime and its node_modules.
- Improved cleanup of unnecessary development files in node_modules.
- Adjusted paths for resources in the packaging process.

style: update loading indicator styles in ChatHistoryPanel

- Changed the border radius and padding for the loading indicator in ChatHistoryPanel.

fix: improve ProvidersSection to handle provider account syncing

- Added logic to sync model configuration to provider accounts.
- Introduced error handling and loading states during the sync process.
- Enhanced vendor resolution and account management logic.

fix: fallback session handling in chat store

- Implemented fallback session logic in loadSessions to ensure a valid session is always available on error.
2026-04-22 21:56:37 +08:00
duanshuwen
2f675afe47 refactor: update tray service imports for consistency and clarity 2026-04-22 19:16:42 +08:00
DEV_DSW
a0cf8c73c9 refactor: remove tab management and related IPC events for cleaner architecture 2026-04-22 08:58:16 +08:00
DEV_DSW
7b8cf84ffb fix: update padding in suggestion button for improved layout 2026-04-22 08:43:59 +08:00
duanshuwen
721344883f refactor: reorganize imports and update type references across services
- Updated import paths for types and utilities in config-service, menu-service, script-execution-service, script-store-service, and window-service to reflect new structure.
- Moved utility functions like debounce and cloneDeep to shared utilities.
- Created new runtime and script types files to centralize type definitions.
- Removed deprecated task-types and locale messages files.
- Updated constants to use shared definitions and added new placeholders for providers.
- Enhanced provider type information with additional placeholders for different languages.
2026-04-21 23:25:51 +08:00
duanshuwen
97a956ffe8 feat: remove getCurrentWindowId IPC event and related functionality for cleaner API 2026-04-21 22:37:32 +08:00
duanshuwen
27dc4af3b4 Add Thai language support for various application components
- Introduced Thai translations for dashboard, knowledge, login, models, scripts, settings, skills, task, and common UI elements.
- Updated provider placeholders to include Thai language options.
- Modified locale resolution to support Thai language.
- Adjusted settings store to handle legacy language migration from Japanese to Thai.
- Enhanced runtime types to include Thai as a supported language.
2026-04-21 19:55:48 +08:00
DEV_DSW
3349d41881 feat: 语言国际化重构 2026-04-21 16:52:45 +08:00
DEV_DSW
0e10ae9e35 feat: 对话国际化样式调整 2026-04-21 11:42:40 +08:00
duanshuwen
6ac4bf1dd9 feat: enhance provider functionality with base URL normalization and API protocol support; add tests for provider creation 2026-04-20 23:51:01 +08:00
duanshuwen
301f7d33ed feat: implement launch at startup functionality in zn-ai
- Added a new setting for "launch at startup" in the GeneralSettingsPanel.
- Integrated the setting with the existing settings store and IPC mechanisms.
- Implemented platform-specific logic for enabling/disabling startup behavior in the main process.
- Created a new service for managing launch at startup settings, including Linux desktop entry creation.
- Added unit tests for the new functionality and ensured existing tests are updated accordingly.
- Updated i18n messages for the new setting in English, Chinese, and Japanese.
2026-04-20 23:29:10 +08:00
duanshuwen
dfef9c90a5 feat: add gateway management features and settings
- Implemented new API routes for handling logs and settings related to the gateway.
- Added a new Gateway section in the General Settings panel to manage gateway status and auto-start options.
- Introduced a state management hook for gateway settings, including status, logs, and auto-start functionality.
- Updated configuration service to include gateway auto-start setting.
- Enhanced internationalization support for new gateway-related messages.
- Refactored existing settings store to accommodate new gateway settings.
- Cleaned up code and improved logging functionality.
2026-04-20 22:22:11 +08:00
DEV_DSW
c9a2f3631e refactor: remove models snapshot feature and related code
- Remove models snapshot UI section from Models page
- Delete models API route handler and related logic
- Remove models store implementation and exports
- Clean up internationalization messages for removed feature
- Update main entry point exports to exclude models store
2026-04-20 14:44:27 +08:00
duanshuwen
38bea97197 feat: Enhance Marketplace and Skill Management UI with improved error handling and user feedback
- Updated MarketplaceDrawer to include security notes and manual installation hints.
- Refactored SkillDetailDrawer to display default icons for skills.
- Simplified SkillListItem to use default icons for better readability.
- Integrated gateway status checks and warnings in SkillsPage for improved user awareness.
- Enhanced error handling for skill installation and fetching, providing clearer feedback to users.
- Added new translations for error messages and gateway warnings to improve localization support.
2026-04-19 20:33:44 +08:00
duanshuwen
18f12d6ce3 feat: enhance channel configuration UI and validation
- Updated ChannelInstructionsPanel to include a button for viewing documentation, improving user guidance.
- Enhanced ChannelTokenField to support showing/hiding secret values with appropriate labels and icons.
- Refined ChannelTypeSelector to display connection type icons and improved layout for better user experience.
- Added new messages for documentation links, validation feedback, and secret management in i18n.
- Extended ChannelMeta to include optional documentation URLs for better context on configuration fields.
- Implemented credential validation logic in ChannelsPage to ensure user inputs are validated before saving.
- Introduced ChannelLogo component to display channel icons in the UI.
- Added tests for channel credential validation to ensure proper error handling and feedback.
2026-04-19 16:43:07 +08:00
duanshuwen
5cc9b86e1f refactor: update knowledge document types and API client interfaces
- Refactored types in `Knowledge/types.ts` to introduce new interfaces for document handling.
- Added `KnowledgeDocItem`, `KnowledgeDocsListResponse`, `KnowledgeDocsUploadInput`, `KnowledgeDocsUploadResponse`, and `KnowledgeDocsDeleteResponse` for better structure and clarity.
- Updated `KnowledgeDocsApiClient` interface to include methods for listing, uploading, and deleting documents.

fix: replace deprecated icons in AccountSettingsPanel and SettingMenu

- Replaced `CheckCircleIcon` with `CheckCircle` from `lucide-react` in `AccountSettingsPanel.tsx`.
- Updated `SettingMenu.tsx` to use `Settings` and `User` from `lucide-react` instead of custom icons.

test: add tests for knowledge docs routes and KnowledgePage

- Created `knowledge-docs-routes.test.ts` to test API routes for listing, uploading, and deleting knowledge documents.
- Added `knowledge-page.test.tsx` to test the rendering and functionality of the KnowledgePage component, including document loading and deletion.
2026-04-19 09:40:07 +08:00
duanshuwen
ef46c73c3e Add unit tests for channel utilities and configure testing environment
- Created a new test file `channels.test.ts` to cover utilities related to channel configurations and targets.
- Implemented tests for normalizing and grouping selected channels by type, as well as building channel targets from account data and cron history.
- Mocked necessary dependencies to isolate tests and ensure accurate results.
- Updated `vite.config.ts` to set up the testing environment with jsdom and enable global variables for tests.
2026-04-18 16:12:49 +08:00
duanshuwen
ee72cf7261 feat: refactor HomePage to integrate agents store and update related components
feat: add runtime event handling for providers in ProvidersSection

feat: update routing to include Channels and Agents pages

feat: extend route types and navigation items for Channels and Agents

feat: implement agents store for managing agent data and interactions

fix: update chat store to utilize agents store for agent-related functionality

chore: export agents store from index

fix: enhance runtime types for better event handling

fix: update Vite config to handle dev server URL correctly
2026-04-18 14:56:32 +08:00
duanshuwen
dfa4388087 refactor: optimize component rendering with memoization and improve state management
- Added memoization to ChatHistoryPanel, ChatMessageList, and TaskBoard components to prevent unnecessary re-renders.
- Refactored HomePage to utilize useMemo for derived state calculations, enhancing performance.
- Updated main.tsx to conditionally render React.StrictMode based on the environment.
- Improved chat and channel store hooks to allow for selector functions, enhancing flexibility in state selection.
- Enhanced streaming message handling in chat store to manage pending deltas more effectively.
- Refactored LoginPage to include animated decorations for improved user experience.
- Implemented lazy loading for routes in the router to optimize initial load time.
2026-04-18 11:05:49 +08:00
duanshuwen
85d92b937f feat: add models management and usage history components
- Introduced RequestContentDialog for displaying request content details.
- Added UsageBarChart for visualizing token usage data.
- Implemented UsageHistorySection to manage and display usage history with filtering and pagination.
- Created provider-types for managing provider-related types.
- Developed ModelsPage to encapsulate models configuration, providers, and usage history.
- Defined usage-history types and utility functions for managing usage data.
- Updated routing to include models page and redirect agents to models.
- Refactored chat store to integrate models instead of agents.
- Established models store for managing model-related state and data fetching.
2026-04-18 09:41:59 +08:00
duanshuwen
e9f3a29886 feat: implement OpenClaw process owner and runtime path utilities
- Add OpenClawProcessOwner class to manage the lifecycle of the OpenClaw process.
- Introduce utility functions for managing OpenClaw runtime paths.
- Update session store to normalize agent session keys and migrate existing keys.
- Refactor main process to handle local provider API routing through a new dispatch function.
- Enhance token usage writer to utilize a new session key parsing function.
- Create agents management store to handle agent data and interactions.
- Update chat store to integrate agent selection and session management.
- Introduce AgentsSection component for displaying agent information in the UI.
- Refactor HomePage to support agent selection and display current agent.
- Update routing to reflect new agents page structure.
2026-04-17 21:32:06 +08:00
DEV_DSW
eca70425cf feat(i18n): integrate internationalization into sidebar, title bar, and settings components
- Added useI18n hook to Sidebar and TitleBar components for translation support.
- Updated sidebar navigation items to use translation keys instead of hardcoded labels.
- Enhanced TitleBar buttons with localized titles for minimize, maximize, and close actions.
- Expanded i18n constants to include new namespaces for sidebar and login.
- Implemented translation messages for sidebar, settings, and login components in English, Chinese, and Japanese.
- Refactored Knowledge and Skills pages to utilize useLocale for locale management.
- Updated Login page to display localized text for form labels, placeholders, and error messages.
- Enhanced Account and General settings panels with localized titles and descriptions.
- Modified SettingMenu to use translation keys for menu items.
2026-04-17 17:16:18 +08:00
DEV_DSW
79bea4f107 Refactor UUID generation, remove unused logger and encryption utilities, and clean up request handling
- Updated `generateUUID` function for improved readability and performance.
- Deleted `logger.ts`, `other.ts`, `request.ts`, `storage.ts`, `tansParams.ts`, and `validate.ts` as they were no longer needed.
- Simplified TypeScript configuration by removing unnecessary paths and aliases.
- Enhanced Vite configuration for better project structure and maintainability.
2026-04-17 15:38:08 +08:00
duanshuwen
b1dea9a5c2 feat: implement task management store with IPC integration
- Added a new task store in `src-react/stores/task.ts` to manage tasks and their statuses.
- Implemented functions for creating, executing, and retrying tasks, along with handling task progress and completion.
- Introduced persistence for tasks using IPC.
- Created utility functions for normalizing room types and building subtasks.
- Added a new CSS file for global styles in `src-react/styles.css`.
- Created runtime types in `src-react/types/runtime.ts` and exported them.
- Updated the main entry points for Vue and React applications to support dynamic framework loading.
- Refactored chat model interfaces and utility functions into `src/shared/chat-model.ts`.
- Updated TypeScript configuration to include paths for React components and types.
- Enhanced Vite configuration to support both Vue and React frameworks.
2026-04-17 07:09:56 +08:00
DEV_DSW
210e8eb363 feat: add task management and progress reporting
- Implemented task and subtask structures with progress tracking.
- Added reporting functionality to log progress at various stages in hotel room status management scripts.
- Created a task store to manage tasks and their states, including persistence to local storage.
- Updated UI components to display task lists and handle task actions (retry, remove).
- Removed deprecated TaskCard and TaskList components, replacing them with a new structure for better maintainability.
- Enhanced script execution service to emit progress events for UI updates.
2026-04-16 16:59:49 +08:00
DEV_DSW
b1f589a674 feat: enhance theme management and image caching functionality 2026-04-16 15:43:35 +08:00
DEV_DSW
411f4f3421 feat: Refactor channel management and UI components
- Removed hardcoded channel data from `channel.ts` and replaced it with a dynamic channel dictionary.
- Introduced a new Pinia store `channel.ts` to manage selected and available channels.
- Reworked `AddChannelDialog.vue` to allow users to search and select channels dynamically.
- Updated `TaskCenter.vue` to utilize the new channel store and handle empty channel selections gracefully.
- Enhanced IPC communication for loading and saving selected channels in the configuration.
- Adjusted `runTaskOperationService.ts` to ensure proper handling of channel data.
- Improved styling and structure of UI components for better user experience.
2026-04-16 15:13:30 +08:00
DEV_DSW
7bd5a1aa20 feat: update language storage key and enhance theme button styles 2026-04-16 09:49:24 +08:00
duanshuwen
5a8e5e4ac2 feat: add channel open interval configuration and improve page navigation logic 2026-04-15 22:08:54 +08:00
duanshuwen
e77c815a86 feat: add new stores for cron, locale, providers, script, shared data, skills, and user info
- Implemented `cron` store to manage scheduled tasks with CRUD operations.
- Created `locale` store for language settings with persistence and system language detection.
- Added `providers` store to handle provider accounts and configurations with API interactions.
- Developed `script` store for managing automation scripts, including recording and execution.
- Introduced `sharedStore` for managing shared data across components.
- Established `skills` store for fetching, installing, and managing skills from a marketplace.
- Created `userinfo` store for user authentication and session management.

chore: update path aliases from `@store` to `@stores` in TypeScript configuration and Vite config
2026-04-15 21:49:25 +08:00
duanshuwen
364db041eb feat: enhance dark mode support across various components
- Updated styles in AccountSetting, SystemConfig, Version, and other components to improve dark mode visibility.
- Added dark mode classes for text and background colors to ensure better contrast and readability.
- Modified CSS variables in dark.css for consistent theming.
- Improved accessibility by ensuring all text elements are legible in dark mode.
2026-04-15 21:17:08 +08:00
DEV_DSW
78d3235ab6 feat: enhance token usage tracking and history management
- Updated HTML assets for improved loading.
- Integrated token usage tracking in chat processing, appending usage details to transcripts.
- Enhanced OpenAIProvider to include usage data in chat completion responses.
- Implemented asynchronous retrieval of recent token usage history.
- Added utility functions for managing transcript files and parsing usage data.
- Updated UI components to reflect changes in usage status handling.
- Ensured consistent usage status definitions across the application.
2026-04-15 11:45:33 +08:00
duanshuwen
b5a67ff650 feat: implement custom window controls and replace header bar with title bar
- Add window handlers for minimize, maximize, close, and check if maximized in ipcMain.
- Update preload script to use new window control IPC events.
- Refactor window service to remove old IPC event handlers and use new handlers.
- Remove old HeaderBar and DragRegion components, replacing them with a new TitleBar component.
- Update Layout component to use TitleBar instead of HeaderBar.
- Remove useWinManager hook as its functionality is now integrated into TitleBar.
- Update login page to remove HeaderBar and adjust layout accordingly.
- Update constants to remove old window IPC events.
- Update package dependencies to replace @iconify/vue with @lucide/vue.
2026-04-14 23:38:42 +08:00
DEV_DSW
c61e41049f feat: 重构对话功能 2026-04-14 17:02:20 +08:00
duanshuwen
b3f07c4cfe feat: 新增开发规划 2026-04-14 07:36:40 +08:00
duanshuwen
66db6c462e feat: 脚本录制功能完善 2026-04-12 22:12:57 +08:00
duanshuwen
6432634d17 feat: 调整脚本功能 2026-04-12 17:01:04 +08:00
duanshuwen
c16fc93685 feat: 新增脚本录制功能 2026-04-12 15:46:28 +08:00
duanshuwen
67808a459e feat: 新增定时任务功能 2026-04-11 23:17:54 +08:00
duanshuwen
37ed157e4a feat: 修复Mac打包编译 2026-04-11 17:22:29 +08:00
DEV_DSW
1aa28a7808 feat: add auto-update functionality with settings UI
- Implement electron-updater integration with IPC handlers for update operations
- Add Pinia store for managing update state and user preferences
- Create settings UI with version display, update controls, and auto-update toggles
- Update IPC constants and preload API for update-related communication
- Refactor preload invoke methods to use async IPC consistently
- Add rounded corners to settings page layout for better visual consistency
2026-04-09 15:15:23 +08:00
duanshuwen
eb9acae071 feat(build): add icon generation and external binary bundling
- Add scripts to generate application icons in multiple formats (ICO, ICNS, PNG)
- Implement download scripts for uv and Node.js binaries for cross-platform support
- Update build configuration to use new icon resources and bundled binaries
- Remove old loading screen and unused build configurations
- Fix application icon path resolution to use app resources directory
2026-04-08 07:25:25 +08:00