X
Nexus Al
(              ))}      );}function Message({ msg }) {  const isUser = msg.role === "user";  return (          {!isUser && (        🤖      )}              {msg.content}            {isUser && (        👤      )}      );}export default function AIChat() {  const [messages, setMessages] = useState([    { role: "assistant", content: "¡Hola! Soy tu asistente de IA. ¿En qué puedo ayudarte hoy? 😊" }  ]);  const [input, setInput] = useState("");  const [loading, setLoading] = useState(false);  const bottomRef = useRef(null);  const inputRef = useRef(null);  useEffect(() => {    bottomRef.current?.scrollIntoView({ behavior: "smooth" });  }, [messages, loading]);  async function sendMessage() {    const text = input.trim();    if (!text || loading) return;    const newMessages = [...messages, { role: "user", content: text }];    setMessages(newMessages);    setInput("");    setLoading(true);    try {      const apiMessages = newMessages.map(m => ({ role: m.role, content: m.content }));      const res = await fetch("https://api.anthropic.com/v1/messages", {        method: "POST",        headers: { "Content-Type": "application/json" },        body: JSON.stringify({          model: "claude-sonnet-4-20250514",          max_tokens: 1000,          system: SYSTEM_PROMPT,          messages: apiMessages        })      });      const data = await res.json();      const reply = data?.content?.[0]?.text || "No pude obtener una respuesta.";      setMessages(prev => [...prev, { role: "assistant", content: reply }]);    } catch (err) {      setMessages(prev => [...prev, { role: "assistant", content: "⚠️ Error al conectar con la IA. Intenta de nuevo." }]);    }    setLoading(false);    setTimeout(() => inputRef.current?.focus(), 100);  }  function handleKey(e) {    if (e.key === "Enter" && !e.shiftKey) {      e.preventDefault();      sendMessage();    }  }  return (          {`        @keyframes bounce {          0%, 60%, 100% { transform: translateY(0); }          30% { transform: translateY(-8px); }        }        @keyframes fadeSlide {          from { opacity: 0; transform: translateY(10px); }          to { opacity: 1; transform: translateY(0); }        }        @keyframes pulse {          0%, 100% { box-shadow: 0 0 20px rgba(124,58,237,0.3); }          50% { box-shadow: 0 0 40px rgba(124,58,237,0.6); }        }        textarea:focus { outline: none; }        textarea::placeholder { color: rgba(167,139,250,0.4); }        ::-webkit-scrollbar { width: 4px; }        ::-webkit-scrollbar-track { background: transparent; }        ::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 2px; }      `}              {/* Header */}                  ✨                                    Chat IA                                                    En línea · Impulsado por Claude                                      {/* Messages */}                  {messages.map((msg, i) => (                      ))}          {loading && }                          {/* Input */}                              setInput(e.target.value)}              onKeyDown={handleKey}              placeholder="Escribe tu mensaje... (Enter para enviar)"              rows={1}              style={{                flex: 1, background: "transparent", border: "none",                color: "#f1f0ff", fontSize: 14.5, resize: "none",                lineHeight: 1.5, maxHeight: 120, overflowY: "auto",                fontFamily: "inherit"              }}              onInput={e => {                e.target.style.height = "auto";                e.target.style.height = Math.min(e.target.scrollHeight, 120) + "px";              }}            />                          {loading ? "⏳" : "➤"}                                            Shift+Enter para nueva línea                              );} ">

Nexus Al

import { useState, useRef, useEffect } from "react";const SYSTEM_PROMPT = `Eres un asistente de IA inteligente, amigable y útil. Responde de forma clara, concisa y en el idioma del usuario. Si te hablan en español, responde en español.`;function TypingIndicator() {  return (          {[0, 1, 2].map(i => (              ))}      );}function Message({ msg }) {  const isUser = msg.role === "user";  return (          {!isUser && (        🤖      )}              {msg.content}            {isUser && ( ...
Welcome to Jhon Quintero

Welcome to Jhon Quintero

This is Jhon Quintero website created by Jhon Quintero. Jhon Quintero falls in LOCAL BUSINESS line of business. You can visit us offline at our office located at : F3H8+HWBolívar, San Pablo, Bolivar, Colombia - 135048 You can contact us by phone - 3136383931 or email us on [email protected] or use the Contact Form. This is your fi...

This site was designed with Websites.co.in - Website Builder

IMPORTANT NOTICE
DISCLAIMER

This website was created by a user of Websites.co.in, a free instant website builder. Websites.co.in does NOT endorse, verify, or guarantee the accuracy, safety, or legality of this site's content, products, or services. Always exercise caution do not share sensitive data or make payments without independent verification. Report suspicious activity by clicking the report abuse below.

WhatsApp Google Map

Safety and Abuse Reporting

Thanks for being awesome!

We appreciate you contacting us. Our support will get back in touch with you soon!

Have a great day!

Are you sure you want to report abuse against this website?

Please note that your query will be processed only if we find it relevant. Rest all requests will be ignored. If you need help with the website, please login to your dashboard and connect to support