@hongymagic/q 2026.227.0 → 2026.227.1-next.c36cfce

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/q.js +9 -2
  2. package/package.json +1 -1
package/dist/q.js CHANGED
@@ -14591,7 +14591,7 @@ import { parseArgs } from "node:util";
14591
14591
  // package.json
14592
14592
  var package_default = {
14593
14593
  name: "@hongymagic/q",
14594
- version: "2026.227.0",
14594
+ version: "2026.227.1-next.c36cfce",
14595
14595
  description: "Quick AI answers from the command line",
14596
14596
  main: "dist/q.js",
14597
14597
  type: "module",
@@ -53282,9 +53282,16 @@ function createOllama(options = {}) {
53282
53282
  var ollama = createOllama();
53283
53283
 
53284
53284
  // src/providers/ollama.ts
53285
+ var DEFAULT_BASE_URL = "http://localhost:11434/api";
53286
+ function normaliseBaseURL(url2) {
53287
+ if (!url2)
53288
+ return DEFAULT_BASE_URL;
53289
+ const trimmed = url2.replace(/\/+$/, "");
53290
+ return trimmed.endsWith("/api") ? trimmed : `${trimmed}/api`;
53291
+ }
53285
53292
  function createOllamaProvider(config2) {
53286
53293
  return createOllama({
53287
- baseURL: config2.base_url ?? "http://localhost:11434/api"
53294
+ baseURL: normaliseBaseURL(config2.base_url)
53288
53295
  });
53289
53296
  }
53290
53297
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hongymagic/q",
3
- "version": "2026.227.0",
3
+ "version": "2026.227.1-next.c36cfce",
4
4
  "description": "Quick AI answers from the command line",
5
5
  "main": "dist/q.js",
6
6
  "type": "module",