@sequent-org/moodboard 1.4.27 → 1.4.28

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequent-org/moodboard",
3
- "version": "1.4.27",
3
+ "version": "1.4.28",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
@@ -1,17 +1,21 @@
1
1
  /**
2
- * Тонкий HTTP-клиент к /api/ai.
2
+ * Тонкий HTTP-клиент к /api/v2/ai.
3
+ *
4
+ * Одна ответственность: общение с backend-эндпоинтами AI.
5
+ * В dev-режиме за same-origin стоит Node-заглушка (server/), в проде —
6
+ * Laravel-пакет futurello/moodboard (контроллер AiController).
7
+ * Контракт payload и SSE-формат у них одинаковый.
3
8
  *
4
- * Одна ответственность: общение с прокси-сервером (server/).
5
9
  * Не знает ни про UI, ни про localStorage. Возвращает обычные данные
6
10
  * и async generator для стриминга.
7
11
  */
8
12
 
9
- const DEFAULT_BASE_URL = '/api/ai';
13
+ const DEFAULT_BASE_URL = '/api/v2/ai';
10
14
 
11
15
  export class AiClient {
12
16
  /**
13
17
  * @param {object} options
14
- * @param {string} [options.baseUrl='/api/ai']
18
+ * @param {string} [options.baseUrl='/api/v2/ai']
15
19
  * @param {typeof fetch} [options.fetchImpl]
16
20
  */
17
21
  constructor(options = {}) {