From 2f573d4464b008a5d47923274bbb723563e28297 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Fri, 28 Mar 2025 21:19:59 +0000 Subject: [PATCH] fix TPL location in llm_chat_panel.ts --- src/public/app/widgets/llm_chat_panel.ts | 110 ++++++++++++----------- 1 file changed, 56 insertions(+), 54 deletions(-) diff --git a/src/public/app/widgets/llm_chat_panel.ts b/src/public/app/widgets/llm_chat_panel.ts index 051e19dda..4aac66096 100644 --- a/src/public/app/widgets/llm_chat_panel.ts +++ b/src/public/app/widgets/llm_chat_panel.ts @@ -13,6 +13,61 @@ import options from "../services/options.js"; await libraryLoader.requireCss('stylesheets/llm_chat.css'); })(); +const TPL = ` +
+ + + +
+
+ +
+ + + +
+
+ + +
+
+ Options: +
+ + +
+
+ + +
+
+
+
+`; + interface ChatResponse { id: string; messages: Array<{role: string; content: string}>; @@ -39,60 +94,7 @@ export default class LlmChatPanel extends BasicWidget { private currentNoteId: string | null = null; doRender() { - this.$widget = $(` -
- - - -
-
- -
- - - -
-
- - -
-
- Options: -
- - -
-
- - -
-
-
-
- `); + this.$widget = $(TPL); const element = this.$widget[0]; this.noteContextChatMessages = element.querySelector('.note-context-chat-messages') as HTMLElement;