Tidy: Use params instead of JSON
@jgclark arbeitet bereits daran.
Seit 21.6.2025.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 204
- Forks
- 82
- Ø Merge
- 22 Std. 27 Min.
- Gemergte PRs (30 T.)
- 3
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.