1. Major Changes:
- Migrate all XGen references to CUI
- Update project naming conventions across codebase
2. License Updates:
- Revise open source license terms
- Update copyright and usage conditions
This is a breaking change that requires updates in dependent projects.
- Updated the Go version in both `pr-test.yml` and `unit-test.yml` workflows from 1.23 to 1.24 to ensure compatibility with the latest features and improvements.
- Replaced the previous method of calculating sheet dimensions with a more efficient approach using the `Cols` method.
- Removed commented-out code related to dimension handling, streamlining the function for better readability and maintainability.
- Implemented `excel.sheet.rows` to read specified rows from a sheet with pagination support.
- Added `excel.sheet.dimension` to retrieve the number of rows and columns in a sheet.
- Enhanced the Excel processing logic to handle new functionalities and updated related tests.
- Updated README with examples for the new features.
- 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.
- Updated the assignment of assistant_id to use the Default value from neo.Use, ensuring consistent behavior when the assistant_id is nil.
- Adjusted the logic for determining assistant_deleteable to compare against the Default value, improving clarity and correctness in chat functionality.
- Added checks in various loading functions to ignore processing if the respective directories do not exist, improving error handling and preventing unnecessary operations.
- Updated the Load function signature to return warnings alongside errors, allowing for better feedback on loading issues across different components.
- Implemented functionality to handle attachments in the Map method of the Message struct.
- Added JSON parsing for attachments, ensuring proper error handling and feedback during the process.
- Changed the download URL for the Yao binary in both development and production Dockerfiles to a new location.
- Ensured that the binary is still installed correctly with the appropriate permissions.
- 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.
- Renamed ClientTypeSDK to ClientTypeAndroid for clarity and consistency in client type definitions.
- Updated SupportedClientTypes map to reflect the change in client type naming.
- 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.
- Enhanced error handling in the Agent class in libsui/agent.ts by providing more descriptive error messages for rejected promises.
- Improved message parsing error handling to ensure clearer feedback on failures.
- 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.
- Updated modification times for various asset files in bindata.go to reflect recent changes.
- Enhanced the Agent class in libsui/agent.ts by adding type tracking for message processing, improving message creation logic based on type changes.
- Improved event handling in the Agent class to streamline message processing and enhance user interactions.
- Updated modification times for various asset files in bindata.go to reflect recent changes.
- Enhanced the Agent class in libsui/agent.ts by adding context management and a cancel method for better resource handling.
- Improved type definitions and event handling in the Agent class to streamline message processing and enhance user interactions.
- Added support for assistant ID in context handling to improve user-specific interactions.
- Updated asset metadata in bindata.go to reflect recent changes in modification times.
- Enhanced the Agent class in libsui/agent.ts with improved type definitions for the Call method, ensuring better type safety and clarity in asynchronous operations.
- Improved event handling in the Agent class to manage message completion more effectively.
- Updated modification times for various asset files in bindata.go to reflect recent changes.
- Enhanced event handling in libsui/index.ts to support parent component names for event binding, improving flexibility and error handling.
- Updated modification times for various asset files in bindata.go to reflect recent changes.
- Enhanced route handling in libsui/index.ts to support optional route parameters, improving flexibility in component rendering.
- Added initialization for sub-components within the rendering process, enhancing component lifecycle management and error handling.
- Updated modification times for various asset files in bindata.go to reflect recent changes.
- Enhanced the Agent class in libsui/agent.ts with improved type definitions and event handling.
- Introduced new interfaces for message structures and event handlers, streamlining message processing.
- Refactored the Call method to better manage message states and improve error handling.
Improved the Yao AI Agent SDK with better type definitions and error handling.
## Key Updates
- Added typed interfaces for attachments and messages
- Optimized attachment handling (only send when present)
- Enhanced error handling with specific error messages
- Improved event system for message streaming
- Added comprehensive TypeScript definitions
- 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.
- Introduce a done channel to track message processing completion.
- Increase timeout for message processing to 5 seconds for better reliability.
- Adjust queue timeout to 1 second to enhance responsiveness when the queue is full.
- Modify the Write method in the Message struct to utilize WriteMessageAsync for improved asynchronous message handling.
- Update ignored message types to include "plan" alongside "loading", "error", "action", and "progress" for better message filtering.
- Update NewGlobalBuildContext to accept a template parameter for improved context management.
- Refactor component handling in Compile method to include JIT components, enhancing dynamic component loading.
- Modify TemplateRender to utilize the updated global context, improving template processing.
- Adjust component attribute parsing to use "s:route" for better clarity in component identification.
- 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.
- Update JWT library from v3.2.2 to v4.5.2 for improved security and features.
- Refactor JwtClaims to use RegisteredClaims for better compliance with the latest JWT standards.
- Introduce token length and format validation in JwtValidate function to enhance security.
- Modify JwtMake function to utilize time.Duration for timeout settings, improving clarity and usability.
- 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.
- Introduce Developer struct to encapsulate developer details such as ID, Name, Info, Email, and Homepage.
- Update processXgen to include developer information in the generated settings map, enhancing app metadata.
- 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.
- Introduce ConsoleMode parameter in the Start function to allow configuration based on the provided runtime settings.
- Enhance runtime initialization by incorporating the new ConsoleMode option from the configuration.
- Update ProcessPinyin function to support tone as a string ("mark" for tone marks, "number" for numeric tones) and add heteronym functionality for multiple pronunciations.
- Modify README.md to include examples for new tone options and heteronym mode.
- Expand unit tests to cover various configurations for tone and heteronym, ensuring comprehensive validation of Pinyin conversion scenarios.
- Introduce ProcessPinyin function to convert Chinese characters to Pinyin with customizable options for tone and separator.
- Register the new Pinyin process in the utils package for easy access.
- Add comprehensive unit tests for various Pinyin conversion scenarios to ensure accuracy and reliability.
- 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.
- Adjust processRead function to ensure it returns the correct string representation of table data.
- Refine unit test for TestProcessRead to validate substring presence in the output, confirming the function's accuracy.
- Modify processRead function to return the string output of the table read operation instead of a map.
- Update unit test for TestProcessRead to check for substring presence in the result, ensuring correct functionality.
- Implement processList to return all loaded tables and processDSL to retrieve the DSL of a specified table.
- Add unit tests for the new processes to ensure correct functionality and data integrity.
- Update process registration in exportProcess to include the new operations.
- Implement processSheetExists function to verify if a specified sheet exists in the workbook.
- Update README.md with usage examples for the new sheet existence check feature.
- Add unit tests for SheetExists functionality to ensure accurate detection of existing and non-existent sheets.
- Change directory creation permissions from 0644 to 0755 in the Open function to align with standard directory permission practices, ensuring proper access for created directories.
- Replace individual row handling with a unified approach to convert input values into a two-dimensional slice of interfaces.
- Streamline the writing process by directly passing the constructed slice to the WriteAll method, enhancing code clarity and maintainability.