Tidy: Use params instead of JSON
@jgclark is already working on this.
Since Jun 21, 2025.
- Dominant language
- JavaScript
- Stars
- 204
- Forks
- 82
- Avg merge
- 22h 27m
- Merged PRs (30d)
- 3
Description
I find the JSON in many of the Tidy commands (esp "Remove Section...") mess things up and either don't work or cause the command to fail. I think having links, quote marks and emojis inside the JSON often keep it from working.
I would like to ask you to think about keeping JSON as the first param for backwards compat but also add individual parameters for each to use if you prefer. This will make xcallbacks and template commands more easy to understand and more reliable.
So for example:
export async function removeSectionFromRecentNotes(params: string = ''): Promise<void> {
would become:
export async function removeSectionFromRecentNotes(
params: string = '',
numDaysParam?: number,
runSilentlyParam?: boolean,
matchTypeParam?: MatchType,
sectionHeadingParam?: string,
): Promise<void> {
I would suggest having Cursor create a generic helper similar to your overrideSettingsWithEncodedTypedArgs() but that allows for either JSON or an array of parameters so that you can use it in any of the commands that use JSON params.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.