@automattic/jetpack-ai-client 0.33.27 → 0.33.29

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/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.33.29] - 2026-01-14
9
+ ### Changed
10
+ - Internal updates.
11
+
12
+ ## [0.33.28] - 2026-01-12
13
+ ### Changed
14
+ - Update package dependencies. [#46456]
15
+
8
16
  ## [0.33.27] - 2026-01-06
9
17
  ### Added
10
18
  - Add site language code to AI request. [#46410]
@@ -770,6 +778,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
770
778
  - AI Client: stop using smart document visibility handling on the fetchEventSource library, so it does not restart the completion when changing tabs. [#32004]
771
779
  - Updated package dependencies. [#31468] [#31659] [#31785]
772
780
 
781
+ [0.33.29]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.28...v0.33.29
782
+ [0.33.28]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.27...v0.33.28
773
783
  [0.33.27]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.26...v0.33.27
774
784
  [0.33.26]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.25...v0.33.26
775
785
  [0.33.25]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.24...v0.33.25
@@ -42,9 +42,11 @@ export default async function askQuestionSync(question, options = {}) {
42
42
  return Promise.reject(error);
43
43
  }
44
44
  const messages = Array.isArray(question) ? { messages: question } : { question: question };
45
+ const { languageCode, ...otherOptions } = options;
45
46
  const body = {
46
47
  ...messages,
47
- ...options,
48
+ ...otherOptions,
49
+ language_code: languageCode,
48
50
  stream: false,
49
51
  };
50
52
  const headers = {
@@ -1,6 +1,6 @@
1
1
  declare const usePostContent: () => {
2
2
  getPostContent: (preprocess?: (serialized: string) => string) => string;
3
- isEditedPostEmpty: any;
3
+ isEditedPostEmpty: () => boolean;
4
4
  getSerializedPostContent: () => any;
5
5
  };
6
6
  export default usePostContent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-ai-client",
3
- "version": "0.33.27",
3
+ "version": "0.33.29",
4
4
  "private": false,
5
5
  "description": "A JS client for consuming Jetpack AI services",
6
6
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/ai-client/#readme",
@@ -33,30 +33,30 @@
33
33
  "watch": "tsc --watch --pretty"
34
34
  },
35
35
  "dependencies": {
36
- "@automattic/jetpack-base-styles": "^1.0.12",
37
- "@automattic/jetpack-components": "^1.4.3",
38
- "@automattic/jetpack-connection": "^1.4.24",
36
+ "@automattic/jetpack-base-styles": "^1.0.13",
37
+ "@automattic/jetpack-components": "^1.4.5",
38
+ "@automattic/jetpack-connection": "^1.4.26",
39
39
  "@automattic/jetpack-explat": "workspace:*",
40
40
  "@automattic/jetpack-script-data": "^0.5.4",
41
- "@automattic/jetpack-shared-extension-utils": "^1.4.3",
41
+ "@automattic/jetpack-shared-extension-utils": "^1.4.5",
42
42
  "@microsoft/fetch-event-source": "2.0.1",
43
43
  "@types/jest": "30.0.0",
44
44
  "@types/react": "18.3.26",
45
45
  "@types/wordpress__block-editor": "11.5.17",
46
- "@wordpress/api-fetch": "7.36.0",
47
- "@wordpress/base-styles": "6.12.0",
48
- "@wordpress/blob": "4.36.0",
49
- "@wordpress/block-editor": "15.9.0",
50
- "@wordpress/blocks": "15.9.0",
51
- "@wordpress/components": "30.9.0",
52
- "@wordpress/compose": "7.36.0",
53
- "@wordpress/data": "10.36.0",
54
- "@wordpress/editor": "14.36.0",
55
- "@wordpress/element": "6.36.0",
56
- "@wordpress/i18n": "6.9.0",
57
- "@wordpress/icons": "11.3.0",
58
- "@wordpress/primitives": "4.36.0",
59
- "@wordpress/url": "4.36.0",
46
+ "@wordpress/api-fetch": "7.37.0",
47
+ "@wordpress/base-styles": "6.13.0",
48
+ "@wordpress/blob": "4.37.0",
49
+ "@wordpress/block-editor": "15.10.0",
50
+ "@wordpress/blocks": "15.10.0",
51
+ "@wordpress/components": "31.0.0",
52
+ "@wordpress/compose": "7.37.0",
53
+ "@wordpress/data": "10.37.0",
54
+ "@wordpress/editor": "14.37.0",
55
+ "@wordpress/element": "6.37.0",
56
+ "@wordpress/i18n": "6.10.0",
57
+ "@wordpress/icons": "11.4.0",
58
+ "@wordpress/primitives": "4.37.0",
59
+ "@wordpress/url": "4.37.0",
60
60
  "clsx": "2.1.1",
61
61
  "debug": "4.4.3",
62
62
  "markdown-it": "14.1.0",
@@ -71,7 +71,6 @@
71
71
  "@types/markdown-it": "14.1.2",
72
72
  "@types/turndown": "5.0.6",
73
73
  "jest": "30.2.0",
74
- "jest-environment-jsdom": "30.2.0",
75
74
  "storybook": "10.1.10",
76
75
  "typescript": "5.9.3"
77
76
  }
@@ -62,9 +62,12 @@ export default async function askQuestionSync(
62
62
 
63
63
  const messages = Array.isArray( question ) ? { messages: question } : { question: question };
64
64
 
65
+ const { languageCode, ...otherOptions } = options;
66
+
65
67
  const body = {
66
68
  ...messages,
67
- ...options,
69
+ ...otherOptions,
70
+ language_code: languageCode,
68
71
  stream: false,
69
72
  };
70
73