Commit graph

2218 commits

Author SHA1 Message Date
Max
b545f7c236
Merge pull request #900 from trheyi/main
feat: Migrate Excel plugin to built-in functionality
2025-03-21 20:58:10 +08:00
Max
f0da60f467 feat: Migrate Excel plugin to built-in functionality
Move Excel plugin from external plugin to built-in functionality, including:
- Core Excel file operations (open, close, save)
- Sheet manipulation and cell operations
- Row and column iterators
- Process handlers for Excel operations
- Comprehensive test coverage

This change internalizes Excel manipulation capabilities:
- Read/write operations on cells, rows and columns
- Sheet management and styling
- Cell merging and formula handling
- Coordinate conversion utilities
2025-03-21 20:56:35 +08:00
Max
431a6236aa
Merge pull request #899 from trheyi/main
Implement built-in assistant deletion and loading improvements
2025-03-21 19:59:13 +08:00
Max
211e523759 Implement built-in assistant deletion and loading improvements
- Retrieve existing built-in assistants before deletion to ensure accurate removal.
- Update LoadBuiltIn function to track and delete assistants that are no longer present.
- Enhance error handling during the deletion process for better reliability.
2025-03-21 19:57:46 +08:00
Max
c5f636df04
Merge pull request #898 from trheyi/main
Update error message for missing assistant data in GetAssistant method
2025-03-21 18:57:49 +08:00
Max
6edaa712df Update error message for missing assistant data in GetAssistant method
- Change error message from "assistant not found" to "the assistant is empty" for improved clarity in the Xun store.
2025-03-21 18:36:59 +08:00
Max
4ca0e40ad0
Merge pull request #897 from trheyi/main
Refactor assistant save and delete methods for cache management
2025-03-18 15:41:41 +08:00
Max
f820e376ab Refactor assistant save and delete methods for cache management
- Rename variable for clarity in handleAssistantSave method.
- Implement cache removal and reloading for assistants after save and delete operations to ensure data consistency.
- Add GetCache method to retrieve the loaded cache for better cache management.
2025-03-18 15:36:44 +08:00
Max
7a7bca5f9d
Merge pull request #896 from trheyi/main
Enhance assistant loading and ID generation
2025-03-17 18:28:40 +08:00
Max
586ad9866c Enhance assistant loading and ID generation
- Update loadMap function to handle prompts as both string and array types, improving flexibility in data loading.
- Refactor assistant ID generation in SaveAssistant method to use a dedicated GenerateAssistantID function, ensuring unique IDs are created with error handling.
- Add GenerateAssistantID method to create a random 6-digit ID while checking for uniqueness in the database.
2025-03-17 18:28:02 +08:00
Max
b83ff0325b
Merge pull request #895 from trheyi/main
Add connector support for AI assistants in processXgen
2025-03-16 11:50:16 +08:00
Max
38b910108b Add connector support for AI assistants in processXgen
- Import connector package to access AIConnectors
- Update processXgen function to include 'connectors' field in agent map
- Add 'placeholder' field to the assistant data structure for enhanced context
2025-03-16 11:49:22 +08:00
Max
ae3fba4a0b
Merge pull request #894 from trheyi/main
Add type filtering for assistants in API and data loading
2025-03-15 17:58:45 +08:00
Max
97a469bc03 Add type filtering for assistants in API and data loading
- Introduce 'Type' field in AssistantFilter for filtering assistant lists
- Update handleAssistantList and handleAssistantDetail methods to set 'Type' to 'assistant'
- Modify LoadPath function to ensure 'type' is set if not already present
- Adjust GetAssistants and GetAssistantTags methods to apply type filtering in queries
2025-03-15 17:57:35 +08:00
Max
e107f7b3c0
Merge pull request #893 from trheyi/main
Add support for passing arguments in assistant method calls
2025-03-12 17:25:07 +08:00
Max
d3734cf1d0 Add support for passing arguments in assistant method calls
- Extend Context struct to include Args field for storing call arguments
- Modify objectCall.run to capture and store arguments in chat context
- Update context mapping to include arguments when present
2025-03-12 17:24:36 +08:00
Max
902d63e7f2
Merge pull request #892 from trheyi/main
Refactor error handling and logging in chat streaming and API methods
2025-03-07 16:58:35 +08:00
Max
b89a39b192 Refactor error handling and logging in chat streaming and API methods
- Update error handling in handleChat to return and log errors
- Modify streamChat to remove explicit error logging and improve retry mechanism
- Adjust HookRetry method to return nil for more flexible error handling
- Improve error handling in retryMessages method with better index tracking
- Remove redundant error logging in requestMessages method
2025-03-07 16:57:58 +08:00
Max
7e571adeb7
Merge pull request #891 from trheyi/main
Improve error handling in request value execution
2025-03-06 10:48:58 +08:00
Max
e59dacefa2 Improve error handling in request value execution
- Modify request value execution to log errors when method calls fail
- Prevent propagation of errors during value resolution
- Update error message in data merging to be more descriptive
2025-03-06 10:48:27 +08:00
Max
1a7d54040c
Merge pull request #890 from trheyi/main
Handle null return for non-existent shared space keys
2025-03-04 17:32:13 +08:00
Max
47da72bbee Handle null return for non-existent shared space keys
- Modify jsGet method to return null when key is not found
- Add string-based error checking to differentiate between missing keys and other errors
- Improve shared space key retrieval error handling in JavaScript bridge
2025-03-04 17:31:07 +08:00
Max
59d7f469c1
Merge pull request #889 from trheyi/main
Improved Request Context Handling and Enhanced Retry Mechanism
2025-03-04 15:29:36 +08:00
Max
dafd6b029b Enhance retry mechanism with flexible action handling
- Modify HookRetry to support returning NextAction
- Update streamChat to handle different retry response types
- Add type switching for retry hook return values
- Implement execution of NextAction in retry flow
- Improve error handling and response processing during retry
2025-03-04 15:27:40 +08:00
Max
f469568d85 Improve request context handling in chat streaming
- Use request context for client connection tracking
- Replace CloseNotify with context cancellation
- Enhance streaming method to handle request context termination
2025-03-04 12:03:19 +08:00
Max
7164eddaba
Merge pull request #888 from trheyi/main
Add optional options handling in objectCall.run method
2025-03-03 18:14:29 +08:00
Max
709c7ec738 Add optional options handling in objectCall.run method
- Modify options unmarshaling to handle undefined JavaScript options
- Add null check to prevent unmarshaling errors when no options are provided
- Improve robustness of method call argument processing
2025-03-03 18:13:10 +08:00
Max
c412e5d896
Merge pull request #887 from trheyi/main
Handle empty prompt in chat streaming with error callback
2025-03-03 15:27:14 +08:00
Max
48d65c0e39 Handle empty prompt in chat streaming with error callback
- Add error handling for empty prompts in streamChat method
- Ensure proper error message generation and callback invocation
- Improve error propagation in chat streaming scenarios
2025-03-03 15:26:24 +08:00
Max
20e8a14e79
Merge pull request #886 from trheyi/main
Add retry mechanism for chat streaming with error handling
2025-03-03 15:00:18 +08:00
Max
c74d32390c Add retry mechanism for chat streaming with error handling
- Implement HookRetry method to handle retry scenarios in chat streaming
- Add retry tracking with RetryTimes and Retry flag in context
- Create retryMessages method to modify messages for retry attempts
- Enhance error handling and logging for retry scenarios
- Add color-coded error output for retry failures
2025-03-03 14:49:31 +08:00
Max
6256a9c196
Merge pull request #885 from trheyi/main
Add silent mode support for chat history and filtering
2025-03-01 16:58:08 +08:00
Max
392676f2cb Add silent mode support for chat history and filtering
- Implement silent flag in chat and history storage
- Add filter options to retrieve chats and messages with silent mode
- Update store interfaces to support silent message filtering
- Enhance GetChats, GetHistory, and related methods to handle silent messages
- Add comprehensive test cases for silent mode functionality
2025-03-01 16:08:56 +08:00
Max
25a5683e56
Merge pull request #884 from trheyi/main
Implement retry mechanism for assistant method calls
2025-03-01 12:21:15 +08:00
Max
dcc126ef95 Implement retry mechanism for assistant method calls
- Add comprehensive retry handling in objectCall.run method
- Support configurable retry times, delay, and custom retry prompts
- Enhance error handling and input processing during retry attempts
- Modify method signatures to return interface{} for more flexible result handling
- Implement retry event hook for custom retry logic in JavaScript
2025-03-01 12:20:02 +08:00
Max
2c35cbe507
Merge pull request #883 from trheyi/main
Enhance input handling and message processing in assistant methods
2025-02-28 20:14:29 +08:00
Max
86dd04728d Enhance input handling and message processing in assistant methods
- Modify Execute and withHistory methods to support multiple input types
- Add flexible type conversion for input messages using jsoniter
- Implement robust handling of string, map, and slice input formats
- Update method signatures to accept interface{} for more dynamic input processing
- Improve error handling during input marshaling and unmarshaling
2025-02-28 20:13:59 +08:00
Max
24bccc1a89
Merge pull request #882 from trheyi/main
Add shared space methods to JavaScript bridge
2025-02-27 16:35:13 +08:00
Max
ca6d075a22 Add shared space methods to JavaScript bridge
- Implement Set, Get, Del, and Clear methods for shared space interactions
- Add error handling and validation for shared space method calls
- Enhance context management with Release method to clear shared space
- Update context initialization to create a default memory shared space
2025-02-27 16:32:25 +08:00
Max
125876d5ef
Merge pull request #881 from trheyi/main
Improve JavaScript argument handling in jsCall method
2025-02-27 15:16:00 +08:00
Max
ae599d9b83 Improve JavaScript argument handling in jsCall method
- Add null check for jsArgs to prevent potential nil pointer dereferences
- Refactor argument parsing logic to handle optional arguments more robustly
- Ensure safe conversion of JavaScript arguments to Go slice
- Enhance error handling for argument type conversion
2025-02-27 15:15:27 +08:00
Max
4b6235c568
Merge pull request #880 from trheyi/main
Enhance message processing in assistant chat method
2025-02-26 08:27:48 +08:00
Max
6b15a1763e Enhance message processing in assistant chat method
- Implement comprehensive message formatting function
- Add filtering for duplicate messages
- Reorder messages to ensure proper system and user message placement
- Merge consecutive assistant messages
- Improve message preprocessing for API requests
2025-02-26 08:27:16 +08:00
Max
d42f96ffc7
Merge pull request #879 from trheyi/main
Add result handling in assistant streaming and hook responses
2025-02-25 17:33:43 +08:00
Max
f1e6c2c62f Add result handling in assistant streaming and hook responses
- Introduce Result field in ResHookDone struct to support additional data
- Update NextAction.Execute method to pass optional callback arguments
- Modify streamChat method to propagate result data to output messages
- Add Result field to Message struct for flexible result storage
2025-02-25 17:32:58 +08:00
Max
f0c4c8bf62
Merge pull request #878 from trheyi/main
Enhance JavaScript bridge argument handling in assistant method calls
2025-02-25 16:12:16 +08:00
Max
5fe43f8103 Enhance JavaScript bridge argument handling in assistant method calls
- Add support for passing additional arguments to callback functions
- Implement flexible argument parsing for JavaScript method calls
- Handle both array and single argument scenarios
- Update method signature to accommodate optional arguments
2025-02-25 16:11:53 +08:00
Max
e536d6ebcc
Merge pull request #877 from trheyi/main
Add Assets method to assistant for retrieving and processing asset files
2025-02-25 11:35:21 +08:00
Max
5475e0ab39 Add Assets method to assistant for retrieving and processing asset files
- Implement Assets method in Assistant struct to read asset files
- Add jsAssets function to JavaScript bridge for accessing assets
- Support optional data replacement in asset file content
- Enable dynamic asset retrieval with optional template data processing
2025-02-25 11:27:04 +08:00
Max
f9f1177e0d
Merge pull request #876 from trheyi/main
Enhance thread safety and tool call handling in streaming components
2025-02-24 19:33:20 +08:00