Skip to content

Commit

Permalink
Removed unused ref in template portion that was causing errors when r…
Browse files Browse the repository at this point in the history
…unning in production
  • Loading branch information
fingerthief committed Apr 20, 2024
1 parent 1c6d3b7 commit 6a856af
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## [Try MinimalGPT/MinimalClaude/MinimalLocal (Public Site)](https://minimalgpt.app/)

![Build Status](https://img.shields.io/badge/build-passing-brightgreen)
![Version](https://img.shields.io/badge/version-5.0.0-blue)
![Version](https://img.shields.io/badge/version-5.0.1-blue)
![License](https://img.shields.io/badge/license-MIT-green)

**MinimalChat** is an open-source LLM chat web app designed to be as self-contained as possible. All conversations are stored locally on the client's device, with the only information being sent to the server being API calls to GPT or Claude (uses a CORS proxy) chat when the user sends a message and when a user saves a conversation to generate a conversation title.
Expand Down Expand Up @@ -86,7 +86,7 @@ A: Yes, MinimalGPT is designed be responsive and works well on mobile devices. Y
- **Local Model Name**: The name of the model you are hosting locally
- **Example**: [This DeepSeek Coder Model](https://huggingface.co/LoneStriker/deepseek-coder-7b-instruct-v1.5-GGUF) has a model name of `LoneStriker/deepseek-coder-7b-instruct-v1.5-GGUF`. That is what should be entered into the **Local Model Name** field. This is also displayed directly in **[LM Studio](https://lmstudio.ai/)** for the user.
- **Local URL**: The API endpoint URL that **[LM Studio](https://lmstudio.ai/)** is running on
- **Example**: `http://192.168.0.45:1234`
- **Example**: `http://192.168.0.45:1234`
- Switch models mid conversations and maintain context
- Swipe Gestures for quick settings and conversations access
- Markdown Support
Expand Down
2 changes: 1 addition & 1 deletion src/components/settings-dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function toggleSidebar() {
<span>
<RefreshCcw :size="23" :stroke-width="2" />
</span>
Settings | V5.0.0
Settings | V5.0.1
</h2>
</div>
<div class="sidebar-content-container">
Expand Down
12 changes: 6 additions & 6 deletions src/views/ChatLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<script setup>
import { ref, onMounted, computed, watch } from 'vue';
import { ChevronDown } from 'lucide-vue-next';
import { loadConversationTitles, loadStoredConversations, fetchGPTResponseStream, generateDALLEImage } from '@/libs/gpt-api-access';
import { fetchClaudeConversationTitle, streamClaudeResponse } from '@/libs/claude-api-access';
import { getConversationTitleFromGPT, showToast } from '@/libs/utils';
import { analyzeImage } from '@/libs/image-analysis';
import { fetchLocalModelResponseStream, getConversationTitleFromLocalModel } from '@/libs/local-model-access';
import { ChevronDown } from 'lucide-vue-next';
import { fetchLocalModelResponseStream } from '@/libs/local-model-access';

import messageItem from '@/components/message-item.vue';
import chatInput from '@/components/chat-input.vue';
Expand Down Expand Up @@ -49,7 +49,7 @@ const lastLoadedConversationId = ref(parseInt(localStorage.getItem("lastConversa
const selectedConversation = ref(conversations.value[0]);
const displayConversations = computed(() => conversations);

let messagesContainer = "";
let messagesContainer;
//#endregion

//#region Watchers
Expand Down Expand Up @@ -672,7 +672,6 @@ function updateScrollButtonVisibility() {
const messagesElement = messagesContainer.querySelectorAll('.message');
if (messagesElement.length > 0) {
const lastMessage = messagesElement[messagesElement.length - 1];
const rect = lastMessage.getBoundingClientRect();

if (!isScrollable(messagesContainer)) {
shouldShowScrollButton.value = false;
Expand Down Expand Up @@ -723,10 +722,11 @@ const updateSetting = (field, value) => {
//#endregion

onMounted(() => {
messagesContainer = document.querySelector('.messages');

selectedModel.value = localStorage.getItem("selectedModel") || "gpt-4-turbo";
selectConversation(lastLoadedConversationId.value); //by index

messagesContainer = document.querySelector('.messages');
messagesContainer.addEventListener('scroll', updateScrollButtonVisibility);
});
</script>
Expand Down Expand Up @@ -779,7 +779,7 @@ onMounted(() => {
@delete-conversation="deleteCurrentConversation" @toggle-conversations="showConversations"
@new-conversation="clearMessages" />
<!-- Messages -->
<div class="messages" id="messagesContainer" ref="messagesContainer">
<div class="messages">
<messageItem :hasFilterText="hasFilterText" :messages="messages" :isLoading="isLoading"
:isClaudeEnabled="isClaudeEnabled" :isUsingLocalModel="isUsingLocalModel"
:isAnalyzingImage="isAnalyzingImage" :streamedMessageText="streamedMessageText"
Expand Down
3 changes: 3 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ export default defineConfig({
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
minify: true,
}
})

0 comments on commit 6a856af

Please sign in to comment.