mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 22:05:50 +00:00
Update historiographer.js
This commit is contained in:
@@ -195,11 +195,8 @@ export async function executeManualSummary(startFloor, endFloor, isAuto = false)
|
|||||||
container.find('.historiography-message-item').each(function() {
|
container.find('.historiography-message-item').each(function() {
|
||||||
const item = $(this);
|
const item = $(this);
|
||||||
const authorType = item.data('author-type');
|
const authorType = item.data('author-type');
|
||||||
if ((authorType === 'user' && !includeUser) || (authorType === 'char' && !includeChar)) {
|
const shouldBeHidden = (authorType === 'user' && !includeUser) || (authorType === 'char' && !includeChar);
|
||||||
item.prop('hidden', true);
|
item.toggle(!shouldBeHidden);
|
||||||
} else {
|
|
||||||
item.prop('hidden', false);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -207,7 +204,17 @@ export async function executeManualSummary(startFloor, endFloor, isAuto = false)
|
|||||||
charCheckbox.on('change', updateVisibility);
|
charCheckbox.on('change', updateVisibility);
|
||||||
},
|
},
|
||||||
onOk: async (dialog) => {
|
onOk: async (dialog) => {
|
||||||
const textToSummarize = dialog.find('.historiography-message-item:not([hidden]) textarea')
|
const includeUser = dialog.find('#hist-include-user').is(':checked');
|
||||||
|
const includeChar = dialog.find('#hist-include-char').is(':checked');
|
||||||
|
|
||||||
|
const textToSummarize = dialog.find('.historiography-message-item')
|
||||||
|
.filter(function() {
|
||||||
|
const authorType = $(this).data('author-type');
|
||||||
|
if (authorType === 'user' && !includeUser) return false;
|
||||||
|
if (authorType === 'char' && !includeChar) return false;
|
||||||
|
return true;
|
||||||
|
})
|
||||||
|
.find('textarea')
|
||||||
.map(function() {
|
.map(function() {
|
||||||
const floor = $(this).data('floor');
|
const floor = $(this).data('floor');
|
||||||
const author = $(this).closest('.historiography-message-item').find('summary').text().replace(`【第 ${floor} 楼】 `, '');
|
const author = $(this).closest('.historiography-message-item').find('summary').text().replace(`【第 ${floor} 楼】 `, '');
|
||||||
|
|||||||
Reference in New Issue
Block a user