mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 06:55:51 +00:00
Initial commit with CC BY-NC-ND 4.0 license
This commit is contained in:
34
CharacterWorldBook/src/cwb_state.js
Normal file
34
CharacterWorldBook/src/cwb_state.js
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
export const SCRIPT_ID_PREFIX = 'cwb';
|
||||
export const CHAR_CARD_VIEWER_BUTTON_ID = `${SCRIPT_ID_PREFIX}-viewer-button`;
|
||||
export const CHAR_CARD_VIEWER_POPUP_ID = `${SCRIPT_ID_PREFIX}-viewer-popup`;
|
||||
export const NEW_MESSAGE_DEBOUNCE_DELAY = 4000;
|
||||
export const MIN_POLLING_INTERVAL = 10000;
|
||||
export const MAX_POLLING_INTERVAL = 100000;
|
||||
export const POLLING_INTERVAL_STEP = 10000;
|
||||
|
||||
export const state = {
|
||||
masterEnabled: false,
|
||||
STORAGE_KEY_VIEWER_BUTTON_POS: 'cwb_viewer_button_position',
|
||||
|
||||
customApiConfig: { url: '', apiKey: '', model: '' },
|
||||
|
||||
currentBreakArmorPrompt: '',
|
||||
currentCharCardPrompt: '',
|
||||
currentIncrementalCharCardPrompt: '',
|
||||
|
||||
autoUpdateThreshold: null,
|
||||
autoUpdateEnabled: null,
|
||||
|
||||
viewerEnabled: null,
|
||||
isIncrementalUpdateEnabled: null,
|
||||
worldbookTarget: 'primary',
|
||||
customWorldBook: null,
|
||||
|
||||
isAutoUpdatingCard: false,
|
||||
newMessageDebounceTimer: null,
|
||||
pollingTimer: null,
|
||||
currentPollingInterval: MIN_POLLING_INTERVAL,
|
||||
allChatMessages: [],
|
||||
currentChatFileIdentifier: 'unknown_chat_init',
|
||||
};
|
||||
Reference in New Issue
Block a user