Skip to content

Commit

Permalink
Updates for community plugin guidelines
Browse files Browse the repository at this point in the history
1. minAppVersion updated in manifest.json
2. fundingURL updated
3. Updated UI elements to sentence case.
4. Removed sample plugin residual code.
  • Loading branch information
manimohans committed Apr 30, 2024
1 parent a80440c commit 25ec184
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
20 changes: 4 additions & 16 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class OLocalLLMPlugin extends Plugin {

menu.addItem((item) =>
item
.setTitle("Make it Professional")
.setTitle("Make it professional")
.setIcon("school")
.onClick(async () => {
let selectedText = this.getSelectedText();
Expand All @@ -77,23 +77,11 @@ export default class OLocalLLMPlugin extends Plugin {
menu.showAtMouseEvent(event);
});

// This adds a status bar item to the bottom of the app. Does not work on mobile apps.
const statusBarItemEl = this.addStatusBarItem();
statusBarItemEl.setText("Local LLM Helper running");

// This adds a settings tab so the user can configure various aspects of the plugin
this.addSettingTab(new OLLMSettingTab(this.app, this));

// If the plugin hooks up any global DOM events (on parts of the app that doesn't belong to this plugin)
// Using this function will automatically remove the event listener when this plugin is disabled.
this.registerDomEvent(document, "click", (evt: MouseEvent) => {
console.log("click", evt);
});

// When registering intervals, this function will automatically clear the interval when the plugin is disabled.
this.registerInterval(
window.setInterval(() => console.log("setInterval"), 5 * 60 * 1000)
);
}

private getSelectedText() {
Expand Down Expand Up @@ -151,7 +139,7 @@ class OLLMSettingTab extends PluginSettingTab {
containerEl.empty();

new Setting(containerEl)
.setName("Server Address")
.setName("Server address")
.setDesc("localhost or remote (do not include http://)")
.addText((text) =>
text
Expand All @@ -165,7 +153,7 @@ class OLLMSettingTab extends PluginSettingTab {

// Add a new setting for another text input
new Setting(containerEl)
.setName("Server Port")
.setName("Server port")
.setDesc("Port number for the LLM server")
.addText((text) =>
text
Expand All @@ -178,7 +166,7 @@ class OLLMSettingTab extends PluginSettingTab {
);

new Setting(containerEl)
.setName("LLM Model")
.setName("LLM model")
.setDesc("currently works with LM Studio - find model name there")
.addText((text) =>
text
Expand Down
6 changes: 3 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "local-llm-helper",
"name": "Local LLM Helper",
"version": "1.0.2",
"minAppVersion": "0.15.0",
"version": "1.0.3",
"minAppVersion": "1.5.12",
"description": "Use your own secure local LLM server to work with your text!",
"author": "Mani Mohan",
"authorUrl": "https:/warpcast.com/mani",
"fundingUrl": "manee.eth",
"fundingUrl": "https://buymeacoffee.com/manee",
"isDesktopOnly": false
}

0 comments on commit 25ec184

Please sign in to comment.