- Introduced lazy knowledge base retrieval mode, allowing the main agent to fetch KB content on demand via the `search_knowledge_base` tool, improving performance by skipping expensive pre-injection processes.
- Added cross-thread caching capability, enabling reuse of compiled graphs across different user chats, reducing latency for returning users.
- Updated middleware to support new lazy loading and caching features, ensuring efficient resource utilization and improved response times.
- Enhanced logging for performance tracking during knowledge retrieval and agent interactions.
- Added a new backend URL import to the route file for better configuration.
- Updated the Composer component to use a relative positioning class for improved layout.
- Refactored the ChatExamplePrompts component to enhance the display of active categories and prompts, including a close button for better user interaction.
- Updated the backend URL initialization to use a function that retrieves the URL from environment variables, enhancing configurability for different environments.
- Modified backend URL assignment to ensure it resolves correctly within the internal Docker network, preventing 503 errors for authenticated Zero queries.
- Added comments to clarify the routing behavior and the necessity of using the internal backend URL.
- Create app/api/zero/query/route.ts — resolves named queries to ZQL
using handleQueryRequest and mustGetQuery from @rocicorp/zero
- Add ZERO_QUERY_URL to both docker-compose files:
- dev: http://host.docker.internal:3000 (reaches local Next.js from Docker)
- prod: http://frontend:3000 (Docker service networking)
Without this endpoint, zero-cache cannot resolve named queries and
no data syncs to the client.