Tidy: Use params instead of JSON
@jgclark ci sta già lavorando.
Dal 21/6/2025.
- Lingua principale
- JavaScript
- Stelle
- 204
- Fork
- 82
- Merge medio
- 22h 27m
- PR unite (30g)
- 3
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.