From 6c7a7bd3db97c0252cf5852355ea95831db2f121 Mon Sep 17 00:00:00 2001
From: David Li <taweili@gmail.com>
Date: Wed, 29 Nov 2023 21:32:21 +0800
Subject: Add Prompt from Block Context Menu Command and put the Ollama
 response in the subblock.

---
 src/App.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/App.tsx')

diff --git a/src/App.tsx b/src/App.tsx
index f9592a3..7366264 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,6 +1,6 @@
 import React, { useEffect, useRef, useState } from "react";
 import { OllamaCommandPallete } from "./components/OllamaCommandPallete";
-import { convertToFlashCardFromEvent, DivideTaskIntoSubTasksFromEvent, ollamaUI, summarizeBlockFromEvent } from "./ollama";
+import { convertToFlashCardFromEvent, DivideTaskIntoSubTasksFromEvent, ollamaUI, summarizeBlockFromEvent, promptFromBlockEvent } from "./ollama";
 import { useAppVisible } from "./utils";
 
 const options = [
@@ -43,6 +43,7 @@ function App() {
     logseq.Editor.registerBlockContextMenuItem("Create a flash card", convertToFlashCardFromEvent)
     logseq.Editor.registerBlockContextMenuItem("Summarize block", summarizeBlockFromEvent)
     logseq.Editor.registerBlockContextMenuItem("Divide into subtasks", DivideTaskIntoSubTasksFromEvent)
+    logseq.Editor.registerBlockContextMenuItem("Prompt from Block", promptFromBlockEvent)
     logseq.App.registerCommandShortcut(
       { "binding": logseq.settings.shortcut },
       ollamaUI
-- 
cgit v1.2.3


From 37c7024b4b4f5afcb00cb0bd6369e2850a4e12c5 Mon Sep 17 00:00:00 2001
From: David Li <taweili@gmail.com>
Date: Wed, 29 Nov 2023 23:33:49 +0800
Subject: Expanding the content of the block with AI

---
 src/App.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'src/App.tsx')

diff --git a/src/App.tsx b/src/App.tsx
index 7366264..b902629 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,6 +1,11 @@
 import React, { useEffect, useRef, useState } from "react";
 import { OllamaCommandPallete } from "./components/OllamaCommandPallete";
-import { convertToFlashCardFromEvent, DivideTaskIntoSubTasksFromEvent, ollamaUI, summarizeBlockFromEvent, promptFromBlockEvent } from "./ollama";
+import {  convertToFlashCardFromEvent, 
+          DivideTaskIntoSubTasksFromEvent, 
+          ollamaUI, 
+          summarizeBlockFromEvent, 
+          promptFromBlockEvent,
+          expandBlockEvent } from "./ollama";
 import { useAppVisible } from "./utils";
 
 const options = [
@@ -43,7 +48,8 @@ function App() {
     logseq.Editor.registerBlockContextMenuItem("Create a flash card", convertToFlashCardFromEvent)
     logseq.Editor.registerBlockContextMenuItem("Summarize block", summarizeBlockFromEvent)
     logseq.Editor.registerBlockContextMenuItem("Divide into subtasks", DivideTaskIntoSubTasksFromEvent)
-    logseq.Editor.registerBlockContextMenuItem("Prompt from Block", promptFromBlockEvent)
+    logseq.Editor.registerBlockContextMenuItem("Ollama: Prompt from Block", promptFromBlockEvent)
+    logseq.Editor.registerBlockContextMenuItem("Ollama: Expand Block", expandBlockEvent)
     logseq.App.registerCommandShortcut(
       { "binding": logseq.settings.shortcut },
       ollamaUI
-- 
cgit v1.2.3

