Chat

The thread of a conversation with the agent. The Message Scroller keeps your place while the reply streams.

Usage

Chat

New Thread
Ask the agent to change your code.

What should we build?

The agent can read your code, run commands and make changes. Press send to start.
import { NgTemplateOutlet } from '@angular/common';import {  Component,  DestroyRef,  ViewEncapsulation,  computed,  inject,  input,  signal,} from '@angular/core';

Each turn is a Message inside a Message Scroller. The person's message is the scroll anchor, so a new question settles near the top and the reply streams in under it. The field is a Prompt Input: an Input Group around a textarea bound with Signal Forms.

Anatomy

import {  ScMessageScroller, ScMessageScrollerViewport, ScMessageScrollerContent,  ScMessageScrollerItem, ScMessageScrollerButton,  ScMessage, ScMessageContent, ScBubble, ScBubbleContent,} from '@semantic-components/ui';
<div scMessageScroller autoScroll>  <div scMessageScrollerViewport aria-label="Conversation">    <div scMessageScrollerContent>      <div scMessageScrollerItem [messageId]="id" scrollAnchor>        <div scMessage alignment="end">          <div scMessageContent>            <div scBubble alignment="end" variant="muted">              <div scBubbleContent>{{ text }}</div>            </div>          </div>        </div>      </div>    </div>  </div>  <button scMessageScrollerButton>…</button></div>

scrollAnchor goes on the person's turn; autoScroll follows the reply while the person stays at the live edge.

Scripted turns

The demo has no model: each agent turn is scripted — reasoning, a command and a reply — and played on timers. The field holds the next scripted question; anything else gets a fallback reply, and Reset starts over. The reply is built from blocks (paragraphs, list items, code), streamed a word at a time: the library has no Markdown renderer.

Examples

RTL

شغّل البناء قبل أن أنشره.
شغّل pnpm build

نجح البناء، فهو جاهز للنشر: لا أخطاء في الأنواع، وأُنشئت كل الصفحات الثابتة الاثنتي عشرة.

import { Dir } from '@angular/cdk/bidi';import { Component, LOCALE_ID, ViewEncapsulation } from '@angular/core';import {  ScBubble,  ScBubbleContent,  ScMessage,  ScMessageContent,  ScMessageScroller,  ScMessageScrollerButton,  ScMessageScrollerContent,

API reference

See the Message Scroller, the Message, the Bubble and the Input Group.