Communitygithub.com

Componentes UI de Chat

Componentes de UI para chatbot com React/Next.js da ui.inference.sh. Exibe chamadas de ferramentas: pendentes, progresso, aprovação necessária, resultados. Recursos: status de ferramentas, indicadores de progresso, fluxos de aprovação, exibição de resultados. Use para: mostrar chamadas de ferramentas de agente, aprovações human-in-the-loop, saída de ferramentas. Gatilhos: ui de ferramentas, chamadas de ferramentas, status de ferramentas, aprovação de ferramentas, resultados de ferramentas, ferramentas de agente, ui de ferramentas mcp, ui de chamadas de função, ciclo de vida de ferramentas, ferramentas pendentes

O que é Componentes UI de Chat?

Este pacote fornece componentes de interface de usuário para construir interfaces de chat modernas e interativas em aplicações React e Next.js, baseados na biblioteca ui.inference.sh. Ele inclui um contêiner de chat, mensagens, entrada de chat e um indicador de digitação, todos estilizados com Tailwind CSS e tokens de design do shadcn/ui. A habilidade é ideal para desenvolvedores que desejam integrar rapidamente um front-end de chat funcional e personalizável, suportando papéis como usuário, assistente e sistema, além de variantes de layout alinhadas. A instalação é simples via npx shadcn, e o uso é demonstrado com exemplos completos de código TypeScript. Componentes relacionados para UI de agente, widgets e renderização Markdown também estão disponíveis, juntamente com documentação oficial sobre padrões de UX de chat e streaming em tempo real.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JantonioFC/skillsbank/tree/HEAD/scripts

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Prévia

Do README da skill

Componentes UI de Chat

Documentação

O que Componentes UI de Chat faz?

Blocos de construção de chat da ui.inference.sh.

Componentes UI de Chat

Início Rápido

# Instalar componentes de chat
npx shadcn@latest add https://ui.inference.sh/r/chat.json

Componentes

Contêiner de Chat

import { ChatContainer } from "@/registry/blocks/chat/chat-container"

<ChatContainer>
  {/* mensagens vão aqui */}
</ChatContainer>

Mensagens

import { ChatMessage } from "@/registry/blocks/chat/chat-message"

<ChatMessage
  role="user"
  content="Olá, como você pode me ajudar?"
/>

<ChatMessage
  role="assistant"
  content="Posso ajudar com muitas coisas!"
/>

Entrada de Chat

import { ChatInput } from "@/registry/blocks/chat/chat-input"

<ChatInput
  onSubmit={(message) => handleSend(message)}
  placeholder="Digite uma mensagem..."
  disabled={isLoading}
/>

Indicador de Digitação

import { TypingIndicator } from "@/registry/blocks/chat/typing-indicator"

{isTyping && <TypingIndicator />}

Exemplo Completo

import {
  ChatContainer,
  ChatMessage,
  ChatInput,
  TypingIndicator,
} from "@/registry/blocks/chat"

export function Chat() {
  const [messages, setMessages] = useState([])
  const [isLoading, setIsLoading] = useState(false)

  const handleSend = async (content: string) => {
    setMessages(prev => [...prev, { role: 'user', content }])
    setIsLoading(true)
    // Enviar para API...
    setIsLoading(false)
  }

  return (
    <ChatContainer>
      {messages.map((msg, i) => (
        <ChatMessage key={i} role={msg.role} content={msg.content} />
      ))}
      {isLoading && <TypingIndicator />}
      <ChatInput onSubmit={handleSend} disabled={isLoading} />
    </ChatContainer>
  )
}

Variantes de Mensagem

FunçãoDescrição
userMensagens do usuário (alinhadas à direita)
assistantRespostas da IA (alinhadas à esquerda)
systemMensagens do sistema (centralizadas)

Estilização

Os componentes usam Tailwind CSS e tokens de design do shadcn/ui:

<ChatMessage
  role="assistant"
  content="Olá!"
  className="bg-muted"
/>

Habilidades Relacionadas

# Componente completo de agente (recomendado)
npx skills add inference-sh/skills@agent-ui

# Widgets declarativos
npx skills add inference-sh/skills@widgets-ui

# Renderização Markdown
npx skills add inference-sh/skills@markdown-ui

Documentação

Documentação dos componentes: ui.inference.sh/blocks/chat

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

JantonioFC/skillsbank

AI-powered image editing with style transfer and object removal

JantonioFC/skillsbank

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

JantonioFC/skillsbank

Analise e auditoria de editais de leilao judicial e extrajudicial. Riscos ocultos, clausulas perigosas, debitos, ocupante e classificacao da oportunidade.

JantonioFC/skillsbank

Embed Photopea in web apps using photopea.js. Covers embedding, file I/O, scripting, exporting, layers, text, filters, and the full Photoshop-compatible API.

JantonioFC/skillsbank

Best practices for Remotion - Video creation in React

JantonioFC/skillsbank

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

JantonioFC/skillsbank

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

JantonioFC/skillsbank

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

JantonioFC/skillsbank

Video and audio perception, indexing, and editing. Ingest files/URLs/live streams, build visual/spoken indexes, search with timestamps, edit timelines, add overlays/subtitles, generate media, and create real-time alerts.

JantonioFC/skillsbank

Upload, stream, search, edit, transcribe, and generate AI video and audio using the VideoDB SDK.

JantonioFC/skillsbank

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

JantonioFC/skillsbank

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

JantonioFC/skillsbank

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

JantonioFC/skillsbank

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' 'audience targeting,' 'Google Ads,' 'Facebook ads,'...

JantonioFC/skillsbank

Create AI avatar and talking head videos with OmniHuman, Fabric, PixVerse via inference.sh CLI. Models: OmniHuman 1.5, OmniHuman 1.0, Fabric 1.0, PixVerse Lipsync. Capabilities: audio-driven avatars, lipsync videos, talking head generation, virtual presenters. Use for: AI presenters, expla...

JantonioFC/skillsbank

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awarene...

JantonioFC/skillsbank

Generate AI videos with Google Veo, Seedance, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 1.5 Pro, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, lipsync, avatar animation, video upscaling, fole...

JantonioFC/skillsbank

Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.

JantonioFC/skillsbank

Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

JantonioFC/skillsbank

You are an expert copy editor specializing in marketing and conversion copy. Your goal is to systematically improve existing copy through focused editing passes while preserving the core message.

Habilidades Relacionadas