chore: update 3 file(s)
This commit is contained in:
@@ -15,7 +15,7 @@ export default (env, argv) => {
|
|||||||
mode: isProduction ? 'production' : 'development',
|
mode: isProduction ? 'production' : 'development',
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
wwww: './www/chatv3.js'
|
www: ['./www/chatv3.js', './www/style2.css']
|
||||||
},
|
},
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
@@ -46,7 +46,7 @@ export default (env, argv) => {
|
|||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: './www/index.html',
|
template: './www/index.html',
|
||||||
filename: 'index.html',
|
filename: 'index.html',
|
||||||
chunks : ['wwww'],
|
chunks : ['www'],
|
||||||
inject : 'body',
|
inject : 'body',
|
||||||
minify : isProduction
|
minify : isProduction
|
||||||
}),
|
}),
|
||||||
@@ -84,8 +84,7 @@ export default (env, argv) => {
|
|||||||
hot : true,
|
hot : true,
|
||||||
devMiddleware: { publicPath: '/' },
|
devMiddleware: { publicPath: '/' },
|
||||||
static : [
|
static : [
|
||||||
{ directory: path.resolve(__dirname, 'dist') },
|
{ directory: path.resolve(__dirname, 'dist') }
|
||||||
{ directory: path.resolve(__dirname, 'www'), publicPath: '/' }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import './style2.css'
|
||||||
|
|
||||||
const BACKENDS = {
|
const BACKENDS = {
|
||||||
plato : {
|
plato : {
|
||||||
prod: '/api/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 = 'auto'
|
||||||
textarea.style.height = Math.min(textarea.scrollHeight, 300) + 'px'
|
textarea.style.height = Math.min(textarea.scrollHeight, 300) + 'px'
|
||||||
}
|
}
|
||||||
@@ -687,4 +689,4 @@ function resetChat() {
|
|||||||
chatLog.innerHTML = ''
|
chatLog.innerHTML = ''
|
||||||
addMessage('assistant', welcomeMessage, true, null, false)
|
addMessage('assistant', welcomeMessage, true, null, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Chat</title>
|
<title>Chat</title>
|
||||||
<link rel="stylesheet" href="style2.css">
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
<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">
|
<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>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
|
||||||
@@ -26,27 +25,32 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="chatLog">
|
<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>
|
<div class="message message-assistant">
|
||||||
<p>I now support <strong>full conversation history</strong>, <strong>real-time streaming responses</strong> and <strong>dark, readable text formatting</strong>.</p>
|
<div class="message-header assistant">
|
||||||
<h2>Features:</h2>
|
<div class="avatar assistant-avatar">?</div>
|
||||||
<ol>
|
<span>Assistant</span></div>
|
||||||
<li><strong>Full Chat History</strong> - Complete conversation context is now sent to the AI</li>
|
<div class="markdown-content"><h1>Welcome to LM Studio Chat!</h1>
|
||||||
<li><strong>Smart History Management</strong> - Automatically keeps the last 50 messages</li>
|
<p>I now support <strong>full conversation history</strong>, <strong>real-time streaming responses</strong> and <strong>dark, readable text formatting</strong>.</p>
|
||||||
<li><strong>Streaming Mode</strong> (enabled by default) - Watch responses appear word-by-word</li>
|
<h2>Features:</h2>
|
||||||
<li><strong>Markdown Rendering</strong> - Proper formatting for code, lists, tables, and more</li>
|
<ol>
|
||||||
<li><strong>Readable Dark Text</strong> - No more eye strain from light gray text</li>
|
<li><strong>Full Chat History</strong> - Complete conversation context is now sent to the AI</li>
|
||||||
</ol>
|
<li><strong>Smart History Management</strong> - Automatically keeps the last 50 messages</li>
|
||||||
<h2>Try it out:</h2>
|
<li><strong>Streaming Mode</strong> (enabled by default) - Watch responses appear word-by-word</li>
|
||||||
<ul>
|
<li><strong>Markdown Rendering</strong> - Proper formatting for code, lists, tables, and more</li>
|
||||||
<li>Ask follow-up questions that reference earlier messages</li>
|
<li><strong>Readable Dark Text</strong> - No more eye strain from light gray text</li>
|
||||||
<li>Have a multi-turn conversation with full context</li>
|
</ol>
|
||||||
<li>Ask "what did I just ask?" to test history retention</li>
|
<h2>Try it out:</h2>
|
||||||
<li>Watch the streaming response in real-time!</li>
|
<ul>
|
||||||
</ul>
|
<li>Ask follow-up questions that reference earlier messages</li>
|
||||||
<blockquote>
|
<li>Have a multi-turn conversation with full context</li>
|
||||||
<p><em>Tip: You can toggle streaming and markdown using the checkboxes below.</em></p>
|
<li>Ask "what did I just ask?" to test history retention</li>
|
||||||
</blockquote>
|
<li>Watch the streaming response in real-time!</li>
|
||||||
</div></div>
|
</ul>
|
||||||
|
<blockquote>
|
||||||
|
<p><em>Tip: You can toggle streaming and markdown using the checkboxes below.</em></p>
|
||||||
|
</blockquote>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="inputArea">
|
<div id="inputArea">
|
||||||
@@ -73,7 +77,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="chatv3.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user