- Added handleDownload method to manage file download requests, including validation for session ID and file ID.
- Enhanced permission checks to ensure users can only download files they are authorized to access.
- Updated CORS headers to include Content-Disposition for better file handling in responses.
- Removed deprecated download logic from the neo package to streamline code and improve maintainability.
- Refactored existing methods to improve clarity and error handling during file operations.
- Implemented SaveAttachment, DeleteAttachment, GetAttachments, and GetAttachment methods for managing file attachments.
- Introduced SaveKnowledge, DeleteKnowledge, GetKnowledges, and GetKnowledge methods for handling knowledge collections.
- Enhanced the Store interface to include methods for attachment and knowledge management.
- Updated tests to cover new attachment and knowledge functionalities, ensuring robust validation and error handling.
- Added the jsonrepair package to go.mod for enhanced JSON handling capabilities.
- Removed unused dependencies from go.mod and updated existing ones for better performance.
- Refactored file upload and download methods in the neo package to return nil values, indicating a temporary placeholder for future implementation.
- Updated the Message struct to use the new attachment package for better organization of file attachments.
- Replaced the Flows field in the Assistant struct with a Workflow field to better represent the assistant's functionality.
- Updated the Clone method to perform a deep copy of the Workflow instead of Flows.
- Adjusted related test cases to reflect the changes in the Assistant struct and ensure proper functionality.
- Added locale parameter to GetChats, GetChat, and GetAssistants methods across various store implementations for improved localization.
- Updated handleChatList, handleChatLatest, and handleChatDetail functions to utilize the new locale handling for better user experience.
- Refactored assistant methods to support localized names and descriptions based on user input.
- Introduced WithLocale function in context to manage locale settings effectively.
- Introduced locale parameter in GetAssistants and GetAssistant methods across various store implementations to support localized responses.
- Updated handleChatLatest, handleAssistantList, handleAssistantDetail, and handleAssistantTags functions to utilize the new locale handling for better user experience.
- Refactored GetPlaceholder method in the Assistant struct to accept a locale argument for dynamic placeholder translations.
- Removed redundant i18n code and centralized translation logic for cleaner implementation.
- Changed the system time message to include a name field and a more descriptive content format for clarity.
- Added a development log comment for the DUI platform to enhance code documentation.
- Introduced global i18n initialization and connector setup in the Load function for better localization support.
- Refactored handleAssistantList, handleAssistantDetail, and handleAssistantTags functions to utilize the new Translate method for improved response translation based on user locale.
- Simplified locale handling by removing redundant code and centralizing translation logic.
- Removed the generateResponse struct and its associated methods to simplify response handling.
- Added locale support in handleAssistantList and handleAssistantDetail functions to allow for localized responses based on user input.
- Updated the Context struct to include locale information for better customization.
- Refactored the Load function in load.go to incorporate i18n support for assistant localization.
- Updated various dependencies in go.mod to their latest versions for improved functionality and security.
- Refactored import statements in main.go to enhance readability and organization.
- Changed the jsonrepair package import in utils.go to use a different library for better performance.
- Introduced Vision and Search capabilities in the Assistant API, enhancing its functionality.
- Updated the Context struct to include Vision and Search fields for better context management.
- Added a new Search type to facilitate search engine integration.
- Adjusted the execute method to handle the new features appropriately.
- Commented out the Assistant metadata in error handling to prevent unnecessary data exposure during error responses.
- Ensured that the output is sent to the client correctly in the streamChat method, maintaining clarity in the execution flow.
- Refactored the result handling logic to ensure that the output is sent to the client correctly, whether a callback is provided or not.
- Simplified the flow by removing redundant callback handling when a result is available.
- Updated modification times for various asset files in bindata.go to reflect recent changes.
- Refactored the Assistant API to improve result handling and streamline message processing.
- Removed unused stream handling code in the Assistant, simplifying the execution flow.
- Enhanced the Agent class in libsui/agent.ts to better manage message states and improve error handling.
- Updated modification times for various asset files in bindata.go to reflect recent changes.
- Improved context handling in the API by adding support for silent mode, history visibility, and client type.
- Refactored assistant ID usage to ensure consistent access to the default assistant across various methods.
- Enhanced the Agent class in libsui/agent.ts to manage silent mode and history visibility settings effectively.
- Update streamChat method to set a default prompt for error messages, enhancing user guidance.
- Refactor case handling in streamChat to better manage boolean and map results, improving response clarity.
- Modify HookRetry method to streamline result extraction and handle action presence more effectively, ensuring robust error handling.
- Add result field to ResHookInit struct for improved response handling.
- Update HookCreate method to initialize result in response and handle result extraction from input.
- Modify execute method to return result directly if available, improving response efficiency.
- Modify message handling logic to include "progress" in the list of ignored message types alongside "loading", "error", and "action".
- Comment out the loading message sending logic in the Execute method to streamline the process and improve clarity in message flow.
- Add ToolID field to Message struct to associate messages with specific tools.
- Update streamChat method to include ToolID in message handling for better tracking.
- Modify message properties to incorporate ToolID, enhancing clarity in message processing.
- Change BeginAt and EndAt fields to Begin and End in Message struct for improved clarity.
- Update related methods and parameters across the codebase to reflect the new naming convention.
- Ensure consistency in timestamp handling within the ScanTokens function and message processing methods.
- Update ScanTokens function to utilize ScanCallbackParams for improved clarity and structure in token processing.
- Modify ClearToken method to accept an ID parameter, enhancing token stack management.
- Refactor GenerateWithAI and streamChat methods to leverage new token handling features, improving message flow and context.
- Introduce BeginAt and EndAt fields in message processing for better timing accuracy.
- Introduce BeginAt and EndAt fields in Message struct to track message timing.
- Update NewText and NewType methods in Contents to accept Extra struct for better metadata handling.
- Modify ScanTokens function to manage token IDs and beginning timestamps, improving token processing accuracy.
- Refactor GenerateWithAI and streamChat methods to utilize new timestamp features, enhancing message context and flow.
- Introduce a system message containing the current time formatted in RFC3339 to the beginning of the filtered messages in the formatMessages function, enhancing message context for users.
- Add OneOf and Enum fields to SchemaProperty for improved schema flexibility.
- Update Parameter structure to include optional description, OneOf, and Enum fields.
- Modify generateExampleValue function to handle new OneOf and Enum logic for generating example values.
- Comment out the retry function and related logic in the run method to streamline the codebase.
- Update the options structure to remove unused retry parameters, enhancing clarity and maintainability.
- Ensure that error handling remains intact while simplifying the execution flow of the assistant.
- Modify APIPayload structure to include Args field for passing arguments.
- Enhance error handling in Call method by adding logging for method not found scenarios.
- Adjust Call method to handle cases with and without arguments, ensuring flexibility in API usage.
- Add logging for empty message roles in requestMessages function to aid debugging.
- Default message role to "assistant" if not provided in jsSend function, ensuring consistent message handling.
- Clean up error handling in jsReplace function for improved clarity.
- Add Items field to SchemaProperty for better JSON Schema representation.
- Introduce Strict field to Parameter for enhanced parameter validation options.
- Improve data structure flexibility for future tool enhancements.
- 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.
- 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.
- 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.
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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