Commit graph

2313 commits

Author SHA1 Message Date
Max
6599a24ffb
Merge pull request #947 from trheyi/main
fix: Improve result handling in Assistant API streamChat method
2025-05-09 12:09:47 +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
3b943b25c0
Merge pull request #946 from trheyi/main
fix: Update asset metadata and improve error handling in Agent class
2025-05-09 10:51:16 +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
e618de72e6
Merge pull request #945 from trheyi/main
feat: Update asset metadata and enhance Assistant API functionality
2025-05-09 10:28:33 +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
ac55508e05
Merge pull request #944 from trheyi/main
feat: Enhance context management and update asset metadata in SUI
2025-05-08 20:06:24 +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
dec0a7db6e
Merge pull request #943 from trheyi/main
Update asset metadata and enhance Agent class functionality in SUI
2025-05-08 12:21:36 +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
deb8d18326
Merge pull request #942 from trheyi/main
Update asset metadata and enhance Agent class functionality in SUI
2025-05-07 15:10:00 +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
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