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

efbff343424e3ef8dd67358882d297149976ffe4

Theros <theros@svaltek.xyz>

Signed
1 files changed, +2 -1Showing whitespace changes
public/scripts/st-context.js+2 -1
@@ -104,7 +104,7 @@ import { ToolManager } from './tool-calling.js';
104import { accountStorage } from './util/AccountStorage.js';104import { accountStorage } from './util/AccountStorage.js';
105import { timestampToMoment, uuidv4, importFromExternalUrl } from './utils.js';105import { timestampToMoment, uuidv4, importFromExternalUrl } from './utils.js';
106import { addGlobalVariable, addLocalVariable, decrementGlobalVariable, decrementLocalVariable, deleteGlobalVariable, deleteLocalVariable, existsGlobalVariable, existsLocalVariable, getGlobalVariable, getLocalVariable, incrementGlobalVariable, incrementLocalVariable, setGlobalVariable, setLocalVariable } from './variables.js';106import { addGlobalVariable, addLocalVariable, decrementGlobalVariable, decrementLocalVariable, deleteGlobalVariable, deleteLocalVariable, existsGlobalVariable, existsLocalVariable, getGlobalVariable, getLocalVariable, incrementGlobalVariable, incrementLocalVariable, setGlobalVariable, setLocalVariable } from './variables.js';
107import { convertCharacterBook, getWorldInfoPrompt, loadWorldInfo, reloadEditor, saveWorldInfo, updateWorldInfoList } from './world-info.js';107import { convertCharacterBook, getWorldInfoPrompt, loadWorldInfo, reloadEditor, saveWorldInfo, updateWorldInfoList, world_names } from './world-info.js';
108import { ChatCompletionService, TextCompletionService } from './custom-request.js';108import { ChatCompletionService, TextCompletionService } from './custom-request.js';
109import { ConnectionManagerRequestService } from './extensions/shared.js';109import { ConnectionManagerRequestService } from './extensions/shared.js';
110import { updateReasoningUI, parseReasoningFromString, getReasoningTemplateByName } from './reasoning.js';110import { updateReasoningUI, parseReasoningFromString, getReasoningTemplateByName } from './reasoning.js';
@@ -279,6 +279,7 @@ export function getContext() {
279 updateWorldInfoList,279 updateWorldInfoList,
280 convertCharacterBook,280 convertCharacterBook,
281 getWorldInfoPrompt,281 getWorldInfoPrompt,
282 getWorldInfoNames: () => Array.isArray(world_names) ? [...world_names] : [],
282 CONNECT_API_MAP,283 CONNECT_API_MAP,
283 getTextGenServer,284 getTextGenServer,
284 extractMessageFromData,285 extractMessageFromData,