Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/lib/onboard/windows-host-ollama.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,25 @@ describe("detectWindowsHostOllama", () => {
loopbackOnly: false,
});
});

it("returns uninstalled when not on WSL", () => {
vi.mocked(isWsl).mockReturnValue(false);

expect(detectWindowsHostOllama()).toEqual({
installed: false,
installedPath: "",
loopbackOnly: false,
});
expect(runCapture).not.toHaveBeenCalled();
});

it("returns uninstalled when all Windows Ollama probes miss", () => {
runCapture.mockImplementation(() => "");

expect(detectWindowsHostOllama()).toEqual({
installed: false,
installedPath: "",
loopbackOnly: false,
});
});
});
2 changes: 2 additions & 0 deletions src/lib/onboard/windows-host-ollama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export function detectWindowsHostOllama(): WindowsHostOllamaState {
return { installed: false, installedPath: "", loopbackOnly: false };
}
const installedPath = probeInstalledPath();
// `installed` reflects binary presence on disk, not a live daemon. Onboard
// still gates Start/Restart on reachability and loopback binding (#3949).
const installed = installedPath.length > 0;
const loopbackOnly = installed ? probeLoopbackOnly() : false;
return { installed, installedPath, loopbackOnly };
Expand Down