Commit graph

2301 commits

Author SHA1 Message Date
Max
979057ae2b
Merge pull request #941 from trheyi/main
feat: Enhance context management and agent functionality in SUI
2025-05-06 19:25:00 +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
96cc9011a5
Merge pull request #940 from trheyi/main
Update asset metadata and enhance event handling in SUI
2025-05-06 12:43:11 +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
0efb57f961
Merge pull request #939 from trheyi/main
fix: Update asset metadata and enhance route handling in SUI
2025-05-05 18:13:14 +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
dc961e7af0
Merge pull request #938 from trheyi/main
feat: Update asset metadata and enhance Agent class in SDK
2025-05-05 16:24:24 +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
68b98f9f62
Merge pull request #937 from trheyi/main
# Enhanced Yao AI Agent SDK
2025-05-05 12:49:40 +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
6b84dc7128
Merge pull request #936 from trheyi/main
feat: Improve error handling and result processing in Assistant API
2025-04-29 20:38:07 +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
591215ca77
Merge pull request #935 from trheyi/main
feat: Enhance result handling in Assistant API and hooks
2025-04-28 12:50:14 +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
a84a178267
Merge pull request #934 from trheyi/main
refactor: Improve asynchronous message processing in WriteMessageAsync
2025-04-27 12:20:24 +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
fa040b0cbc
Merge pull request #933 from trheyi/main
refactor: Update message writing logic to use message queue
2025-04-26 21:26:26 +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
fd84be9f84
Merge pull request #932 from trheyi/main
feat: Enhance global build context and component handling
2025-04-23 16:08: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
91cf52632f
Merge pull request #931 from trheyi/main
refactor: Update message handling to ignore progress messages
2025-04-19 15:38:52 +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
e4b76a9a08
Merge pull request #930 from trheyi/main
feat: Enhance message structure with ToolID for improved context
2025-04-16 16:53:01 +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
492645b378
Merge pull request #929 from trheyi/main
refactor: Rename BeginAt and EndAt fields for consistency in message …
2025-04-16 16:41:05 +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
ac22599865
Merge pull request #928 from trheyi/main
feat: Refactor token management and enhance message scanning
2025-04-16 16:23:34 +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
9182a96bb6
Merge pull request #927 from trheyi/main
feat: Upgrade JWT library and enhance token validation
2025-04-16 14:43:42 +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
17686a77c6
Merge pull request #926 from trheyi/main
feat: Enhance message handling with timestamps and token management
2025-04-16 14:30:38 +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
0073e249ba
Merge pull request #925 from trheyi/main
feat: Add current time message to formatMessages function
2025-04-10 10:52:34 +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
caa529dc58
Merge pull request #924 from trheyi/main
feat: Enhance getTimestamp function to support time.Time type
2025-04-10 10:46:51 +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
951da60267
Merge pull request #923 from trheyi/main
feat: Add Developer information to AppInfo structure and update proce…
2025-04-09 23:07:08 +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
52c128529c
Merge pull request #922 from trheyi/main
feat: Enhance SchemaProperty and Parameter structures with additional…
2025-04-09 16:25:09 +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
8551bdfdf6
Merge pull request #921 from trheyi/main
Refactor: Remove deprecated retry logic from objectCall, use the retr…
2025-04-08 12:30:24 +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
fed99ab7d9
Merge pull request #920 from trheyi/main
feat: Add ConsoleMode configuration to runtime settings
2025-04-04 18:27:34 +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
5d18e12999
Merge pull request #919 from trheyi/main
feat: Enhance Pinyin processing with additional options and tests
2025-04-04 16:35:59 +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
3bf0cd8d61
Merge pull request #918 from trheyi/main
feat: Add Pinyin processing functionality to string utilities
2025-04-04 16:23:21 +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
2e74595ad0
Merge pull request #917 from trheyi/main
fix: Update Assistant API to handle arguments and improve error logging
2025-04-03 14:38:02 +08:00