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
417a81fd
Unverified
Commit
417a81fd
authored
Nov 20, 2025
by
Jeffrey Morgan
Committed by
GitHub
Nov 20, 2025
Browse files
app: open app instead of always navigating to / on connect (#13164)
parent
dba62ff3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
19 deletions
+10
-19
app/cmd/app/app.go
app/cmd/app/app.go
+5
-3
app/cmd/app/app_darwin.m
app/cmd/app/app_darwin.m
+2
-15
app/cmd/app/app_windows.go
app/cmd/app/app_windows.go
+3
-1
No files found.
app/cmd/app/app.go
View file @
417a81fd
...
...
@@ -397,8 +397,8 @@ func checkUserLoggedIn(uiServerPort int) bool {
// handleConnectURLScheme fetches the connect URL and opens it in the browser
func
handleConnectURLScheme
()
{
if
checkUserLoggedIn
(
uiServerPort
)
{
slog
.
Info
(
"user is already logged in, opening
settings
instead"
)
s
endUIRequestMessage
(
"/"
)
slog
.
Info
(
"user is already logged in, opening
app
instead"
)
s
howWindow
(
wv
.
webview
.
Window
()
)
return
}
...
...
@@ -466,6 +466,8 @@ func handleURLSchemeInCurrentInstance(urlSchemeRequest string) {
if
isConnect
{
handleConnectURLScheme
()
}
else
{
sendUIRequestMessage
(
"/"
)
if
wv
.
webview
!=
nil
{
showWindow
(
wv
.
webview
.
Window
())
}
}
}
app/cmd/app/app_darwin.m
View file @
417a81fd
...
...
@@ -24,27 +24,14 @@ bool firstTimeRun,startHidden; // Set in run before initialization
for
(
NSURL
*
url
in
urls
)
{
if
([
url
.
scheme
isEqualToString
:
@"ollama"
])
{
NSString
*
path
=
url
.
path
;
if
(
!
path
||
[
path
isEqualToString
:
@""
])
{
// For URLs like ollama://settings (without triple slash),
// the "settings" part is parsed as the host, not the path.
// We need to convert it to a path by prepending "/"
if
(
url
.
host
&&
!
[
url
.
host
isEqualToString
:
@""
])
{
path
=
[
@"/"
stringByAppendingString
:
url
.
host
];
}
else
{
path
=
@"/"
;
}
}
if
([
path
isEqualToString
:
@"/connect"
]
||
[
url
.
host
isEqualToString
:
@"connect"
])
{
if
(
path
&&
([
path
isEqualToString
:
@"/connect"
]
||
[
url
.
host
isEqualToString
:
@"connect"
]))
{
// Special case: handle connect by opening browser instead of app
handleConnectURL
();
}
else
{
// Set app to be active and visible
[
NSApp
setActivationPolicy
:
NSApplicationActivationPolicyRegular
];
[
NSApp
activateIgnoringOtherApps
:
YES
];
// Open the path with the UI
[
self
uiRequest
:
path
];
}
break
;
...
...
app/cmd/app/app_windows.go
View file @
417a81fd
...
...
@@ -147,7 +147,9 @@ func handleURLSchemeRequest(urlScheme string) {
if
isConnect
{
handleConnectURLScheme
()
}
else
{
sendUIRequestMessage
(
"/"
)
if
wv
.
webview
!=
nil
{
showWindow
(
wv
.
webview
.
Window
())
}
}
}
...
...
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