Closed Technologicat closed 4 months ago
Talking to myself here...
bookmark_link
) the relevant message in the originating chat file as having spawned that checkpointbookmark_link
field to identify checkpointsTherefore:
bookmark_link
), this spawns another new chat file, and overwrites the bookmark_link
field in the originating chat file. But the previous spawned chat file still also exists; the originating chat file just no longer links to it.bookmark_link
in the original chat file remains.Will need to think about what this all means for Timelines when less tired.
I have this pretty much working, now pending on #16.
@Cohee1207: What's the preferred way to handle hotkeys in third-party extensions? I'd like Esc
to close the timeline view, like in many built-in views, but I suppose modding the Esc catcher in RossAscends-mods.js
is not the way to do it. :)
Possibly stopPropagation
is your bro here if you want to cancel out the default top-level handler of Esc key.
Upcoming PR posted as #18.
Changelog moved there.
Possibly
stopPropagation
is your bro here if you want to cancel out the default top-level handler of Esc key.
I have no problem with the top-level handler, except it's not closing the timeline view. :)
I noticed that the new Token probabilities feature added a case to RossAscends-mods.js
, but that's a core feature, not a third-party plugin. Hence, I was thinking that I probably need to wire in a custom handler when the plugin initializes...
Yes, a custom handler with stopPropagation cancels the event bubbling to the top-level handler if it was used to close a Timelines view.
Yes, a custom handler with stopPropagation cancels the event bubbling to the top-level handler if it was used to close a Timelines view.
I missed the obvious implication, as usual. Thanks for the clarification. :)
Resolved by #18.
From quickly trying out Timelines for a small creative writing test, the UX has some rough edges:
bookmark_link
in existing chat files that points to the deleted file. If you manually edit that out, the ghost checkpoint disappears from the legend.onTimelineButtonClick
inSillyTavern/public/scripts/extensions/third-party/SillyTavern-Timelines/index.js
updateTimelineDataIfNeeded
inSillyTavern/public/scripts/extensions/third-party/SillyTavern-Timelines/index.js
fetchData
inSillyTavern/public/scripts/extensions/third-party/SillyTavern-Timelines/tl_node_data.js
/api/characters/chats
~-> the returned filenames include deleted chat files~/chats
endpoint handler inSillyTavern/src/endpoints/characters.js
gets its list of chat files directly by scanning the folder on the disk. Not much can go wrong there.bookmark_link
, but forgot to delete the chat file -> "ghost checkpoint" in the jump buttons in a graph node (because the chat file still exists), although no longer listed in the legendbookmark_link
, it could also check that the linked chat file exists in the set of all chats (that the graph is built out of). Then dead links wouldn't matter. I'll try this approach.~ EDIT: Yep, pruning dead links when constructing the timeline graph solves this. Fix stashed for the next PR.RossAscends-mods.js
, since this is a third-party extension.I'll see if I have the time to do something to these - as usual, no promises except of the async/await kind.
EDIT: My mistake. The API endpoint gets the correct file list.