Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
d2bfaeac
Commit
d2bfaeac
authored
Jul 21, 2023
by
Eva Ho
Browse files
format code
parent
0768b1b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
app/src/index.ts
app/src/index.ts
+14
-14
No files found.
app/src/index.ts
View file @
d2bfaeac
...
...
@@ -103,33 +103,33 @@ if (require('electron-squirrel-startup')) {
function
server
()
{
const
binary
=
app
.
isPackaged
?
path
.
join
(
process
.
resourcesPath
,
'
ollama
'
)
:
path
.
resolve
(
process
.
cwd
(),
'
..
'
,
'
ollama
'
)
;
:
path
.
resolve
(
process
.
cwd
(),
'
..
'
,
'
ollama
'
)
const
proc
=
spawn
(
binary
,
[
'
serve
'
])
;
const
proc
=
spawn
(
binary
,
[
'
serve
'
])
proc
.
stdout
.
on
(
'
data
'
,
data
=>
{
logger
.
info
(
data
.
toString
().
trim
())
;
})
;
logger
.
info
(
data
.
toString
().
trim
())
})
proc
.
stderr
.
on
(
'
data
'
,
data
=>
{
logger
.
error
(
data
.
toString
().
trim
())
;
})
;
logger
.
error
(
data
.
toString
().
trim
())
})
proc
.
on
(
'
exit
'
,
(
code
,
signal
)
=>
{
if
(
code
===
0
||
code
===
null
)
{
logger
.
info
(
'
Server has stopped.
'
)
;
setTimeout
(
server
,
5000
)
;
logger
.
info
(
'
Server has stopped.
'
)
setTimeout
(
server
,
5000
)
}
else
{
logger
.
error
(
`Server exited with code:
${
code
}
, signal:
${
signal
}
`
)
;
setTimeout
(
server
,
3000
)
;
logger
.
error
(
`Server exited with code:
${
code
}
, signal:
${
signal
}
`
)
setTimeout
(
server
,
3000
)
}
})
;
})
app
.
on
(
'
before-quit
'
,
()
=>
{
proc
.
off
(
'
exit
'
,
server
)
;
proc
.
kill
()
;
})
;
proc
.
off
(
'
exit
'
,
server
)
proc
.
kill
()
})
}
if
(
process
.
platform
===
'
darwin
'
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment