Extend getContext API

This commit is contained in:
Cohee 2024-03-21 01:11:47 +02:00
parent 04dad9a8de
commit 41b6169ea8
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import { humanizedDateTime, favsToHotswap, getMessageTimeStamp, dragElement, isMobile, initRossMods } from './scripts/RossAscends-mods.js';
import { humanizedDateTime, favsToHotswap, getMessageTimeStamp, dragElement, isMobile, initRossMods, shouldSendOnEnter } from './scripts/RossAscends-mods.js';
import { userStatsHandler, statMesProcess, initStats } from './scripts/stats.js';
import {
generateKoboldWithStreaming,
@ -7419,6 +7419,9 @@ window['SillyTavern'].getContext = function () {
writeExtensionField: writeExtensionField,
getThumbnailUrl: getThumbnailUrl,
selectCharacterById: selectCharacterById,
messageFormatting: messageFormatting,
shouldSendOnEnter: shouldSendOnEnter,
isMobile: isMobile,
tags: tags,
tagMap: tag_map,
menuType: menu_type,

View File

@ -126,7 +126,7 @@ export function isMobile() {
return mobileTypes.includes(parsedUA?.platform?.type);
}
function shouldSendOnEnter() {
export function shouldSendOnEnter() {
if (!power_user) {
return false;
}