Allow editing of global Worldinfo settings (#4921)

* create and export updateWorldInfoSettings

* Add WorldInfoSettings type and refactor updateWorldInfoSettings function

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
This commit is contained in:
Sammy
2025-12-27 19:08:29 +01:00
committed by GitHub
parent d46fd60a57
commit 9a1ded5202
2 changed files with 43 additions and 0 deletions
+2
View File
@@ -8,6 +8,7 @@ import { FileAttachment } from './scripts/chats';
import { ReasoningMessageExtra } from './scripts/reasoning';
import { IGNORE_SYMBOL, OVERSWIPE_BEHAVIOR } from './scripts/constants';
import { ToolInvocation } from './scripts/tool-calling';
import { getWorldInfoSettings } from './scripts/world-info';
declare global {
// Custom types
@@ -16,6 +17,7 @@ declare global {
type ReasoningSettings = typeof power_user.reasoning;
type ChatCompletionSettings = typeof oai_settings;
type TextCompletionSettings = typeof textgenerationwebui_settings;
type WorldInfoSettings = ReturnType<typeof getWorldInfoSettings>;
type MessageTimestamp = string | number | Date;
type Character = import('./scripts/char-data').v1CharData;
type ChatMessageExtra = BaseMessageExtra & Partial<ReasoningMessageExtra> & Record<string, any>;