Vectors: escape file names

378dfd3626330dbb96a38f70e275ab3c41501e30

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -3Showing whitespace changes
public/scripts/extensions/vectors/index.js+3 -3
@@ -23,7 +23,7 @@ import {
2323import { collapseNewlines, registerDebugFunction } from '../../power-user.js';
2424import { SECRET_KEYS, secret_state, writeSecret } from '../../secrets.js';
2525import { getDataBankAttachments, getDataBankAttachmentsForSource, getFileAttachment } from '../../chats.js';
2626import { debounce, getStringHash as calculateHash, waitUntilCondition, onlyUnique, splitRecursive, trimToStartSentence, trimToEndSentence, escapeHtml } from '../../utils.js';
2727import { debounce_timeout } from '../../constants.js';
2828import { getSortedEntries } from '../../world-info.js';
2929import { textgen_types, textgenerationwebui_settings } from '../../textgen-settings.js';
@@ -565,7 +565,7 @@ async function vectorizeFile(fileText, fileName, collectionId, chunkSize, overla
565565
566566 const batchSize = getBatchSize();
567567 const toastBody = $('<span>').text('This may take a while. Please wait...');
568568 const toast = toastr.info(toastBody, `Ingesting file ${escapeHtml(fileName)}`, { closeButton: false, escapeHtml: false, timeOut: 0, extendedTimeOut: 0 });
569569 const overlapSize = Math.round(chunkSize * overlapPercent / 100);
570570 const delimiters = getChunkDelimiters();
571571 // Overlap should not be included in chunk size. It will be later compensated by overlapChunks
@@ -1060,7 +1060,7 @@ async function onViewStatsClick() {
10601060 toastr.info(`Total hashes: <b>${totalHashes}</b><br>
10611061 Unique hashes: <b>${uniqueHashes}</b><br><br>
10621062 I'll mark collected messages with a green circle.`,
10631063 `Stats for chat ${escapeHtml(chatId)}`,
10641064 { timeOut: 10000, escapeHtml: false },
10651065 );
10661066