@agentscope-ai/chat 1.1.60 → 1.1.61-beta.1775186870953
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/components/ChatAnywhere/Input/index.tsx +1 -0
- package/components/ChatAnywhere/hooks/types.ts +5 -0
- package/components/Sender/index.tsx +6 -0
- package/lib/ChatAnywhere/Input/index.js +1 -0
- package/lib/ChatAnywhere/hooks/types.d.ts +5 -0
- package/lib/Sender/index.d.ts +5 -0
- package/lib/Sender/index.js +1 -1
- package/package.json +1 -1
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/README.md +0 -75
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/eslint.config.js +0 -28
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/index.html +0 -12
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/package.json +0 -34
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/src/App.tsx +0 -20
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/src/components/Cards/Weather.tsx +0 -234
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/src/components/Chat/defaultConfig.ts +0 -54
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/src/components/Chat/index.tsx +0 -11
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/src/main.tsx +0 -9
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/src/vite-env.d.ts +0 -4
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/tsconfig.app.json +0 -24
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/tsconfig.json +0 -7
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/tsconfig.node.json +0 -22
- package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/vite.config.ts +0 -7
|
@@ -381,6 +381,7 @@ export default forwardRef(function (_, ref) {
|
|
|
381
381
|
sendDisabled={sendDisabled}
|
|
382
382
|
allowEmptySubmit={(onInput.allowEmptySubmit ?? true) && hasSubmittableFiles}
|
|
383
383
|
header={senderHeader}
|
|
384
|
+
footer={onInput.footer}
|
|
384
385
|
prefix={<>
|
|
385
386
|
{uploadPrefixNodes}
|
|
386
387
|
{onInput?.morePrefixActions}
|
|
@@ -151,6 +151,11 @@ export interface IChatAnywhereConfigOnInput {
|
|
|
151
151
|
* @descriptionEn Input field header components
|
|
152
152
|
*/
|
|
153
153
|
header?: React.ReactElement | React.ReactElement[];
|
|
154
|
+
/**
|
|
155
|
+
* @description 输入框底部组件
|
|
156
|
+
* @descriptionEn Input field footer components
|
|
157
|
+
*/
|
|
158
|
+
footer?: React.ReactNode;
|
|
154
159
|
/**
|
|
155
160
|
* @description 是否启用用户focus时展开输入框组件
|
|
156
161
|
* @descriptionEn Whether to enable the user focus to expand the input box component
|
|
@@ -185,6 +185,11 @@ export interface SenderProps extends Pick<TextareaProps, 'placeholder' | 'onKeyP
|
|
|
185
185
|
* @descriptionEn Header UI
|
|
186
186
|
*/
|
|
187
187
|
header?: React.ReactNode;
|
|
188
|
+
/**
|
|
189
|
+
* @description 底部 UI
|
|
190
|
+
* @descriptionEn Footer UI
|
|
191
|
+
*/
|
|
192
|
+
footer?: React.ReactNode;
|
|
188
193
|
/**
|
|
189
194
|
* @description 最大文本长度
|
|
190
195
|
* @descriptionEn Max content length
|
|
@@ -658,6 +663,7 @@ const ForwardSender = React.forwardRef<SenderRef, SenderProps>((props, ref) => {
|
|
|
658
663
|
</ActionButtonContext.Provider>
|
|
659
664
|
</div>
|
|
660
665
|
</div>
|
|
666
|
+
{props.footer}
|
|
661
667
|
</div>
|
|
662
668
|
</div>
|
|
663
669
|
</>
|
|
@@ -426,6 +426,7 @@ export default /*#__PURE__*/forwardRef(function (_, ref) {
|
|
|
426
426
|
sendDisabled: sendDisabled,
|
|
427
427
|
allowEmptySubmit: ((_onInput$allowEmptySu = onInput.allowEmptySubmit) !== null && _onInput$allowEmptySu !== void 0 ? _onInput$allowEmptySu : true) && hasSubmittableFiles,
|
|
428
428
|
header: senderHeader,
|
|
429
|
+
footer: onInput.footer,
|
|
429
430
|
prefix: /*#__PURE__*/_jsxs(_Fragment, {
|
|
430
431
|
children: [uploadPrefixNodes, onInput === null || onInput === void 0 ? void 0 : onInput.morePrefixActions]
|
|
431
432
|
}),
|
|
@@ -147,6 +147,11 @@ export interface IChatAnywhereConfigOnInput {
|
|
|
147
147
|
* @descriptionEn Input field header components
|
|
148
148
|
*/
|
|
149
149
|
header?: React.ReactElement | React.ReactElement[];
|
|
150
|
+
/**
|
|
151
|
+
* @description 输入框底部组件
|
|
152
|
+
* @descriptionEn Input field footer components
|
|
153
|
+
*/
|
|
154
|
+
footer?: React.ReactNode;
|
|
150
155
|
/**
|
|
151
156
|
* @description 是否启用用户focus时展开输入框组件
|
|
152
157
|
* @descriptionEn Whether to enable the user focus to expand the input box component
|
package/lib/Sender/index.d.ts
CHANGED
|
@@ -147,6 +147,11 @@ export interface SenderProps extends Pick<TextareaProps, 'placeholder' | 'onKeyP
|
|
|
147
147
|
* @descriptionEn Header UI
|
|
148
148
|
*/
|
|
149
149
|
header?: React.ReactNode;
|
|
150
|
+
/**
|
|
151
|
+
* @description 底部 UI
|
|
152
|
+
* @descriptionEn Footer UI
|
|
153
|
+
*/
|
|
154
|
+
footer?: React.ReactNode;
|
|
150
155
|
/**
|
|
151
156
|
* @description 最大文本长度
|
|
152
157
|
* @descriptionEn Max content length
|
package/lib/Sender/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# agentscope-runtime-starter-webui
|
|
2
|
-
|
|
3
|
-
## node version
|
|
4
|
-
|
|
5
|
-
> =22
|
|
6
|
-
|
|
7
|
-
## install
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
$ npm run install
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## dev
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
$ npm run dev
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## build
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
$ npm run build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Core Code
|
|
26
|
-
```tsx
|
|
27
|
-
import { AgentScopeRuntimeWebUI } from '@agentscope-ai/chat';
|
|
28
|
-
|
|
29
|
-
const options = {
|
|
30
|
-
theme: {
|
|
31
|
-
colorPrimary: '#615CED',
|
|
32
|
-
darkMode: true,
|
|
33
|
-
prefix: 'agentscope-runtime-webui',
|
|
34
|
-
leftHeader: {
|
|
35
|
-
logo: 'https://img.alicdn.com/imgextra/i2/O1CN01lmoGYn1kjoXATy4PX_!!6000000004720-2-tps-200-200.png',
|
|
36
|
-
title: 'Runtime WebUI',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
sender: {
|
|
40
|
-
maxLength: 10000,
|
|
41
|
-
disclaimer:
|
|
42
|
-
'AI can also make mistakes, so please check carefully and use it with caution',
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
welcome: {
|
|
46
|
-
greeting: 'Hello, how can I help you today?',
|
|
47
|
-
description:
|
|
48
|
-
'I am a helpful assistant that can help you with your questions.',
|
|
49
|
-
avatar:
|
|
50
|
-
'https://img.alicdn.com/imgextra/i2/O1CN01lmoGYn1kjoXATy4PX_!!6000000004720-2-tps-200-200.png',
|
|
51
|
-
prompts: [
|
|
52
|
-
{
|
|
53
|
-
value: 'Hello',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
value: 'How are you?',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
value: 'What can you do?',
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
api: {
|
|
64
|
-
baseURL: 'YOUR_API_URL',
|
|
65
|
-
token: 'YOUR_API_TOKEN', // is not required
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
<AgentScopeRuntimeWebUI
|
|
71
|
-
options={options}
|
|
72
|
-
/>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js'
|
|
2
|
-
import globals from 'globals'
|
|
3
|
-
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
-
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
-
import tseslint from 'typescript-eslint'
|
|
6
|
-
|
|
7
|
-
export default tseslint.config(
|
|
8
|
-
{ ignores: ['dist'] },
|
|
9
|
-
{
|
|
10
|
-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
-
files: ['**/*.{ts,tsx}'],
|
|
12
|
-
languageOptions: {
|
|
13
|
-
ecmaVersion: 2020,
|
|
14
|
-
globals: globals.browser,
|
|
15
|
-
},
|
|
16
|
-
plugins: {
|
|
17
|
-
'react-hooks': reactHooks,
|
|
18
|
-
'react-refresh': reactRefresh,
|
|
19
|
-
},
|
|
20
|
-
rules: {
|
|
21
|
-
...reactHooks.configs.recommended.rules,
|
|
22
|
-
'react-refresh/only-export-components': [
|
|
23
|
-
'warn',
|
|
24
|
-
{ allowConstantExport: true },
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>AgentScope Runtime Starter WebUI</title>
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<div id="root"></div>
|
|
10
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agentscope-runtime-starter-webui",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite --host",
|
|
8
|
-
"build": "tsc -b && vite build",
|
|
9
|
-
"lint": "eslint .",
|
|
10
|
-
"preview": "vite preview"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@agentscope-ai/icons": "^1.0.46",
|
|
14
|
-
"@agentscope-ai/chat": "1.1.59-beta.1775119922876",
|
|
15
|
-
"@agentscope-ai/design": "^1.0.19",
|
|
16
|
-
"antd": "^5.29.1",
|
|
17
|
-
"antd-style": "^3.7.1",
|
|
18
|
-
"react": "^18",
|
|
19
|
-
"react-dom": "^18"
|
|
20
|
-
},
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"@eslint/js": "^9.25.0",
|
|
23
|
-
"@types/react": "^18",
|
|
24
|
-
"@types/react-dom": "^18",
|
|
25
|
-
"@vitejs/plugin-react": "^4.4.1",
|
|
26
|
-
"eslint": "^9.25.0",
|
|
27
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
28
|
-
"eslint-plugin-react-refresh": "^0.4.19",
|
|
29
|
-
"globals": "^16.0.0",
|
|
30
|
-
"typescript": "~5.8.3",
|
|
31
|
-
"typescript-eslint": "^8.30.1",
|
|
32
|
-
"vite": "^6.3.5"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import Chat from './components/Chat';
|
|
2
|
-
|
|
3
|
-
import { createGlobalStyle } from 'antd-style';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const GlobalStyle = createGlobalStyle`
|
|
7
|
-
* {
|
|
8
|
-
margin: 0;
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
}
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
function App() {
|
|
14
|
-
return <>
|
|
15
|
-
<GlobalStyle />
|
|
16
|
-
<Chat />
|
|
17
|
-
</>
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default App
|
package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/src/components/Cards/Weather.tsx
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { createStyles } from 'antd-style';
|
|
2
|
-
|
|
3
|
-
interface IToolContentItem {
|
|
4
|
-
type: string;
|
|
5
|
-
object?: string;
|
|
6
|
-
status: string;
|
|
7
|
-
delta?: boolean | null;
|
|
8
|
-
msg_id?: string;
|
|
9
|
-
index?: number;
|
|
10
|
-
error?: unknown;
|
|
11
|
-
sequence_number?: number | null;
|
|
12
|
-
data: {
|
|
13
|
-
name: string;
|
|
14
|
-
arguments?: string;
|
|
15
|
-
output?: string;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface IToolMessage {
|
|
20
|
-
id: string;
|
|
21
|
-
object?: string;
|
|
22
|
-
type: string;
|
|
23
|
-
role: string;
|
|
24
|
-
status: string;
|
|
25
|
-
content: IToolContentItem[];
|
|
26
|
-
code?: string | null;
|
|
27
|
-
message?: string | null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface IWeatherItem {
|
|
31
|
-
location: string;
|
|
32
|
-
weather: string;
|
|
33
|
-
temperature: number;
|
|
34
|
-
date: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function parseOutput(data: IToolMessage): IWeatherItem[] {
|
|
38
|
-
const outputContent = data.content[1]?.data;
|
|
39
|
-
try {
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
return JSON.parse(JSON.parse(outputContent.output));
|
|
42
|
-
} catch {
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const weatherIcons: Record<string, string> = {
|
|
48
|
-
sunny: '☀️',
|
|
49
|
-
cloudy: '☁️',
|
|
50
|
-
rainy: '🌧️',
|
|
51
|
-
snowy: '❄️',
|
|
52
|
-
stormy: '⛈️',
|
|
53
|
-
windy: '💨',
|
|
54
|
-
foggy: '🌫️',
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
const weatherLabels: Record<string, string> = {
|
|
58
|
-
sunny: '晴',
|
|
59
|
-
cloudy: '多云',
|
|
60
|
-
rainy: '雨',
|
|
61
|
-
snowy: '雪',
|
|
62
|
-
stormy: '暴风雨',
|
|
63
|
-
windy: '大风',
|
|
64
|
-
foggy: '雾',
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
function formatDate(dateStr: string) {
|
|
68
|
-
const d = new Date(dateStr);
|
|
69
|
-
const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
|
|
70
|
-
const month = d.getMonth() + 1;
|
|
71
|
-
const day = d.getDate();
|
|
72
|
-
const today = new Date();
|
|
73
|
-
const isToday =
|
|
74
|
-
d.getFullYear() === today.getFullYear() &&
|
|
75
|
-
d.getMonth() === today.getMonth() &&
|
|
76
|
-
d.getDate() === today.getDate();
|
|
77
|
-
return {
|
|
78
|
-
weekday: isToday ? '今天' : weekdays[d.getDay()],
|
|
79
|
-
date: `${month}/${day}`,
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const useStyles = createStyles(({ token, css }) => ({
|
|
84
|
-
wrapper: css`
|
|
85
|
-
border-radius: 12px;
|
|
86
|
-
border: 1px solid ${token.colorBorderSecondary};
|
|
87
|
-
background: ${token.colorBgElevated};
|
|
88
|
-
overflow: hidden;
|
|
89
|
-
`,
|
|
90
|
-
header: css`
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
justify-content: space-between;
|
|
94
|
-
padding: 14px 16px;
|
|
95
|
-
border-bottom: 1px solid ${token.colorBorderSecondary};
|
|
96
|
-
`,
|
|
97
|
-
locationRow: css`
|
|
98
|
-
display: flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
gap: 6px;
|
|
101
|
-
`,
|
|
102
|
-
locationIcon: css`
|
|
103
|
-
font-size: 16px;
|
|
104
|
-
line-height: 1;
|
|
105
|
-
`,
|
|
106
|
-
locationText: css`
|
|
107
|
-
font-size: 14px;
|
|
108
|
-
font-weight: 600;
|
|
109
|
-
color: ${token.colorText};
|
|
110
|
-
`,
|
|
111
|
-
todayTemp: css`
|
|
112
|
-
font-size: 22px;
|
|
113
|
-
font-weight: 700;
|
|
114
|
-
color: ${token.colorText};
|
|
115
|
-
display: flex;
|
|
116
|
-
align-items: center;
|
|
117
|
-
gap: 6px;
|
|
118
|
-
`,
|
|
119
|
-
todayWeather: css`
|
|
120
|
-
font-size: 13px;
|
|
121
|
-
font-weight: 400;
|
|
122
|
-
color: ${token.colorTextSecondary};
|
|
123
|
-
`,
|
|
124
|
-
container: css`
|
|
125
|
-
display: flex;
|
|
126
|
-
overflow-x: auto;
|
|
127
|
-
padding: 14px 12px;
|
|
128
|
-
`,
|
|
129
|
-
card: css`
|
|
130
|
-
flex: 1;
|
|
131
|
-
flex-shrink: 0;
|
|
132
|
-
display: flex;
|
|
133
|
-
flex-direction: column;
|
|
134
|
-
align-items: center;
|
|
135
|
-
gap: 8px;
|
|
136
|
-
padding: 10px 12px;
|
|
137
|
-
border-radius: 10px;
|
|
138
|
-
min-width: 72px;
|
|
139
|
-
transition: background 0.2s;
|
|
140
|
-
cursor: default;
|
|
141
|
-
&:hover {
|
|
142
|
-
background: ${token.colorFillQuaternary};
|
|
143
|
-
}
|
|
144
|
-
`,
|
|
145
|
-
todayCard: css`
|
|
146
|
-
background: ${token.colorPrimaryBg};
|
|
147
|
-
&:hover {
|
|
148
|
-
background: ${token.colorPrimaryBgHover};
|
|
149
|
-
}
|
|
150
|
-
`,
|
|
151
|
-
weekday: css`
|
|
152
|
-
font-size: 12px;
|
|
153
|
-
font-weight: 500;
|
|
154
|
-
color: ${token.colorTextSecondary};
|
|
155
|
-
line-height: 1;
|
|
156
|
-
`,
|
|
157
|
-
todayWeekday: css`
|
|
158
|
-
color: ${token.colorPrimary};
|
|
159
|
-
font-weight: 600;
|
|
160
|
-
`,
|
|
161
|
-
date: css`
|
|
162
|
-
font-size: 11px;
|
|
163
|
-
color: ${token.colorTextQuaternary};
|
|
164
|
-
line-height: 1;
|
|
165
|
-
`,
|
|
166
|
-
icon: css`
|
|
167
|
-
font-size: 26px;
|
|
168
|
-
line-height: 1;
|
|
169
|
-
`,
|
|
170
|
-
temp: css`
|
|
171
|
-
font-size: 15px;
|
|
172
|
-
font-weight: 600;
|
|
173
|
-
color: ${token.colorText};
|
|
174
|
-
line-height: 1;
|
|
175
|
-
`,
|
|
176
|
-
label: css`
|
|
177
|
-
font-size: 11px;
|
|
178
|
-
color: ${token.colorTextTertiary};
|
|
179
|
-
line-height: 1;
|
|
180
|
-
`,
|
|
181
|
-
}));
|
|
182
|
-
|
|
183
|
-
export default function Weather(props: { data: IToolMessage }) {
|
|
184
|
-
const items = parseOutput(props.data);
|
|
185
|
-
const { styles, cx } = useStyles();
|
|
186
|
-
|
|
187
|
-
if (!items.length) return null;
|
|
188
|
-
|
|
189
|
-
const todayItem = items.find((_, i) => {
|
|
190
|
-
const { weekday } = formatDate(items[i].date);
|
|
191
|
-
return weekday === '今天';
|
|
192
|
-
}) || items[0];
|
|
193
|
-
|
|
194
|
-
return (
|
|
195
|
-
<div className={styles.wrapper}>
|
|
196
|
-
<div className={styles.header}>
|
|
197
|
-
<div className={styles.locationRow}>
|
|
198
|
-
<span className={styles.locationIcon}>📍</span>
|
|
199
|
-
<span className={styles.locationText}>{items[0].location}</span>
|
|
200
|
-
</div>
|
|
201
|
-
<div className={styles.todayTemp}>
|
|
202
|
-
{weatherIcons[todayItem.weather] || '🌤️'} {todayItem.temperature}°
|
|
203
|
-
<span className={styles.todayWeather}>
|
|
204
|
-
{weatherLabels[todayItem.weather] || todayItem.weather}
|
|
205
|
-
</span>
|
|
206
|
-
</div>
|
|
207
|
-
</div>
|
|
208
|
-
<div className={styles.container}>
|
|
209
|
-
{items.map((item) => {
|
|
210
|
-
const { weekday, date } = formatDate(item.date);
|
|
211
|
-
const isToday = weekday === '今天';
|
|
212
|
-
return (
|
|
213
|
-
<div
|
|
214
|
-
key={item.date}
|
|
215
|
-
className={cx(styles.card, isToday && styles.todayCard)}
|
|
216
|
-
>
|
|
217
|
-
<span className={cx(styles.weekday, isToday && styles.todayWeekday)}>
|
|
218
|
-
{weekday}
|
|
219
|
-
</span>
|
|
220
|
-
<span className={styles.date}>{date}</span>
|
|
221
|
-
<span className={styles.icon}>
|
|
222
|
-
{weatherIcons[item.weather] || '🌤️'}
|
|
223
|
-
</span>
|
|
224
|
-
<span className={styles.temp}>{item.temperature}°</span>
|
|
225
|
-
<span className={styles.label}>
|
|
226
|
-
{weatherLabels[item.weather] || item.weather}
|
|
227
|
-
</span>
|
|
228
|
-
</div>
|
|
229
|
-
);
|
|
230
|
-
})}
|
|
231
|
-
</div>
|
|
232
|
-
</div>
|
|
233
|
-
);
|
|
234
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { IAgentScopeRuntimeWebUIOptions } from '@agentscope-ai/chat';
|
|
2
|
-
import Weather from '../Cards/Weather';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const config: IAgentScopeRuntimeWebUIOptions = {
|
|
6
|
-
customToolRenderConfig: {
|
|
7
|
-
'weather search mock': Weather,
|
|
8
|
-
},
|
|
9
|
-
theme: {
|
|
10
|
-
colorPrimary: '#615CED',
|
|
11
|
-
darkMode: true,
|
|
12
|
-
prefix: 'agentscope-runtime-webui',
|
|
13
|
-
leftHeader: {
|
|
14
|
-
logo: 'https://img.alicdn.com/imgextra/i2/O1CN01lmoGYn1kjoXATy4PX_!!6000000004720-2-tps-200-200.png',
|
|
15
|
-
title: 'Runtime WebUI',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
sender: {
|
|
19
|
-
maxLength: 10000,
|
|
20
|
-
disclaimer:
|
|
21
|
-
'AI can also make mistakes, so please check carefully and use it with caution',
|
|
22
|
-
},
|
|
23
|
-
session: {
|
|
24
|
-
multiple: false,
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
welcome: {
|
|
28
|
-
greeting: 'Hello, how can I help you today?',
|
|
29
|
-
description:
|
|
30
|
-
'I am a helpful assistant that can help you with your questions.',
|
|
31
|
-
avatar:
|
|
32
|
-
'https://img.alicdn.com/imgextra/i2/O1CN01lmoGYn1kjoXATy4PX_!!6000000004720-2-tps-200-200.png',
|
|
33
|
-
prompts: [
|
|
34
|
-
{
|
|
35
|
-
value: 'Hello',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
value: 'How are you?',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
value: 'What can you do?',
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
api: {
|
|
46
|
-
baseURL: 'https://highcodnvvwbdks-ptzchpamaz.cn-beijing.fcapp.run/process',
|
|
47
|
-
token: '32a3e4da-528a-462d-a270-74b10cb21d75',
|
|
48
|
-
enableHistoryMessages: true,
|
|
49
|
-
},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export default config
|
package/components/AgentScopeRuntimeWebUI/bailian-high-code-webui/src/components/Chat/index.tsx
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AgentScopeRuntimeWebUI, IAgentScopeRuntimeWebUIOptions } from '@agentscope-ai/chat';
|
|
2
|
-
import defaultConfig from './defaultConfig';
|
|
3
|
-
|
|
4
|
-
export default function () {
|
|
5
|
-
|
|
6
|
-
return <div style={{ height: '100vh' }}>
|
|
7
|
-
<AgentScopeRuntimeWebUI
|
|
8
|
-
options={defaultConfig as unknown as IAgentScopeRuntimeWebUIOptions}
|
|
9
|
-
/>
|
|
10
|
-
</div>;
|
|
11
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
-
"target": "ES2020",
|
|
5
|
-
"useDefineForClassFields": true,
|
|
6
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
-
"module": "ESNext",
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"allowImportingTsExtensions": true,
|
|
12
|
-
"moduleDetection": "force",
|
|
13
|
-
"noEmit": true,
|
|
14
|
-
"jsx": "react-jsx",
|
|
15
|
-
|
|
16
|
-
"strict": true,
|
|
17
|
-
"noUnusedLocals": true,
|
|
18
|
-
"noUnusedParameters": true,
|
|
19
|
-
"erasableSyntaxOnly": true,
|
|
20
|
-
"noFallthroughCasesInSwitch": true,
|
|
21
|
-
"noUncheckedSideEffectImports": true
|
|
22
|
-
},
|
|
23
|
-
"include": ["src"]
|
|
24
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
-
"target": "ES2022",
|
|
5
|
-
"lib": ["ES2023"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
"moduleResolution": "bundler",
|
|
10
|
-
"allowImportingTsExtensions": true,
|
|
11
|
-
"moduleDetection": "force",
|
|
12
|
-
"noEmit": true,
|
|
13
|
-
|
|
14
|
-
"strict": true,
|
|
15
|
-
"noUnusedLocals": true,
|
|
16
|
-
"noUnusedParameters": true,
|
|
17
|
-
"erasableSyntaxOnly": true,
|
|
18
|
-
"noFallthroughCasesInSwitch": true,
|
|
19
|
-
"noUncheckedSideEffectImports": true
|
|
20
|
-
},
|
|
21
|
-
"include": ["vite.config.ts"]
|
|
22
|
-
}
|