Refines settings UI and error handling
Simplifies commentary prompt assignments and streamlines the Freewriting Cleanup Plugin command registration. Improves consistency and readability in the settings interface by standardizing heading and button labels. Removes redundant model selection logging. This enhances user experience by making the interface more intuitive and declutters the codebase for easier maintenance.
This commit is contained in:
4 files changed
+46
-53
No files matched your search
@@ -72,7 +72,7 @@ export default class FreewritingCleanupPlugin extends Plugin {
|
||||
*/
|
||||
async loadSettings(): Promise<FreewritingCleanupData | null> {
|
||||
const data = await this.loadData() as FreewritingCleanupData | null;
|
||||
const { modelCache, ...persisted } = data ?? {};
|
||||
const { ...persisted } = data ?? {};
|
||||
this.settings = {
|
||||
...DEFAULT_SETTINGS,
|
||||
...(persisted as Partial<FreewritingCleanupSettings>)
|
||||
@@ -111,7 +111,7 @@ export default class FreewritingCleanupPlugin extends Plugin {
|
||||
*/
|
||||
private registerCommand() {
|
||||
this.addCommand({
|
||||
id: 'freewriting-cleanup-cleanup-text',
|
||||
id: 'cleanup-text',
|
||||
name: 'Clean up text',
|
||||
editorCallback: async (editor: Editor, view: MarkdownView) => {
|
||||
await this.executeCleanupCommand(editor, view);
|
||||
|
||||
Reference in new issue
Block a user