Tidy: Use params instead of JSON
@jgclark 已經在處理了。
開始於 2025年6月21日。
評估
這個 Issue 還沒有評估資料。
描述
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 分鐘
- 30 天內合併 PR
- 3
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
NotePlan/plugins 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
-
bug
難度 4/5 3-5 天 新手友好度 48/100
-
難度 5/5 一週以上 新手友好度 35/100
-
bug
-
bug
難度 3/5 1-2 天 新手友好度 38/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
antfu-collective/icones#398 ·
-
ECmail.com 未關閉
難度 1/5 1 小時以內 新手友好度 90/100
wesbos/burner-email-providers#554 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
radiantearth/stac-browser#1023 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
components-web-app/docs#92 ·