feat: add manual activation key for suggestions and update settings handling

This commit is contained in:
Ahmet Ildirim 2025-07-15 18:36:12 +02:00
parent f1268cac46
commit d485a60fc6
3 changed files with 2 additions and 3 deletions

View file

@ -33,7 +33,7 @@ export default class Inscribe extends Plugin {
fetchFunc: () => this.completionService.fetchCompletion(),
getOptions: () => this.profileService.getOptions(),
acceptanceHotkey: this.settings.suggestionSettings.acceptanceHotkey,
triggerHotkey: "Shift-Ctrl-Enter",
triggerHotkey: this.settings.suggestionSettings.manualActivationKey,
});
this.registerEditorExtension(extension);
}

View file

@ -60,6 +60,7 @@ export const DEFAULT_SETTINGS: Settings = {
suggestionSettings: {
acceptanceHotkey: "Tab",
splitStrategy: "sentence",
manualActivationKey: "",
},
providers: {
openai: {

View file

@ -131,7 +131,6 @@ class SuggestionSettingsSection {
.onChange(async (value) => {
this.plugin.settings.suggestionSettings.acceptanceHotkey = value;
await this.plugin.saveSettings();
this.plugin.statusBarItem.render();
});
});
@ -146,7 +145,6 @@ class SuggestionSettingsSection {
.onChange(async (value) => {
this.plugin.settings.suggestionSettings.manualActivationKey = value || undefined;
await this.plugin.saveSettings();
this.plugin.statusBarItem.render();
});
});