feat: add getWorldInfoNames() to getContext() for WorldInfo enumeration. (#5505)

This commit is contained in:
Theros
2026-04-23 09:24:10 +01:00
committed by GitHub
parent 6d2165149b
commit efbff34342
+2 -1
View File
@@ -104,7 +104,7 @@ import { ToolManager } from './tool-calling.js';
import { accountStorage } from './util/AccountStorage.js';
import { timestampToMoment, uuidv4, importFromExternalUrl } from './utils.js';
import { addGlobalVariable, addLocalVariable, decrementGlobalVariable, decrementLocalVariable, deleteGlobalVariable, deleteLocalVariable, existsGlobalVariable, existsLocalVariable, getGlobalVariable, getLocalVariable, incrementGlobalVariable, incrementLocalVariable, setGlobalVariable, setLocalVariable } from './variables.js';
import { convertCharacterBook, getWorldInfoPrompt, loadWorldInfo, reloadEditor, saveWorldInfo, updateWorldInfoList } from './world-info.js';
import { convertCharacterBook, getWorldInfoPrompt, loadWorldInfo, reloadEditor, saveWorldInfo, updateWorldInfoList, world_names } from './world-info.js';
import { ChatCompletionService, TextCompletionService } from './custom-request.js';
import { ConnectionManagerRequestService } from './extensions/shared.js';
import { updateReasoningUI, parseReasoningFromString, getReasoningTemplateByName } from './reasoning.js';
@@ -279,6 +279,7 @@ export function getContext() {
updateWorldInfoList,
convertCharacterBook,
getWorldInfoPrompt,
getWorldInfoNames: () => Array.isArray(world_names) ? [...world_names] : [],
CONNECT_API_MAP,
getTextGenServer,
extractMessageFromData,