From 6746a00af8ae75b57f9439810f6aca888a45d1d5 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Sun, 16 Jul 2023 18:29:11 -0700 Subject: [PATCH] app: format `app.tsx` --- app/src/app.tsx | 61 ++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/app/src/app.tsx b/app/src/app.tsx index 6c4d1b3c..9bb94b11 100644 --- a/app/src/app.tsx +++ b/app/src/app.tsx @@ -1,4 +1,4 @@ -import { useState } from "react" +import { useState } from 'react' import copy from 'copy-to-clipboard' import { exec } from 'child_process' import * as path from 'path' @@ -7,11 +7,9 @@ import { DocumentDuplicateIcon } from '@heroicons/react/24/outline' import { app } from '@electron/remote' import OllamaIcon from './ollama.svg' -const ollama = app.isPackaged -? path.join(process.resourcesPath, 'ollama') -: path.resolve(process.cwd(), '..', 'ollama') +const ollama = app.isPackaged ? path.join(process.resourcesPath, 'ollama') : path.resolve(process.cwd(), '..', 'ollama') -function installCLI(callback: () => void) { +async function installCLI(callback: () => void) { const symlinkPath = '/usr/local/bin/ollama' if (fs.existsSync(symlinkPath) && fs.readlinkSync(symlinkPath) === ollama) { @@ -28,7 +26,7 @@ function installCLI(callback: () => void) { callback && callback() return } - + callback && callback() }) } @@ -39,36 +37,34 @@ export default function () { const command = 'ollama run orca' return ( -
+
{step === 0 && ( <> -
-

Welcome to Ollama

-

- Let’s get you up and running with your own large language models. +

+

Welcome to Ollama

+

+ Let's get you up and running with your own large language models.

+
-
+
)} {step === 1 && ( <> -
-

Install the command line

-
-             > ollama
-            
-
+
+

Install the command line

+
> ollama
+
-

+

You will be prompted for administrator access

@@ -90,11 +86,11 @@ export default function () { )} {step === 2 && ( <> -
-

Run your first model

-
-
-
+          
+

Run your first model

+
+
+
                   {command}
                 
-

- Run this command in your favorite terminal. -

+

Run this command in your favorite terminal.

@@ -122,6 +116,5 @@ export default function () { )}
- ) -} \ No newline at end of file +}