aboutsummaryrefslogtreecommitdiff
path: root/src/App.tsx
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2023-12-12 13:26:28 +0200
committeromagdy7 <omar.professional8777@gmail.com>2023-12-12 13:26:28 +0200
commit6b872e11c7925df85a2e14f56429c6d4c8b88891 (patch)
tree22b1135d4a0f6cba75a953ab287b5c436d3f72ae /src/App.tsx
parent689af97a41afc5f709c948dbf463287558caca9f (diff)
downloadollama-logseq-6b872e11c7925df85a2e14f56429c6d4c8b88891.tar.xz
ollama-logseq-6b872e11c7925df85a2e14f56429c6d4c8b88891.zip
Added some polish touches before v1.0.9
Diffstat (limited to 'src/App.tsx')
-rw-r--r--src/App.tsx23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/App.tsx b/src/App.tsx
index b6b6918..0a32968 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -45,20 +45,19 @@ function App() {
return
}
-logseq.Editor.getPageBlocksTree("ollama-logseq-config").then((blocks) => {
- blocks!.forEach((block) => {
- logseq.Editor.getBlockProperty(block.uuid, "ollama-context-menu-title").then((title) => {
- logseq.Editor.getBlockProperty(block.uuid, "ollama-prompt-prefix").then((prompt_prefix) => {
- logseq.Editor.registerBlockContextMenuItem(title, promptFromBlockEventClosure(prompt_prefix))
+ logseq.Editor.getPageBlocksTree("ollama-logseq-config").then((blocks) => {
+ blocks!.forEach((block) => {
+ logseq.Editor.getBlockProperty(block.uuid, "ollama-context-menu-title").then((title) => {
+ logseq.Editor.getBlockProperty(block.uuid, "ollama-prompt-prefix").then((prompt_prefix) => {
+ logseq.Editor.registerBlockContextMenuItem(title, promptFromBlockEventClosure(prompt_prefix))
+ })
+ }).catch((reason) => {
+ })
})
}).catch((reason) => {
+ console.error("Can not find the configuration page named 'ollama-logseq-config'", reason)
})
- })
-}).catch((reason) => {
- console.log("Can not find the configuration page named 'ollama-logseq-config'")
- console.log(reason)
-})
-
+
logseq.Editor.registerSlashCommand("ollama", ollamaUI)
logseq.Editor.registerBlockContextMenuItem("Ollama: Create a flash card", convertToFlashCardFromEvent)
@@ -70,7 +69,7 @@ logseq.Editor.getPageBlocksTree("ollama-logseq-config").then((blocks) => {
logseq.App.registerCommandShortcut(
{ "binding": logseq.settings.shortcut },
ollamaUI
- );
+ );
}, [])
if (visible) {