mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Export variable manipulation functions to getContext
This commit is contained in:
@ -69,6 +69,7 @@ import { textgenerationwebui_settings } from './textgen-settings.js';
|
||||
import { tokenizers, getTextTokens, getTokenCount, getTokenCountAsync, getTokenizerModel } from './tokenizers.js';
|
||||
import { ToolManager } from './tool-calling.js';
|
||||
import { timestampToMoment, uuidv4 } from './utils.js';
|
||||
import { getGlobalVariable, getLocalVariable, setGlobalVariable, setLocalVariable } from './variables.js';
|
||||
|
||||
export function getContext() {
|
||||
return {
|
||||
@ -175,6 +176,16 @@ export function getContext() {
|
||||
humanizedDateTime,
|
||||
updateMessageBlock,
|
||||
appendMediaToMessage,
|
||||
variables: {
|
||||
local: {
|
||||
get: getLocalVariable,
|
||||
set: setLocalVariable,
|
||||
},
|
||||
global: {
|
||||
get: getGlobalVariable,
|
||||
set: setGlobalVariable,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user