- Implemented content negotiation for markdown files based on URL suffix and Accept header.
- Introduced a new RenderRaw method to serve raw markdown content, bypassing HTML rendering.
- Updated PageConfig to include a handler for markdown output, enhancing flexibility in content delivery.
- Adjust error handling in the middleware to ensure proper redirection for HTTP status codes 301 and 302.
- Clean up comments in the Template struct for better readability and consistency.
- Update the OAuth guard to prevent automatic response writing on failure, allowing for custom error handling.
- Introduce a mechanism to register default guard redirects from template configurations, improving guard management.
- Refactor the page configuration merging process to prioritize page-specific settings while allowing inheritance from templates.
- Ensure guards can be explicitly disabled in page configurations, enhancing flexibility in guard application.
- Introduce a new `RewriteRule` type and associated functions for managing URL rewrite rules in `service/static.go`.
- Add `GetRewriteRules` and `ResolveRoute` functions to facilitate the retrieval and application of rewrite rules.
- Update the `sui/api/run.go` to utilize the new route resolver for handling dynamic routes when the config file is not found.
- Define `RouteResolver` in `sui/core/interfaces.go` to allow for dynamic route resolution across the application.
- Update timestamps in `bindata.go` for various asset files to reflect recent modifications.
- Modify translation handling in `parser.go` to merge messages from YAML locale files with script messages, ensuring all translation keys are available at runtime.
- Refactor `writeLocaleFiles` in `page.go` to accept a build context, allowing for better integration of script translations during the build process.
- Refactor the `ResolveScript` function to improve the script path resolution strategy, allowing for better handling of assistant directories and module paths.
- Update asset metadata timestamps in `bindata.go` to reflect recent changes, ensuring accurate tracking of file modifications.
- Modify CSS component name formatting in `build.go` and TypeScript component selectors in `index.ts` for consistency in syntax.
- Improve locale handling in `locale.go` by implementing a fallback mechanism for locale file resolution based on language prefixes.
- Normalize locale values in `request.go` to lowercase for consistency across the application.
- Enhance component name sanitization in `utils.go` to replace additional characters, ensuring valid component naming conventions.
- Introduced support for OpenAPI mode, allowing dynamic routing and OAuth guards for API endpoints.
- Updated API root path handling to accommodate OpenAPI configurations, ensuring consistent URL structures.
- Added well-known routes for Yao metadata and OAuth discovery, improving API discoverability.
- Refactored middleware and guards to streamline OpenAPI integration, enhancing overall service functionality.
- Removed deprecated agent TypeScript file, simplifying the codebase and improving maintainability.
- Introduced the IWatchDirs interface to support watching multiple directories for changes, allowing templates to specify directories dynamically.
- Updated the watch command to handle multiple directories and display watched directories in the output.
- Added functionality to write locale files from a page's __locales directory to the public directory, improving localization support.
- Enhanced error handling during directory watching and locale file processing for better reliability and logging.
- Updated the `build` and `watch` commands to accept a single argument for `<sui>` and made the `<template>` argument optional, improving usability.
- Introduced a default template assignment for the `agent` SUI, ensuring a more intuitive setup for users.
- Enhanced error messages for command usage to provide clearer guidance on expected input format.
- Added new OpenAPI file to the bindata, improving the framework's capabilities for API integration.
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 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.
- Bump github.com/mattn/go-colorable from v0.1.13 to v0.1.14 in go.mod and go.sum.
- Refactor expression execution in pipe and core data handling to use a map for improved type safety.
- Modify request value execution to log errors when method calls fail
- Prevent propagation of errors during value resolution
- Update error message in data merging to be more descriptive