forgot to save before committing

This commit is contained in:
Eri Ishihara 2025-07-18 17:04:30 +02:00
parent f53d9d917e
commit 746432c6ff

View file

@ -108,12 +108,10 @@ function updateStreamMessage(content) {
let letterIndex = -1;
for (let i = 0; i < content.length - 1; i++) {
if (/[a-zA-Z]/.test(content[i])) {
// If it's capital I, split immediately
if (content[i] === "I") {
letterIndex = i;
break;
}
// If next character is also a letter, split at two consecutive letters
if (/[a-zA-Z]/.test(content[i + 1])) {
letterIndex = i;
break;
@ -173,7 +171,6 @@ function finalizeStreamMessage() {
addMessage(assistantname, currentStreamMessage);
}
// Add assistant message to conversation history
conversationHistory.push({
role: "assistant",
content: assistantMessage,
@ -200,7 +197,6 @@ async function sendMessage(message) {
addMessage(username, message);
// Add user message to conversation history
conversationHistory.push({
role: "user",
content: message,
@ -239,7 +235,7 @@ inputBox.on("submit", async (text) => {
inputBox.clearValue();
inputBox.focus();
// Handle commands
// command trash
if (text.trim().startsWith("l!")) {
const commandParts = text.trim().slice(2).split(" ");
const command = commandParts[0];
@ -270,7 +266,7 @@ inputBox.on("submit", async (text) => {
break;
}
} else {
// Regular message - send to ollama
// message just send it
await sendMessage(text);
}
}