@mujian/js-sdk 0.0.6-beta.9 → 0.0.6-beta.91
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/dist/events/index.d.ts +31 -3
- package/dist/index.d.ts +16 -39
- package/dist/index.js +360 -62
- package/dist/lite.d.ts +73 -0
- package/dist/lite.js +119 -0
- package/dist/modules/ai/chat/chat.d.ts +46 -4
- package/dist/modules/ai/chat/index.d.ts +1 -1
- package/dist/modules/ai/chat/message/index.d.ts +3 -7
- package/dist/modules/ai/chat/settings/index.d.ts +1 -2
- package/dist/modules/ai/chat/settings/persona.d.ts +0 -8
- package/dist/modules/ai/index.d.ts +3 -2
- package/dist/modules/ai/openai/chat.d.ts +22 -0
- package/dist/modules/ai/openai/completions.d.ts +17 -0
- package/dist/modules/ai/openai/images.d.ts +17 -0
- package/dist/modules/ai/openai/index.d.ts +4 -0
- package/dist/modules/ai/openai/responses.d.ts +18 -0
- package/dist/modules/ai/text/index.d.ts +9 -2
- package/dist/modules/config.d.ts +17 -0
- package/dist/modules/utils/clipboard.d.ts +5 -0
- package/dist/modules/utils/index.d.ts +4 -0
- package/dist/react/chat/useChat/index.d.ts +34 -8
- package/dist/react/chat/useChat/inner/chatStreaming.d.ts +4 -2
- package/dist/react/chat/useChat/message.d.ts +31 -13
- package/dist/react/components/MdRenderer/index.d.ts +5 -3
- package/dist/react/components/MdRenderer/utils/height.d.ts +0 -0
- package/dist/react/components/MdRenderer/utils/iframe.d.ts +9 -0
- package/dist/react/components/MdRenderer/utils/scripts.d.ts +4 -0
- package/dist/react/components/MujianSpinner/index.d.ts +7 -0
- package/dist/react/components/index.d.ts +1 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/mjEngine/index.d.ts +48 -0
- package/dist/react.css +65 -4
- package/dist/react.js +834 -188
- package/dist/types/index.d.ts +39 -0
- package/dist/umd/index.js +2 -0
- package/dist/umd/index.js.LICENSE.txt +7 -0
- package/dist/umd/lite.js +2 -0
- package/dist/umd/lite.js.LICENSE.txt +7 -0
- package/dist/umd/react.css +1 -0
- package/dist/umd/react.js +133 -0
- package/dist/umd/react.js.LICENSE.txt +31 -0
- package/dist/utils/is-network-error.d.ts +1 -0
- package/dist/utils/log.d.ts +4 -0
- package/package.json +16 -6
- package/dist/modules/ai/chat/settings/model.d.ts +0 -24
- /package/dist/react/components/MdRenderer/{utils.d.ts → utils/md.d.ts} +0 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */
|
|
2
|
+
|
|
3
|
+
/*! showdown v 2.1.0 - 21-04-2022 */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
postmate - A powerful, simple, promise-based postMessage library
|
|
7
|
+
@version v1.5.2
|
|
8
|
+
@link https://github.com/dollarshaveclub/postmate
|
|
9
|
+
@author Jacob Kelley <jakie8@gmail.com>
|
|
10
|
+
@license MIT
|
|
11
|
+
**/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @license React
|
|
15
|
+
* react-dom.production.js
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @license React
|
|
25
|
+
* react-jsx-runtime.production.js
|
|
26
|
+
*
|
|
27
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isNetworkError(message: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mujian/js-sdk",
|
|
3
|
-
"version": "0.0.6-beta.
|
|
3
|
+
"version": "0.0.6-beta.91",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"types": "./dist/react/index.d.ts",
|
|
15
15
|
"import": "./dist/react.js"
|
|
16
16
|
},
|
|
17
|
+
"./lite": {
|
|
18
|
+
"types": "./dist/lite.d.ts",
|
|
19
|
+
"import": "./dist/lite.js"
|
|
20
|
+
},
|
|
17
21
|
"./react.css": {
|
|
18
22
|
"import": "./dist/react.css"
|
|
19
23
|
}
|
|
@@ -39,13 +43,16 @@
|
|
|
39
43
|
"upload:doc": "node upload.js"
|
|
40
44
|
},
|
|
41
45
|
"devDependencies": {
|
|
46
|
+
"@types/lodash-es": "4.17.12",
|
|
47
|
+
"openai": "^6.9.1",
|
|
42
48
|
"rimraf": "^6.0.1",
|
|
43
49
|
"@rsbuild/core": "~1.5.12",
|
|
44
|
-
"rspress": "^
|
|
50
|
+
"@rspress/core": "^2.0.19",
|
|
45
51
|
"jsdom": "^26.1.0",
|
|
46
|
-
"@rspress/plugin-typedoc": "^
|
|
47
|
-
"@rspress/plugin-api-docgen": "^
|
|
48
|
-
"@rspress/plugin-preview": "^
|
|
52
|
+
"@rspress/plugin-typedoc": "^2.0.19",
|
|
53
|
+
"@rspress/plugin-api-docgen": "^2.0.19",
|
|
54
|
+
"@rspress/plugin-preview": "^2.0.19",
|
|
55
|
+
"@mujian/rspress-plugin-sakana-widget": "workspace:",
|
|
49
56
|
"rspress-plugin-mermaid": "0.3.0",
|
|
50
57
|
"rspress-plugin-align-image": "0.3.0",
|
|
51
58
|
"rspress-plugin-file-tree": "0.4.0",
|
|
@@ -76,11 +83,14 @@
|
|
|
76
83
|
},
|
|
77
84
|
"dependencies": {
|
|
78
85
|
"dompurify": "^3.2.6",
|
|
86
|
+
"uuid": "^13.0.0",
|
|
79
87
|
"@adobe/css-tools": "^4.4.4",
|
|
80
88
|
"showdown": "^2.1.0",
|
|
81
89
|
"postmate": "^1.5.2",
|
|
82
90
|
"ahooks": "~3.9.5",
|
|
83
|
-
"
|
|
91
|
+
"lodash-es": "4.17.21",
|
|
92
|
+
"virtua": "~0.51.0",
|
|
93
|
+
"immer": "~11.1.8"
|
|
84
94
|
},
|
|
85
95
|
"peerDependencies": {
|
|
86
96
|
"react": "~19.1.1",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { MujianSdk } from '../../../../index.ts';
|
|
2
|
-
import type { ModelInfo } from '../../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* 获取当前激活的模型
|
|
5
|
-
* @returns 模型ID
|
|
6
|
-
*/
|
|
7
|
-
export declare const getActive: (
|
|
8
|
-
/** @hidden */
|
|
9
|
-
this: MujianSdk) => Promise<string>;
|
|
10
|
-
/**
|
|
11
|
-
* 设置当前激活的模型
|
|
12
|
-
* @param modelId
|
|
13
|
-
* @returns 模型ID
|
|
14
|
-
*/
|
|
15
|
-
export declare const setActive: (
|
|
16
|
-
/** @hidden */
|
|
17
|
-
this: MujianSdk, modelId: string) => Promise<string>;
|
|
18
|
-
/**
|
|
19
|
-
* 获取模型列表
|
|
20
|
-
* @returns 模型列表
|
|
21
|
-
*/
|
|
22
|
-
export declare const getAll: (
|
|
23
|
-
/** @hidden */
|
|
24
|
-
this: MujianSdk) => Promise<ModelInfo[]>;
|
|
File without changes
|