62 Commits

Author SHA1 Message Date
t 18c9354095 refactor: 将客服后端重构为宿主可嵌入模块
- 注入数据库、运行时配置、统一响应、文件存储和平台 AI 能力,补充业务读写工具与客户快捷操作契约。

- 移除模块内重复的组织、客户、工单、标签、技能、旧工作流、MCP 和迁移实现,将身份权限与业务主体交由宿主管理。

- 使用 libSQL 重构向量存储,并完善图片消息、访客身份、排队调度、企业微信和支持聊天页面。

- 统一 HTTP、DTO 与 WebSocket 的 snake_case 协议,补齐模块初始化、业务动作和公共载荷等回归测试。
2026-08-28 22:23:13 +08:00
t 2bbf42b741 refactor(auth): delegate access control to be-system
Remove Agent Desk users, roles, login sessions, tokens, and local permission persistence. Expose the backend as an embeddable ai-agent module with host-provided subject lookup and operation authorization callbacks, and complete the frontend/backend repository split.
2026-08-21 00:41:07 +08:00
t 3d47227fbd refactor: split backend into standalone server project
Remove embedded frontend and workflow editor assets, add standalone API deployment configuration, and retain the current backend service updates.
2026-08-20 21:46:55 +08:00
mlogclub 954a3fe8d9 feat: add sync permissions functionality and UI integration 2026-08-19 15:35:28 +08:00
mlogclub 1d6c0e37db feat: add WeCom outbox management features including retry and ignore actions, permissions, and UI integration 2026-08-02 14:03:23 +08:00
mlogclub 847f688398 Refactor AI Agent configuration and workflow handling
- Removed runtime mode handling from AIAgentConfigWorkbench and related components.
- Updated tests to reflect changes in AI Agent policy copy and configuration.
- Changed terminology from "workflow" to "revision" in various components and API responses.
- Simplified agent binding logic in channel editing.
- Cleaned up unused variables and types related to runtime modes.
- Updated localization files for consistency with new terminology.
2026-07-27 23:29:02 +08:00
mlogclub c07ae9597b refactor: add publish route to AI workflow and adjust header styling in workflow workbench 2026-07-27 19:20:14 +08:00
mlogclub 05eb85167c refactor: enhance AI workflow management with restore version and usage tracking features 2026-07-25 18:19:59 +08:00
mlogclub 1663db7f24 refactor: remove agent ID references from AI workflow handling and related components 2026-07-25 15:32:55 +08:00
mlogclub 7b86fd1f09 feat: Implement AI Agent Workflow Binding functionality
- Added aiAgentWorkflowBindingRepository for managing workflow bindings associated with AI agents.
- Enhanced agentRevisionService to include workflow bindings in agent revisions.
- Updated aIAgentService to handle workflow bindings during agent creation and updates.
- Introduced ai_agent_workflow_binding_service for managing workflow binding logic.
- Created new API endpoints for fetching, creating, updating, and deleting AI workflows.
- Developed a new dashboard page for managing AI workflows.
- Updated frontend components to support workflow binding management in agent configuration.
- Added necessary tests for workflow binding functionality and updated existing tests for compatibility.
- Translated relevant UI texts and messages for workflow management.
2026-07-25 15:24:49 +08:00
mlogclub 34051a4631 feat: Enhance AI Agent and Channel Management
- Updated labels in the AI Agents dashboard for clarity, changing "流程状态" to "Playbook 状态" and "未发布流程" to "未发布 Playbook".
- Introduced AI Agent rollout percentage management in channel editing, allowing users to set and rollback rollout percentages.
- Added new API endpoints for rolling back AI Agent rollout and fetching agent run metrics.
- Implemented new UI components for displaying agent run details, including status, duration, and input/output tokens.
- Enhanced type definitions for AdminChannel and AIAgent to include rollout percentages and runtime modes.
- Updated navigation to include a section for agent runs.
- Added new translations for agent run features in both English and Chinese.
2026-07-25 12:04:06 +08:00
mlogclub f827a7471c refactor: remove LocaleSwitcher component and update locale handling
- Removed LocaleSwitcher from NavUser, SiteHeader, and WorkbenchHeader components.
- Updated tests to reflect the removal of LocaleSwitcher.
- Changed default locale from "en-US" to "zh-CN" in i18n configuration.
- Refactored locale resolution logic to read configured locale without relying on browser language detection.
- Updated AgentDesk SDK to support language configuration from public API.
- Cleaned up unused auth options fetching in the auth API.
2026-06-26 14:46:01 +08:00
mlogclub b7056b59b5 feat: add default workflow definition endpoint and related functionality 2026-06-25 18:50:38 +08:00
mlogclub 6122a1d881 refactor: remove AgentRunLog related code and components
- Deleted AgentRunLogResponse struct from skill_response.go.
- Removed agent_run_log_repository.go and agent_run_log_service.go files.
- Eliminated AgentRunLogDetailDialog component and its related logic from the dashboard.
- Removed agent run log fetching functions from admin API.
- Updated navigation and localization files to remove references to agent run logs.
2026-06-23 23:22:18 +08:00
mlogclub 1440c3c4c3 Add AI workflow run management with listing and detail retrieval endpoints, including corresponding response structures and UI integration 2026-06-23 23:05:17 +08:00
mlogclub 32ab43e7c2 refactor: make AI workflows agent-centric 2026-06-22 10:08:51 +08:00
mlogclub 14f50e064f feat: add AI workflow editor 2026-06-22 00:26:16 +08:00
mlogclub 3267a4ce5c feat: add AI workflow dashboard APIs 2026-06-22 00:13:00 +08:00
mlogclub 164953d56d feat: add health check endpoint and update Makefile for health URL 2026-06-13 09:59:21 +08:00
mlogclub 6eb3cfe5be feat: update banner text from "Shell AI" to "AGENT DESK" 2026-06-07 19:47:47 +08:00
mlogclub 0b4a1b4594 Refactor error handling in services to use internationalized error messages
- Updated OSSStorage validation errors to use internationalized messages.
- Changed error messages in provider.go for unsupported file storage types.
- Refactored tag_service.go to replace hardcoded error messages with internationalized versions.
- Updated ticket_service.go to use internationalized error messages for various validation checks.
- Refactored ticket_tag_service.go to use internationalized error messages for tag validation.
- Changed ticket_view_service.go to use internationalized error messages for view validation.
- Updated tool_catalog_service.go to use internationalized error messages for tool code validation.
- Refactored user_service.go to replace error messages with internationalized versions.
- Updated ws_service.go to use internationalized error messages for WebSocket handling.
- Refactored wxwork_kf_inbound_service.go to use internationalized error messages for message handling.
- Updated wxwork_kf_outbound_service.go to use internationalized error messages for outbound message handling.
- Refactored wxwork_login_service.go to use internationalized error messages for login handling.
- Updated login.go in wxwork package to use internationalized error messages for login state and ticket validation.
2026-06-02 20:51:13 +08:00
mlogclub 842f827c86 feat: implement batch move and delete functionality for documents and FAQs 2026-06-02 16:13:08 +08:00
mlogclub 853ae71b3d feat: add knowledge directory management for documents and FAQs
- Implemented directory validation in Create and Update knowledge document services.
- Added directory selection in document and FAQ edit dialogs with a new KnowledgeDirectoryPanel component.
- Enhanced API to support fetching, creating, updating, and deleting knowledge directories.
- Updated data models to include directory information for knowledge documents and FAQs.
- Added translations for directory-related messages in English and Chinese.
2026-06-02 15:37:50 +08:00
mlogclub 8933e963f5 feat(knowledge): add FAQ Excel import export 2026-06-01 13:57:49 +08:00
mlogclub 0b0b16abb2 refactor: update codebase references from cs-ai-agent to agent-desk 2026-05-31 18:51:22 +08:00
mlogclub 101577f163 Refactor internal services to use agent-desk package structure
- Updated import paths in multiple service files to reflect the new agent-desk module.
- Added a new configuration file for agent-desk in the Docker setup.
2026-05-31 18:43:48 +08:00
mlogclub 5d7c10aeab refactor: rename agent widget references to AI agent for consistency
- Updated runtime configuration to use __CS_AI_AGENT_WIDGET_CONFIG__ instead of __CS_AGENT_WIDGET_CONFIG__.
- Changed message types in support host bridge from "cs-agent" to "cs-ai-agent".
- Minified SDK script updated to reflect new AI agent naming conventions.
- Adjusted scrollbar styles in main.scss to use .cs-ai-agent-scrollbar instead of .cs-agent-scrollbar.
2026-05-30 21:19:36 +08:00
mlogclub b3f5824fd6 feat: add QuickReplyGetBy route and builder functions for quick replies 2026-05-28 09:11:48 +08:00
mlogclub c246b85a9e feat: add support for request ID tracking across services
- Implemented request ID handling in various services and handlers to improve traceability of requests.
- Added new AuthOptions endpoint to expose WxWork and OIDC configuration options.
- Updated message and event logging to include request ID for better debugging.
- Enhanced login form to dynamically show available authentication options based on server configuration.
- Introduced utility functions for normalizing and ensuring valid request IDs.
- Updated tests to verify request ID functionality in message sending and event logging.
2026-05-27 22:18:43 +08:00
mlogclub 498932de61 refactor: simplify cors and maxBodySize middleware by removing parameters 2026-05-27 22:06:32 +08:00
mlogclub 4d816182ee feat: implement CORS support with configurable allowed origins 2026-05-27 22:05:02 +08:00
mlogclub 988f55c80d refactor: support i18n 2026-05-25 12:06:15 +08:00
mlogclub eac039bba4 feat: add OIDC login support
- Introduced OIDC configuration options in config.example.yaml.
- Added OIDC client initialization and routes for OIDC login, callback, and exchange.
- Implemented OIDC login service to handle user authentication via OIDC.
- Created frontend components for OIDC login and callback handling.
- Updated user creation logic to support OIDC users and their identities.
- Enhanced error handling for OIDC login processes.
2026-05-24 20:49:10 +08:00
mlogclub c9ad978da6 feat: add banner printing functionality to server startup 2026-05-24 20:13:18 +08:00
mlogclub 8bbd6c9414 feat: set Gin to release mode in NewServer function 2026-05-24 20:10:20 +08:00
mlogclub 467759d547 feat: update AIConfig route handler and add validation utility function with tests 2026-05-24 19:57:36 +08:00
mlogclub c80bae5106 feat: enhance Makefile commands and update README for improved development workflow
refactor: separate API and SPA handling in server routes and add static file serving options

test: add tests for SPA handling and static file serving

feat: implement embedded SPA support for production and development environments
2026-05-23 22:44:06 +08:00
mlogclub c6c1c00141 feat: add dashboard handlers for roles, sessions, skill definitions, tags, tickets, users, and WeChat integration
- Implement role management endpoints including listing, creating, updating, and deleting roles.
- Add session management endpoints for viewing and revoking sessions.
- Create skill definition management endpoints for CRUD operations and status updates.
- Introduce tag management endpoints for handling tags with sorting and status updates.
- Develop ticket management endpoints for viewing, creating, updating, and managing ticket progress.
- Implement user management endpoints for CRUD operations, role assignments, and password resets.
- Add WeChat callback handlers for verifying and processing messages.
2026-05-23 22:30:30 +08:00
mlogclub f9ddf39c83 refactor: simplify route handlers by removing redundant ID parsing logic 2026-05-23 22:28:21 +08:00
mlogclub e9d2e41f9e Refactor controllers to use httpx for JSON responses and eliminate context dependency
- Updated TagController methods to use httpx.WriteJSON for consistent JSON response handling.
- Refactored TicketController to replace context-dependent methods with standalone functions using httpx.
- Modified UserController to utilize httpx for error handling and response formatting.
- Adjusted WechatController to remove context dependency and standardize response handling.
2026-05-23 22:22:18 +08:00
mlogclub 7fdf96dd9d feat: implement httpx response utilities and refactor API controllers to use them 2026-05-23 22:18:40 +08:00
mlogclub d21b420765 feat: restructure API routing and remove ginx package
- Added new routing functions for API and dashboard endpoints in controller_routes.go.
- Replaced previous ginx.HandleController calls with explicit route registrations.
- Removed the ginx package as it is no longer needed for handling controllers.
- Improved organization and readability of route definitions.
2026-05-23 22:12:13 +08:00
mlogclub 79614b2d07 Refactor import paths to use internal/pkg/httpx/params
- Updated multiple repository and service files to replace imports from "github.com/mlogclub/simple/web/params" with "cs-agent/internal/pkg/httpx/params".
- Adjusted context handling in auth_service and ws_service to use gin.Context instead of iris.Context.
- Ensured consistent usage of HTTP status responses across websocket handlers.
2026-05-23 22:10:20 +08:00
mlogclub fce0b5709d refactor(ticket): contract backend ticket core 2026-05-02 18:49:10 +08:00
mlogclub 14e3df64f1 feat: add customer session refresh functionality and improve session management
- Introduced RealtimeCustomerSessionRefreshPayload and RealtimeCustomerSessionRefreshEvent types for handling session refresh events.
- Updated ws_service to verify customer session and handle session refresh notifications.
- Enhanced API client to manage customer session tokens and expiration.
- Implemented customer session validation and storage in session storage.
- Added functions to exchange and ensure customer sessions.
- Updated IM real-time connection to include customer session tokens in WebSocket requests.
- Modified SDK and widget configurations to support external IDs and user tokens.
2026-04-28 23:00:22 +08:00
mlogclub 909854cd03 feat(notification): add dashboard notification center 2026-04-28 19:20:38 +08:00
mlogclub cf63b75590 refactor: rename ExternalInfo to ExternalUser and update related functions for consistency
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 11:10:47 +08:00
mlogclub 24105781d9 refactor: update visitor references to guest in WebSocket service and related files 2026-04-27 18:52:33 +08:00
mlogclub e0b15c23d9 update gorm log config 2026-04-26 20:52:22 +08:00
mlogclub 323db62512 refactor: reorganize WebSocket API route configuration for improved clarity 2026-04-25 10:51:41 +08:00