@automattic/jetpack-ai-client 0.33.27 → 0.33.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/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ 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.28] - 2026-01-12
9
+ ### Changed
10
+ - Update package dependencies. [#46456]
11
+
8
12
  ## [0.33.27] - 2026-01-06
9
13
  ### Added
10
14
  - Add site language code to AI request. [#46410]
@@ -770,6 +774,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
770
774
  - AI Client: stop using smart document visibility handling on the fetchEventSource library, so it does not restart the completion when changing tabs. [#32004]
771
775
  - Updated package dependencies. [#31468] [#31659] [#31785]
772
776
 
777
+ [0.33.28]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.27...v0.33.28
773
778
  [0.33.27]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.26...v0.33.27
774
779
  [0.33.26]: https://github.com/Automattic/jetpack-ai-client/compare/v0.33.25...v0.33.26
775
780
  [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.28",
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.4",
38
+ "@automattic/jetpack-connection": "^1.4.25",
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.4",
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",
@@ -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