Commit graph

2222 commits

Author SHA1 Message Date
Max
4dbdb07efb chore: Update version and Go installation in CI workflows
- Bumped the version from 0.9.0 to 0.10.5 in the macOS build workflow.
- Updated the Go installation in the Dockerfile from version 1.24.0 to 1.24.3 for improved compatibility and features.
2025-05-18 17:57:21 +08:00
Max
eeac6bbf96 chore: Update .gitignore and Makefile for improved artifact management
- Added backup entries for bindata.go and const.go in .gitignore to prevent accidental commits.
- Refactored Makefile to streamline CUI commit retrieval and ensure consistent versioning in artifact generation.
- Implemented backup and restoration of bindata.go and const.go during the release process for better safety.
2025-05-18 17:37:28 +08:00
Max
4c026755c4 feat: Update versioning and commit information in Makefile and version command
- Added CUI commit information to the Makefile for artifact generation.
- Enhanced version command output to include Yao and CUI commit details with improved formatting.
- Updated constant names in share/const.go for clarity on versioning.
- Fixed references to CUI commit in process and app files to align with new naming conventions.
2025-05-18 16:47:32 +08:00
Max
f55fc7b374 ⚠️ BREAKING: Rename XGen to CUI and update license terms
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.
2025-05-18 12:16:45 +08:00
Max
42e5e5ecdb chore: Update Go version in CI workflows to 1.24
- 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.
2025-05-18 10:19:19 +08:00
Max
c357c72934 refactor: Simplify sheet dimension retrieval in Excel processing
- 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.
2025-05-15 13:02:13 +08:00
Max
1cce634d24 feat: Add row reading and dimension retrieval functionalities for Excel sheets
- 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.
2025-05-15 12:56:28 +08:00
Max
aca3014167 feat: Add support for Vision and Search in Assistant API
- 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.
2025-05-14 16:03:13 +08:00
Max
51cb155d73 fix: Correct assistant ID handling in chat methods
- 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.
2025-05-13 15:18:25 +08:00
Max
fabced291c fix: Enhance loading functions to handle non-existent directories
- 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.
2025-05-13 09:10:10 +08:00
Max
15f3f0adf8 fix: Add support for attachments in message mapping
- 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.
2025-05-12 14:38:37 +08:00
Max
8b7d56a83d fix: Update download URL for Yao binary in Dockerfiles
- 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.
2025-05-09 15:39:00 +08:00
Max
6934381319 fix: Comment out Assistant metadata in error handling within Assistant API
- 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.
2025-05-09 15:25:39 +08:00
Max
eb89272048 fix: Update client type constant for Android in context management
- Renamed ClientTypeSDK to ClientTypeAndroid for clarity and consistency in client type definitions.
- Updated SupportedClientTypes map to reflect the change in client type naming.
2025-05-09 12:14:41 +08:00
Max
dc54d17f2b fix: Improve result handling in Assistant API streamChat method
- 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.
2025-05-09 12:09:19 +08:00
Max
4c7b1547e8 fix: Update asset metadata and improve error handling in Agent class
- 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.
2025-05-09 10:50:49 +08:00
Max
c44c332334 feat: Update asset metadata and enhance Assistant API functionality
- 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.
2025-05-09 10:27:31 +08:00
Max
712bb99ab1 feat: Enhance context management and update asset metadata in SUI
- 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.
2025-05-08 20:05:39 +08:00
Max
afc2971830 Update asset metadata and enhance Agent class functionality in SUI
- 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.
2025-05-08 12:21:07 +08:00
Max
54e291b804 Update asset metadata and enhance Agent class functionality in SUI
- 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.
2025-05-07 15:07:52 +08:00
Max
83bdab3499 feat: Enhance context management and agent functionality in SUI
- 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.
2025-05-06 19:24:06 +08:00
Max
3b723fbce8 Update asset metadata and enhance event handling in SUI
- 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.
2025-05-06 12:42:40 +08:00
Max
01c524be54 fix: Update asset metadata and enhance route handling in SUI
- 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.
2025-05-05 18:11:47 +08:00
Max
d894f0a1e9 feat: Update asset metadata and enhance Agent class in SDK
- 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.
2025-05-05 16:18:57 +08:00
Max
d731296b94 refactor: Clean up and standardize code formatting in bindata.go
- Reorganized import statements for consistency.
- Removed unnecessary blank lines and standardized indentation for better readability.
- Updated map initialization syntax for improved clarity and uniformity.
2025-05-05 14:53:05 +08:00
Max
595709f834 # Enhanced Yao AI Agent SDK
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
2025-05-05 12:48:58 +08:00
Max
bc13b0d83f feat: Improve error handling and result processing in Assistant API
- 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.
2025-04-29 20:35:27 +08:00
Max
a865595254 feat: Enhance result handling in Assistant API and hooks
- 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.
2025-04-28 12:47:35 +08:00
Max
93be3acb97 refactor: Improve asynchronous message processing in WriteMessageAsync
- 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.
2025-04-27 12:19:54 +08:00
Max
c76024fda1 refactor: Update message writing logic to use message queue
- 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.
2025-04-26 21:25:38 +08:00
Max
77efc03582 feat: Enhance global build context and component handling
- 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.
2025-04-23 16:08:10 +08:00
Max
57e8389afd refactor: Update message handling to ignore progress messages
- 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.
2025-04-19 15:38:12 +08:00
Max
6203b5ccf2 feat: Enhance message structure with ToolID for improved context
- 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.
2025-04-16 16:52:32 +08:00
Max
f1de4c07f8 refactor: Rename BeginAt and EndAt fields for consistency in message handling
- 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.
2025-04-16 16:40:45 +08:00
Max
712c8ade62 feat: Refactor token management and enhance message scanning
- 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.
2025-04-16 16:23:00 +08:00
Max
77b991ed20 feat: Upgrade JWT library and enhance token validation
- 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.
2025-04-16 14:43:09 +08:00
Max
14f447c782 feat: Enhance message handling with timestamps and token management
- 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.
2025-04-16 14:29:50 +08:00
Max
1fadfe0882 feat: Add current time message to formatMessages function
- 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.
2025-04-10 10:50:29 +08:00
Max
1e047a86eb feat: Enhance getTimestamp function to support time.Time type
- Add case for time.Time in getTimestamp function to return Unix timestamp in nanoseconds, improving versatility in timestamp handling.
2025-04-10 10:46:19 +08:00
Max
645861d7a1 feat: Add Developer information to AppInfo structure and update processXgen
- 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.
2025-04-09 23:05:45 +08:00
Max
5965460c3f feat: Enhance SchemaProperty and Parameter structures with additional fields
- 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.
2025-04-09 16:24:46 +08:00
Max
55e3bb4387 Refactor: Remove deprecated retry logic from objectCall, use the retry hook instead.
- 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.
2025-04-08 12:29:48 +08:00
Max
c59e12434a feat: Add ConsoleMode configuration to runtime settings
- 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.
2025-04-04 18:26:35 +08:00
Max
f2882c3cbb feat: Enhance Pinyin processing with additional options and tests
- 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.
2025-04-04 16:35:34 +08:00
Max
efb9da57c1 feat: Add Pinyin processing functionality to string utilities
- 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.
2025-04-04 16:22:39 +08:00
Max
46b0947dfd fix: Update Assistant API to handle arguments and improve error logging
- 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.
2025-04-03 14:36:39 +08:00
Max
af002aa396 fix: Enhance message role handling in Assistant API and object
- 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.
2025-04-02 09:14:09 +08:00
Max
547b880ca5 fix: Correct processRead output format and enhance unit tests
- 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.
2025-03-31 09:54:07 +08:00
Max
13f89e8395 fix: Update processRead to return string representation of table data
- 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.
2025-03-31 09:02:03 +08:00
Max
eba6ba49c0 feat: Add table listing and DSL retrieval processes
- 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.
2025-03-31 08:52:25 +08:00