mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add branching as distinct from bookmarking
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user