From e74d423e7ac104bd7270a434eb8fe77e7e7f7740 Mon Sep 17 00:00:00 2001 From: Chad Curtis Date: Fri, 30 Jan 2026 21:22:15 +0000 Subject: [PATCH] Remove redundant conversation length handler, simplify "prompt too large" response. --- src/components/Quilly.tsx | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/components/Quilly.tsx b/src/components/Quilly.tsx index 2a06cc1f..503fd104 100644 --- a/src/components/Quilly.tsx +++ b/src/components/Quilly.tsx @@ -146,21 +146,6 @@ function QuillyContent({ error, onDismiss, onNewChat, onOpenModelSelector, onTry }], }; - // Check for prompt length errors (413 or 400 with specific message) - case (error.status === 413 || error.status === 400) && - (error.message?.toLowerCase().includes('prompt is too long') || - error.message?.toLowerCase().includes('prompt') && error.message?.toLowerCase().includes('too long')): - return { - message: 'Your conversation has grown too long for this model. Try starting a new chat or switching to a model with a larger context window.', - actions: [{ - label: 'New chat', - onClick: onNewChat, - }, { - label: 'Change model', - onClick: onOpenModelSelector, - }], - }; - case error.status === 403: return { message: `It seems your API key has been used up. Check your API provider's settings, or try a different API key or different provider/model combo:`, @@ -175,14 +160,8 @@ function QuillyContent({ error, onDismiss, onNewChat, onOpenModelSelector, onTry case error.status === 413: return { - message: 'Your request is too large for the AI provider. Try starting a new chat to reduce the conversation size.', - actions: [{ - label: 'New chat', - onClick: onNewChat, - }, { - label: 'Change model', - onClick: onOpenModelSelector, - }], + message: 'Your request is too large for the AI provider. Try sending a shorter message.', + actions: [], }; case error.status === 400: