chore: update 3 file(s)

This commit is contained in:
mike
2025-12-29 00:00:55 +01:00
parent 11f0f8fbee
commit 9a649a9475
3 changed files with 33 additions and 30 deletions

View File

@@ -15,7 +15,7 @@ export default (env, argv) => {
mode: isProduction ? 'production' : 'development',
entry: {
wwww: './www/chatv3.js'
www: ['./www/chatv3.js', './www/style2.css']
},
output: {
@@ -46,7 +46,7 @@ export default (env, argv) => {
new HtmlWebpackPlugin({
template: './www/index.html',
filename: 'index.html',
chunks : ['wwww'],
chunks : ['www'],
inject : 'body',
minify : isProduction
}),
@@ -84,8 +84,7 @@ export default (env, argv) => {
hot : true,
devMiddleware: { publicPath: '/' },
static : [
{ directory: path.resolve(__dirname, 'dist') },
{ directory: path.resolve(__dirname, 'www'), publicPath: '/' }
{ directory: path.resolve(__dirname, 'dist') }
]
}
}

View File

@@ -1,3 +1,5 @@
import './style2.css'
const BACKENDS = {
plato : {
prod: '/api/plato',
@@ -212,7 +214,7 @@ marked.setOptions({
}
})
function autoResize(textarea) {
window.autoResize = function autoResize(textarea) {
textarea.style.height = 'auto'
textarea.style.height = Math.min(textarea.scrollHeight, 300) + 'px'
}
@@ -687,4 +689,4 @@ function resetChat() {
chatLog.innerHTML = ''
addMessage('assistant', welcomeMessage, true, null, false)
}
}
}

View File

@@ -4,7 +4,6 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chat</title>
<link rel="stylesheet" href="style2.css">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github-dark.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
@@ -26,27 +25,32 @@
</div>
<div id="chatLog">
<div class="message message-assistant"><div class="message-header assistant"><div class="avatar assistant-avatar">?</div><span>Assistant</span></div><div class="markdown-content"><h1>Welcome to LM Studio Chat!</h1>
<p>I now support <strong>full conversation history</strong>, <strong>real-time streaming responses</strong> and <strong>dark, readable text formatting</strong>.</p>
<h2>Features:</h2>
<ol>
<li><strong>Full Chat History</strong> - Complete conversation context is now sent to the AI</li>
<li><strong>Smart History Management</strong> - Automatically keeps the last 50 messages</li>
<li><strong>Streaming Mode</strong> (enabled by default) - Watch responses appear word-by-word</li>
<li><strong>Markdown Rendering</strong> - Proper formatting for code, lists, tables, and more</li>
<li><strong>Readable Dark Text</strong> - No more eye strain from light gray text</li>
</ol>
<h2>Try it out:</h2>
<ul>
<li>Ask follow-up questions that reference earlier messages</li>
<li>Have a multi-turn conversation with full context</li>
<li>Ask "what did I just ask?" to test history retention</li>
<li>Watch the streaming response in real-time!</li>
</ul>
<blockquote>
<p><em>Tip: You can toggle streaming and markdown using the checkboxes below.</em></p>
</blockquote>
</div></div>
<div class="message message-assistant">
<div class="message-header assistant">
<div class="avatar assistant-avatar">?</div>
<span>Assistant</span></div>
<div class="markdown-content"><h1>Welcome to LM Studio Chat!</h1>
<p>I now support <strong>full conversation history</strong>, <strong>real-time streaming responses</strong> and <strong>dark, readable text formatting</strong>.</p>
<h2>Features:</h2>
<ol>
<li><strong>Full Chat History</strong> - Complete conversation context is now sent to the AI</li>
<li><strong>Smart History Management</strong> - Automatically keeps the last 50 messages</li>
<li><strong>Streaming Mode</strong> (enabled by default) - Watch responses appear word-by-word</li>
<li><strong>Markdown Rendering</strong> - Proper formatting for code, lists, tables, and more</li>
<li><strong>Readable Dark Text</strong> - No more eye strain from light gray text</li>
</ol>
<h2>Try it out:</h2>
<ul>
<li>Ask follow-up questions that reference earlier messages</li>
<li>Have a multi-turn conversation with full context</li>
<li>Ask "what did I just ask?" to test history retention</li>
<li>Watch the streaming response in real-time!</li>
</ul>
<blockquote>
<p><em>Tip: You can toggle streaming and markdown using the checkboxes below.</em></p>
</blockquote>
</div>
</div>
</div>
<div id="inputArea">
@@ -73,7 +77,5 @@
</div>
</div>
</div>
<script src="chatv3.js"></script>
</body>
</html>