fix no-undef errors

This commit is contained in:
Marcello Fitton
2026-03-03 12:33:54 -08:00
parent 05ff17c661
commit d713dab3eb
8 changed files with 14 additions and 7 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ const EmbedConfig = {
this.writable.includes(key)
);
if (validKeys.length === 0)
return { embed: { id }, message: "No valid fields to update!" };
return { embed: { id: embedId }, message: "No valid fields to update!" };
const updates = {};
validKeys.map((key) => {
+1 -1
View File
@@ -170,7 +170,7 @@ class AWSBedrockLLM {
const numericLimit = Number(limit);
if (isNaN(numericLimit) || numericLimit <= 0) {
this.#slog(
`[AWSBedrock ERROR] Invalid AWS_BEDROCK_LLM_MODEL_TOKEN_LIMIT found: "${limitSourceValue}". Must be a positive number - returning default ${DEFAULT_CONTEXT_WINDOW_TOKENS}.`
`[AWSBedrock ERROR] Invalid AWS_BEDROCK_LLM_MODEL_TOKEN_LIMIT found: "${limit}". Must be a positive number - returning default ${DEFAULT_CONTEXT_WINDOW_TOKENS}.`
);
return DEFAULT_CONTEXT_WINDOW_TOKENS;
}
@@ -7,6 +7,7 @@ const {
writeResponseChunk,
clientAbortedHandler,
} = require("../../helpers/chat/responses");
const { v4: uuidv4 } = require("uuid");
const { toValidNumber } = require("../../http");
const { getAnythingLLMUserAgent } = require("../../../endpoints/utils");
+4 -1
View File
@@ -3,7 +3,10 @@ const {
LLMPerformanceMonitor,
} = require("../../helpers/chat/LLMPerformanceMonitor");
const { v4: uuidv4 } = require("uuid");
const { writeResponseChunk } = require("../../helpers/chat/responses");
const {
writeResponseChunk,
clientAbortedHandler,
} = require("../../helpers/chat/responses");
const { MODEL_MAP } = require("../modelMap");
class SambaNovaLLM {
+1 -1
View File
@@ -355,7 +355,7 @@ class EphemeralAgentHandler extends AgentHandler {
async createAIbitat(
args = {
handler,
handler: null,
}
) {
this.aibitat = new AIbitat({
+1 -1
View File
@@ -593,7 +593,7 @@ class AgentHandler {
async createAIbitat(
args = {
socket,
socket: null,
}
) {
this.aibitat = new AIbitat({
+4 -1
View File
@@ -38,7 +38,10 @@ async function determineLogoFilepath(defaultFilename = LOGO_FILENAME) {
const defaultFilepath = path.join(basePath, defaultFilename);
if (currentLogoFilename && validFilename(currentLogoFilename)) {
customLogoPath = path.join(basePath, normalizePath(currentLogoFilename));
const customLogoPath = path.join(
basePath,
normalizePath(currentLogoFilename)
);
if (!isWithin(path.resolve(basePath), path.resolve(customLogoPath)))
return defaultFilepath;
return fs.existsSync(customLogoPath) ? customLogoPath : defaultFilepath;
+1 -1
View File
@@ -384,7 +384,7 @@ function fillSourceWindow({
searchResults = [], // Sources from similarity search
history = [], // Raw history
filterIdentifiers = [], // pinned document sources
} = config) {
} = {}) {
const sources = [...searchResults];
if (sources.length >= nDocs || history.length === 0) {