Reduce clutter in chat message ux on Obsidian

- Move khoj message border to left like in web ui
- Remove user, sender emojis and name
- Ensure conversation title always at top of chat sessions view,
  even if no chat sessions loaded yet, instead of causing layout shift
  on chat sessions load
This commit is contained in:
Debanjum
2024-12-10 18:02:19 -08:00
parent 1ec1eff57e
commit 40e4f2ec2e
2 changed files with 15 additions and 9 deletions

View File

@@ -50,12 +50,12 @@ If your plugin does not need CSS, delete this file.
overflow-y: scroll; /* Make chat body scroll to see history */
}
/* add chat metatdata to bottom of bubble */
.khoj-chat-message::after {
.khoj-chat-message.khoj::after {
content: attr(data-meta);
display: block;
font-size: var(--font-ui-smaller);
color: var(--text-muted);
margin: -12px 7px 0 -5px;
margin: -12px 7px 0 0px;
}
/* move message by khoj to left */
.khoj-chat-message.khoj {
@@ -82,7 +82,7 @@ If your plugin does not need CSS, delete this file.
}
/* color chat bubble by khoj blue */
.khoj-chat-message-text.khoj {
border-top: 1px solid var(--khoj-sun);
border-left: 2px solid var(--khoj-sun);
border-radius: 0px;
margin-left: auto;
white-space: pre-line;
@@ -242,6 +242,10 @@ div.new-conversation {
grid-auto-flow: column;
grid-template-columns: 1fr auto;
margin-bottom: 16px;
position: sticky;
top: 0;
z-index: 10;
background-color: var(--background-primary)
}
div.conversation-header-title {
text-align: left;
@@ -316,6 +320,9 @@ div.selected-conversation {
background: var(--background-primary);
margin: 0 0 0 -8px;
align-items: center;
position: sticky;
bottom: 0;
z-index: 10;
}
#khoj-chat-input.option:hover {
box-shadow: 0 0 11px var(--background-modifier-box-shadow);