mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-15 11:30:09 +01:00
Add custom macro for latest {{summary}}.
This commit is contained in:
parent
345bae4fc0
commit
cd8cc70e4f
@ -23,8 +23,7 @@ import { debounce_timeout } from '../../constants.js';
|
||||
import { SlashCommandParser } from '../../slash-commands/SlashCommandParser.js';
|
||||
import { SlashCommand } from '../../slash-commands/SlashCommand.js';
|
||||
import { ARGUMENT_TYPE, SlashCommandArgument, SlashCommandNamedArgument } from '../../slash-commands/SlashCommandArgument.js';
|
||||
import { resolveVariable } from '../../variables.js';
|
||||
import { commonEnumProviders } from '../../slash-commands/SlashCommandCommonEnumsProvider.js';
|
||||
import { MacrosParser } from '../../macros.js';
|
||||
export { MODULE_NAME };
|
||||
|
||||
const MODULE_NAME = '1_memory';
|
||||
@ -937,4 +936,6 @@ jQuery(async function () {
|
||||
helpString: 'Summarizes the given text. If no text is provided, the current chat will be summarized. Can specify the source and the prompt to use.',
|
||||
returns: ARGUMENT_TYPE.STRING,
|
||||
}));
|
||||
|
||||
MacrosParser.registerMacro('summary', () => getLatestMemoryFromChat(getContext().chat));
|
||||
});
|
||||
|
@ -16,6 +16,7 @@
|
||||
<li><tt>{{persona}}</tt> – <span data-i18n="help_macros_12">your current Persona Description</span></li>
|
||||
<li><tt>{{mesExamples}}</tt> – <span data-i18n="help_macros_13">the Character's Dialogue Examples</span></li>
|
||||
<li><tt>{{mesExamplesRaw}}</tt> – <span data-i18n="help_macros_14">unformatted Dialogue Examples </span><b data-i18n="(only for Story String)">(only for Story String)</b></li>
|
||||
<li><tt>{{summary}}</tt> – <span data-i18n="help_macros_summary">the latest chat summary generated by the "Summarize" extension (if available).</span></li>
|
||||
<li><tt>{{user}}</tt> – <span data-i18n="help_macros_15">your current Persona username</span></li>
|
||||
<li><tt>{{char}}</tt> – <span data-i18n="help_macros_16">the Character's name</span></li>
|
||||
<li><tt>{{char_version}}</tt> – <span data-i18n="help_macros_17">the Character's version number</span></li>
|
||||
|
Loading…
x
Reference in New Issue
Block a user