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
c4484438
Unverified
Commit
c4484438
authored
Jul 22, 2023
by
hoyyeva
Committed by
GitHub
Jul 22, 2023
Browse files
Merge pull request #164 from jmorganca/restart-server
restart server more gracefully
parents
efacd45f
9657314a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
app/package.json
app/package.json
+3
-1
app/src/declarations.d.ts
app/src/declarations.d.ts
+3
-3
app/src/index.ts
app/src/index.ts
+9
-10
No files found.
app/package.json
View file @
c4484438
...
...
@@ -11,7 +11,9 @@
"make"
:
"electron-forge make"
,
"make:sign"
:
"SIGN=1 electron-forge make"
,
"publish"
:
"SIGN=1 electron-forge publish"
,
"lint"
:
"eslint --ext .ts,.tsx ."
"lint"
:
"eslint --ext .ts,.tsx ."
,
"format"
:
"prettier --check . --ignore-path .gitignore"
,
"format:fix"
:
"prettier --write . --ignore-path .gitignore"
},
"keywords"
:
[],
"author"
:
{
...
...
app/src/declarations.d.ts
View file @
c4484438
declare
module
'
*.svg
'
{
const
content
:
string
;
export
default
content
;
}
\ No newline at end of file
const
content
:
string
export
default
content
}
app/src/index.ts
View file @
c4484438
...
...
@@ -67,25 +67,25 @@ function firstRunWindow() {
function
createSystemtray
()
{
let
iconPath
=
nativeTheme
.
shouldUseDarkColors
?
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_icon_16x16Template.png
'
)
?
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_icon_16x16Template.png
'
)
:
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_outline_icon_16x16Template.png
'
)
if
(
app
.
isPackaged
)
{
iconPath
=
nativeTheme
.
shouldUseDarkColors
?
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_16x16Template.png
'
)
:
path
.
join
(
process
.
resourcesPath
,
'
ollama_outline_icon_16x16Template.png
'
)
?
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_16x16Template.png
'
)
:
path
.
join
(
process
.
resourcesPath
,
'
ollama_outline_icon_16x16Template.png
'
)
}
tray
=
new
Tray
(
iconPath
)
nativeTheme
.
on
(
'
updated
'
,
function
theThemeHasChanged
()
{
nativeTheme
.
on
(
'
updated
'
,
function
theThemeHasChanged
()
{
if
(
nativeTheme
.
shouldUseDarkColors
)
{
app
.
isPackaged
?
tray
.
setImage
(
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_16x16Template.png
'
))
app
.
isPackaged
?
tray
.
setImage
(
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_16x16Template.png
'
))
:
tray
.
setImage
(
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_icon_16x16Template.png
'
))
}
else
{
app
.
isPackaged
?
tray
.
setImage
(
path
.
join
(
process
.
resourcesPath
,
'
ollama_outline_icon_16x16Template.png
'
))
app
.
isPackaged
?
tray
.
setImage
(
path
.
join
(
process
.
resourcesPath
,
'
ollama_outline_icon_16x16Template.png
'
))
:
tray
.
setImage
(
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_outline_icon_16x16Template.png
'
))
}
})
...
...
@@ -116,8 +116,7 @@ function server() {
})
function
restart
()
{
logger
.
info
(
'
Restarting the server...
'
)
server
()
setTimeout
(
server
,
3000
)
}
proc
.
on
(
'
exit
'
,
restart
)
...
...
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