@agentscope-ai/chat 1.1.23 → 1.1.25
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/README.md +20 -7
- package/README.zh-CN.md +20 -7
- package/bin/cli.bundle.js +3116 -0
- package/bin/cli.js +0 -4
- package/lib/AgentScopeRuntimeWebUI/lib/Context/ChatAnywhereOptionsContext.js +1 -1
- package/lib/AgentScopeRuntimeWebUI/starter/OptionsPanel/OptionsEditor.js +1 -1
- package/lib/Bubble/Footer.js +1 -1
- package/lib/Bubble/ScrollToBottom.js +1 -1
- package/lib/ChatAnywhere/Input/index.js +1 -1
- package/lib/ChatAnywhere/SessionList/index.js +1 -1
- package/lib/Conversations/Item.js +1 -1
- package/lib/Markdown/Markdown/defaultComponents/CodeBlock.js +1 -1
- package/lib/Mermaid/index.js +1 -1
- package/lib/OperateCard/OperateCard.js +1 -1
- package/lib/Sender/components/ActionButton.js +1 -1
- package/lib/Sender/index.js +1 -1
- package/lib/StatusCard/index.js +1 -1
- package/package.json +12 -11
package/bin/cli.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
1
|
const { program } = require('commander');
|
|
4
2
|
const { createServer } = require('vite');
|
|
5
3
|
const path = require('path');
|
|
@@ -42,9 +40,7 @@ async function startServer() {
|
|
|
42
40
|
resolve: {
|
|
43
41
|
dedupe: ['react', 'react-dom'],
|
|
44
42
|
alias: {
|
|
45
|
-
'@ali/agentscope-ai-chat': path.resolve(projectRoot, 'components/index.ts'),
|
|
46
43
|
'@agentscope-ai/chat': path.resolve(projectRoot, 'components/index.ts'),
|
|
47
|
-
'@agentscope-ai/design': '@ali/agentscope-ai-design'
|
|
48
44
|
}
|
|
49
45
|
},
|
|
50
46
|
plugins: [
|
|
@@ -7,7 +7,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import { useResponsive } from "ahooks";
|
|
8
8
|
import { createContext, useContextSelector } from 'use-context-selector';
|
|
9
9
|
import { useMemo } from "react";
|
|
10
|
-
import { ConfigProvider, generateTheme, generateThemeByToken } from
|
|
10
|
+
import { ConfigProvider, generateTheme, generateThemeByToken } from '@agentscope-ai/design';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
var ChatAnywhereOptionsContext = createContext(undefined);
|
|
13
13
|
export function useChatAnywhereOptions(selector) {
|
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { Form, Input, ColorPicker, Flex, Divider, InputNumber } from 'antd';
|
|
9
9
|
import { createStyles } from 'antd-style';
|
|
10
|
-
import { Button, IconButton, Switch } from
|
|
10
|
+
import { Button, IconButton, Switch } from '@agentscope-ai/design';
|
|
11
11
|
import { SparkDeleteLine, SparkPlusLine } from '@agentscope-ai/icons';
|
|
12
12
|
import FormItem from "./FormItem";
|
|
13
13
|
import defaultConfig from "./defaultConfig";
|
package/lib/Bubble/Footer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useProviderContext } from "./..";
|
|
3
|
-
import { IconButton } from
|
|
3
|
+
import { IconButton } from '@agentscope-ai/design';
|
|
4
4
|
import Style from "./style/footer";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useProviderContext } from "./..";
|
|
3
3
|
import cls from 'classnames';
|
|
4
4
|
import { useStickToBottomContext } from 'use-stick-to-bottom';
|
|
5
|
-
import { IconButton } from
|
|
5
|
+
import { IconButton } from '@agentscope-ai/design';
|
|
6
6
|
import { SparkDownArrowLine } from '@agentscope-ai/icons';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
var ScrollToBottomButton = function ScrollToBottomButton(_, ref) {
|
|
@@ -20,7 +20,7 @@ import { useChatAnywhere } from "../hooks/ChatAnywhereProvider";
|
|
|
20
20
|
import { useInput } from "../hooks/useInput";
|
|
21
21
|
import { Upload } from 'antd';
|
|
22
22
|
import Style from "./style";
|
|
23
|
-
import { IconButton } from
|
|
23
|
+
import { IconButton } from '@agentscope-ai/design';
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import { createElement as _createElement } from "react";
|
|
26
26
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -2,7 +2,7 @@ import React, { useEffect } from 'react';
|
|
|
2
2
|
import { Conversations } from "../..";
|
|
3
3
|
import cls from 'classnames';
|
|
4
4
|
import { useProviderContext } from "../..";
|
|
5
|
-
import { Button, IconButton } from
|
|
5
|
+
import { Button, IconButton } from '@agentscope-ai/design';
|
|
6
6
|
import { useChatAnywhere } from "../hooks/ChatAnywhereProvider";
|
|
7
7
|
import { useSessionList } from "../hooks/useSessionList";
|
|
8
8
|
import { useMessages } from "../hooks/useMessages";
|
|
@@ -18,7 +18,7 @@ import classnames from 'classnames';
|
|
|
18
18
|
import React, { useEffect, useRef, useState } from 'react';
|
|
19
19
|
import pickAttrs from 'rc-util/lib/pickAttrs';
|
|
20
20
|
import { SparkMoreLine } from '@agentscope-ai/icons';
|
|
21
|
-
import { Button, IconButton, Popover } from
|
|
21
|
+
import { Button, IconButton, Popover } from '@agentscope-ai/design';
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
var editableMap = {};
|
|
@@ -7,7 +7,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
7
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
9
|
import React, { useMemo, useState } from 'react';
|
|
10
|
-
import { CodeBlock as Code, CodeBlockLangExtensionsMap } from
|
|
10
|
+
import { CodeBlock as Code, CodeBlockLangExtensionsMap } from '@agentscope-ai/design';
|
|
11
11
|
import { createStyles } from 'antd-style';
|
|
12
12
|
import { useProviderContext, Mermaid } from "../../..";
|
|
13
13
|
import { theme as AntdTheme } from 'antd';
|
package/lib/Mermaid/index.js
CHANGED
|
@@ -10,7 +10,7 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
|
|
|
10
10
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
11
11
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
12
12
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
13
|
-
import { Image } from
|
|
13
|
+
import { Image } from '@agentscope-ai/design';
|
|
14
14
|
import { useAsyncEffect } from 'ahooks';
|
|
15
15
|
import { theme as AntdTheme } from 'antd';
|
|
16
16
|
import { kebabCase } from 'lodash';
|
|
@@ -13,7 +13,7 @@ import { useProviderContext } from "../Provider";
|
|
|
13
13
|
import Style from "./style";
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { SparkDownLine, SparkUpLine } from '@agentscope-ai/icons';
|
|
16
|
-
import { IconButton } from
|
|
16
|
+
import { IconButton } from '@agentscope-ai/design';
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -7,7 +7,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
7
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
-
import { IconButton } from
|
|
10
|
+
import { IconButton } from '@agentscope-ai/design';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/lib/Sender/index.js
CHANGED
|
@@ -35,7 +35,7 @@ import Style from "./style";
|
|
|
35
35
|
import useSpeech from "./useSpeech";
|
|
36
36
|
import ModeSelect from "./ModeSelect";
|
|
37
37
|
import { SparkEnlargeLine, SparkShrinkLine } from '@agentscope-ai/icons';
|
|
38
|
-
import { IconButton } from
|
|
38
|
+
import { IconButton } from '@agentscope-ai/design';
|
|
39
39
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
40
40
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
41
41
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
package/lib/StatusCard/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { SparkCheckCircleFill, SparkErrorCircleFill, SparkStopCircleLine, SparkT
|
|
|
2
2
|
import { useProviderContext } from "../Provider";
|
|
3
3
|
import Style from "./style";
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import { Button } from
|
|
5
|
+
import { Button } from '@agentscope-ai/design';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentscope-ai/chat",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.25",
|
|
4
4
|
"description": "a free and open-source chat framework for building excellent LLM-powered chat experiences",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"module": "lib/index.js",
|
|
12
12
|
"types": "lib/index.d.ts",
|
|
13
13
|
"bin": {
|
|
14
|
-
"agentscope-runtime-webui": "./bin/cli.js"
|
|
14
|
+
"agentscope-runtime-webui": "./bin/cli.bundle.js"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"lib",
|
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
"components"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "npm run src:build && npm run docs:build",
|
|
22
|
+
"build": "npm run build:cli && npm run src:build && npm run docs:build",
|
|
23
|
+
"build:cli": "node scripts/build-cli.js",
|
|
23
24
|
"build:doc-api": "rm -rf node_modules && tnpm i && npm run start",
|
|
24
|
-
"build:publish": "NPM_PUBLISH=1 npm run src:build",
|
|
25
|
+
"build:publish": "NPM_PUBLISH=1 npm run build:cli && npm run src:build",
|
|
25
26
|
"build:watch": "father dev",
|
|
26
27
|
"dev": "dumi dev",
|
|
27
28
|
"docs:build": "dumi build",
|
|
@@ -60,8 +61,6 @@
|
|
|
60
61
|
"dependencies": {
|
|
61
62
|
"@agentscope-ai/design": "^1.0.0",
|
|
62
63
|
"@agentscope-ai/icons": "^1.0.32",
|
|
63
|
-
"commander": "^12.1.0",
|
|
64
|
-
"vite": "^5.4.11",
|
|
65
64
|
"@agentscope-ai/icons-override-antd": "^6.0.0",
|
|
66
65
|
"@agentscope-ai/icons-svg-override-antd": "^4.4.2",
|
|
67
66
|
"@ant-design/cssinjs-utils": "^1.1.3",
|
|
@@ -107,10 +106,10 @@
|
|
|
107
106
|
"zustand": "^5.0.3"
|
|
108
107
|
},
|
|
109
108
|
"devDependencies": {
|
|
110
|
-
"
|
|
111
|
-
"@
|
|
112
|
-
"@
|
|
113
|
-
"@
|
|
109
|
+
"vite": "^5.4.11",
|
|
110
|
+
"@agentscope-ai/dumi-theme-spark": "0.0.98",
|
|
111
|
+
"@alibot/dumi-plugin-api-parser": "1.0.3",
|
|
112
|
+
"@alibot/dumi-plugin-llms": "1.0.4",
|
|
114
113
|
"@ant-design/charts": "^2.6.2",
|
|
115
114
|
"@commitlint/cli": "^17.1.2",
|
|
116
115
|
"@commitlint/config-conventional": "^17.1.0",
|
|
@@ -120,7 +119,9 @@
|
|
|
120
119
|
"@umijs/lint": "^4.0.0",
|
|
121
120
|
"@umijs/plugins": "^4.4.11",
|
|
122
121
|
"antd": "^5.18.0",
|
|
122
|
+
"commander": "^12.1.0",
|
|
123
123
|
"dumi": "^2.4.13",
|
|
124
|
+
"esbuild": "^0.19.12",
|
|
124
125
|
"eslint": "^8.23.0",
|
|
125
126
|
"father": "^4.1.0",
|
|
126
127
|
"husky": "^8.0.1",
|
|
@@ -144,4 +145,4 @@
|
|
|
144
145
|
"react-dom": ">=16.9.0"
|
|
145
146
|
},
|
|
146
147
|
"authors": []
|
|
147
|
-
}
|
|
148
|
+
}
|