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
- 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.
- Removed redundant return statements in various controller functions across the dashboard module.
- This change improves code readability and maintains the same functionality.
- 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.
- 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.
- 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.
- Introduced `readKefuChatRuntimeConfig` and `setKefuChatRuntimeConfig` functions to manage runtime configuration for the Kefu Chat SDK.
- Updated `useKefuChatStore` to utilize the new runtime configuration functions instead of the previous widget config methods.
- Modified the SDK build process to compile TypeScript instead of JavaScript, enhancing type safety and maintainability.
- Updated the minified SDK file to reflect the changes in configuration handling and TypeScript compilation.
- Changed `userToken` property to `getUserToken` function in KefuWidgetHostConfig for dynamic token fetching.
- Introduced KefuWidgetRuntimeConfig to manage runtime-specific configurations.
- Updated readKefuWidgetConfig and setKefuWidgetConfig functions to accommodate new configuration structure.
- Enhanced cs-ai-agent-sdk.js to handle user token resolution and frame configuration.
- Added tests for dynamic user token retrieval in cs-ai-agent-sdk.test.mjs.
- Removed deprecated cs-agent-widget.js file as part of the refactor.