From fe8403156aa664c8fb203bddc243eb6fc4448b1a Mon Sep 17 00:00:00 2001
From: gixita <kris.laermans@gmail.com>
Date: Sat, 10 Feb 2024 15:03:39 +0100
Subject: Move the custom prompt trigger on the block command

---
 src/ollama.tsx | 17 -----------------
 1 file changed, 17 deletions(-)

(limited to 'src/ollama.tsx')

diff --git a/src/ollama.tsx b/src/ollama.tsx
index 4fe697f..e59c633 100644
--- a/src/ollama.tsx
+++ b/src/ollama.tsx
@@ -186,23 +186,6 @@ export async function summarizeBlock() {
   }
 }
 
-export async function customPromptBlock() {
-  try {
-    if (!logseq.settings) {
-      throw new Error("Couldn't find ollama-logseq settings")
-    }
-  
-    // TODO: Get contnet of current block and subblocks
-    const currentBlock = await logseq.Editor.getCurrentBlock()
-    let customPromptBlock = await logseq.Editor.insertBlock(currentBlock!.uuid, `⌛Apply custom prompt...`, { before: false })
-    const customPrompt = await promptLLM(`${logseq.settings.custom_prompt_block} ${currentBlock!.content}`);
-     
-    await logseq.Editor.updateBlock(customPromptBlock!.uuid, `${customPrompt}`)
-  } catch (e: any) {
-    logseq.App.showMsg(e.toString(), 'warning')
-    console.error(e)
-  }
-}
 
 
 async function getOllamaParametersFromBlockProperties(b: BlockEntity) {
-- 
cgit v1.2.3

