chore: fix format issue from pre-commit hook - trailing-whitespace and end-of-file-fixer

This commit is contained in:
Sam Ho
2025-01-13 20:07:48 +00:00
parent 93687f141a
commit fc6fab4cce
2 changed files with 4 additions and 4 deletions

View File

@@ -655,7 +655,7 @@ export class KhojChatView extends KhojPaneView {
setIcon(pasteToFile, "clipboard-paste");
pasteToFile.addEventListener('click', (event) => { pasteTextAtCursor(createCopyParentText(message, 'clipboard-paste')(event)); });
// Add delete button
let deleteButton = null;
if (!isSystemMessage) {
@@ -1543,7 +1543,7 @@ export class KhojChatView extends KhojPaneView {
async deleteMessage(messageEl: HTMLElement) {
const chatBodyEl = this.contentEl.getElementsByClassName("khoj-chat-body")[0] as HTMLElement;
const conversationId = chatBodyEl.dataset.conversationId;
// Get the turn_id from the message's data-meta attribute
const turnId = messageEl.getAttribute("data-meta");
if (!turnId || !conversationId) return;
@@ -1566,7 +1566,7 @@ export class KhojChatView extends KhojPaneView {
const isKhojMessage = messageEl.classList.contains("khoj");
const messages = Array.from(chatBodyEl.getElementsByClassName("khoj-chat-message"));
const messageIndex = messages.indexOf(messageEl);
if (isKhojMessage && messageIndex > 0) {
// If it is a Khoj message, remove the previous user message too
messages[messageIndex - 1].remove();

View File

@@ -858,4 +858,4 @@ img.copy-icon {
100% {
transform: rotate(360deg);
}
}
}