Improves error notices and settings descriptions
Refines user-facing text in error notices and settings to improve clarity and user experience. Standardizes settings header creation, updates placeholder text, and simplifies setting descriptions.
This commit is contained in:
2 files changed
+5
-5
No files matched your search
@@ -92,7 +92,7 @@ export class CleanupCommand {
|
|||||||
} else if (error instanceof ServiceUnavailableError) {
|
} else if (error instanceof ServiceUnavailableError) {
|
||||||
new Notice(error.message);
|
new Notice(error.message);
|
||||||
} else if (error instanceof InvalidResponseError) {
|
} else if (error instanceof InvalidResponseError) {
|
||||||
new Notice('Received an unexpected response from Claude. Please try again.');
|
new Notice('Received an unexpected response from Claude. Please try again');
|
||||||
} else if (error instanceof NetworkError) {
|
} else if (error instanceof NetworkError) {
|
||||||
new Notice('Network error. Check your connection and try again.');
|
new Notice('Network error. Check your connection and try again.');
|
||||||
} else if (error instanceof Error) {
|
} else if (error instanceof Error) {
|
||||||
|
|||||||
+4
-4
@@ -70,7 +70,7 @@ export class FreewritingCleanupSettingTab extends PluginSettingTab {
|
|||||||
const { containerEl } = this;
|
const { containerEl } = this;
|
||||||
containerEl.empty();
|
containerEl.empty();
|
||||||
|
|
||||||
containerEl.createEl('h2', { text: 'Freewriting cleanup settings' });
|
new Setting(containerEl).setName('Freewriting cleanup settings').setHeading();
|
||||||
|
|
||||||
// Load models asynchronously in the background
|
// Load models asynchronously in the background
|
||||||
this.loadModels()
|
this.loadModels()
|
||||||
@@ -92,7 +92,7 @@ export class FreewritingCleanupSettingTab extends PluginSettingTab {
|
|||||||
.setName('Anthropic API key')
|
.setName('Anthropic API key')
|
||||||
.setDesc('Your Anthropic API key for Claude. Get one at https://console.anthropic.com/')
|
.setDesc('Your Anthropic API key for Claude. Get one at https://console.anthropic.com/')
|
||||||
.addText(text => text
|
.addText(text => text
|
||||||
.setPlaceholder('sk-ant-...')
|
.setPlaceholder('Enter API key')
|
||||||
.setValue(this.plugin.settings.apiKey)
|
.setValue(this.plugin.settings.apiKey)
|
||||||
.onChange(async (value) => {
|
.onChange(async (value) => {
|
||||||
this.plugin.settings.apiKey = value;
|
this.plugin.settings.apiKey = value;
|
||||||
@@ -125,7 +125,7 @@ export class FreewritingCleanupSettingTab extends PluginSettingTab {
|
|||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Claude model')
|
.setName('Claude model')
|
||||||
.setDesc('Which Claude model to use for text cleanup')
|
.setDesc('Claude model to use for text cleanup')
|
||||||
.addDropdown(dropdown => {
|
.addDropdown(dropdown => {
|
||||||
this.modelDropdown = dropdown;
|
this.modelDropdown = dropdown;
|
||||||
this.populateModelDropdown(dropdown);
|
this.populateModelDropdown(dropdown);
|
||||||
@@ -143,7 +143,7 @@ export class FreewritingCleanupSettingTab extends PluginSettingTab {
|
|||||||
|
|
||||||
new Setting(containerEl)
|
new Setting(containerEl)
|
||||||
.setName('Cleanup prompt')
|
.setName('Cleanup prompt')
|
||||||
.setDesc('Instructions for how Claude should clean up your freewriting text')
|
.setDesc('Instructions for how to clean up your freewriting text')
|
||||||
.addTextArea(textArea => {
|
.addTextArea(textArea => {
|
||||||
textArea
|
textArea
|
||||||
.setPlaceholder('Enter your cleanup instructions...')
|
.setPlaceholder('Enter your cleanup instructions...')
|
||||||
|
|||||||
Reference in new issue
Block a user