+
+
+
+
+ Send
+
+
+
+
+
+ @action onSend() {
+ this.args.onSend(this.args.value);
+ }
+
+ get height() {
+ const lineHeight = 20;
+ const padding = 9;
+
+ let lineCount = (this.args.value.match(/\n/g) ?? []).length + 1;
+ let count = 2;
+
+ if (lineCount > 5) {
+ count = 5;
+ } else if (lineCount > 2) {
+ count = lineCount;
+ }
+
+ let height = count * lineHeight + 2 * padding;
+ return `${height}px`;
+ }
+}
diff --git a/packages/host/app/components/ai-assistant/chat-input/usage.gts b/packages/host/app/components/ai-assistant/chat-input/usage.gts
new file mode 100644
index 0000000000..e4db96671d
--- /dev/null
+++ b/packages/host/app/components/ai-assistant/chat-input/usage.gts
@@ -0,0 +1,53 @@
+import { fn } from '@ember/helper';
+import { action } from '@ember/object';
+import Component from '@glimmer/component';
+import { tracked } from '@glimmer/tracking';
+
+import FreestyleUsage from 'ember-freestyle/components/freestyle/usage';
+
+import AiAssistantChatInput from './index';
+
+export default class AiAssistantChatInputUsage extends Component {
+ @tracked value = '';
+
+ @action onSend(message: string) {
+ console.log(`message sent: ${message}`);
+ }
+
+