chat.component.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <div class="chat-wrapper">
  2. <!-- Chat panel -->
  3. <mat-card class="panel chat-panel">
  4. <mat-card-title>Chat</mat-card-title>
  5. <mat-card-content>
  6. <div class="messages">
  7. <div *ngFor="let msg of messages" [ngClass]="['message', msg.sender]">
  8. <strong>{{ msg.sender === 'user' ? 'You' : 'Bot' }}:</strong>
  9. <span>{{ msg.content }}</span>
  10. </div>
  11. </div>
  12. <div *ngIf="loading" class="bot-typing">Bot is typing...</div>
  13. </mat-card-content>
  14. <mat-card-actions class="chat-input">
  15. <mat-form-field appearance="outline">
  16. <input matInput placeholder="Type a message" [(ngModel)]="inputMessage" (keyup.enter)="sendMessage()" />
  17. </mat-form-field>
  18. <button mat-raised-button color="primary" (click)="sendMessage()">Send</button>
  19. </mat-card-actions>
  20. </mat-card>
  21. <!-- Planner output panel -->
  22. <mat-card class="panel planner-panel">
  23. <mat-card-title>Planner Output</mat-card-title>
  24. <mat-card-content>
  25. <pre>{{ plannerOutput | json }}</pre>
  26. </mat-card-content>
  27. </mat-card>
  28. <!-- Executor output panel -->
  29. <mat-card class="panel executor-panel">
  30. <mat-card-title>Executor Output</mat-card-title>
  31. <mat-card-content>
  32. <pre>{{ executorOutput | json }}</pre>
  33. </mat-card-content>
  34. </mat-card>
  35. </div>