Tidy: Use params instead of JSON

オープン
#647 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@jgclark がすでに取り組んでいます。

2025年6月21日 から。

評価

この issue はまだ評価されていません。

説明

enhancement

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.

主要言語
JavaScript
スター
204
フォーク
82
平均マージ
22時間 27分
マージ済み PR(30日)
3

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NotePlan/plugins のほかの issue

NotePlan/plugins の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。