From 077bf4f5e6d591bc90a7eeece7c7966de57459bc Mon Sep 17 00:00:00 2001 From: WFH Brian Date: Wed, 6 Mar 2024 08:44:41 -0500 Subject: [PATCH] Update SmartObsidianView.js and styles.css, and add placeholder in smart_chat.ejs --- src/SmartObsidianView.js | 1 - src/styles.css | 19 +++++++++++++------ src/views/smart_chat.ejs | 9 ++++----- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/SmartObsidianView.js b/src/SmartObsidianView.js index 87bd008a..33788a4a 100644 --- a/src/SmartObsidianView.js +++ b/src/SmartObsidianView.js @@ -1,6 +1,5 @@ const { getIcon, ItemView } = require("obsidian"); const views = require("../build/views.json"); -// const ejs = require("ejs"); const ejs = require("../ejs.min"); // handle rendering EJS views diff --git a/src/styles.css b/src/styles.css index 7d81d441..a373d416 100644 --- a/src/styles.css +++ b/src/styles.css @@ -127,7 +127,8 @@ user-select: text; } .sc-message-container { - border: 1px solid var(--blockquote-border-color); + /* border: 1px solid var(--blockquote-border-color); */ + border: 1px solid var(--divider-color); border-radius: 10px; margin: 0.5rem 0; display: flex; @@ -145,14 +146,20 @@ word-break: break-word; } -.sc-message.assistant { - background-color: #007bff; - color: #fff; +.sc-message.assistant, .sc-message.system { + /* background-color: #007bff; + color: #fff; */ + background-color: var(--nav-item-background-active); + color: var(--nav-item-color); } .sc-message.user { - background-color: #333; - color: #fff; + /* background-color: #333; + color: #fff; */ + align-self: flex-end; + background-color: var(--background-modifier-form-field); + color: var(--text-normal); align-self: flex-end; + border: var(--input-border-width) solid var(--background-modifier-border); } .sc-message-content { diff --git a/src/views/smart_chat.ejs b/src/views/smart_chat.ejs index 4bc6851a..96b7274a 100644 --- a/src/views/smart_chat.ejs +++ b/src/views/smart_chat.ejs @@ -1,7 +1,8 @@
- + + @@ -10,11 +11,9 @@
-
-

Hi, I'm ChatGPT with access to your notes via Smart Connections. Ask me a question about your notes and - I'll try to answer it.

-
+
Hi there, welcome to the Smart Chat. Ask me a question about your notes and I'll try to answer it.
+ <%- messages %>