feat: add OpenRouter support and fix input disabling

- Add OpenRouter provider support with @openrouter/ai-sdk-provider
- Fix input not disabling during 'submitted' state for fast providers
- Apply disable logic to all interactive elements (textarea, buttons, handlers)
- Clean up env.example by removing model examples and separator blocks
- Upgrade zod to v4.1.12 for compatibility with ollama-ai-provider-v2
- Add debug logging for status changes in chat components
This commit is contained in:
dayuan.jiang
2025-11-15 14:29:18 +09:00
parent 4a3abc2e39
commit 58dcb3c41a
6 changed files with 83 additions and 66 deletions

View File

@@ -133,9 +133,15 @@ Please retry with an adjusted search pattern or use display_diagram if retries a
}
}, [messages]);
// Debug: Log status changes
useEffect(() => {
console.log('[ChatPanel] Status changed to:', status);
}, [status]);
const onFormSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (input.trim() && status !== "streaming") {
const isProcessing = status === "streaming" || status === "submitted";
if (input.trim() && !isProcessing) {
try {
// Fetch chart data before sending message
let chartXml = await onFetchChart();