Get pro (#1930)
* BREAKING? Remove overflow-hidden from message info container
The overflow-hidden class was removed from the message info container div to allow content to overflow as needed. This may improve the display of message metadata or related elements.
* Add subscribe modal and improve error handling
Introduces a SubscribeModal component to prompt users to upgrade when hitting message limits, shown on 402 errors in conversation pages. Enhances error propagation and handling in router and endpoint logic, preserving HTTP status codes and error messages, and updates types to support status codes in message updates. Also includes minor UI improvements to Toast and refines error extraction and logging throughout the routing flow.
* Sanitize and improve error handling in router endpoints
Introduces functions to sanitize error messages before sending them to clients, preventing leakage of provider details. Differentiates between policy errors (e.g., authorization, payment) and transient errors, surfacing only policy errors to users while allowing fallback for transient errors. Also updates conversation update logic for compatibility with different MongoDB driver versions.
* Remove public error message sanitization
Eliminated the publicErrorMessage function and now forward raw error messages to clients. This simplifies error handling and avoids altering upstream error messages before sending them to the client.
* Hide router UI elements on error and refactor RetryBtn
Router examples and follow-ups are now hidden when the last message is an error. Also refactored the RetryBtn rendering logic to simplify the condition and only show it when not loading and lastIsError is true.
* Improve error handling and type safety in server code
Refactored error extraction logic in endpoint.ts for better type safety and more robust handling of OpenAI and HTTP errors. Updated conversation group and conversation server routes to use stricter type checks for status codes. Removed unused import and variable from SubscribeModal.svelte.