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
2ed26f00
Commit
2ed26f00
authored
Jul 11, 2023
by
Jeffrey Morgan
Browse files
tweak logging
parent
e64ef69e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
app/src/index.ts
app/src/index.ts
+9
-8
No files found.
app/src/index.ts
View file @
2ed26f00
...
@@ -45,7 +45,6 @@ const createSystemtray = () => {
...
@@ -45,7 +45,6 @@ const createSystemtray = () => {
tray
.
setToolTip
(
'
Ollama
'
)
tray
.
setToolTip
(
'
Ollama
'
)
}
}
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if
(
require
(
'
electron-squirrel-startup
'
))
{
if
(
require
(
'
electron-squirrel-startup
'
))
{
app
.
quit
()
app
.
quit
()
}
}
...
@@ -57,12 +56,14 @@ function server() {
...
@@ -57,12 +56,14 @@ function server() {
?
path
.
join
(
process
.
resourcesPath
,
'
ollama
'
)
?
path
.
join
(
process
.
resourcesPath
,
'
ollama
'
)
:
path
.
resolve
(
process
.
cwd
(),
'
..
'
,
'
ollama
'
)
:
path
.
resolve
(
process
.
cwd
(),
'
..
'
,
'
ollama
'
)
const
proc
=
spawn
(
binary
,
[
'
serve
'
],
{
cwd
:
path
.
dirname
(
binary
)
})
const
proc
=
spawn
(
binary
,
[
'
serve
'
])
proc
.
stdout
.
on
(
'
data
'
,
data
=>
{
proc
.
stdout
.
on
(
'
data
'
,
data
=>
{
logger
.
info
(
`server:
${
data
.
toString
()
}
`
)
logger
.
info
(
data
.
toString
())
})
})
proc
.
stderr
.
on
(
'
data
'
,
data
=>
{
proc
.
stderr
.
on
(
'
data
'
,
data
=>
{
logger
.
info
(
`server:
${
data
.
toString
()
}
`
)
logger
.
error
(
data
.
toString
())
})
})
proc
.
on
(
'
exit
'
,
()
=>
{
proc
.
on
(
'
exit
'
,
()
=>
{
...
@@ -101,12 +102,12 @@ function installCLI() {
...
@@ -101,12 +102,12 @@ function installCLI() {
`
`
exec
(
`osascript -e '
${
command
}
'`
,
(
error
:
Error
|
null
,
stdout
:
string
,
stderr
:
string
)
=>
{
exec
(
`osascript -e '
${
command
}
'`
,
(
error
:
Error
|
null
,
stdout
:
string
,
stderr
:
string
)
=>
{
if
(
error
)
{
if
(
error
)
{
logger
.
error
(
`
CLI
:
F
ailed to install
CLI -
${
error
.
message
}
`
)
logger
.
error
(
`
cli
:
f
ailed to install
cli:
${
error
.
message
}
`
)
return
return
}
}
logger
.
info
(
`CLI:
${
stdout
}
}`
)
logger
.
info
(
stdout
)
logger
.
error
(
`CLI:
${
stderr
}
`
)
logger
.
error
(
stderr
)
})
})
}
}
})
})
...
@@ -200,7 +201,7 @@ if (app.isPackaged) {
...
@@ -200,7 +201,7 @@ if (app.isPackaged) {
}
}
autoUpdater
.
on
(
'
error
'
,
e
=>
{
autoUpdater
.
on
(
'
error
'
,
e
=>
{
logger
.
error
(
`
auto updater:
update check failed -
${
e
.
message
}
`
)
logger
.
error
(
`update check failed -
${
e
.
message
}
`
)
})
})
autoUpdater
.
on
(
'
update-downloaded
'
,
(
event
,
releaseNotes
,
releaseName
)
=>
{
autoUpdater
.
on
(
'
update-downloaded
'
,
(
event
,
releaseNotes
,
releaseName
)
=>
{
...
...
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