Browse Source
spawn desktop quickly (#11011)
Give the desktop app a hint to start fast.
brucemacd/runner-completion
v0.9.1-rc0
Daniel Hiltgen
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
2 additions and
2 deletions
-
cmd/start_darwin.go
-
cmd/start_windows.go
|
|
|
@ -23,7 +23,7 @@ func startApp(ctx context.Context, client *api.Client) error { |
|
|
|
return errors.New("could not find ollama app") |
|
|
|
} |
|
|
|
path := strings.Split(link, "Ollama.app") |
|
|
|
if err := exec.Command("/usr/bin/open", "-j", "-a", path[0]+"Ollama.app").Run(); err != nil { |
|
|
|
if err := exec.Command("/usr/bin/open", "-j", "-a", path[0]+"Ollama.app", "--args", "--fast-startup").Run(); err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
return waitForServer(ctx, client) |
|
|
|
|
|
|
|
@ -47,7 +47,7 @@ func startApp(ctx context.Context, client *api.Client) error { |
|
|
|
} |
|
|
|
|
|
|
|
cmd_path := "c:\\Windows\\system32\\cmd.exe" |
|
|
|
cmd := exec.Command(cmd_path, "/c", appExe, "hidden") |
|
|
|
cmd := exec.Command(cmd_path, "/c", appExe, "--hide", "--fast-startup") |
|
|
|
cmd.SysProcAttr = &syscall.SysProcAttr{CreationFlags: 0x08000000, HideWindow: true} |
|
|
|
|
|
|
|
cmd.Stdin = strings.NewReader("") |
|
|
|
|