MCPcopy Create free account
hub / github.com/continuedev/continue / startLocalOllama

Function startLocalOllama

core/util/ollamaHelper.ts:22–52  ·  view source on GitHub ↗
(ide: IDE)

Source from the content-addressed store, hash-verified

20}
21
22export async function startLocalOllama(ide: IDE): Promise<any> {
23 let startCommand: string | undefined;
24
25 switch (process.platform) {
26 case "darwin": //MacOS
27 startCommand = "open -a Ollama.app\n";
28 break;
29
30 case "win32": //Windows
31 startCommand = '& "ollama app.exe"\n';
32 break;
33
34 default: //Linux...
35 const start_script_path = path.resolve(__dirname, "./start_ollama.sh");
36 if (await ide.fileExists(`file:/${start_script_path}`)) {
37 startCommand = `set -e && chmod +x ${start_script_path} && ${start_script_path}\n`;
38 console.log(`Ollama Linux startup script at : ${start_script_path}`);
39 } else {
40 return ide.showToast(
41 "error",
42 `Cannot start Ollama: could not find ${start_script_path}!`,
43 );
44 }
45 }
46 if (startCommand) {
47 return ide.runCommand(startCommand, {
48 reuseTerminal: true,
49 terminalName: "Start Ollama",
50 });
51 }
52}
53
54export async function getRemoteModelInfo(
55 modelId: string,

Callers 1

getCommandsMapFunction · 0.90

Calls 4

fileExistsMethod · 0.65
logMethod · 0.65
showToastMethod · 0.65
runCommandMethod · 0.65

Tested by

no test coverage detected