astro-minimax v0.9.1 focuses on what the AI can do: standard tool calls drive page behavior, backed by a type-safe action pipeline in the theme. It also improves retrieval granularity and polishes chat and code-block experiences.
New Features
AI Tool Calling
The assistant can now control the page through tool calls. Seven built-in tools are available:
toggleTheme: Switch theme (light / dark / system)navigateToArticle: Navigate to a specific postscrollToSection: Scroll to a heading or sectiontoggleImmersiveMode: Toggle immersive modehighlightText: Highlight text in the articlesetPreference: Update user preferencessearchArticles: Search blog posts (server-side)
Client Action Runtime
packages/core/src/actions/ provides a full action execution system:
- Type-safe action definitions: Six action kinds
- ActionQueue: Cross-navigation action queue
- URL persistence:
ai_actionsquery parameter encodes pending actions - CSS-driven UX: Section highlight pulse, theme transition effects, and more
Paragraph-Level RAG & RRF Hybrid Retrieval
Retrieval moves from article-level to paragraph-level, combined with RRF hybrid ranking for finer-grained evidence and citations.
ChatPanel Improvements
- Size presets: S / M / L with localStorage persistence
APICallError: Clearer error handling and UI feedback- Tool call-driven actions: AI SDK Tool Calling directly triggers client-side ActionExecutor for page interactions
CodeBlock Improvements
- Mermaid toolbar: Zoom, reset, fullscreen, view source
- Standalone copy control: Clipboard fallback when APIs are unavailable
- Skeleton loading: Better perceived performance for async renders
- Unique Mermaid IDs: Avoids clashes when multiple diagrams share a page
Fixes
- SSR
useRefnull during build: Switched affected islands fromclient:idletoclient:only="preact" ToolSettype mismatch: Uses AI SDK–exported types correctlyPromiseLike.catchmissing: Replaced withtry/catchfor async flowschat-handlerimports: Direct module paths instead of a barrel export to avoid cycles and ambiguous bundling
Technical Notes
- AI SDK v6:
streamTextwithtools,toolChoice: 'auto', andstepCountIs(5)to cap multi-step tool loops - Automatic tool results:
sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithToolCalls - System prompt: Bilingual (EN/ZH) guidance for safe, effective tool use
- Vite:
dedupefor@ai-sdk/reactandaito reduce duplicate packages and Preact hook issues
Upgrade Guide
This release is backward compatible. Update packages with:
pnpm update @astro-minimax/core @astro-minimax/aibashAcknowledgments
Thanks to everyone who contributed and shared feedback!
评论区
文明评论,共建和谐社区