Spaces:
Running
Running
<!-- Oturum yoksa sadece Start Chat düğmesi --> | |
<div *ngIf="!sessionId" class="start-wrapper"> | |
<button mat-raised-button color="primary" (click)="startChat()"> | |
<mat-icon>chat</mat-icon> | |
Start Chat | |
</button> | |
</div> | |
<!-- Oturum başladığında sohbet paneli --> | |
<mat-card *ngIf="sessionId" class="chat-card"> | |
<div class="chat-history" #scrollMe> | |
<div | |
*ngFor="let msg of messages" | |
[ngClass]="{ | |
'msg-row': true, | |
me: msg.author === 'user', | |
bot: msg.author === 'assistant' | |
}" | |
> | |
<span class="bubble">{{ msg.text }}</span> | |
</div> | |
</div> | |
<form (ngSubmit)="send()" class="input-row" [formGroup]="input"> | |
<mat-form-field appearance="outline" class="flex-1"> | |
<input | |
matInput | |
placeholder="Type your message…" | |
formControlName="value" | |
autocomplete="off" | |
/> | |
</mat-form-field> | |
<button | |
mat-icon-button | |
color="primary" | |
type="submit" | |
[disabled]="input.invalid" | |
> | |
<mat-icon>send</mat-icon> | |
</button> | |
</form> | |
</mat-card> | |