mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 05:45:51 +00:00
ci: auto build & obfuscate [2026-04-08 21:17:22] (Jenkins #12)
This commit is contained in:
@@ -46,7 +46,7 @@ import { renderTables } from '../../ui/table-bindings.js';
|
||||
async function processMessageUpdate(messageId) {
|
||||
TableManager.clearHighlights();
|
||||
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
const tableSystemEnabled = settings.table_system_enabled !== false;
|
||||
if (!tableSystemEnabled) {
|
||||
log('【表格服务】表格系统总开关已关闭,跳过所有表格处理。', 'info');
|
||||
|
||||
@@ -22,7 +22,7 @@ const MAX_RETRIES = 2;
|
||||
|
||||
|
||||
async function getWorldBookContext() {
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
if (!settings.table_worldbook_enabled) {
|
||||
return '';
|
||||
}
|
||||
@@ -114,7 +114,7 @@ function updateButtonState(state, batchNum = 0, attemptNum = 0) {
|
||||
|
||||
async function callTableModel(messages) {
|
||||
try {
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
|
||||
if (settings.nccsEnabled) {
|
||||
log('使用 Nccs API 进行表格填充...', 'info');
|
||||
@@ -141,7 +141,7 @@ async function callTableModel(messages) {
|
||||
function getRawMessagesForSummary(startFloor, endFloor) {
|
||||
const context = getContext();
|
||||
const chat = context.chat;
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
|
||||
const historySlice = chat.slice(startFloor - 1, endFloor);
|
||||
if (historySlice.length === 0) return null;
|
||||
@@ -319,7 +319,7 @@ export function startBatchFilling() {
|
||||
const button = fillButton();
|
||||
if (!button) return;
|
||||
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
const tableSystemEnabled = settings.table_system_enabled !== false;
|
||||
if (!tableSystemEnabled) {
|
||||
log('表格系统总开关已关闭,跳过批量填表。', 'info');
|
||||
@@ -387,7 +387,7 @@ export function startBatchFilling() {
|
||||
|
||||
|
||||
export async function startFloorRangeFilling(startFloor, endFloor) {
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
const tableSystemEnabled = settings.table_system_enabled !== false;
|
||||
if (!tableSystemEnabled) {
|
||||
log('表格系统总开关已关闭,跳过楼层填表。', 'info');
|
||||
|
||||
@@ -1264,7 +1264,7 @@ export function getAiFlowTemplateForInjection() {
|
||||
}
|
||||
|
||||
export async function updateTableFromText(textContent, options = {}) {
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
if (settings.table_system_enabled === false) {
|
||||
log('表格系统总开关已关闭,跳过 <Amily2Edit> 标签处理。', 'info');
|
||||
return;
|
||||
@@ -1575,7 +1575,7 @@ export async function rollbackState() {
|
||||
|
||||
export async function rollbackAndRefill() {
|
||||
// 检查表格系统总开关
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
if (settings.table_system_enabled === false) {
|
||||
log('表格系统总开关已关闭,跳过回退填表。', 'info');
|
||||
toastr.info('表格系统总开关已关闭,无法执行回退填表。');
|
||||
|
||||
@@ -8,7 +8,7 @@ import { callAI, generateRandomSeed } from '../api.js';
|
||||
import { callNccsAI } from '../api/NccsApi.js';
|
||||
|
||||
export async function reorganizeTableContent(selectedTableIndices) {
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
|
||||
if (settings.table_system_enabled === false) {
|
||||
toastr.warning('表格系统总开关已关闭。');
|
||||
|
||||
@@ -13,7 +13,7 @@ import { safeLorebookEntries } from '../tavernhelper-compatibility.js';
|
||||
|
||||
|
||||
async function getWorldBookContext() {
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
|
||||
if (!settings.table_worldbook_enabled) {
|
||||
return '';
|
||||
@@ -67,7 +67,7 @@ async function getWorldBookContext() {
|
||||
export async function fillWithSecondaryApi(latestMessage, forceRun = false) {
|
||||
clearHighlights();
|
||||
|
||||
const settings = extension_settings[extensionName];
|
||||
const settings = extension_settings[extensionName] || {};
|
||||
|
||||
// 总开关关闭时,分步填表同样禁用
|
||||
if (settings.table_system_enabled === false) {
|
||||
|
||||
@@ -131,6 +131,7 @@ export {
|
||||
};
|
||||
|
||||
export const tableSystemDefaultSettings = {
|
||||
table_system_enabled: true,
|
||||
table_injection_enabled: false,
|
||||
|
||||
injection: {
|
||||
|
||||
Reference in New Issue
Block a user