diff --git a/main.js b/main.js index 9c33fd6..afaee50 100644 --- a/main.js +++ b/main.js @@ -11186,19 +11186,11 @@ var ChatView = class extends import_obsidian5.ItemView { if (!this.inputEl) { this.inputEl = inputContainer.createEl("textarea", { cls: "ollama-input", - attr: { placeholder: "Type your message..." } + attr: { placeholder: "Type your message...", rows: "3" } }); } else { inputContainer.appendChild(this.inputEl); } - if (!this.sendButton) { - this.sendButton = inputContainer.createEl("button", { - cls: "ollama-send-button", - text: "Send" - }); - } else { - inputContainer.appendChild(this.sendButton); - } if (!this.activityIndicatorEl) { this.activityIndicatorEl = inputContainer.createEl("div", { cls: "ollama-activity-indicator" @@ -11212,6 +11204,14 @@ var ChatView = class extends import_obsidian5.ItemView { } else { inputContainer.appendChild(this.activityIndicatorEl); } + if (!this.sendButton) { + this.sendButton = inputContainer.createEl("button", { + cls: "ollama-send-button", + text: "Send" + }); + } else { + inputContainer.appendChild(this.sendButton); + } if (this.contentEl.addClass) { this.contentEl.addClass("ollama-chat-view-content"); } else { diff --git a/src/chat-view.ts b/src/chat-view.ts index 3cf2e75..d17452b 100755 --- a/src/chat-view.ts +++ b/src/chat-view.ts @@ -382,22 +382,12 @@ export class ChatView extends ItemView { if (!this.inputEl) { this.inputEl = inputContainer.createEl('textarea', { cls: 'ollama-input', - attr: { placeholder: 'Type your message...' }, + attr: { placeholder: 'Type your message...', rows: '3' }, }); } else { inputContainer.appendChild(this.inputEl); } - // Setup send button - if (!this.sendButton) { - this.sendButton = inputContainer.createEl('button', { - cls: 'ollama-send-button', - text: 'Send', - }); - } else { - inputContainer.appendChild(this.sendButton); - } - // Setup activity indicator if (!this.activityIndicatorEl) { this.activityIndicatorEl = inputContainer.createEl('div', { @@ -413,6 +403,16 @@ export class ChatView extends ItemView { inputContainer.appendChild(this.activityIndicatorEl); } + // Setup send button + if (!this.sendButton) { + this.sendButton = inputContainer.createEl('button', { + cls: 'ollama-send-button', + text: 'Send', + }); + } else { + inputContainer.appendChild(this.sendButton); + } + // Append containers to contentEl if (this.contentEl.addClass) { this.contentEl.addClass('ollama-chat-view-content'); diff --git a/styles.css b/styles.css index ae88592..c1abac5 100644 --- a/styles.css +++ b/styles.css @@ -129,19 +129,10 @@ content: '➕'; } -.ollama-input-container { - display: flex; - gap: var(--size-4-1); - padding: var(--size-4-2); - border-top: 1px solid var(--ollama-border); - background-color: var(--background-primary); - align-items: flex-end; -} - .ollama-input { flex: 1; - min-height: 2.5rem; - max-height: 8rem; + min-height: 4rem; + max-height: 12rem; padding: var(--size-4-1) var(--size-4-2); border-radius: var(--ollama-radius); border: 1px solid var(--ollama-border); @@ -445,10 +436,10 @@ display: none; align-items: center; gap: var(--size-4-1); - padding: var(--size-4-1) 0; + padding: var(--size-4-1) var(--size-4-1); font-size: var(--font-ui-small); color: var(--text-muted); - min-height: 1.5rem; + white-space: nowrap; } .ollama-activity-dot { @@ -458,6 +449,7 @@ border-radius: 50%; background-color: var(--interactive-accent); animation: ollama-pulse 1.2s ease-in-out infinite; + flex-shrink: 0; } .ollama-activity-text {