Open romeoleung opened 1 year ago
A similar thing happens when I capture to a non-existent daily note that contains various Templater templates.
The Quickadd capture triggers the creation of the daily note, thus triggering Templater (run Templater on new file creation enabled). Like you report, when I fill in the system prompts from Templater, they open once more.
This doesn't happen when I create the daily note outside of Quickadd, only when Quickadd creates the daily note as part of the capture.
I'd like to just chime in here that I see this too.
Experiencing this as well.
Solving this would provide a lot of value to users, because the current situation a big impediment to a good workflow. Whenever you capture to a non-existent daily note that contains Templater prompts, thereby triggering its creation, you have to fill in the prompts twice to get valid results in the resulting note. Of course, this is very inconvenient.
FYI for anyone who uses quickadd features sparingly and is looking for a quick minimal solution to this- reverting back to Version 0.17.1 fixes the duplicate prompt templater issue.
FYI for anyone who uses quickadd features sparingly and is looking for a quick minimal solution to this- reverting back to Version 0.17.1 fixes the duplicate prompt templater issue.
Very interesting! Maybe that holds some clues as to the cause of this issue. I'm wondering, did you revert version by version to figure this out?
FYI for anyone who uses quickadd features sparingly and is looking for a quick minimal solution to this- reverting back to Version 0.17.1 fixes the duplicate prompt templater issue.
Very interesting! Maybe that holds some clues as to the cause of this issue. I'm wondering, did you revert version by version to figure this out?
Read version releases and looked at the code with my limited typescript knowledge.
I didn't look too far into it but I believe it has to do with the templaterParseTemplate function.
My hypothesis is that when templater's own parse_template function is called within that function, it is generating its own instance of the templater object in order to interpret it for rendering. That's why the first entry goes nowhere but the second entry is appended to the current line. This bug started happening around the time of 0.18.3 which involved a fix for rendering templater syntax so it lines up with the timeline.
Describe the bug When enabled Capture format, and inputting templater tp.system.prompt to capture user input, the code will execute twice, and only the 2nd time gets registered.
To Reproduce Steps to reproduce the behavior:
Expected behavior The prompts should not display twice. They should display once and the input should be captured and put into the note.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):