Merge branch 'release' into staging

d25d97ad5de40b05f5d95aafc8fddb54e59d52fe

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +10 -11Showing whitespace changes
public/scripts/extensions/memory/index.js+10 -0
@@ -349,6 +349,11 @@ function onMaxMessagesPerRequestInput() {
349349 saveSettingsDebounced();
350350}
351351
352+/**
353+ * Get the latest memory summary from the chat.
354+ * @param {ChatMessage[]} chat Chat messages
355+ * @returns {string} Latest memory summary or empty string
356+ */
352357function getLatestMemoryFromChat(chat) {
353358 if (!Array.isArray(chat) || !chat.length) {
354359 return '';
@@ -365,6 +370,11 @@ function getLatestMemoryFromChat(chat) {
365370 return '';
366371}
367372
373+/**
374+ * Get the index of the latest memory summary from the chat.
375+ * @param {ChatMessage[]} chat Chat messages
376+ * @returns {number} Index of the latest memory summary or -1 if not found
377+ */
368378function getIndexOfLatestChatSummary(chat) {
369379 if (!Array.isArray(chat) || !chat.length) {
370380 return -1;
public/scripts/macros/definitions/env-macros.js+0 -11
@@ -160,17 +160,6 @@ export function registerEnvMacros() {
160160 handler: ({ env }) => env.system.model,
161161 });
162162
163- // TODO: Move this to the summary extension, where it belongs
164- MacroRegistry.registerMacro('summary', {
165- category: MacroCategory.CHAT,
166- description: 'Latest chat summary from the "Summarize" extension (when available).',
167- returns: 'Latest chat summary.',
168- handler: ({ env }) => {
169- const value = /** @type {any} */ (env.extra).summary;
170- return value == null ? '' : String(value);
171- },
172- });
173-
174163 MacroRegistry.registerMacro('original', {
175164 category: MacroCategory.CHARACTER,
176165 description: 'Original message content for {{original}} substitution in in character prompt overrides.',