Add branching as distinct from bookmarking

This commit is contained in:
city-unit
2023-09-20 22:48:05 -04:00
parent e3f760a9dd
commit e0b5df97c4
3 changed files with 51 additions and 2 deletions

View File

@@ -103,7 +103,8 @@ import {
import {
createNewBookmark,
showBookmarksButtons
showBookmarksButtons,
createBranch,
} from "./scripts/bookmarks.js";
import {
@@ -6525,6 +6526,11 @@ function swipe_left() { // when we swipe left..but no generation.
}
}
async function branchChat(mesID) {
let name = await createBranch(mesID);
await openCharacterChat(name);
}
// when we click swipe right button
const swipe_right = () => {
if (chat.length - 1 === Number(this_edit_mes_id)) {
@@ -6705,6 +6711,8 @@ const swipe_right = () => {
}
}
function displayOverrideWarnings() {
if (!this_chid || !selected_group) {
$('.prompt_overridden').hide();
@@ -8426,6 +8434,13 @@ jQuery(async function () {
}
});
$(document).on("click", ".mes_create_branch", async function () {
var selected_mes_id = $(this).closest(".mes").attr("mesid");
if (selected_mes_id !== undefined) {
branchChat(selected_mes_id);
}
});
$(document).on("click", ".mes_stop", function () {
if (streamingProcessor) {
streamingProcessor.abortController.abort();