@@ -28209,6 +28209,9 @@ var package_default = {
2820928209 ini: "^3.0.1",
2821028210 inquirer: "^9.1.4",
2821128211 openai: "^3.2.1"
28212+ },
28213+ overrides: {
28214+ "whatwg-url": "13.0.0"
2821228215 }
2821328216};
2821428217
@@ -30964,7 +30967,8 @@ var getConfig = ({
3096430967 OCO_AZURE_ENDPOINT: process.env.OCO_AZURE_ENDPOINT || void 0,
3096530968 OCO_TEST_MOCK_TYPE: process.env.OCO_TEST_MOCK_TYPE || "commit-message",
3096630969 OCO_FLOWISE_ENDPOINT: process.env.OCO_FLOWISE_ENDPOINT || ":",
30967- OCO_FLOWISE_API_KEY: process.env.OCO_FLOWISE_API_KEY || void 0
30970+ OCO_FLOWISE_API_KEY: process.env.OCO_FLOWISE_API_KEY || void 0,
30971+ OCO_OLLAMA_API_URL: process.env.OCO_OLLAMA_API_URL || void 0
3096830972 };
3096930973 const configExists = (0, import_fs.existsSync)(configPath);
3097030974 if (!configExists)
@@ -34231,11 +34235,9 @@ if (provider === "openai" && !apiKey && command !== "config" && mode !== "set" /
3423134235 process.exit(1);
3423234236}
3423334237var MODEL = config3?.OCO_MODEL || "gpt-3.5-turbo";
34234- if (provider === "openai" && !MODEL_LIST.openai.includes( MODEL) && command !== "config" && mode !== "set" /* set */) {
34238+ if (provider === "openai" && MODEL.typeof !== "string" && command !== "config" && mode !== "set" /* set */) {
3423534239 ce(
34236- `${source_default.red("\u2716")} Unsupported model ${MODEL} for OpenAI. Supported models are: ${MODEL_LIST.openai.join(
34237- ", "
34238- )}`
34240+ `${source_default.red("\u2716")} Unsupported model ${MODEL}. The model can be any string, but the current configuration is not supported.`
3423934241 );
3424034242 process.exit(1);
3424134243}
@@ -37280,11 +37282,9 @@ if (provider2 === "anthropic" && !apiKey2 && command2 !== "config" && mode2 !==
3728037282 process.exit(1);
3728137283}
3728237284var MODEL2 = config5?.OCO_MODEL;
37283- if (provider2 === "anthropic" && !MODEL_LIST.anthropic.includes( MODEL2) && command2 !== "config" && mode2 !== "set" /* set */) {
37285+ if (provider2 === "anthropic" && MODEL2.typeof !== "string" && command2 !== "config" && mode2 !== "set" /* set */) {
3728437286 ce(
37285- `${source_default.red("\u2716")} Unsupported model ${MODEL2} for Anthropic. Supported models are: ${MODEL_LIST.anthropic.join(
37286- ", "
37287- )}`
37287+ `${source_default.red("\u2716")} Unsupported model ${MODEL2}. The model can be any string, but the current configuration is not supported.`
3728837288 );
3728937289 process.exit(1);
3729037290}
@@ -41076,9 +41076,11 @@ function getEngine() {
4107641076 const provider4 = config12?.OCO_AI_PROVIDER;
4107741077 if (provider4?.startsWith("ollama")) {
4107841078 const ollamaAi = new OllamaAi();
41079- const model = provider4.split("/")[1] ;
41080- if (model)
41079+ const model = provider4.substring("ollama/".length) ;
41080+ if (model) {
4108141081 ollamaAi.setModel(model);
41082+ ollamaAi.setUrl(config12?.OCO_OLLAMA_API_URL);
41083+ }
4108241084 return ollamaAi;
4108341085 } else if (provider4 == "anthropic") {
4108441086 return new AnthropicAi();
0 commit comments