mirror of
https://github.com/ahmetildirim/obsidian-inscribe.git
synced 2026-07-22 05:44:10 +00:00
feat: add manual activation key for suggestions and update settings handling
This commit is contained in:
parent
f1268cac46
commit
d485a60fc6
3 changed files with 2 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ export const DEFAULT_SETTINGS: Settings = {
|
|||
suggestionSettings: {
|
||||
acceptanceHotkey: "Tab",
|
||||
splitStrategy: "sentence",
|
||||
manualActivationKey: "",
|
||||
},
|
||||
providers: {
|
||||
openai: {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue