Fix AI chat: disable send without session
- Disable send button when no active session exists Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
2d61ba2afc
commit
fb2527f4b3
1 changed files with 1 additions and 1 deletions
|
|
@ -161,7 +161,7 @@ export default function AIChatPage() {
|
|||
className="flex-1 p-3 border rounded-lg"
|
||||
disabled={loading}
|
||||
/>
|
||||
<button onClick={handleSend} disabled={loading} className={`px-4 py-2 text-white rounded-lg ${loading ? "bg-gray-300 cursor-not-allowed" : "bg-rose-400"}`}>
|
||||
<button onClick={handleSend} disabled={loading || !currentSession} className={`px-4 py-2 text-white rounded-lg ${loading || !currentSession ? "bg-gray-300 cursor-not-allowed" : "bg-rose-400"}`}>
|
||||
{loading ? "..." : "Send"}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue