import { Component, Input } from "@angular/core"; import { CommonModule } from "@angular/common"; import { FormsModule } from "@angular/forms"; import type { ChatState } from "@copilotkit/angular"; @Component({ selector: "custom-input", standalone: true, imports: [CommonModule, FormsModule], template: `
`, }) export class CustomInputComponent { @Input() inputClass?: string; inputValue = ""; constructor(private chat: ChatState) {} handleSend() { const value = this.inputValue.trim(); if (value) { this.chat.submitInput(value); this.inputValue = ""; } } }