icarus
a424e3a039
feat(agents): add success toast notifications for agent operations
2025-09-19 13:32:16 +08:00
icarus
eaa5ec5545
refactor(agents): remove unused useRemoveAgent hook and use deleteAgent from useAgents
2025-09-19 13:30:50 +08:00
icarus
5850e5da66
refactor(AgentItem): simplify component structure and remove unused logger
...
- Remove Button wrapper from AgentLabel component
- Replace div container with Button component for better semantics
- Clean up unused logger service and related click handler
2025-09-19 13:28:36 +08:00
icarus
eb3ff6f570
fix(agents): convert null values to undefined in database responses
...
Ensure type consistency by converting null values from database to undefined as specified in type definitions
2025-09-19 13:14:20 +08:00
icarus
ae9c78e643
Merge branch 'feat/agents-new' of github.com:CherryHQ/cherry-studio into feat/agents-new
2025-09-19 12:58:21 +08:00
icarus
445528aff7
refactor(agent): replace interface with zod schema for message request
...
Add createMessage method to AgentApiClient to handle posting messages to sessions
2025-09-19 12:58:14 +08:00
Vaayne
d13c25444c
feat(agents, sessions): enhance agent and session schemas with detailed properties and CRUD API documentation
2025-09-19 12:56:20 +08:00
Vaayne
5386716ebe
feat(session messages): enhance session message persistence with improved error handling and completion notifications
2025-09-19 12:56:20 +08:00
Vaayne
da3cd62486
feat(sessions): update session creation and update requests with new session details
2025-09-19 12:56:20 +08:00
Vaayne
d8b47e30c4
feat(session messages): implement user message persistence and retrieve last agent session ID
2025-09-19 12:56:20 +08:00
icarus
1c19e529ac
Merge branch 'feat/agents-new' of github.com:CherryHQ/cherry-studio into feat/agents-new
2025-09-19 12:51:08 +08:00
Vaayne
514b60f704
feat(agents, sessions): implement replace functionality for agent and session updates
2025-09-19 11:13:05 +08:00
Vaayne
df1d4cd62b
refactor(sessions): update getSession and related methods to include agentId parameter
2025-09-19 10:41:26 +08:00
Vaayne
4839b91cef
chore(docs): remove session tracking protocol from AI Assistant Guide
2025-09-19 10:27:09 +08:00
Vaayne
5048d6987d
refactor(validators): migrate validation logic to Zod for agents and sessions
2025-09-19 10:27:02 +08:00
icarus
809736dd33
feat(sessions): add update session functionality
...
Introduce UpdateSessionResponse type and schema to support session updates. Implement update session methods across client, service, and handler layers to enable session modifications.
2025-09-18 22:58:49 +08:00
icarus
369cc37071
feat(sessions): add delete session functionality to agent api and hook
...
Implement session deletion by adding deleteSession method to AgentApiClient and corresponding hook in useSessions. This enables removing sessions from the UI with proper error handling and cache invalidation.
2025-09-18 22:52:46 +08:00
icarus
d0b64dabc2
fix(agents): correct agent update and retrieval logic
...
Fix mutation logic to use result.id instead of form.id for consistency
Make getAgent async and update cache with fetched agent data
2025-09-18 22:51:02 +08:00
icarus
02d2838424
fix(agent): add response validation for ID mismatches
...
Add checks to ensure response IDs match expected values in agent API calls
2025-09-18 22:50:05 +08:00
icarus
4c4039283f
fix(useSessions): correct session fetching logic to use API call
...
Previously the getSession hook was only searching local data. Now it properly fetches from the API and updates the cache. This ensures data consistency when sessions are modified elsewhere.
2025-09-18 22:46:24 +08:00
icarus
77df6fd58e
feat(sessions): add getSession method to retrieve specific session
...
Implement session retrieval functionality in both hook and API client to enable fetching individual sessions by ID
2025-09-18 22:37:02 +08:00
icarus
100801821f
fix(agents): update agents list response structure to match API
...
Align frontend and backend types for agents list response. The API now returns paginated data with limit/offset and renamed 'agents' field to 'data' for consistency. Update related type definitions and usage across the codebase.
2025-09-18 22:26:54 +08:00
icarus
2201ebbb88
feat(i18n): add error messages for agent and session operations
...
Add error messages for agent deletion, update, and session creation operations
Add "no response" error message for all supported languages
2025-09-18 22:21:27 +08:00
icarus
9810f01330
feat(sessions): add create session functionality to agent api and hook
...
Implement session creation in the agent API client and expose it through the useSessions hook. The hook now provides a createSession method that updates the session list upon successful creation.
2025-09-18 22:19:52 +08:00
icarus
7b428be93d
feat(types): add session form interfaces for agent operations
...
Add BaseSessionForm, CreateSessionForm and UpdateSessionForm interfaces to support session management functionality
2025-09-18 22:10:53 +08:00
icarus
a4c2ed5328
fix(api): update error handling to match new error structure
...
The AgentServerError schema was updated to nest error properties under an 'error' object. This commit aligns the error formatting function with the new schema structure.
2025-09-18 22:02:42 +08:00
icarus
934cc0dd33
refactor(useAgents): simplify agent data structure and mutations
...
Remove unnecessary nesting of agents array in SWR response and simplify mutation logic to work directly with the array
2025-09-18 22:00:25 +08:00
icarus
da61500e34
feat(hooks): add useSessions hook for agent session management
2025-09-18 21:57:18 +08:00
icarus
db2042800b
feat(agent): add listSessions method to AgentApiClient
...
Implement session listing functionality for agents by adding the listSessions method. This enables retrieving all sessions associated with a specific agent.
2025-09-18 21:50:14 +08:00
icarus
08772741e6
feat(agent-sessions): add schema and type for listing agent sessions
...
Add ListAgentSessionsResponseSchema and type to support paginated session listing
2025-09-18 21:49:02 +08:00
icarus
f5f542911f
feat(sessions): add CreateSessionResponse type for better type safety
...
Introduce CreateSessionResponse type and schema to clearly define the return type of session creation operations. This improves type safety and consistency across the codebase when handling session responses.
2025-09-18 21:43:06 +08:00
icarus
3b5b1986e6
feat(hooks): add getAgent function to useAgents hook
2025-09-18 21:34:25 +08:00
icarus
3b0995c8ef
feat(agents): add deleteAgent hook to useAgents
...
Implement agent deletion functionality with optimistic updates and error handling
2025-09-18 21:22:20 +08:00
icarus
34c95ca787
feat(agents): add update agent functionality and error message
...
Add updateAgent method to useAgents hook and update agent API client
2025-09-18 21:20:58 +08:00
icarus
a4c2a1d435
feat(i18n): add new translation keys for agent errors and session management
...
Add "failed" error message for agent addition and implement session-related translations including delete confirmation and labels
2025-09-18 20:49:04 +08:00
icarus
e4f0743e2f
fix(api): replace Axios constructor with axios.create for better defaults
...
Using axios.create() provides better default configuration and error handling compared to the Axios constructor
2025-09-18 20:47:53 +08:00
icarus
7632efda88
fix(api): handle ZodError in processError and formatErrorMessage
...
Add explicit handling of ZodError in processError to return the error directly and in formatErrorMessage to use formatZodError for better error reporting
2025-09-18 20:40:30 +08:00
icarus
ab90eb2aab
refactor(AgentModal): replace useAddAgent with useAgents hook
2025-09-18 20:29:04 +08:00
icarus
4c5bed0b1f
fix(agents): add http protocol to agent client base url
2025-09-18 20:28:08 +08:00
icarus
302331043a
refactor(agent): add error logging in agent api client
...
Use logger service to log errors when processing API requests
2025-09-18 20:25:40 +08:00
icarus
09f5e7af8c
feat(agents): implement add agent functionality in useAgents hook
...
Add createAgent method to useAgents hook and remove unused useAddAgent hook
Use formatErrorMessageWithPrefix for better error handling
2025-09-18 20:25:28 +08:00
icarus
664304241a
feat(i18n): make base locale configurable via env var
...
Add support for BASE_LOCALE environment variable to override default locale
Add file existence check for base locale file in auto-translate script
Update npm scripts to load .env for i18n commands
2025-09-18 19:31:24 +08:00
icarus
27f98b02a6
feat(sessions): add sessions tab with basic functionality and translations
...
- Create new SessionsTab component with mock data
- Add session item component with context menu for edit/delete
- Include session tab in main navigation
- Add English translations for session-related strings
2025-09-18 19:26:25 +08:00
icarus
af6a3c87d6
fix(AgentItem): add missing onPress dependency to useCallback
...
Ensure the callback is updated when onPress prop changes to avoid stale closures
2025-09-18 19:17:10 +08:00
icarus
d1819274bb
Revert "feat(agent): add name field to AgentSessionEntitySchema"
...
This reverts commit 8058ed21b3 .
2025-09-18 19:13:24 +08:00
icarus
8058ed21b3
feat(agent): add name field to AgentSessionEntitySchema
...
Add name field to agent session schema to support session naming functionality
2025-09-18 19:11:52 +08:00
icarus
eaf302bb40
Merge branch 'feat/agents-new' of github.com:CherryHQ/cherry-studio into feat/agents-new
2025-09-18 19:04:14 +08:00
icarus
3405b7e429
refactor(ui): rename agents to assistantPresets for consistency
...
Update route paths, i18n keys and tab identifiers to use 'assistantPresets' instead of 'agents'
Add new agents tab component while maintaining backward compatibility
2025-09-18 19:04:05 +08:00
icarus
2fc1df8793
refactor(ui): remove unused UI elements and commented code
...
clean up UI by removing unused text spans and commented out code
remove unused timer functionality from AgentModal
2025-09-18 19:00:41 +08:00
icarus
ec82eb2881
build: add @types alias to electron vite config
2025-09-18 18:52:36 +08:00