+
+
@if (ViewModel?.ConversationListViewModel.CurrentConversation != null)
{
if (ViewModel.ConversationListViewModel.CurrentConversation.IsEmpty)
@@ -56,40 +55,39 @@
}
}
-
-
-
-
+
+
+
-
-
- @if (ViewModel?.ConversationListViewModel?.CurrentConversation?.LMKitConversation?.ContextSize > 0)
- {
-
- Tokens: @ViewModel.ConversationListViewModel.CurrentConversation.LMKitConversation.ContextUsedSpace /
- @ViewModel.ConversationListViewModel.CurrentConversation.LMKitConversation.ContextSize
- (@CalculateUsagePercentage(ViewModel.ConversationListViewModel.CurrentConversation.LMKitConversation.ContextUsedSpace,
- ViewModel.ConversationListViewModel.CurrentConversation.LMKitConversation.ContextSize)%)
-
- }
+
@@ -329,7 +327,7 @@
[JSInvokable]
- public async Task OnConversationContainerScrolled(double scrollTop)
+ public async Task OnChatScrolled(double scrollTop)
{
_scrollTop = scrollTop;
diff --git a/LM-Kit-Maestro/UI/Razor/Components/Chat.razor.css b/LM-Kit-Maestro/UI/Razor/Components/Chat.razor.css
index ab3c342..44a0899 100644
--- a/LM-Kit-Maestro/UI/Razor/Components/Chat.razor.css
+++ b/LM-Kit-Maestro/UI/Razor/Components/Chat.razor.css
@@ -8,36 +8,38 @@
/* width: auto;
left: 0;
right: 0;*/
-
}
-#conversation-container {
- background-color: transparent;
- display: flex;
+#chat-content {
+ display: grid;
+ grid-template-rows: 1fr, auto, auto;
flex-direction: column;
position: relative;
overflow-y: auto;
scrollbar-gutter: both-edges stable;
- grid-template-rows: 1fr auto;
}
- #conversation-container::-webkit-scrollbar {
- width: 10px;
- }
+#chat-messages {
+
+}
- #conversation-container::-webkit-scrollbar-thumb {
- background-color: var(--OutlineVariant);
- border-radius: 0;
- border: 10px solid transparent;
- }
+#chat-content::-webkit-scrollbar {
+ width: 10px;
+}
- #conversation-container::-webkit-scrollbar-track {
- background-color: transparent;
- }
+#chat-content::-webkit-scrollbar-thumb {
+ background-color: var(--OutlineVariant);
+ border-radius: 0;
+ border: 10px solid transparent;
+}
- #conversation-container::-webkit-scrollbar-thumb:hover {
- background-color: var(--Outline);
- }
+#chat-content::-webkit-scrollbar-track {
+ background-color: transparent;
+}
+
+#chat-content::-webkit-scrollbar-thumb:hover {
+ background-color: var(--Outline);
+}
#bottom-space {
display: flex;
diff --git a/LM-Kit-Maestro/wwwroot/js/lmkitmaestro.js b/LM-Kit-Maestro/wwwroot/js/lmkitmaestro.js
index 4673170..71540d8 100644
--- a/LM-Kit-Maestro/wwwroot/js/lmkitmaestro.js
+++ b/LM-Kit-Maestro/wwwroot/js/lmkitmaestro.js
@@ -21,19 +21,19 @@ document.addEventListener("DOMContentLoaded", function () {
Chat
*/
function initializeScrollHandler(dotNetHelper) {
- const container = document.getElementById('conversation-container');
+ const container = document.getElementById('chat-content');
container.addEventListener('scroll', () => {
- dotNetHelper.invokeMethodAsync('OnConversationContainerScrolled', container.scrollTop);
+ dotNetHelper.invokeMethodAsync('OnChatScrolled', container.scrollTop);
});
}
function getScrollHeight() {
- const element = document.getElementById('conversation-container');
+ const element = document.getElementById('chat-content');
return element.scrollHeight;
};
function getConversationViewHeight() {
- const element = document.getElementById('conversation-container');
+ const element = document.getElementById('chat-content');
return element.clientHeight;
};
@@ -44,7 +44,7 @@ function setUserInputFocus() {
}
function scrollToEnd(smooth) {
- const container = document.getElementById('conversation-container');
+ const container = document.getElementById('chat-content');
container.scrollTo({
top: container.scrollHeight,
behavior: smooth ? 'smooth' : 'auto'