Rename plugin to InlineAI and update references in code

This commit is contained in:
Francisco Barragán 2024-11-01 18:02:46 +01:00
parent 7c70f320fe
commit b121bcd3cd
4 changed files with 7 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{
"id": "sample-plugin",
"name": "Sample Plugin",
"id": "inlineAI",
"name": "InlineAI",
"version": "1.0.0",
"minAppVersion": "0.15.0",
"description": "Demonstrates some of the capabilities of the Obsidian API.",

4
package-lock.json generated
View file

@ -1,11 +1,11 @@
{
"name": "obsidian-sample-plugin",
"name": "obsidian-inlineAI",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "obsidian-sample-plugin",
"name": "obsidian-inlineAI",
"version": "1.0.0",
"license": "MIT",
"dependencies": {

View file

@ -1,5 +1,5 @@
{
"name": "obsidian-sample-plugin",
"name": "obsidian-inlineAI",
"version": "1.0.0",
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
"main": "main.js",

View file

@ -144,7 +144,7 @@ export class TooltipWidget {
this.loader.style.display = "block";
try {
const response = await callApi(userInput, this.selectedText, (this.app as any).plugins.getPlugin("sample-plugin").settings);
const response = await callApi(userInput, this.selectedText, (this.app as any).plugins.getPlugin("inlineAI").settings);
this.generatedText = response.generated;
this.diff = response.diff;
@ -273,7 +273,7 @@ export class TooltipWidget {
const userInput = this.editorView.state.doc.toString();
this.promptText = userInput;
// Step 5: Call the API to get the new generated text
const response = await callApi(this.promptText, this.selectedText, (this.app as any).plugins.getPlugin("sample-plugin").settings);
const response = await callApi(this.promptText, this.selectedText, (this.app as any).plugins.getPlugin("inlineAI").settings);
this.generatedText = response.generated;
this.diff = response.diff;