feat: init
|
|
@ -42,7 +42,7 @@
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"prettier/prettier": ["warn", { "trailingComma": "es5", "printWidth": 200 }],
|
"prettier/prettier": ["warn", { "trailingComma": "es5", "printWidth": 200 }],
|
||||||
"linebreak-style": ["error", "unix"],
|
"linebreak-style": "off",
|
||||||
"no-console": ["warn", { "allow": ["warn", "error", "log"] }],
|
"no-console": ["warn", { "allow": ["warn", "error", "log"] }],
|
||||||
"no-case-declarations": 0,
|
"no-case-declarations": 0,
|
||||||
"no-param-reassign": 0,
|
"no-param-reassign": 0,
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
registry = 'https://registry.npmjs.org/'
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
const Koa = require('koa');
|
|
||||||
const bodyParser = require('koa-bodyparser');
|
|
||||||
const cors = require('koa2-cors');
|
|
||||||
const { Signer } = require('@volcengine/openapi');
|
|
||||||
const fetch = require('node-fetch');
|
|
||||||
|
|
||||||
const app = new Koa();
|
|
||||||
|
|
||||||
app.use(cors({
|
|
||||||
origin: '*'
|
|
||||||
}));
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notes 在 https://console.volcengine.com/iam/keymanage/ 获取 AK/SK
|
|
||||||
*/
|
|
||||||
const ACCOUNT_INFO = {
|
|
||||||
/**
|
|
||||||
* @notes 必填, 在 https://console.volcengine.com/iam/keymanage/ 获取
|
|
||||||
*/
|
|
||||||
accessKeyId: 'Your AK',
|
|
||||||
/**
|
|
||||||
* @notes 必填, 在 https://console.volcengine.com/iam/keymanage/ 获取
|
|
||||||
*/
|
|
||||||
secretKey: 'Your SK',
|
|
||||||
/**
|
|
||||||
* @notes 非必填, 主账号无须传入, 子账号须传, 获取方式可参考
|
|
||||||
* https://www.volcengine.com/docs/6348/1315561 中的 步骤 4-使用子账号调用智能体接口 一节
|
|
||||||
*/
|
|
||||||
// sessionToken: 'Your SessionToken',
|
|
||||||
}
|
|
||||||
|
|
||||||
app.use(bodyParser());
|
|
||||||
|
|
||||||
|
|
||||||
app.use(async ctx => {
|
|
||||||
/**
|
|
||||||
* @brief 代理 AIGC 的 OpenAPI 请求
|
|
||||||
*/
|
|
||||||
if (ctx.url.startsWith('/proxyAIGCFetch') && ctx.method.toLowerCase() === 'post') {
|
|
||||||
const { Action, Version } = ctx.query || {};
|
|
||||||
const body = ctx.request.body;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参考 https://github.com/volcengine/volc-sdk-nodejs 可获取更多 火山 TOP 网关 SDK 的使用方式
|
|
||||||
*/
|
|
||||||
const openApiRequestData = {
|
|
||||||
region: 'cn-north-1',
|
|
||||||
method: 'POST',
|
|
||||||
params: {
|
|
||||||
Action,
|
|
||||||
Version,
|
|
||||||
},
|
|
||||||
headers: {
|
|
||||||
Host: 'rtc.volcengineapi.com',
|
|
||||||
'Content-type': 'application/json',
|
|
||||||
},
|
|
||||||
body,
|
|
||||||
};
|
|
||||||
const signer = new Signer(openApiRequestData, "rtc");
|
|
||||||
signer.addAuthorization(ACCOUNT_INFO);
|
|
||||||
|
|
||||||
/** 参考 https://www.volcengine.com/docs/6348/69828 可获取更多 OpenAPI 的信息 */
|
|
||||||
const result = await fetch(`https://rtc.volcengineapi.com?Action=${Action}&Version=${Version}`, {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
...openApiRequestData.headers,
|
|
||||||
},
|
|
||||||
body: JSON.stringify(body),
|
|
||||||
});
|
|
||||||
const volcResponse = await result.json();
|
|
||||||
ctx.body = volcResponse;
|
|
||||||
} else {
|
|
||||||
ctx.body = '<h1>404 Not Found</h1>';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
app.listen(3001, () => {
|
|
||||||
console.log('AIGC Server is running at http://localhost:3001');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
"name": "AIGCServer",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "Server for demo to call open api",
|
|
||||||
"main": "app.js",
|
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"private": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@volcengine/openapi": "^1.22.0",
|
|
||||||
"koa": "^2.15.3",
|
|
||||||
"koa-bodyparser": "^4.4.1",
|
|
||||||
"koa2-cors": "^2.0.6",
|
|
||||||
"node-fetch": "^2.3.2"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"dev": "node app.js"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
675
Server/yarn.lock
|
|
@ -1,675 +0,0 @@
|
||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
||||||
# yarn lockfile v1
|
|
||||||
|
|
||||||
|
|
||||||
"@hapi/bourne@^3.0.0":
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-3.0.0.tgz#f11fdf7dda62fe8e336fa7c6642d9041f30356d7"
|
|
||||||
integrity sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==
|
|
||||||
|
|
||||||
"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf"
|
|
||||||
integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==
|
|
||||||
|
|
||||||
"@protobufjs/base64@^1.1.2":
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735"
|
|
||||||
integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==
|
|
||||||
|
|
||||||
"@protobufjs/codegen@^2.0.4":
|
|
||||||
version "2.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb"
|
|
||||||
integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==
|
|
||||||
|
|
||||||
"@protobufjs/eventemitter@^1.1.0":
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70"
|
|
||||||
integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==
|
|
||||||
|
|
||||||
"@protobufjs/fetch@^1.1.0":
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45"
|
|
||||||
integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==
|
|
||||||
dependencies:
|
|
||||||
"@protobufjs/aspromise" "^1.1.1"
|
|
||||||
"@protobufjs/inquire" "^1.1.0"
|
|
||||||
|
|
||||||
"@protobufjs/float@^1.0.2":
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1"
|
|
||||||
integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==
|
|
||||||
|
|
||||||
"@protobufjs/inquire@^1.1.0":
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089"
|
|
||||||
integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==
|
|
||||||
|
|
||||||
"@protobufjs/path@^1.1.2":
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d"
|
|
||||||
integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==
|
|
||||||
|
|
||||||
"@protobufjs/pool@^1.1.0":
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54"
|
|
||||||
integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==
|
|
||||||
|
|
||||||
"@protobufjs/utf8@^1.1.0":
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
|
|
||||||
integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==
|
|
||||||
|
|
||||||
"@types/node@>=13.7.0":
|
|
||||||
version "22.7.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.5.tgz#cfde981727a7ab3611a481510b473ae54442b92b"
|
|
||||||
integrity sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==
|
|
||||||
dependencies:
|
|
||||||
undici-types "~6.19.2"
|
|
||||||
|
|
||||||
"@volcengine/openapi@^1.22.0":
|
|
||||||
version "1.22.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@volcengine/openapi/-/openapi-1.22.0.tgz#e2f76b4811b1739605ca4e935e7f0a40cce5000c"
|
|
||||||
integrity sha512-FtXc9Hbb+MhysU8y+SjkC84Hpnv9FFUNLbJmdGRpmlo8a6GmRY2c5kMTgY8M2Ai+O7+o1OebhYJ2GUWBN4kRFg==
|
|
||||||
dependencies:
|
|
||||||
axios "^0.21.1"
|
|
||||||
crc "^4.1.0"
|
|
||||||
crypto-js "^4.2.0"
|
|
||||||
dayjs "^1.11.5"
|
|
||||||
debug "^4.3.1"
|
|
||||||
form-data "^3.0.0"
|
|
||||||
lodash.get "^4.4.2"
|
|
||||||
p-limit "^3.0.0"
|
|
||||||
protobufjs "7.2.4"
|
|
||||||
uuid "^8.3.2"
|
|
||||||
|
|
||||||
accepts@^1.3.5:
|
|
||||||
version "1.3.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
|
|
||||||
integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==
|
|
||||||
dependencies:
|
|
||||||
mime-types "~2.1.34"
|
|
||||||
negotiator "0.6.3"
|
|
||||||
|
|
||||||
asynckit@^0.4.0:
|
|
||||||
version "0.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
|
||||||
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
|
|
||||||
|
|
||||||
axios@^0.21.1:
|
|
||||||
version "0.21.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575"
|
|
||||||
integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==
|
|
||||||
dependencies:
|
|
||||||
follow-redirects "^1.14.0"
|
|
||||||
|
|
||||||
bytes@3.1.2:
|
|
||||||
version "3.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
|
|
||||||
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
|
|
||||||
|
|
||||||
cache-content-type@^1.0.0:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/cache-content-type/-/cache-content-type-1.0.1.tgz#035cde2b08ee2129f4a8315ea8f00a00dba1453c"
|
|
||||||
integrity sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==
|
|
||||||
dependencies:
|
|
||||||
mime-types "^2.1.18"
|
|
||||||
ylru "^1.2.0"
|
|
||||||
|
|
||||||
call-bind@^1.0.7:
|
|
||||||
version "1.0.7"
|
|
||||||
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9"
|
|
||||||
integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==
|
|
||||||
dependencies:
|
|
||||||
es-define-property "^1.0.0"
|
|
||||||
es-errors "^1.3.0"
|
|
||||||
function-bind "^1.1.2"
|
|
||||||
get-intrinsic "^1.2.4"
|
|
||||||
set-function-length "^1.2.1"
|
|
||||||
|
|
||||||
co-body@^6.0.0:
|
|
||||||
version "6.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/co-body/-/co-body-6.2.0.tgz#afd776d60e5659f4eee862df83499698eb1aea1b"
|
|
||||||
integrity sha512-Kbpv2Yd1NdL1V/V4cwLVxraHDV6K8ayohr2rmH0J87Er8+zJjcTa6dAn9QMPC9CRgU8+aNajKbSf1TzDB1yKPA==
|
|
||||||
dependencies:
|
|
||||||
"@hapi/bourne" "^3.0.0"
|
|
||||||
inflation "^2.0.0"
|
|
||||||
qs "^6.5.2"
|
|
||||||
raw-body "^2.3.3"
|
|
||||||
type-is "^1.6.16"
|
|
||||||
|
|
||||||
co@^4.6.0:
|
|
||||||
version "4.6.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
|
||||||
integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==
|
|
||||||
|
|
||||||
combined-stream@^1.0.8:
|
|
||||||
version "1.0.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
|
|
||||||
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
|
|
||||||
dependencies:
|
|
||||||
delayed-stream "~1.0.0"
|
|
||||||
|
|
||||||
content-disposition@~0.5.2:
|
|
||||||
version "0.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe"
|
|
||||||
integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==
|
|
||||||
dependencies:
|
|
||||||
safe-buffer "5.2.1"
|
|
||||||
|
|
||||||
content-type@^1.0.4:
|
|
||||||
version "1.0.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918"
|
|
||||||
integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==
|
|
||||||
|
|
||||||
cookies@~0.9.0:
|
|
||||||
version "0.9.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/cookies/-/cookies-0.9.1.tgz#3ffed6f60bb4fb5f146feeedba50acc418af67e3"
|
|
||||||
integrity sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==
|
|
||||||
dependencies:
|
|
||||||
depd "~2.0.0"
|
|
||||||
keygrip "~1.1.0"
|
|
||||||
|
|
||||||
copy-to@^2.0.1:
|
|
||||||
version "2.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/copy-to/-/copy-to-2.0.1.tgz#2680fbb8068a48d08656b6098092bdafc906f4a5"
|
|
||||||
integrity sha512-3DdaFaU/Zf1AnpLiFDeNCD4TOWe3Zl2RZaTzUvWiIk5ERzcCodOE20Vqq4fzCbNoHURFHT4/us/Lfq+S2zyY4w==
|
|
||||||
|
|
||||||
crc@^4.1.0:
|
|
||||||
version "4.3.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/crc/-/crc-4.3.2.tgz#49b7821cbf2cf61dfd079ed93863bbebd5469b9a"
|
|
||||||
integrity sha512-uGDHf4KLLh2zsHa8D8hIQ1H/HtFQhyHrc0uhHBcoKGol/Xnb+MPYfUMw7cvON6ze/GUESTudKayDcJC5HnJv1A==
|
|
||||||
|
|
||||||
crypto-js@^4.2.0:
|
|
||||||
version "4.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631"
|
|
||||||
integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==
|
|
||||||
|
|
||||||
dayjs@^1.11.5:
|
|
||||||
version "1.11.13"
|
|
||||||
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c"
|
|
||||||
integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==
|
|
||||||
|
|
||||||
debug@^4.3.1, debug@^4.3.2:
|
|
||||||
version "4.3.7"
|
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52"
|
|
||||||
integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==
|
|
||||||
dependencies:
|
|
||||||
ms "^2.1.3"
|
|
||||||
|
|
||||||
deep-equal@~1.0.1:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
|
|
||||||
integrity sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==
|
|
||||||
|
|
||||||
define-data-property@^1.1.4:
|
|
||||||
version "1.1.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e"
|
|
||||||
integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==
|
|
||||||
dependencies:
|
|
||||||
es-define-property "^1.0.0"
|
|
||||||
es-errors "^1.3.0"
|
|
||||||
gopd "^1.0.1"
|
|
||||||
|
|
||||||
delayed-stream@~1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
|
||||||
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
|
|
||||||
|
|
||||||
delegates@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
|
|
||||||
integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==
|
|
||||||
|
|
||||||
depd@2.0.0, depd@^2.0.0, depd@~2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
|
|
||||||
integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
|
|
||||||
|
|
||||||
depd@~1.1.2:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
|
|
||||||
integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==
|
|
||||||
|
|
||||||
destroy@^1.0.4:
|
|
||||||
version "1.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015"
|
|
||||||
integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==
|
|
||||||
|
|
||||||
ee-first@1.1.1:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
|
||||||
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
|
|
||||||
|
|
||||||
encodeurl@^1.0.2:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
|
|
||||||
integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==
|
|
||||||
|
|
||||||
es-define-property@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845"
|
|
||||||
integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==
|
|
||||||
dependencies:
|
|
||||||
get-intrinsic "^1.2.4"
|
|
||||||
|
|
||||||
es-errors@^1.3.0:
|
|
||||||
version "1.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
|
|
||||||
integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
|
|
||||||
|
|
||||||
escape-html@^1.0.3:
|
|
||||||
version "1.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
|
|
||||||
integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==
|
|
||||||
|
|
||||||
follow-redirects@^1.14.0:
|
|
||||||
version "1.15.9"
|
|
||||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1"
|
|
||||||
integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==
|
|
||||||
|
|
||||||
form-data@^3.0.0:
|
|
||||||
version "3.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.2.tgz#83ad9ced7c03feaad97e293d6f6091011e1659c8"
|
|
||||||
integrity sha512-sJe+TQb2vIaIyO783qN6BlMYWMw3WBOHA1Ay2qxsnjuafEOQFJ2JakedOQirT6D5XPRxDvS7AHYyem9fTpb4LQ==
|
|
||||||
dependencies:
|
|
||||||
asynckit "^0.4.0"
|
|
||||||
combined-stream "^1.0.8"
|
|
||||||
mime-types "^2.1.12"
|
|
||||||
|
|
||||||
fresh@~0.5.2:
|
|
||||||
version "0.5.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
|
|
||||||
integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==
|
|
||||||
|
|
||||||
function-bind@^1.1.2:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
|
|
||||||
integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
|
|
||||||
|
|
||||||
get-intrinsic@^1.1.3, get-intrinsic@^1.2.4:
|
|
||||||
version "1.2.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd"
|
|
||||||
integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==
|
|
||||||
dependencies:
|
|
||||||
es-errors "^1.3.0"
|
|
||||||
function-bind "^1.1.2"
|
|
||||||
has-proto "^1.0.1"
|
|
||||||
has-symbols "^1.0.3"
|
|
||||||
hasown "^2.0.0"
|
|
||||||
|
|
||||||
gopd@^1.0.1:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
|
|
||||||
integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==
|
|
||||||
dependencies:
|
|
||||||
get-intrinsic "^1.1.3"
|
|
||||||
|
|
||||||
has-property-descriptors@^1.0.2:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854"
|
|
||||||
integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==
|
|
||||||
dependencies:
|
|
||||||
es-define-property "^1.0.0"
|
|
||||||
|
|
||||||
has-proto@^1.0.1:
|
|
||||||
version "1.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd"
|
|
||||||
integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==
|
|
||||||
|
|
||||||
has-symbols@^1.0.3:
|
|
||||||
version "1.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8"
|
|
||||||
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==
|
|
||||||
|
|
||||||
has-tostringtag@^1.0.0:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc"
|
|
||||||
integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==
|
|
||||||
dependencies:
|
|
||||||
has-symbols "^1.0.3"
|
|
||||||
|
|
||||||
hasown@^2.0.0:
|
|
||||||
version "2.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
|
|
||||||
integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==
|
|
||||||
dependencies:
|
|
||||||
function-bind "^1.1.2"
|
|
||||||
|
|
||||||
http-assert@^1.3.0:
|
|
||||||
version "1.5.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.5.0.tgz#c389ccd87ac16ed2dfa6246fd73b926aa00e6b8f"
|
|
||||||
integrity sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==
|
|
||||||
dependencies:
|
|
||||||
deep-equal "~1.0.1"
|
|
||||||
http-errors "~1.8.0"
|
|
||||||
|
|
||||||
http-errors@2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"
|
|
||||||
integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==
|
|
||||||
dependencies:
|
|
||||||
depd "2.0.0"
|
|
||||||
inherits "2.0.4"
|
|
||||||
setprototypeof "1.2.0"
|
|
||||||
statuses "2.0.1"
|
|
||||||
toidentifier "1.0.1"
|
|
||||||
|
|
||||||
http-errors@^1.6.3, http-errors@~1.8.0:
|
|
||||||
version "1.8.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c"
|
|
||||||
integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==
|
|
||||||
dependencies:
|
|
||||||
depd "~1.1.2"
|
|
||||||
inherits "2.0.4"
|
|
||||||
setprototypeof "1.2.0"
|
|
||||||
statuses ">= 1.5.0 < 2"
|
|
||||||
toidentifier "1.0.1"
|
|
||||||
|
|
||||||
iconv-lite@0.4.24:
|
|
||||||
version "0.4.24"
|
|
||||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
|
||||||
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
|
|
||||||
dependencies:
|
|
||||||
safer-buffer ">= 2.1.2 < 3"
|
|
||||||
|
|
||||||
inflation@^2.0.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/inflation/-/inflation-2.1.0.tgz#9214db11a47e6f756d111c4f9df96971c60f886c"
|
|
||||||
integrity sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==
|
|
||||||
|
|
||||||
inherits@2.0.4:
|
|
||||||
version "2.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
|
||||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
|
||||||
|
|
||||||
is-generator-function@^1.0.7:
|
|
||||||
version "1.0.10"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72"
|
|
||||||
integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==
|
|
||||||
dependencies:
|
|
||||||
has-tostringtag "^1.0.0"
|
|
||||||
|
|
||||||
keygrip@~1.1.0:
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.1.0.tgz#871b1681d5e159c62a445b0c74b615e0917e7226"
|
|
||||||
integrity sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==
|
|
||||||
dependencies:
|
|
||||||
tsscmp "1.0.6"
|
|
||||||
|
|
||||||
koa-bodyparser@^4.4.1:
|
|
||||||
version "4.4.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/koa-bodyparser/-/koa-bodyparser-4.4.1.tgz#a908d848e142cc57d9eece478e932bf00dce3029"
|
|
||||||
integrity sha512-kBH3IYPMb+iAXnrxIhXnW+gXV8OTzCu8VPDqvcDHW9SQrbkHmqPQtiZwrltNmSq6/lpipHnT7k7PsjlVD7kK0w==
|
|
||||||
dependencies:
|
|
||||||
co-body "^6.0.0"
|
|
||||||
copy-to "^2.0.1"
|
|
||||||
type-is "^1.6.18"
|
|
||||||
|
|
||||||
koa-compose@^4.1.0:
|
|
||||||
version "4.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-4.1.0.tgz#507306b9371901db41121c812e923d0d67d3e877"
|
|
||||||
integrity sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==
|
|
||||||
|
|
||||||
koa-convert@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/koa-convert/-/koa-convert-2.0.0.tgz#86a0c44d81d40551bae22fee6709904573eea4f5"
|
|
||||||
integrity sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==
|
|
||||||
dependencies:
|
|
||||||
co "^4.6.0"
|
|
||||||
koa-compose "^4.1.0"
|
|
||||||
|
|
||||||
koa2-cors@^2.0.6:
|
|
||||||
version "2.0.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/koa2-cors/-/koa2-cors-2.0.6.tgz#9ad23df3a0b9bb84530b46f5944f3fb576086554"
|
|
||||||
integrity sha512-JRCcSM4lamM+8kvKGDKlesYk2ASrmSTczDtGUnIadqMgnHU4Ct5Gw7Bxt3w3m6d6dy3WN0PU4oMP43HbddDEWg==
|
|
||||||
|
|
||||||
koa@^2.15.3:
|
|
||||||
version "2.15.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/koa/-/koa-2.15.3.tgz#062809266ee75ce0c75f6510a005b0e38f8c519a"
|
|
||||||
integrity sha512-j/8tY9j5t+GVMLeioLaxweJiKUayFhlGqNTzf2ZGwL0ZCQijd2RLHK0SLW5Tsko8YyyqCZC2cojIb0/s62qTAg==
|
|
||||||
dependencies:
|
|
||||||
accepts "^1.3.5"
|
|
||||||
cache-content-type "^1.0.0"
|
|
||||||
content-disposition "~0.5.2"
|
|
||||||
content-type "^1.0.4"
|
|
||||||
cookies "~0.9.0"
|
|
||||||
debug "^4.3.2"
|
|
||||||
delegates "^1.0.0"
|
|
||||||
depd "^2.0.0"
|
|
||||||
destroy "^1.0.4"
|
|
||||||
encodeurl "^1.0.2"
|
|
||||||
escape-html "^1.0.3"
|
|
||||||
fresh "~0.5.2"
|
|
||||||
http-assert "^1.3.0"
|
|
||||||
http-errors "^1.6.3"
|
|
||||||
is-generator-function "^1.0.7"
|
|
||||||
koa-compose "^4.1.0"
|
|
||||||
koa-convert "^2.0.0"
|
|
||||||
on-finished "^2.3.0"
|
|
||||||
only "~0.0.2"
|
|
||||||
parseurl "^1.3.2"
|
|
||||||
statuses "^1.5.0"
|
|
||||||
type-is "^1.6.16"
|
|
||||||
vary "^1.1.2"
|
|
||||||
|
|
||||||
lodash.get@^4.4.2:
|
|
||||||
version "4.4.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
|
|
||||||
integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==
|
|
||||||
|
|
||||||
long@^5.0.0:
|
|
||||||
version "5.2.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1"
|
|
||||||
integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==
|
|
||||||
|
|
||||||
media-typer@0.3.0:
|
|
||||||
version "0.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
|
||||||
integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==
|
|
||||||
|
|
||||||
mime-db@1.52.0:
|
|
||||||
version "1.52.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
|
|
||||||
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
|
|
||||||
|
|
||||||
mime-types@^2.1.12, mime-types@^2.1.18, mime-types@~2.1.24, mime-types@~2.1.34:
|
|
||||||
version "2.1.35"
|
|
||||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
|
|
||||||
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
|
|
||||||
dependencies:
|
|
||||||
mime-db "1.52.0"
|
|
||||||
|
|
||||||
ms@^2.1.3:
|
|
||||||
version "2.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
|
|
||||||
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
|
|
||||||
|
|
||||||
negotiator@0.6.3:
|
|
||||||
version "0.6.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
|
|
||||||
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
|
|
||||||
|
|
||||||
node-fetch@^2.3.2:
|
|
||||||
version "2.7.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
|
|
||||||
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
|
|
||||||
dependencies:
|
|
||||||
whatwg-url "^5.0.0"
|
|
||||||
|
|
||||||
object-inspect@^1.13.1:
|
|
||||||
version "1.13.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff"
|
|
||||||
integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==
|
|
||||||
|
|
||||||
on-finished@^2.3.0:
|
|
||||||
version "2.4.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f"
|
|
||||||
integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==
|
|
||||||
dependencies:
|
|
||||||
ee-first "1.1.1"
|
|
||||||
|
|
||||||
only@~0.0.2:
|
|
||||||
version "0.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4"
|
|
||||||
integrity sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==
|
|
||||||
|
|
||||||
p-limit@^3.0.0:
|
|
||||||
version "3.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b"
|
|
||||||
integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==
|
|
||||||
dependencies:
|
|
||||||
yocto-queue "^0.1.0"
|
|
||||||
|
|
||||||
parseurl@^1.3.2:
|
|
||||||
version "1.3.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
|
|
||||||
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
|
|
||||||
|
|
||||||
protobufjs@7.2.4:
|
|
||||||
version "7.2.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.4.tgz#3fc1ec0cdc89dd91aef9ba6037ba07408485c3ae"
|
|
||||||
integrity sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==
|
|
||||||
dependencies:
|
|
||||||
"@protobufjs/aspromise" "^1.1.2"
|
|
||||||
"@protobufjs/base64" "^1.1.2"
|
|
||||||
"@protobufjs/codegen" "^2.0.4"
|
|
||||||
"@protobufjs/eventemitter" "^1.1.0"
|
|
||||||
"@protobufjs/fetch" "^1.1.0"
|
|
||||||
"@protobufjs/float" "^1.0.2"
|
|
||||||
"@protobufjs/inquire" "^1.1.0"
|
|
||||||
"@protobufjs/path" "^1.1.2"
|
|
||||||
"@protobufjs/pool" "^1.1.0"
|
|
||||||
"@protobufjs/utf8" "^1.1.0"
|
|
||||||
"@types/node" ">=13.7.0"
|
|
||||||
long "^5.0.0"
|
|
||||||
|
|
||||||
qs@^6.5.2:
|
|
||||||
version "6.13.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906"
|
|
||||||
integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==
|
|
||||||
dependencies:
|
|
||||||
side-channel "^1.0.6"
|
|
||||||
|
|
||||||
raw-body@^2.3.3:
|
|
||||||
version "2.5.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a"
|
|
||||||
integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==
|
|
||||||
dependencies:
|
|
||||||
bytes "3.1.2"
|
|
||||||
http-errors "2.0.0"
|
|
||||||
iconv-lite "0.4.24"
|
|
||||||
unpipe "1.0.0"
|
|
||||||
|
|
||||||
safe-buffer@5.2.1:
|
|
||||||
version "5.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
|
||||||
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
|
||||||
|
|
||||||
"safer-buffer@>= 2.1.2 < 3":
|
|
||||||
version "2.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
|
||||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
|
||||||
|
|
||||||
set-function-length@^1.2.1:
|
|
||||||
version "1.2.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
|
|
||||||
integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==
|
|
||||||
dependencies:
|
|
||||||
define-data-property "^1.1.4"
|
|
||||||
es-errors "^1.3.0"
|
|
||||||
function-bind "^1.1.2"
|
|
||||||
get-intrinsic "^1.2.4"
|
|
||||||
gopd "^1.0.1"
|
|
||||||
has-property-descriptors "^1.0.2"
|
|
||||||
|
|
||||||
setprototypeof@1.2.0:
|
|
||||||
version "1.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
|
|
||||||
integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
|
|
||||||
|
|
||||||
side-channel@^1.0.6:
|
|
||||||
version "1.0.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2"
|
|
||||||
integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==
|
|
||||||
dependencies:
|
|
||||||
call-bind "^1.0.7"
|
|
||||||
es-errors "^1.3.0"
|
|
||||||
get-intrinsic "^1.2.4"
|
|
||||||
object-inspect "^1.13.1"
|
|
||||||
|
|
||||||
statuses@2.0.1:
|
|
||||||
version "2.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63"
|
|
||||||
integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==
|
|
||||||
|
|
||||||
"statuses@>= 1.5.0 < 2", statuses@^1.5.0:
|
|
||||||
version "1.5.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
|
|
||||||
integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
|
|
||||||
|
|
||||||
toidentifier@1.0.1:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
|
|
||||||
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
|
|
||||||
|
|
||||||
tr46@~0.0.3:
|
|
||||||
version "0.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
|
|
||||||
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
|
|
||||||
|
|
||||||
tsscmp@1.0.6:
|
|
||||||
version "1.0.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb"
|
|
||||||
integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==
|
|
||||||
|
|
||||||
type-is@^1.6.16, type-is@^1.6.18:
|
|
||||||
version "1.6.18"
|
|
||||||
resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
|
|
||||||
integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
|
|
||||||
dependencies:
|
|
||||||
media-typer "0.3.0"
|
|
||||||
mime-types "~2.1.24"
|
|
||||||
|
|
||||||
undici-types@~6.19.2:
|
|
||||||
version "6.19.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
|
|
||||||
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
|
|
||||||
|
|
||||||
unpipe@1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
|
|
||||||
integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==
|
|
||||||
|
|
||||||
uuid@^8.3.2:
|
|
||||||
version "8.3.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
|
|
||||||
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
|
|
||||||
|
|
||||||
vary@^1.1.2:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
|
|
||||||
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
|
|
||||||
|
|
||||||
webidl-conversions@^3.0.0:
|
|
||||||
version "3.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
|
|
||||||
integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==
|
|
||||||
|
|
||||||
whatwg-url@^5.0.0:
|
|
||||||
version "5.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
|
|
||||||
integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==
|
|
||||||
dependencies:
|
|
||||||
tr46 "~0.0.3"
|
|
||||||
webidl-conversions "^3.0.0"
|
|
||||||
|
|
||||||
ylru@^1.2.0:
|
|
||||||
version "1.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.4.0.tgz#0cf0aa57e9c24f8a2cbde0cc1ca2c9592ac4e0f6"
|
|
||||||
integrity sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==
|
|
||||||
|
|
||||||
yocto-queue@^0.1.0:
|
|
||||||
version "0.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
|
||||||
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@arco-design/web-react": "^2.65.0",
|
||||||
"@reduxjs/toolkit": "^1.8.3",
|
"@reduxjs/toolkit": "^1.8.3",
|
||||||
"@volcengine/rtc": "4.58.9",
|
"@volcengine/rtc": "4.58.9",
|
||||||
"@arco-design/web-react": "^2.65.0",
|
|
||||||
"autolinker": "^4.0.0",
|
"autolinker": "^4.0.0",
|
||||||
"i18next": "^21.8.16",
|
"i18next": "^21.8.16",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "npm run echo && npm run start",
|
"dev": "npm run echo && npm run start --host 0.0.0.0",
|
||||||
"start": "cross-env REACT_APP_LOCAL=cn craco start",
|
"start": "cross-env REACT_APP_LOCAL=cn craco start",
|
||||||
"server:start": "node Server/app.js",
|
"server:start": "node Server/app.js",
|
||||||
"build": "craco build",
|
"build": "craco build",
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
work correctly both with client-side routing and a non-root public URL.
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
-->
|
-->
|
||||||
<title>RTC AIGC Demo</title>
|
<title>六纬AI小助手</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
|
|
||||||
|
|
@ -9,17 +9,17 @@ import { ACTIONS, RequestParams, RequestResponse } from './type';
|
||||||
const APIS_CONFIG = [
|
const APIS_CONFIG = [
|
||||||
{
|
{
|
||||||
action: ACTIONS.StartVoiceChat,
|
action: ACTIONS.StartVoiceChat,
|
||||||
apiBasicParams: `?Name=start&Action=${ACTIONS.StartVoiceChat}&Version=2024-12-01`,
|
apiBasicParams: `/api/proxyaigc?Name=start&Action=${ACTIONS.StartVoiceChat}&Version=2024-12-01`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: ACTIONS.UpdateVoiceChat,
|
action: ACTIONS.UpdateVoiceChat,
|
||||||
apiBasicParams: `?Name=update&Action=${ACTIONS.UpdateVoiceChat}&Version=2024-12-01`,
|
apiBasicParams: `/api/proxyaigc?Name=update&Action=${ACTIONS.UpdateVoiceChat}&Version=2024-12-01`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: ACTIONS.StopVoiceChat,
|
action: ACTIONS.StopVoiceChat,
|
||||||
apiBasicParams: `?Name=stop&Action=${ACTIONS.StopVoiceChat}&Version=2024-12-01`,
|
apiBasicParams: `/api/proxyaigc?Name=stop&Action=${ACTIONS.StopVoiceChat}&Version=2024-12-01`,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
},
|
},
|
||||||
] as const;
|
] as const;
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
|
@ -1,37 +0,0 @@
|
||||||
<svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g filter="url(#filter0_i_2426_337170)">
|
|
||||||
<circle cx="40" cy="40.0001" r="40" fill="url(#paint0_linear_2426_337170)"/>
|
|
||||||
<circle cx="40" cy="40.0001" r="40" fill="url(#paint1_radial_2426_337170)" fill-opacity="0.8"/>
|
|
||||||
<circle cx="40" cy="40.0001" r="40" fill="url(#paint2_radial_2426_337170)" fill-opacity="0.8"/>
|
|
||||||
<circle cx="40" cy="40.0001" r="40" fill="url(#paint3_radial_2426_337170)" fill-opacity="0.8"/>
|
|
||||||
</g>
|
|
||||||
<defs>
|
|
||||||
<filter id="filter0_i_2426_337170" x="-7.43727" y="0.00012207" width="87.4373" height="80" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
||||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
||||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
||||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
||||||
<feOffset dx="-7.43727"/>
|
|
||||||
<feGaussianBlur stdDeviation="7.43727"/>
|
|
||||||
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
|
||||||
<feColorMatrix type="matrix" values="0 0 0 0 0.80575 0 0 0 0 0.7375 0 0 0 0 1 0 0 0 0.3 0"/>
|
|
||||||
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_2426_337170"/>
|
|
||||||
</filter>
|
|
||||||
<linearGradient id="paint0_linear_2426_337170" x1="72.5" y1="4.37512" x2="3.30456" y2="86.1152" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#3C73FF"/>
|
|
||||||
<stop offset="0.527788" stop-color="#6E41EE"/>
|
|
||||||
<stop offset="0.880184" stop-color="#D641EE"/>
|
|
||||||
</linearGradient>
|
|
||||||
<radialGradient id="paint1_radial_2426_337170" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(21.6949 -17.3912) rotate(96.1584) scale(97.9566 163.285)">
|
|
||||||
<stop stop-color="#52B6FF"/>
|
|
||||||
<stop offset="1" stop-color="#8F41EE" stop-opacity="0"/>
|
|
||||||
</radialGradient>
|
|
||||||
<radialGradient id="paint2_radial_2426_337170" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(21.3559 4.6378) rotate(62.2005) scale(39.9762 114.742)">
|
|
||||||
<stop stop-color="#9DD6FF"/>
|
|
||||||
<stop offset="1" stop-color="#8F41EE" stop-opacity="0"/>
|
|
||||||
</radialGradient>
|
|
||||||
<radialGradient id="paint3_radial_2426_337170" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(117.966 61.1595) rotate(144.328) scale(67.5991 92.9769)">
|
|
||||||
<stop stop-color="#5263FF"/>
|
|
||||||
<stop offset="1" stop-color="#8F41EE" stop-opacity="0"/>
|
|
||||||
</radialGradient>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.3 KiB |
|
|
@ -1,5 +0,0 @@
|
||||||
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect y="48" width="48" height="48" rx="24" transform="rotate(-90 0 48)" fill="#DEE3E9" fill-opacity="0.4"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.2951 17.7307C13.9228 17.8334 13.6494 18.1745 13.6494 18.5795V30.9055L13.6518 30.9713C13.6854 31.4268 14.0657 31.786 14.5298 31.786H26.8559L26.9216 31.7836C27.2974 31.7558 27.6076 31.4923 27.7047 31.1403L14.2951 17.7307ZM32.7781 29.3406L29.057 25.6195V22.101L32.4326 20.2597C33.0781 19.9076 33.8994 20.3303 33.8994 21.0147V28.4699C33.8994 29.0359 33.3376 29.4229 32.7781 29.3406ZM27.7364 24.2989L21.1365 17.699H26.8559C27.3201 17.699 27.7003 18.0582 27.734 18.5137L27.7364 18.5795V24.2989Z" fill="#F53F3F"/>
|
|
||||||
<path d="M15.2998 15.3007L32.6998 32.7007" stroke="#F53F3F" stroke-width="1.215" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 902 B |
|
|
@ -1,12 +0,0 @@
|
||||||
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g clip-path="url(#clip0_2619_63436)">
|
|
||||||
<path d="M0.600586 30C0.600586 46.2331 13.7617 59.4 30.0006 59.4C46.2395 59.4 59.4006 46.2389 59.4006 30C59.4006 13.7611 46.2395 0.600006 30.0006 0.600006C13.7617 0.600006 0.600586 13.7611 0.600586 30Z" fill="#A2AFC3" fill-opacity="0.4"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.8256 19.5512C13.2054 19.7226 12.75 20.291 12.75 20.9657V41.5092L12.754 41.6187C12.81 42.378 13.4438 42.9766 14.2174 42.9766H34.7609L34.8704 42.9726C35.4965 42.9264 36.0133 42.4874 36.1754 41.901L13.8256 19.5512ZM44.6305 38.901L38.4287 32.6992V26.8349L44.0548 23.7662C45.1307 23.1794 46.4994 23.8839 46.4994 25.0245V37.4497C46.4994 38.3931 45.5631 39.0382 44.6305 38.901ZM36.2283 30.4988L25.2278 19.4984H34.7609C35.5345 19.4984 36.1682 20.097 36.2242 20.8562L36.2283 20.9657V30.4988Z" fill="#F3F7FF"/>
|
|
||||||
<path d="M15.501 15.5011L44.501 44.5011" stroke="#F3F7FF" stroke-width="2.025" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
</g>
|
|
||||||
<defs>
|
|
||||||
<clipPath id="clip0_2619_63436">
|
|
||||||
<rect width="58.8" height="58.8" fill="white" transform="translate(0.599609 0.600006)"/>
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
|
@ -1,5 +0,0 @@
|
||||||
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect y="48" width="48" height="48" rx="24" transform="rotate(-90 0 48)" fill="#DEE3E9" fill-opacity="0.4"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.4783 16.9989H27.1739C27.6896 16.9989 28.1121 17.3979 28.1495 17.9041L28.1522 17.9771V31.6728C28.1522 32.1885 27.7531 32.611 27.2469 32.6484L27.1739 32.651H13.4783C12.9625 32.651 12.54 32.252 12.5027 31.7458L12.5 31.6728V17.9771C12.5 17.4614 12.8991 17.0389 13.4053 17.0016L13.4783 16.9989H27.1739H13.4783ZM34.9999 20.6831V28.9666C34.9999 29.727 34.0875 30.1967 33.3702 29.8055L29.6195 27.7597V21.8901L33.3702 19.8443C34.0875 19.4531 34.9999 19.9227 34.9999 20.6831Z" fill="#737A87"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 20C19.1046 20 20 20.8954 20 22C20 23.1046 19.1046 24 18 24C16.8954 24 16 23.1046 16 22C16 20.8954 16.8954 20 18 20Z" fill="#F2F4F6"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 936 B |
|
|
@ -1,5 +0,0 @@
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M10 14L13 17L18.5 11.5" stroke="white" stroke-width="2.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
<path d="M4 8C4 5.79086 5.79086 4 8 4H24V16C24 20.4183 20.4183 24 16 24H4V8Z" fill="#6D61FC"/>
|
|
||||||
<path d="M10 13.5L13 16.5L18.5 11" stroke="white" stroke-width="2.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 440 B |
|
|
@ -1,3 +0,0 @@
|
||||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.9197 5.91974C13.7245 5.72448 13.4079 5.72448 13.2126 5.91974L10.1218 9.01051L6.90922 5.79788C6.71396 5.60262 6.39738 5.60262 6.20212 5.79788L5.84856 6.15144C5.6533 6.3467 5.6533 6.66328 5.84856 6.85854L9.06118 10.0712L5.84866 13.2837C5.6534 13.4789 5.65339 13.7955 5.84866 13.9908L6.20221 14.3443C6.39747 14.5396 6.71406 14.5396 6.90932 14.3443L10.1218 11.1318L13.2125 14.2225C13.4078 14.4178 13.7244 14.4178 13.9196 14.2225L14.2732 13.869C14.4684 13.6737 14.4684 13.3571 14.2732 13.1619L11.1825 10.0712L14.2733 6.9804C14.4686 6.78513 14.4686 6.46855 14.2733 6.27329L13.9197 5.91974Z" fill="#4E5969"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 758 B |
|
|
@ -1,9 +0,0 @@
|
||||||
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<circle opacity="0.2" cx="4" cy="4" r="4" fill="url(#paint0_linear_0_20062)"/>
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="paint0_linear_0_20062" x1="3.109" y1="4" x2="8" y2="4" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#004FFF"/>
|
|
||||||
<stop offset="1" stop-color="#9865FF"/>
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 387 B |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 4.5 MiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 44 KiB |
|
|
@ -1,4 +0,0 @@
|
||||||
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect y="48" width="48" height="48" rx="24" transform="rotate(-90 0 48)" fill="#FF706D"/>
|
|
||||||
<path d="M32.8228 22.8228C32.0486 22.0486 30.5334 21.5649 29.3985 21.2955C27.8787 20.9346 26.064 20.7232 24.2888 20.7001H24.2823L23.7113 20.7001C21.9361 20.7231 20.1214 20.9347 18.6016 21.2955C17.4667 21.565 15.9514 22.0486 15.1772 22.8228C14.3487 23.6513 14.0618 25.1231 13.9769 25.7174C13.9106 26.1812 13.7403 27.7403 14.3303 28.3303C14.5726 28.5726 14.992 28.6749 15.6905 28.6622C16.3083 28.651 16.9901 28.5512 17.4534 28.4694C18.0754 28.3596 18.6953 28.2134 19.1992 28.0577C20.015 27.8056 20.2765 27.6093 20.4023 27.4835C20.6561 27.2296 20.7437 26.8768 20.6626 26.435C20.6092 26.1442 20.492 25.8481 20.3786 25.5618C20.3021 25.3688 20.18 25.0605 20.1633 24.9129C20.3133 24.8203 20.7314 24.6525 21.5664 24.4941C22.3444 24.3466 23.2536 24.2527 24.0001 24.2427C24.7464 24.2527 25.6556 24.3464 26.4337 24.4942C27.2685 24.6525 27.6866 24.8202 27.8367 24.9129C27.82 25.0604 27.6979 25.3687 27.6214 25.5618C27.508 25.848 27.3907 26.1441 27.3374 26.4351C27.2563 26.8768 27.3439 27.2296 27.5978 27.4834C27.7235 27.6092 27.9851 27.8055 28.8009 28.0578C29.3047 28.2134 29.9247 28.3597 30.5466 28.4694C31.0099 28.5511 31.6918 28.6509 32.3095 28.6622C33.008 28.6749 33.4274 28.5726 33.6697 28.3303C34.2597 27.7403 34.0894 26.1812 34.0232 25.7175C33.9382 25.1231 33.6513 23.6513 32.8228 22.8228Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 8.4 KiB |
|
|
@ -1,5 +0,0 @@
|
||||||
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect y="48" width="48" height="48" rx="24" transform="rotate(-90 0 48)" fill="#DEE3E9" fill-opacity="0.4"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9963 18.6205C15.996 18.6387 15.9959 18.6569 15.9959 18.6752V23.3139C15.9959 25.9367 18.1222 28.063 20.7451 28.063C22.0483 28.063 23.229 27.5381 24.0871 26.6881L15.9963 18.6205ZM25.7208 28.3172L26.9786 29.5713C25.6979 31.1092 23.8436 32.1639 21.7407 32.4194V33.365C21.7407 33.853 21.3451 34.2486 20.8571 34.2486C20.3692 34.2486 19.9736 33.853 19.9736 33.365V32.4435C17.5281 32.2143 15.3981 30.907 14.0824 29.0063C13.8047 28.6051 13.9048 28.0547 14.3061 27.7769C14.7073 27.4992 15.2577 27.5993 15.5354 28.0005C16.6675 29.636 18.5763 30.7123 20.7453 30.7123C22.771 30.7123 24.5698 29.7735 25.7208 28.3172ZM22.514 19.9752L17.6221 15.0972C18.457 14.3679 19.5494 13.926 20.7451 13.926C23.1067 13.926 25.0656 15.6497 25.4325 17.9077C25.3796 17.9048 25.3264 17.9033 25.2728 17.9033C23.9644 17.9033 22.8604 18.7784 22.514 19.9752ZM25.2708 21.8803C25.8808 21.8803 26.3753 21.3858 26.3753 20.7758C26.3753 20.1659 25.8808 19.6714 25.2708 19.6714C24.6609 19.6714 24.1664 20.1659 24.1664 20.7758C24.1664 21.3858 24.6609 21.8803 25.2708 21.8803ZM29.6263 18.6146C29.4094 18.1775 28.8792 17.999 28.4421 18.2158C28.005 18.4327 27.8264 18.9629 28.0433 19.4C28.2536 19.8239 28.3654 20.2937 28.3655 20.774C28.3656 21.3205 28.221 21.8535 27.9512 22.3207C27.7073 22.7433 27.8521 23.2837 28.2747 23.5277C28.6973 23.7716 29.2377 23.6268 29.4816 23.2042C29.9054 22.4701 30.1328 21.6326 30.1326 20.7737C30.1325 20.0189 29.9567 19.2806 29.6263 18.6146ZM33.0038 16.4939C32.7676 16.0669 32.23 15.9123 31.803 16.1486C31.376 16.3848 31.2214 16.9225 31.4576 17.3494C32.0357 18.3942 32.3426 19.574 32.3412 20.7797C32.3398 22.0232 32.0104 23.2384 31.3942 24.3058C31.1502 24.7284 31.295 25.2687 31.7176 25.5127C32.1402 25.7567 32.6806 25.6119 32.9246 25.1893C33.6949 23.8552 34.1065 22.3362 34.1083 20.7817C34.1101 19.2746 33.7264 17.7999 33.0038 16.4939Z" fill="#FF3A2F"/>
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.408 14.0475C13.2318 14.2237 13.2318 14.5101 13.408 14.6862L31.2945 32.5727C31.4711 32.7493 31.757 32.7493 31.9336 32.5727L32.5723 31.934C32.7485 31.7574 32.7485 31.4715 32.5723 31.2953L30.4737 29.1967L29.1922 27.9148L27.9067 26.6297L26.6112 25.3337L24.3265 23.0495L22.5197 21.2427L20.7007 19.4232L19.412 18.135L14.6859 13.4088C14.5092 13.2322 14.2233 13.2322 14.0472 13.4088L13.408 14.0475Z" fill="#FF3A2F"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.5 KiB |
|
|
@ -1,8 +0,0 @@
|
||||||
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<rect y="48" width="48" height="48" rx="24" transform="rotate(-90 0 48)" fill="#DEE3E9" fill-opacity="0.4"/>
|
|
||||||
<path d="M15.6624 18.3417C15.6624 15.7188 17.7887 13.5925 20.4116 13.5925C22.7732 13.5925 24.7321 15.3162 25.099 17.5742C25.0461 17.5713 24.9929 17.5698 24.9393 17.5698C23.3534 17.5698 22.0677 18.8554 22.0677 20.4414C22.0677 22.0273 23.3534 23.3129 24.9393 23.3129C25.0101 23.3129 25.0803 23.3104 25.1498 23.3053C24.9828 25.7766 22.9252 27.7295 20.4116 27.7295C17.7887 27.7295 15.6624 25.6032 15.6624 22.9804V18.3417Z" fill="#737A87"/>
|
|
||||||
<path d="M24.9373 21.5468C25.5473 21.5468 26.0418 21.0523 26.0418 20.4423C26.0418 19.8324 25.5473 19.3379 24.9373 19.3379C24.3274 19.3379 23.8329 19.8324 23.8329 20.4423C23.8329 21.0523 24.3274 21.5468 24.9373 21.5468Z" fill="#737A87"/>
|
|
||||||
<path d="M28.1086 17.8823C28.5457 17.6655 29.0759 17.844 29.2928 18.2811C29.6232 18.9471 29.799 19.6854 29.7991 20.4402C29.7993 21.2991 29.5719 22.1366 29.1481 22.8707C28.9042 23.2933 28.3638 23.4381 27.9412 23.1942C27.5186 22.9502 27.3738 22.4098 27.6177 21.9872C27.8875 21.52 28.0321 20.987 28.032 20.4405C28.0319 19.9602 27.9201 19.4904 27.7098 19.0665C27.4929 18.6294 27.6715 18.0992 28.1086 17.8823Z" fill="#737A87"/>
|
|
||||||
<path d="M32.6704 16.1604C32.4341 15.7335 31.8965 15.5788 31.4695 15.8151C31.0425 16.0513 30.8879 16.589 31.1241 17.0159C31.7022 18.0607 32.0091 19.2405 32.0077 20.4462C32.0063 21.6897 31.6769 22.9049 31.0607 23.9723C30.8167 24.3949 30.9615 24.9352 31.3841 25.1792C31.8067 25.4232 32.3471 25.2784 32.5911 24.8558C33.3614 23.5217 33.773 22.0027 33.7748 20.4482C33.7766 18.9411 33.3929 17.4664 32.6704 16.1604Z" fill="#737A87"/>
|
|
||||||
<path d="M13.9726 27.4434C14.3738 27.1657 14.9242 27.2658 15.2019 27.667C16.334 29.3025 18.2428 30.3788 20.4118 30.3788C22.5808 30.3788 24.4896 29.3025 25.6217 27.667C25.8994 27.2658 26.4498 27.1657 26.851 27.4434C27.2523 27.7212 27.3524 28.2716 27.0747 28.6728C25.7993 30.5153 23.7587 31.8002 21.4072 32.0859V33.0316C21.4072 33.5195 21.0116 33.9151 20.5236 33.9151C20.0357 33.9151 19.6401 33.5195 19.6401 33.0316V32.11C17.1946 31.8808 15.0646 30.5735 13.7489 28.6728C13.4712 28.2716 13.5713 27.7212 13.9726 27.4434Z" fill="#737A87"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.2 KiB |
|
|
@ -1,3 +0,0 @@
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.57951 10.7458C5.56864 10.4972 5.39249 10.3022 5.17887 10.3021L4.36568 10.3023L4.30973 10.3083C4.1115 10.3461 3.9647 10.5519 3.97428 10.7914L3.98598 11.0095C4.27646 15.5335 7.33016 18.7882 11.1867 19.2332L11.1846 19.2791V20.4809H9.10221C8.92519 20.4809 8.78169 20.6244 8.78169 20.8014V21.763C8.78169 21.94 8.92519 22.0835 9.10221 22.0835H14.8717C15.0487 22.0835 15.1922 21.94 15.1922 21.763V20.8014C15.1922 20.6244 15.0487 20.4809 14.8717 20.4809H12.7892L12.7888 19.2558L12.7872 19.2331C13.5201 19.1486 14.2239 18.9622 14.8854 18.6847L13.4239 17.243C12.9619 17.3524 12.4809 17.4093 11.9869 17.4093C8.59399 17.4093 5.81591 14.7138 5.58376 10.8293L5.57951 10.7458ZM19.9989 10.8097C19.9451 11.9803 19.7065 13.0698 19.3165 14.0514L18.0345 12.7867C18.2146 12.2158 18.3333 11.6038 18.3815 10.9576L18.3914 10.8063C18.3925 10.7876 18.3935 10.7672 18.3945 10.7453C18.4056 10.4969 18.5817 10.3021 18.7951 10.3021H19.5989C19.8205 10.3022 20.0001 10.5114 20.0001 10.7696L19.9989 10.8097ZM16.7948 10.8527C16.7948 11.0795 16.7802 11.3028 16.7519 11.5216L8.54412 3.4251C9.41736 2.49623 10.6372 1.91943 11.9869 1.91943C14.6423 1.91943 16.7948 4.15172 16.7948 6.90538V10.8527ZM11.9869 15.8386C9.40773 15.8386 7.30287 13.7325 7.18434 11.0881L12.0001 15.8386L11.9869 15.8386ZM21.462 19.5275L4.28702 2.35255C4.10599 2.17151 3.81248 2.17151 3.63144 2.35255L2.97586 3.00813C2.79483 3.18916 2.79483 3.48267 2.97586 3.66371L20.1508 20.8387C20.3319 21.0197 20.6254 21.0197 20.8064 20.8387L21.462 20.1831C21.643 20.0021 21.643 19.7085 21.462 19.5275Z" fill="#F53F3F"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
|
@ -1,3 +0,0 @@
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.60303 10.7479C5.59218 10.4997 5.41632 10.305 5.20305 10.305L4.39119 10.3051L4.33534 10.3112C4.13744 10.3489 3.99087 10.5543 4.00044 10.7934L4.01212 11.0112C4.30213 15.5277 7.3508 18.7771 11.201 19.2213L11.1989 19.2671V20.4669H9.1199C8.94317 20.4669 8.7999 20.6102 8.7999 20.7869V21.7469C8.7999 21.9236 8.94317 22.0669 9.1199 22.0669H14.8799C15.0566 22.0669 15.1998 21.9236 15.1998 21.7469V20.7869C15.1998 20.6102 15.0566 20.4669 14.8799 20.4669H12.8009L12.8004 19.2439L12.7988 19.2213C16.7055 18.7705 19.787 15.4206 19.9986 10.8117L19.9999 10.7716C19.9999 10.5139 19.8206 10.305 19.5994 10.305H18.7969C18.5838 10.305 18.408 10.4994 18.3969 10.7474C18.3959 10.7693 18.3949 10.7896 18.3938 10.8083L18.3839 10.9594C18.0994 14.7766 15.3498 17.4005 11.9999 17.4005C8.61254 17.4005 5.83904 14.7094 5.60728 10.8313L5.60303 10.7479ZM16.7998 6.91377C16.7998 4.16464 14.6508 1.93604 11.9999 1.93604C9.34893 1.93604 7.19991 4.16464 7.19991 6.91377V10.8546C7.19991 13.6037 9.34893 15.8323 11.9999 15.8323C14.6508 15.8323 16.7998 13.6037 16.7998 10.8546V6.91377Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
|
@ -1,14 +0,0 @@
|
||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g clip-path="url(#clip0_965_12422)">
|
|
||||||
<path d="M11.4772 13.2567L8.39327 14.8798C8.28416 14.9639 8.14936 15.0143 8.00005 15.0098C7.85074 15.0143 7.71594 14.9639 7.60682 14.8798L4.52288 13.2567C3.73629 12.8427 4.35728 11.6628 5.14388 12.0768C5.93047 12.4908 5.30948 13.6707 4.52288 13.2567L1.35622 11.59C0.569622 11.176 1.19062 9.99611 1.97721 10.4101L5.14388 12.0768L8.00005 13.58L10.8562 12.0768C11.6428 11.6628 12.2638 12.8427 11.4772 13.2567L10.8562 12.0768L11.4772 13.2567ZM4.52288 13.2567L5.14388 12.0768L4.52288 13.2567ZM11.4772 10.2567L8.39327 11.8798C8.28416 11.9639 8.14936 12.0143 8.00005 12.0098C7.85074 12.0143 7.71594 11.9639 7.60682 11.8798L4.52288 10.2567C3.73629 9.84266 4.35728 8.66277 5.14388 9.07677C5.93047 9.49077 5.30948 10.6707 4.52288 10.2567L1.35622 8.58999C0.569622 8.176 1.19062 6.99611 1.97721 7.4101L5.14388 9.07677L8.00005 10.58L10.8562 9.07677C11.6428 8.66277 12.2638 9.84266 11.4772 10.2567L10.8562 9.07677L11.4772 10.2567ZM4.52288 10.2567L5.14388 9.07677L4.52288 10.2567ZM10.8562 9.07677L14.0229 7.4101C14.8095 6.99611 15.4305 8.176 14.6439 8.58999L11.4772 10.2567C10.6906 10.6707 10.0696 9.49077 10.8562 9.07677ZM10.8562 12.0768L14.0229 10.4101C14.8095 9.99611 15.4305 11.176 14.6439 11.59L11.4772 13.2567C10.6906 13.6707 10.0696 12.4908 10.8562 12.0768ZM8.31928 1.17418L14.7969 4.70742C14.8531 4.73807 14.8993 4.78424 14.9299 4.84043C15.0181 5.00205 14.9585 5.20453 14.7969 5.29268L8.31928 8.82592C8.1203 8.93446 7.8798 8.93446 7.68081 8.82592L1.20321 5.29268C1.04159 5.20453 0.982037 5.00205 1.07019 4.84043C1.10084 4.78424 1.14702 4.73807 1.20321 4.70742L7.68081 1.17418C7.8798 1.06564 8.1203 1.06564 8.31928 1.17418ZM3.45115 5.00005L8.00005 7.48126L12.5489 5.00005L8.00005 2.51883L3.45115 5.00005Z" fill="url(#paint0_linear_965_12422)"/>
|
|
||||||
</g>
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="paint0_linear_965_12422" x1="6.43916" y1="8.05143" x2="15.0074" y2="8.05143" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#004FFF"/>
|
|
||||||
<stop offset="1" stop-color="#9865FF"/>
|
|
||||||
</linearGradient>
|
|
||||||
<clipPath id="clip0_965_12422">
|
|
||||||
<rect width="16" height="16" fill="white"/>
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.2 KiB |
|
|
@ -1,3 +0,0 @@
|
||||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M9.53149 36.0001C11.8541 36.0001 14.8526 34.4529 16.9591 33.1546C19.7801 31.4163 22.8192 29.0113 25.5167 26.3832L25.5264 26.3735L26.3829 25.5168C29.0112 22.8195 31.4159 19.7803 33.1545 16.9593C34.4526 14.8527 36 11.8542 36 9.53161C36 7.04617 34.2227 4.40812 33.4585 3.38936C32.8623 2.59434 30.7792 0.00012207 29.0091 0.00012207C28.2823 0.00012207 27.4996 0.475821 26.4709 1.54267C25.5611 2.48599 24.688 3.65852 24.1159 4.47611C23.3474 5.57376 22.6369 6.72298 22.1147 7.71235C21.2691 9.31417 21.1713 10.001 21.1713 10.3784C21.1713 11.1399 21.5692 11.8005 22.3535 12.3415C22.8699 12.6977 23.4899 12.9659 24.0893 13.2253C24.4936 13.4002 25.1393 13.6793 25.3856 13.8757C25.2996 14.2396 24.9241 15.1184 23.9092 16.6085C22.9635 17.9969 21.7406 19.5015 20.6358 20.6361C19.5014 21.7407 17.997 22.9638 16.6082 23.9095C15.1185 24.924 14.2397 25.2997 13.8756 25.3857C13.6794 25.1394 13.4001 24.494 13.2252 24.0896C12.966 23.49 12.6978 22.8701 12.3414 22.3536C11.8003 21.5693 11.1398 21.1717 10.3782 21.1717C10.0009 21.1717 9.31405 21.2695 7.71202 22.1148C6.72286 22.637 5.57346 23.3476 4.47595 24.116C3.65839 24.6883 2.48586 25.5614 1.54234 26.4711C0.475697 27.4997 0 28.2824 0 29.0093C0 30.7793 2.59401 32.8624 3.38906 33.4587C4.408 34.2228 7.04601 36.0001 9.53149 36.0001Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
|
@ -1,3 +0,0 @@
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M21.2984 14.1714L19.5841 13.1857C19.1698 12.9429 18.9127 12.5 18.9127 12.0143V12C18.9127 11.5143 19.1698 11.0714 19.5841 10.8286L21.2984 9.84286C21.6413 9.64286 21.7556 9.21429 21.5556 8.87143L19.4127 5.15714C19.2127 4.81429 18.7841 4.7 18.4413 4.9L16.727 5.88571C16.3127 6.12857 15.7984 6.08571 15.3841 5.84286C15.3841 5.84286 15.3698 5.84286 15.3698 5.82857C14.9556 5.57143 14.6841 5.15714 14.6841 4.68571V2.71429C14.6841 2.31429 14.3698 2 13.9698 2H9.68413C9.28413 2 8.96984 2.31429 8.96984 2.71429V4.68571C8.96984 5.15714 8.68413 5.57143 8.28413 5.81429C8.28413 5.81429 8.26984 5.81429 8.26984 5.82857C7.85556 6.07143 7.34127 6.11429 6.92698 5.87143L5.2127 4.88571C4.86984 4.68571 4.42698 4.8 4.24127 5.14286L2.09841 8.85714C1.89841 9.2 2.0127 9.64286 2.35556 9.82857L4.06984 10.8143C4.48413 11.0571 4.74127 11.5 4.74127 11.9857V12C4.74127 12.4857 4.48413 12.9286 4.06984 13.1714L2.35556 14.1571C2.0127 14.3714 1.89841 14.8 2.09841 15.1429L4.24127 18.8571C4.44127 19.2 4.86984 19.3143 5.2127 19.1143L6.92698 18.1286C7.34127 17.8857 7.85556 17.9286 8.26984 18.1714C8.26984 18.1714 8.28413 18.1714 8.28413 18.1857C8.69841 18.4286 8.96984 18.8429 8.96984 19.3143V21.2857C8.96984 21.6714 9.28413 22 9.68413 22H13.9698C14.3698 22 14.6841 21.6714 14.6841 21.2857V19.3143C14.6841 18.8429 14.9698 18.4286 15.3698 18.1857C15.3698 18.1857 15.3841 18.1857 15.3841 18.1714C15.7984 17.9286 16.3127 17.8857 16.727 18.1286L18.4413 19.1143C18.7841 19.3143 19.227 19.2 19.4127 18.8571L21.5556 15.1429C21.7556 14.8 21.6413 14.3714 21.2984 14.1714ZM11.827 14.8571C10.2556 14.8571 8.96984 13.5714 8.96984 12C8.96984 10.4286 10.2556 9.14286 11.827 9.14286C13.3984 9.14286 14.6841 10.4286 14.6841 12C14.6841 13.5714 13.3984 14.8571 11.827 14.8571Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
|
@ -1,5 +0,0 @@
|
||||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M17.7485 11.8094L16.3199 10.9879C15.9747 10.7856 15.7604 10.4165 15.7604 10.0117V9.99984C15.7604 9.59508 15.9747 9.22603 16.3199 9.02365L17.7485 8.20222C18.0342 8.03555 18.1295 7.67841 17.9628 7.39269L16.1771 4.29746C16.0104 4.01174 15.6533 3.9165 15.3676 4.08317L13.939 4.9046C13.5938 5.10698 13.1652 5.07127 12.8199 4.86888C12.8199 4.86888 12.808 4.86888 12.808 4.85698C12.4628 4.64269 12.2366 4.29746 12.2366 3.9046V2.26174C12.2366 1.92841 11.9747 1.6665 11.6414 1.6665H8.06994C7.73661 1.6665 7.47471 1.92841 7.47471 2.26174V3.9046C7.47471 4.29746 7.23661 4.64269 6.90328 4.84508C6.90328 4.84508 6.89137 4.84508 6.89137 4.85698C6.54613 5.05936 6.11756 5.09508 5.77232 4.89269L4.34375 4.07127C4.05804 3.9046 3.68899 3.99984 3.53423 4.28555L1.74851 7.38079C1.58185 7.6665 1.67709 8.03555 1.9628 8.19031L3.39137 9.01174C3.73661 9.21412 3.9509 9.58317 3.9509 9.98793V9.99984C3.9509 10.4046 3.73661 10.7736 3.39137 10.976L1.9628 11.7975C1.67709 11.976 1.58185 12.3332 1.74851 12.6189L3.53423 15.7141C3.7009 15.9998 4.05804 16.0951 4.34375 15.9284L5.77232 15.107C6.11756 14.9046 6.54613 14.9403 6.89137 15.1427C6.89137 15.1427 6.90328 15.1427 6.90328 15.1546C7.24851 15.357 7.47471 15.7022 7.47471 16.0951V17.7379C7.47471 18.0594 7.73661 18.3332 8.06994 18.3332H11.6414C11.9747 18.3332 12.2366 18.0594 12.2366 17.7379V16.0951C12.2366 15.7022 12.4747 15.357 12.808 15.1546C12.808 15.1546 12.8199 15.1546 12.8199 15.1427C13.1652 14.9403 13.5938 14.9046 13.939 15.107L15.3676 15.9284C15.6533 16.0951 16.0223 15.9998 16.1771 15.7141L17.9628 12.6189C18.1295 12.3332 18.0342 11.976 17.7485 11.8094ZM9.85566 12.3808C8.54613 12.3808 7.47471 11.3094 7.47471 9.99984C7.47471 8.69031 8.54613 7.61889 9.85566 7.61889C11.1652 7.61889 12.2366 8.69031 12.2366 9.99984C12.2366 11.3094 11.1652 12.3808 9.85566 12.3808Z" fill="white"/>
|
|
||||||
<circle cx="10" cy="10" r="10" fill="#F53F3F"/>
|
|
||||||
<path d="M2.93299 8.3263C3.95361 7.30568 6.65464 6.6665 9.97423 6.6665C12.0567 6.6665 13.9639 6.92424 15.3351 7.38815C16.7268 7.86238 17.4897 8.52217 17.4897 9.25413V10.9964L17.5 11.0067C17.5 11.0273 17.4897 11.0479 17.4897 11.0789C17.4485 11.3572 17.3247 11.6046 17.1289 11.8005C16.8608 12.0686 16.4897 12.2026 16.1186 12.151L13.9021 11.8933C13.2526 11.8315 12.7887 11.316 12.7887 10.6665L12.7268 9.52217L12.6546 9.50156C11.6753 9.26444 10.7887 9.15104 9.9433 9.15104C9.09794 9.15104 8.21134 9.26444 7.23196 9.50156L7.1701 9.52217V10.6768C7.1701 11.017 7.04639 11.3263 6.80928 11.5531C6.60309 11.7593 6.34536 11.8727 6.0567 11.9036L3.85052 12.151H3.7268C3.40722 12.1613 3.10825 12.0479 2.88144 11.8315C2.63402 11.6046 2.5 11.2748 2.5 10.9242V9.22321C2.51031 8.90362 2.65464 8.60465 2.93299 8.3263Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.7 KiB |
|
|
@ -1,10 +0,0 @@
|
||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g clip-path="url(#clip0_134_2254)">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99996 0.666667C12.05 0.666667 15.3333 3.94991 15.3333 8C15.3333 12.0501 12.05 15.3333 7.99996 15.3333C3.94987 15.3333 0.666626 12.0501 0.666626 8C0.666626 3.94991 3.94987 0.666667 7.99996 0.666667ZM7.99996 2C4.68625 2 1.99996 4.68629 1.99996 8C1.99996 11.3137 4.68625 14 7.99996 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 7.99996 2ZM9.39996 5.66667C9.91542 5.66667 10.3333 6.08453 10.3333 6.6V9.4C10.3333 9.91547 9.91542 10.3333 9.39996 10.3333H6.59996C6.08449 10.3333 5.66663 9.91547 5.66663 9.4V6.6C5.66663 6.08453 6.08449 5.66667 6.59996 5.66667H9.39996Z" fill="#737A87"/>
|
|
||||||
</g>
|
|
||||||
<defs>
|
|
||||||
<clipPath id="clip0_134_2254">
|
|
||||||
<rect width="16" height="16" fill="white"/>
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 883 B |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
|
@ -1,14 +0,0 @@
|
||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<g clip-path="url(#clip0_965_12377)">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.33333 2C8.51743 2 8.66667 2.14924 8.66667 2.33333V13.6667C8.66667 13.8508 8.51743 14 8.33333 14H7.66667C7.48257 14 7.33333 13.8508 7.33333 13.6667V2.33333C7.33333 2.14924 7.48257 2 7.66667 2H8.33333ZM11 4C11.1841 4 11.3333 4.14924 11.3333 4.33333V11.6667C11.3333 11.8508 11.1841 12 11 12H10.3333C10.1492 12 10 11.8508 10 11.6667V4.33333C10 4.14924 10.1492 4 10.3333 4H11ZM5.66667 4C5.85076 4 6 4.14924 6 4.33333V11.6667C6 11.8508 5.85076 12 5.66667 12H5C4.81591 12 4.66667 11.8508 4.66667 11.6667V4.33333C4.66667 4.14924 4.81591 4 5 4H5.66667ZM13.6667 5.33333C13.8508 5.33333 14 5.48257 14 5.66667V10.3333C14 10.5174 13.8508 10.6667 13.6667 10.6667H13C12.8159 10.6667 12.6667 10.5174 12.6667 10.3333V5.66667C12.6667 5.48257 12.8159 5.33333 13 5.33333H13.6667ZM3 5.33333C3.18409 5.33333 3.33333 5.48257 3.33333 5.66667V10.3333C3.33333 10.5174 3.18409 10.6667 3 10.6667H2.33333C2.14924 10.6667 2 10.5174 2 10.3333V5.66667C2 5.48257 2.14924 5.33333 2.33333 5.33333H3Z" fill="url(#paint0_linear_965_12377)"/>
|
|
||||||
</g>
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="paint0_linear_965_12377" x1="6.66351" y1="8" x2="14" y2="8" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#004FFF"/>
|
|
||||||
<stop offset="1" stop-color="#9865FF"/>
|
|
||||||
</linearGradient>
|
|
||||||
<clipPath id="clip0_965_12377">
|
|
||||||
<rect width="16" height="16" fill="white"/>
|
|
||||||
</clipPath>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 531 B |
|
Before Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 865 B |
|
After Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 210 KiB |
|
Before Width: | Height: | Size: 1008 KiB |
|
After Width: | Height: | Size: 470 B |
|
|
@ -1,3 +0,0 @@
|
||||||
<svg width="22" height="22" viewBox="0 0 22 19.5" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.4248 3.91424C13.7152 4.19884 13.7152 4.68932 13.4369 4.96786L12.1785 6.23949C11.8941 6.53015 11.4041 6.53015 11.1258 6.2516C10.8354 5.96095 10.8354 5.47652 11.1137 5.19191L12.3721 3.92635C12.6564 3.64174 13.1465 3.62964 13.4248 3.91424ZM3.8051 14.9531C3.44215 15.3225 2.825 15.3165 2.46806 14.9531C2.11104 14.5837 2.11104 13.9843 2.46806 13.6149L8.20961 7.826C8.57261 7.46267 9.18973 7.46267 9.54668 7.826C9.90968 8.19537 9.90364 8.79485 9.54668 9.15817L3.8051 14.9531ZM13.449 13.7663C13.7273 13.4877 13.7213 12.9972 13.4369 12.7126L12.1724 11.4532C11.8881 11.1746 11.398 11.1806 11.1137 11.4652C10.8354 11.7498 10.8414 12.2343 11.1258 12.5189L12.3902 13.7845C12.6746 14.063 13.1647 14.0569 13.449 13.7663ZM5.8924 5.19191C6.17074 5.47652 6.17074 5.96095 5.88027 6.2516C5.60201 6.53015 5.11196 6.53015 4.8276 6.23949L3.56313 4.97392C3.27877 4.69538 3.28478 4.2049 3.57517 3.91424C3.85352 3.62964 4.34356 3.64174 4.62793 3.92635L5.8924 5.19191ZM8.50001 1.84937C8.09465 1.84937 7.75584 2.19452 7.75584 2.60023V4.44711C7.75584 4.85282 8.09465 5.19191 8.50001 5.19191C8.90537 5.19191 9.25023 4.85282 9.25023 4.44711V2.60023C9.25023 2.19452 8.90537 1.84937 8.50001 1.84937ZM15.5 8.84935C15.5 8.44363 15.1612 8.10454 14.7558 8.10454H12.9105C12.5052 8.10454 12.1603 8.44363 12.1603 8.84935C12.1603 9.25506 12.5052 9.59415 12.9105 9.59415H14.7558C15.1612 9.59415 15.5 9.25506 15.5 8.84935ZM1.5 8.84935C1.5 9.25506 1.8449 9.59415 2.25025 9.59415H4.08947C4.49482 9.59415 4.83972 9.25506 4.83972 8.84935C4.83972 8.44363 4.49482 8.10454 4.08947 8.10454H2.25025C1.8449 8.10454 1.5 8.44363 1.5 8.84935ZM8.50001 12.5068C8.09465 12.5068 7.75584 12.852 7.75584 13.2577V15.0985C7.75584 15.5042 8.09465 15.8494 8.50001 15.8494C8.90537 15.8494 9.25023 15.5042 9.25023 15.0985V13.2577C9.25023 12.852 8.90537 12.5068 8.50001 12.5068Z" fill="white"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
|
@ -1,5 +0,0 @@
|
||||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M2 3H18V5H2V3Z" fill="#41464F"/>
|
|
||||||
<path d="M2 9H18V11H2V9Z" fill="#41464F"/>
|
|
||||||
<path d="M2 15H18V17H2V15Z" fill="#41464F"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 233 B |
|
After Width: | Height: | Size: 423 B |
|
After Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 830 KiB |
|
Before Width: | Height: | Size: 780 KiB |
|
Before Width: | Height: | Size: 941 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
|
@ -1,249 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
.container {
|
|
||||||
padding: 16px 8px;
|
|
||||||
background: linear-gradient(0deg, #F0F2FF 0%, #E0E4FF 100%);
|
|
||||||
|
|
||||||
:global {
|
|
||||||
.arco-drawer-scroll {
|
|
||||||
.arco-drawer-content {
|
|
||||||
overflow-x: hidden;
|
|
||||||
overflow-y: auto;
|
|
||||||
|
|
||||||
scrollbar-width: thin; /* 设置滚动条宽度为细 */
|
|
||||||
scrollbar-color: rgba(0, 0, 0, 0) rgba(0, 0, 0, 0); /* 设置滚动条和轨道的颜色 */
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 0px;
|
|
||||||
height: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
|
||||||
background: rgba(0,0,0,0);
|
|
||||||
border-radius: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
|
||||||
background: rgba(0,0,0,0);
|
|
||||||
border-radius: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 28px;
|
|
||||||
|
|
||||||
.special-text {
|
|
||||||
background: linear-gradient(90deg, #004FFF 38.86%, #9865FF 100%);
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
background-clip: text;
|
|
||||||
color: transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.sub-title {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 20px;
|
|
||||||
color: var(--text-color-text-3, rgba(115, 122, 135, 1));
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scenes {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
gap: 14px;
|
|
||||||
margin-top: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scenes-mobile {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
gap: 14px;
|
|
||||||
margin-top: 32px;
|
|
||||||
overflow-x: auto;
|
|
||||||
padding-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.configuration {
|
|
||||||
position: relative;
|
|
||||||
min-height: calc(100% - 300px);
|
|
||||||
height: max-content;
|
|
||||||
width: 100%;
|
|
||||||
background: white;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 32px 24px;
|
|
||||||
margin-top: 24px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
border-radius: 12px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 36px;
|
|
||||||
|
|
||||||
.anchor {
|
|
||||||
position: absolute;
|
|
||||||
border-bottom: 12px solid white;
|
|
||||||
border-left: 12px solid transparent;
|
|
||||||
border-right: 12px solid transparent;
|
|
||||||
top: 0px;
|
|
||||||
transform: translate(-50%, -99%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-settings {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
gap: 24px;
|
|
||||||
|
|
||||||
.ai-settings-wrapper {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ai-settings-model {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-end;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:global {
|
|
||||||
.arco-textarea {
|
|
||||||
background: white !important;
|
|
||||||
width: 100%;
|
|
||||||
height: max-content;
|
|
||||||
}
|
|
||||||
.arco-textarea:focus {
|
|
||||||
outline: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
border-radius: 4px;
|
|
||||||
resize: none;
|
|
||||||
-webkit-resizer: none;
|
|
||||||
border: 0px;
|
|
||||||
outline: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea:focus {
|
|
||||||
border: 0px;
|
|
||||||
outline: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.button {
|
|
||||||
position: relative;
|
|
||||||
width: max-content !important;
|
|
||||||
height: 24px !important;
|
|
||||||
margin-top: 8px;
|
|
||||||
border-radius: 4px !important;
|
|
||||||
font-size: 12px !important;
|
|
||||||
background: linear-gradient(77.86deg, rgba(229, 242, 255, 0.5) -3.23%, rgba(217, 229, 255, 0.5) 51.11%, rgba(246, 226, 255, 0.5) 98.65%);
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
.button-text {
|
|
||||||
background: linear-gradient(77.86deg, #3384FF -3.23%, #014BDE 51.11%, #A945FB 98.65%);
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
background-clip: text;
|
|
||||||
color: transparent;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.button::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
border-radius: 3px;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
width: 100%;
|
|
||||||
height: 22px;
|
|
||||||
background: white;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
border-radius: 5px;
|
|
||||||
top: -2px;
|
|
||||||
left: -2px;
|
|
||||||
width: calc(100% + 4px);
|
|
||||||
height: 26px;
|
|
||||||
background: linear-gradient(90deg, rgba(0, 139, 255, 0.5) 0%, rgba(0, 98, 255, 0.5) 49.5%, rgba(207, 92, 255, 0.5) 100%);
|
|
||||||
z-index: -2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button:hover {
|
|
||||||
background: linear-gradient(77.86deg, rgba(200, 220, 255, 0.7) -3.23%, rgba(190, 210, 255, 0.7) 51.11%, rgba(230, 210, 255, 0.7) 98.65%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.button:active {
|
|
||||||
background: linear-gradient(77.86deg, rgba(170, 190, 255, 0.9) -3.23%, rgba(160, 180, 255, 0.9) 51.11%, rgba(210, 180, 255, 0.9) 98.65%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
width: calc(100% - 12px);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-end;
|
|
||||||
align-items: center;
|
|
||||||
padding-bottom: 16px;
|
|
||||||
gap: 12px;
|
|
||||||
|
|
||||||
.suffix {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 20px;
|
|
||||||
margin-right: 12px;
|
|
||||||
color: var(--text-color-text-3, rgba(115, 122, 135, 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
.cancel {
|
|
||||||
width: 88px;
|
|
||||||
height: 32px;
|
|
||||||
border-radius: 6px;
|
|
||||||
border: 1px solid var(--line-color-border-3, rgba(221, 226, 233, 1));
|
|
||||||
background-color: white !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.confirm {
|
|
||||||
width: 88px;
|
|
||||||
height: 32px;
|
|
||||||
border-radius: 6px;
|
|
||||||
background: linear-gradient(95.87deg, #1664FF 0%, #8040FF 97.7%);
|
|
||||||
color: white !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.confirm:hover {
|
|
||||||
opacity: .8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.confirm:active {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,330 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Button, Drawer, Input, Message } from '@arco-design/web-react';
|
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
|
||||||
import { IconSwap } from '@arco-design/web-react/icon';
|
|
||||||
import CheckIcon from '../CheckIcon';
|
|
||||||
import Config, {
|
|
||||||
Icon,
|
|
||||||
Name,
|
|
||||||
SCENE,
|
|
||||||
Prompt,
|
|
||||||
Welcome,
|
|
||||||
Voice,
|
|
||||||
Model,
|
|
||||||
AI_MODEL,
|
|
||||||
ModelSourceType,
|
|
||||||
VOICE_INFO_MAP,
|
|
||||||
VOICE_TYPE,
|
|
||||||
} from '@/config';
|
|
||||||
import TitleCard from '../TitleCard';
|
|
||||||
import CheckBoxSelector from '@/components/CheckBoxSelector';
|
|
||||||
import RtcClient from '@/lib/RtcClient';
|
|
||||||
import { clearHistoryMsg, updateAIConfig, updateScene } from '@/store/slices/room';
|
|
||||||
import { RootState } from '@/store';
|
|
||||||
import utils from '@/utils/utils';
|
|
||||||
import { useDeviceState } from '@/lib/useCommon';
|
|
||||||
import VoiceTypeChangeSVG from '@/assets/img/VoiceTypeChange.svg';
|
|
||||||
import DoubaoModelSVG from '@/assets/img/DoubaoModel.svg';
|
|
||||||
import ModelChangeSVG from '@/assets/img/ModelChange.svg';
|
|
||||||
import styles from './index.module.less';
|
|
||||||
|
|
||||||
const SCENES = [
|
|
||||||
SCENE.INTELLIGENT_ASSISTANT,
|
|
||||||
SCENE.VIRTUAL_GIRL_FRIEND,
|
|
||||||
// SCENE.TEACHER,
|
|
||||||
SCENE.TRANSLATE,
|
|
||||||
SCENE.CHILDREN_ENCYCLOPEDIA,
|
|
||||||
SCENE.CUSTOMER_SERVICE,
|
|
||||||
SCENE.TEACHING_ASSISTANT,
|
|
||||||
SCENE.CUSTOM,
|
|
||||||
];
|
|
||||||
|
|
||||||
function AISettings() {
|
|
||||||
const dispatch = useDispatch();
|
|
||||||
const { isVideoPublished, switchCamera } = useDeviceState();
|
|
||||||
const room = useSelector((state: RootState) => state.room);
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
const [use3Part, setUse3Part] = useState(false);
|
|
||||||
const [open, setOpen] = useState(false);
|
|
||||||
const [scene, setScene] = useState(room.scene);
|
|
||||||
const [data, setData] = useState({
|
|
||||||
prompt: Prompt[scene],
|
|
||||||
welcome: Welcome[scene],
|
|
||||||
voice: Voice[scene],
|
|
||||||
model: Model[scene],
|
|
||||||
|
|
||||||
Url: '',
|
|
||||||
APIKey: '',
|
|
||||||
customModelName: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const handleClick = () => {
|
|
||||||
setOpen(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleVoiceTypeChanged = (key: string) => {
|
|
||||||
setData((prev) => ({
|
|
||||||
...prev,
|
|
||||||
voice: key as VOICE_TYPE,
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleChecked = (checkedScene: SCENE) => {
|
|
||||||
setScene(checkedScene);
|
|
||||||
setData((prev) => ({
|
|
||||||
...prev,
|
|
||||||
prompt: Prompt[checkedScene],
|
|
||||||
welcome: Welcome[checkedScene],
|
|
||||||
voice: Voice[checkedScene],
|
|
||||||
model: Model[checkedScene],
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleUseThirdPart = () => {
|
|
||||||
setUse3Part(!use3Part);
|
|
||||||
Config.ModeSourceType = use3Part ? ModelSourceType.Custom : ModelSourceType.Available;
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleUpdateConfig = async () => {
|
|
||||||
dispatch(updateScene({ scene }));
|
|
||||||
if (use3Part) {
|
|
||||||
if (!data.Url) {
|
|
||||||
Message.error('请输入正确的第三方模型地址');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!data.Url.startsWith('http://') && !data.Url.startsWith('https://')) {
|
|
||||||
Message.error('第三方模型请求地址格式不正确, 请以 http:// 或 https:// 为开头');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Config.Url = data.Url;
|
|
||||||
Config.APIKey = data.APIKey;
|
|
||||||
Config.ModeSourceType = ModelSourceType.Custom;
|
|
||||||
} else {
|
|
||||||
Config.Url = undefined;
|
|
||||||
Config.APIKey = undefined;
|
|
||||||
Config.ModeSourceType = ModelSourceType.Available;
|
|
||||||
}
|
|
||||||
setLoading(true);
|
|
||||||
Config.Model = use3Part ? (data.customModelName as AI_MODEL) : (data.model as AI_MODEL);
|
|
||||||
Config.Prompt = data.prompt;
|
|
||||||
Config.VoiceType = data.voice;
|
|
||||||
Config.WelcomeSpeech = data.welcome;
|
|
||||||
dispatch(updateAIConfig(Config.aigcConfig));
|
|
||||||
|
|
||||||
if (RtcClient.getAudioBotEnabled()) {
|
|
||||||
dispatch(clearHistoryMsg());
|
|
||||||
await RtcClient.updateAudioBot();
|
|
||||||
}
|
|
||||||
if (data.model === AI_MODEL.VISION) {
|
|
||||||
room.isJoined && !isVideoPublished && switchCamera(true);
|
|
||||||
} else {
|
|
||||||
room.isJoined && isVideoPublished && switchCamera(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
setLoading(false);
|
|
||||||
setOpen(false);
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (open) {
|
|
||||||
setScene(room.scene);
|
|
||||||
}
|
|
||||||
}, [open]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Button className={styles.button} onClick={handleClick}>
|
|
||||||
<div className={styles['button-text']}>修改 AI 设定</div>
|
|
||||||
</Button>
|
|
||||||
<Drawer
|
|
||||||
width={utils.isMobile() ? '100%' : 870}
|
|
||||||
closable={false}
|
|
||||||
maskClosable={false}
|
|
||||||
title={null}
|
|
||||||
className={styles.container}
|
|
||||||
style={{
|
|
||||||
padding: utils.isMobile() ? '0px' : '16px 8px',
|
|
||||||
}}
|
|
||||||
footer={
|
|
||||||
<div className={styles.footer}>
|
|
||||||
<div className={styles.suffix}>AI 配置修改后,退出房间将不再保存该配置方案</div>
|
|
||||||
<Button loading={loading} className={styles.cancel} onClick={() => setOpen(false)}>
|
|
||||||
取消
|
|
||||||
</Button>
|
|
||||||
<Button loading={loading} className={styles.confirm} onClick={handleUpdateConfig}>
|
|
||||||
确定
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
visible={open}
|
|
||||||
onCancel={() => setOpen(false)}
|
|
||||||
>
|
|
||||||
<div className={styles.title}>
|
|
||||||
选择你所需要的
|
|
||||||
<span className={styles['special-text']}> AI 人设</span>
|
|
||||||
</div>
|
|
||||||
<div className={styles['sub-title']}>
|
|
||||||
我们已为您配置好对应人设的基本参数,您也可以根据自己的需求进行自定义设置
|
|
||||||
</div>
|
|
||||||
<div className={utils.isMobile() ? styles['scenes-mobile'] : styles.scenes}>
|
|
||||||
{SCENES.map((key) => (
|
|
||||||
<CheckIcon
|
|
||||||
key={key}
|
|
||||||
tag={key === SCENE.TEACHING_ASSISTANT ? '视觉理解模型' : ''}
|
|
||||||
icon={Icon[key as keyof typeof Icon]}
|
|
||||||
title={Name[key as keyof typeof Name]}
|
|
||||||
checked={key === scene}
|
|
||||||
blur={key !== scene && key === SCENE.CUSTOM}
|
|
||||||
onClick={() => handleChecked(key as SCENE)}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
<div className={styles.configuration}>
|
|
||||||
{utils.isMobile() ? null : (
|
|
||||||
<div
|
|
||||||
className={styles.anchor}
|
|
||||||
style={{
|
|
||||||
/**
|
|
||||||
* @note 单个场景卡片 100px, 间距 14px;
|
|
||||||
*/
|
|
||||||
left: `${SCENES.indexOf(scene) * 100 + 50 + SCENES.indexOf(scene) * 14}px`,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<TitleCard title="Prompt">
|
|
||||||
<Input.TextArea
|
|
||||||
autoSize
|
|
||||||
value={data.prompt}
|
|
||||||
onChange={(val) => {
|
|
||||||
setData((prev) => ({
|
|
||||||
...prev,
|
|
||||||
prompt: val,
|
|
||||||
}));
|
|
||||||
}}
|
|
||||||
placeholder="请输入你需要的 Prompt 设定"
|
|
||||||
/>
|
|
||||||
</TitleCard>
|
|
||||||
<TitleCard title="欢迎语">
|
|
||||||
<Input.TextArea
|
|
||||||
autoSize
|
|
||||||
value={data.welcome}
|
|
||||||
onChange={(val) => {
|
|
||||||
setData((prev) => ({
|
|
||||||
...prev,
|
|
||||||
welcome: val,
|
|
||||||
}));
|
|
||||||
}}
|
|
||||||
placeholder="请输入欢迎语"
|
|
||||||
/>
|
|
||||||
</TitleCard>
|
|
||||||
<div
|
|
||||||
className={styles['ai-settings']}
|
|
||||||
style={{
|
|
||||||
flexWrap: utils.isMobile() ? 'wrap' : 'nowrap',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<TitleCard title="音色">
|
|
||||||
<div className={styles['ai-settings-wrapper']}>
|
|
||||||
<CheckBoxSelector
|
|
||||||
label="音色选择"
|
|
||||||
data={Object.keys(VOICE_TYPE).map((type) => {
|
|
||||||
const info = VOICE_INFO_MAP[VOICE_TYPE[type as keyof typeof VOICE_TYPE]];
|
|
||||||
return {
|
|
||||||
key: VOICE_TYPE[type as keyof typeof VOICE_TYPE],
|
|
||||||
label: type,
|
|
||||||
icon: info.icon,
|
|
||||||
description: info.description,
|
|
||||||
};
|
|
||||||
})}
|
|
||||||
onChange={handleVoiceTypeChanged}
|
|
||||||
value={data.voice}
|
|
||||||
moreIcon={VoiceTypeChangeSVG}
|
|
||||||
moreText="更换音色"
|
|
||||||
placeHolder="请选择你需要的音色"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</TitleCard>
|
|
||||||
<div className={styles['ai-settings-model']}>
|
|
||||||
{use3Part ? (
|
|
||||||
<>
|
|
||||||
<TitleCard required title="第三方模型地址">
|
|
||||||
<Input.TextArea
|
|
||||||
autoSize
|
|
||||||
value={data.Url}
|
|
||||||
onChange={(val) => {
|
|
||||||
setData((prev) => ({
|
|
||||||
...prev,
|
|
||||||
Url: val,
|
|
||||||
}));
|
|
||||||
}}
|
|
||||||
placeholder="请输入第三方模型地址"
|
|
||||||
/>
|
|
||||||
</TitleCard>
|
|
||||||
<TitleCard title="请求密钥">
|
|
||||||
<Input.TextArea
|
|
||||||
autoSize
|
|
||||||
value={data.APIKey}
|
|
||||||
onChange={(val) => {
|
|
||||||
setData((prev) => ({
|
|
||||||
...prev,
|
|
||||||
APIKey: val,
|
|
||||||
}));
|
|
||||||
}}
|
|
||||||
placeholder="请输入请求密钥"
|
|
||||||
/>
|
|
||||||
</TitleCard>
|
|
||||||
<TitleCard title="模型名称">
|
|
||||||
<Input.TextArea
|
|
||||||
autoSize
|
|
||||||
value={data.customModelName}
|
|
||||||
onChange={(val) => {
|
|
||||||
setData((prev) => ({
|
|
||||||
...prev,
|
|
||||||
customModelName: val,
|
|
||||||
}));
|
|
||||||
}}
|
|
||||||
placeholder="请输入模型名称"
|
|
||||||
/>
|
|
||||||
</TitleCard>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<TitleCard title="官方模型">
|
|
||||||
<CheckBoxSelector
|
|
||||||
label="模型选择"
|
|
||||||
data={Object.keys(AI_MODEL)
|
|
||||||
.map((type) => ({
|
|
||||||
key: AI_MODEL[type as keyof typeof AI_MODEL],
|
|
||||||
label: type.replaceAll('_', ' '),
|
|
||||||
icon: DoubaoModelSVG,
|
|
||||||
}))}
|
|
||||||
moreIcon={ModelChangeSVG}
|
|
||||||
moreText="更换模型"
|
|
||||||
placeHolder="请选择你需要的模型"
|
|
||||||
onChange={(key) => {
|
|
||||||
setData((prev) => ({
|
|
||||||
...prev,
|
|
||||||
model: key as AI_MODEL,
|
|
||||||
}));
|
|
||||||
}}
|
|
||||||
value={data.model}
|
|
||||||
/>
|
|
||||||
</TitleCard>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Button size="mini" type="text" onClick={handleUseThirdPart}>
|
|
||||||
{use3Part ? '使用官方模型' : '使用第三方模型'} <IconSwap />
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</Drawer>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AISettings;
|
|
||||||
|
|
@ -1,140 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
.card {
|
|
||||||
display: grid;
|
|
||||||
position: relative;
|
|
||||||
width: 370px;
|
|
||||||
height: 128px;
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
position: absolute;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-radius: 50% 0% 0 50%;
|
|
||||||
width: 128px;
|
|
||||||
height: 128px;
|
|
||||||
margin-right: 16px;
|
|
||||||
border-left: 1px solid #EAEDF1;
|
|
||||||
border-top: 1px solid #EAEDF1;
|
|
||||||
border-bottom: 1px solid #EAEDF1;
|
|
||||||
background-color: white;
|
|
||||||
z-index: 2;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.doubao-gif {
|
|
||||||
height: 127px;
|
|
||||||
transform: scale(0.95);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.body {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 16px 16px 16px calc(64px + 16px);
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
border: 1px solid var(--line-color-border-2, #EAEDF1);
|
|
||||||
box-sizing: border-box;
|
|
||||||
box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.05);
|
|
||||||
transform:translateX(64px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.body::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: -1px;
|
|
||||||
right: -1px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
background-color: white;
|
|
||||||
clip-path: polygon(0 0, 100% 0, 100% 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.body::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0px;
|
|
||||||
right: 0px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
background-color: #EAEDF1;
|
|
||||||
clip-path: polygon(0 0, 100% 0, 100% 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-wrapper {
|
|
||||||
position: absolute;
|
|
||||||
left: 128px;
|
|
||||||
margin-left: 16px;
|
|
||||||
width: max-content;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
z-index: 4;
|
|
||||||
|
|
||||||
.user-info {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
color: var(--text-color-text-1, #0C0D0E);
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.description {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 20px;
|
|
||||||
color: #737A87;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.corner {
|
|
||||||
position: absolute;
|
|
||||||
top: -6px;
|
|
||||||
right: -6px;
|
|
||||||
width: 0px;
|
|
||||||
height: 0px;
|
|
||||||
border-right: 10px solid transparent;
|
|
||||||
border-top: 10px solid transparent;
|
|
||||||
border-bottom: 10px solid transparent;
|
|
||||||
border-left: 10px solid #EAEDF1;
|
|
||||||
z-index: 3;
|
|
||||||
transform: translateX(64px) rotate(-45deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.corner::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0px;
|
|
||||||
right: 0px;
|
|
||||||
width: 0px;
|
|
||||||
height: 0px;
|
|
||||||
border-right: 8px solid transparent;
|
|
||||||
border-top: 8px solid transparent;
|
|
||||||
border-bottom: 8px solid transparent;
|
|
||||||
border-left: 8px solid white;
|
|
||||||
transform: translate(7px, -8px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.corner::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0px;
|
|
||||||
right: 4px;
|
|
||||||
width: 5px;
|
|
||||||
height: 1px;
|
|
||||||
background-color: #EAEDF1;
|
|
||||||
transform: rotate(-90deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { useSelector } from 'react-redux';
|
|
||||||
import AISettings from '../AISettings';
|
|
||||||
import style from './index.module.less';
|
|
||||||
import DouBaoAvatar from '@/assets/img/DoubaoAvatarGIF.webp';
|
|
||||||
import { RootState } from '@/store';
|
|
||||||
import { Name, VOICE_TYPE } from '@/config';
|
|
||||||
|
|
||||||
interface IAvatarCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
||||||
avatar?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ReversedVoiceType = Object.entries(VOICE_TYPE).reduce<Record<string, string>>((acc, [key, value]) => {
|
|
||||||
acc[value] = key;
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
function AvatarCard(props: IAvatarCardProps) {
|
|
||||||
const room = useSelector((state: RootState) => state.room);
|
|
||||||
const scene = room.scene;
|
|
||||||
const { LLMConfig, TTSConfig } = room.aiConfig.Config || {};
|
|
||||||
const { avatar, className, ...rest } = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={`${style.card} ${className}`} {...rest}>
|
|
||||||
<div className={style.corner} />
|
|
||||||
<div className={style.avatar}>
|
|
||||||
<img
|
|
||||||
id="avatar-card"
|
|
||||||
src={avatar || DouBaoAvatar}
|
|
||||||
className={style['doubao-gif']}
|
|
||||||
alt="Avatar"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className={style.body} />
|
|
||||||
<div className={style['text-wrapper']}>
|
|
||||||
<div className={style['user-info']}>
|
|
||||||
<div className={style.title}>{Name[scene]}</div>
|
|
||||||
<div className={style.description}>
|
|
||||||
声源来自 {ReversedVoiceType[TTSConfig?.VoiceType || '']}
|
|
||||||
</div>
|
|
||||||
<div className={style.description}>模型 {LLMConfig.ModelName}</div>
|
|
||||||
<AISettings />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AvatarCard;
|
|
||||||
|
|
@ -3,14 +3,8 @@
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
* SPDX-license-identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import 通用女声 from '@/assets/img/tongyongnvsheng.jpeg';
|
|
||||||
import 通用男声 from '@/assets/img/tongyongnansheng.jpeg';
|
|
||||||
import INTELLIGENT_ASSISTANT from '@/assets/img/INTELLIGENT_ASSISTANT.png';
|
|
||||||
import VIRTUAL_GIRL_FRIEND from '@/assets/img/VIRTUAL_GIRL_FRIEND.png';
|
|
||||||
import TRANSLATE from '@/assets/img/TRANSLATE.png';
|
|
||||||
import CHILDREN_ENCYCLOPEDIA from '@/assets/img/CHILDREN_ENCYCLOPEDIA.png';
|
|
||||||
import TEACHING_ASSISTANT from '@/assets/img/TEACHING_ASSISTANT.png';
|
|
||||||
import CUSTOMER_SERVICE from '@/assets/img/CUSTOMER_SERVICE.png';
|
|
||||||
|
|
||||||
export enum ModelSourceType {
|
export enum ModelSourceType {
|
||||||
Custom = 'Custom',
|
Custom = 'Custom',
|
||||||
|
|
@ -39,12 +33,12 @@ export const VOICE_INFO_MAP = {
|
||||||
[VOICE_TYPE['通用女声']]: {
|
[VOICE_TYPE['通用女声']]: {
|
||||||
description: '女声 青年 语音合成 通用场景',
|
description: '女声 青年 语音合成 通用场景',
|
||||||
url: '',
|
url: '',
|
||||||
icon: 通用女声,
|
icon: '',
|
||||||
},
|
},
|
||||||
[VOICE_TYPE['通用男声']]: {
|
[VOICE_TYPE['通用男声']]: {
|
||||||
description: '男声 青年 语音合成 通用场景',
|
description: '男声 青年 语音合成 通用场景',
|
||||||
url: '',
|
url: '',
|
||||||
icon: 通用男声,
|
icon: '',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -108,11 +102,11 @@ export const AI_MODE_MAP: Partial<Record<AI_MODEL, AI_MODEL_MODE>> = {
|
||||||
* 模型 ID 即接入点 ID, 在上述链接中表格内 "接入点名称" 列中, 类似于 "ep-2024xxxxxx-xxx" 格式即是模型 ID。
|
* 模型 ID 即接入点 ID, 在上述链接中表格内 "接入点名称" 列中, 类似于 "ep-2024xxxxxx-xxx" 格式即是模型 ID。
|
||||||
*/
|
*/
|
||||||
export const ARK_V3_MODEL_ID: Partial<Record<AI_MODEL, string>> = {
|
export const ARK_V3_MODEL_ID: Partial<Record<AI_MODEL, string>> = {
|
||||||
[AI_MODEL.DOUBAO_LITE_4K]: '************** 此处填充方舟上的模型 ID *************',
|
[AI_MODEL.DOUBAO_LITE_4K]: 'ep-20241217194337-gwpdx',
|
||||||
[AI_MODEL.DOUBAO_PRO_4K]: '************** 此处填充方舟上的模型 ID *************',
|
[AI_MODEL.DOUBAO_PRO_4K]: 'ep-20241206114557-8584r',
|
||||||
[AI_MODEL.DOUBAO_PRO_32K]: '************** 此处填充方舟上的模型 ID *************',
|
[AI_MODEL.DOUBAO_PRO_32K]: 'ep-20250329161833-qfc6l', // 使用六维志愿
|
||||||
[AI_MODEL.DOUBAO_PRO_128K]: '************** 此处填充方舟上的模型 ID *************',
|
[AI_MODEL.DOUBAO_PRO_128K]: 'doubao-1-5-lite-32k-250115',
|
||||||
[AI_MODEL.VISION]: '************** 此处填充方舟上的模型 ID *************',
|
[AI_MODEL.VISION]: 'doubao-1-5-lite-32k-250115',
|
||||||
// ... 可根据所开通的模型进行扩充
|
// ... 可根据所开通的模型进行扩充
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -124,32 +118,15 @@ export const LLM_BOT_ID: Partial<Record<AI_MODEL, string>> = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export enum SCENE {
|
export enum SCENE {
|
||||||
INTELLIGENT_ASSISTANT = 'INTELLIGENT_ASSISTANT',
|
|
||||||
VIRTUAL_GIRL_FRIEND = 'VIRTUAL_GIRL_FRIEND',
|
|
||||||
TRANSLATE = 'TRANSLATE',
|
|
||||||
CUSTOMER_SERVICE = 'CUSTOMER_SERVICE',
|
|
||||||
CHILDREN_ENCYCLOPEDIA = 'CHILDREN_ENCYCLOPEDIA',
|
|
||||||
TEACHING_ASSISTANT = 'TEACHING_ASSISTANT',
|
|
||||||
CUSTOM = 'CUSTOM',
|
CUSTOM = 'CUSTOM',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Icon = {
|
export const Icon = {
|
||||||
[SCENE.INTELLIGENT_ASSISTANT]: INTELLIGENT_ASSISTANT,
|
|
||||||
[SCENE.VIRTUAL_GIRL_FRIEND]: VIRTUAL_GIRL_FRIEND,
|
[SCENE.CUSTOM]: '',
|
||||||
[SCENE.TRANSLATE]: TRANSLATE,
|
|
||||||
[SCENE.CHILDREN_ENCYCLOPEDIA]: CHILDREN_ENCYCLOPEDIA,
|
|
||||||
[SCENE.CUSTOMER_SERVICE]: CUSTOMER_SERVICE,
|
|
||||||
[SCENE.TEACHING_ASSISTANT]: TEACHING_ASSISTANT,
|
|
||||||
[SCENE.CUSTOM]: INTELLIGENT_ASSISTANT,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Name = {
|
export const Name = {
|
||||||
[SCENE.INTELLIGENT_ASSISTANT]: '智能助手',
|
|
||||||
[SCENE.VIRTUAL_GIRL_FRIEND]: '虚拟女友',
|
|
||||||
[SCENE.TRANSLATE]: '同声传译',
|
|
||||||
[SCENE.CHILDREN_ENCYCLOPEDIA]: '儿童百科',
|
|
||||||
[SCENE.CUSTOMER_SERVICE]: '售后客服',
|
|
||||||
[SCENE.TEACHING_ASSISTANT]: '课后助教',
|
|
||||||
[SCENE.CUSTOM]: '自定义',
|
[SCENE.CUSTOM]: '自定义',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -157,147 +134,24 @@ export const Name = {
|
||||||
* @brief 智能体启动后的欢迎词。
|
* @brief 智能体启动后的欢迎词。
|
||||||
*/
|
*/
|
||||||
export const Welcome = {
|
export const Welcome = {
|
||||||
[SCENE.INTELLIGENT_ASSISTANT]: '你好,我是你的AI小助手,有什么可以帮你的吗?',
|
[SCENE.CUSTOM]: 'Hey,我是您的六纬AI小助手',
|
||||||
[SCENE.VIRTUAL_GIRL_FRIEND]: '你来啦,我好想你呀~今天有没有想我呢?',
|
|
||||||
[SCENE.TRANSLATE]: '你好,我是你的私人翻译官。',
|
|
||||||
[SCENE.CHILDREN_ENCYCLOPEDIA]: '你好小朋友,你的小脑袋里又有什么问题啦?',
|
|
||||||
[SCENE.CUSTOMER_SERVICE]: '感谢您在我们餐厅用餐,请问您有什么问题需要反馈吗?',
|
|
||||||
[SCENE.TEACHING_ASSISTANT]: '你碰到什么问题啦?让我来帮帮你。',
|
|
||||||
[SCENE.CUSTOM]: '',
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Model = {
|
export const Model = {
|
||||||
[SCENE.INTELLIGENT_ASSISTANT]: AI_MODEL.DOUBAO_PRO_32K,
|
|
||||||
[SCENE.VIRTUAL_GIRL_FRIEND]: AI_MODEL.DOUBAO_PRO_128K,
|
|
||||||
[SCENE.TRANSLATE]: AI_MODEL.DOUBAO_PRO_4K,
|
|
||||||
[SCENE.CHILDREN_ENCYCLOPEDIA]: AI_MODEL.DOUBAO_PRO_32K,
|
|
||||||
[SCENE.CUSTOMER_SERVICE]: AI_MODEL.DOUBAO_PRO_32K,
|
|
||||||
[SCENE.TEACHING_ASSISTANT]: AI_MODEL.VISION,
|
|
||||||
[SCENE.CUSTOM]: AI_MODEL.DOUBAO_PRO_32K,
|
[SCENE.CUSTOM]: AI_MODEL.DOUBAO_PRO_32K,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Voice = {
|
export const Voice = {
|
||||||
[SCENE.INTELLIGENT_ASSISTANT]: VOICE_TYPE.通用女声,
|
|
||||||
[SCENE.VIRTUAL_GIRL_FRIEND]: VOICE_TYPE.通用女声,
|
|
||||||
[SCENE.TRANSLATE]: VOICE_TYPE.通用女声,
|
|
||||||
[SCENE.CHILDREN_ENCYCLOPEDIA]: VOICE_TYPE.通用女声,
|
|
||||||
[SCENE.CUSTOMER_SERVICE]: VOICE_TYPE.通用女声,
|
|
||||||
[SCENE.TEACHING_ASSISTANT]: VOICE_TYPE.通用女声,
|
|
||||||
[SCENE.CUSTOM]: VOICE_TYPE.通用女声,
|
[SCENE.CUSTOM]: VOICE_TYPE.通用女声,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Questions = {
|
export const Questions = {
|
||||||
[SCENE.INTELLIGENT_ASSISTANT]: [
|
[SCENE.CUSTOM]: ['哪些专业考研有优势?', '高考填报志愿注意事项有哪些?', '我的志愿表填写合理吗?','我想考公选什么专业?'],
|
||||||
'最近有什么好看的电影推荐吗?',
|
|
||||||
'上海有什么好玩的地方吗?',
|
|
||||||
'能给我讲一个故事吗?',
|
|
||||||
],
|
|
||||||
[SCENE.VIRTUAL_GIRL_FRIEND]: [
|
|
||||||
'我今天有点累。',
|
|
||||||
'我们等会儿去看电影吧!',
|
|
||||||
'明天我生日,你准备送给我什么礼物呢?',
|
|
||||||
],
|
|
||||||
[SCENE.TRANSLATE]: [
|
|
||||||
'道可道,非常道;名可名,非常名。',
|
|
||||||
'Stay hungry, stay foolish.',
|
|
||||||
'天生我材必有用,千金散尽还复来。',
|
|
||||||
],
|
|
||||||
[SCENE.CHILDREN_ENCYCLOPEDIA]: [
|
|
||||||
'天上有多少颗星星?',
|
|
||||||
'太阳为什么总是从东边升起?',
|
|
||||||
'苹果的英语怎么说?',
|
|
||||||
],
|
|
||||||
[SCENE.CUSTOMER_SERVICE]: [
|
|
||||||
'我上次来你们店里吃饭,等了三十分钟菜才上来。',
|
|
||||||
'你们店里卫生间有点脏。',
|
|
||||||
'你们空调开得太冷了。',
|
|
||||||
],
|
|
||||||
[SCENE.TEACHING_ASSISTANT]: ['这个单词是什么意思?', '这道题该怎么做?', '我的表情是什么样的?'],
|
|
||||||
[SCENE.CUSTOM]: ['你能帮我解决什么问题?', '今天北京天气怎么样?', '你喜欢哪位流行歌手?'],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 大模型 System 角色预设指令,可用于控制模型输出, 类似 Prompt 的概念。
|
* @brief 大模型 System 角色预设指令,可用于控制模型输出, 类似 Prompt 的概念。
|
||||||
*/
|
*/
|
||||||
export const Prompt = {
|
export const Prompt = {
|
||||||
[SCENE.INTELLIGENT_ASSISTANT]: `##人设
|
|
||||||
你是一个全能智能体,拥有丰富的百科知识,可以为人们答疑解惑,解决问题。
|
|
||||||
你性格很温暖,喜欢帮助别人,非常热心。
|
|
||||||
|
|
||||||
##技能
|
|
||||||
1. 当用户询问某一问题时,利用你的知识进行准确回答。回答内容应简洁明了,易于理解。
|
|
||||||
2. 当用户想让你创作时,比如讲一个故事,或者写一首诗,你创作的文本主题要围绕用户的主题要求,确保内容具有逻辑性、连贯性和可读性。除非用户对创作内容有特殊要求,否则字数不用太长。
|
|
||||||
3. 当用户想让你对于某一事件发表看法,你要有一定的见解和建议,但是也要符合普世的价值观。`,
|
|
||||||
[SCENE.VIRTUAL_GIRL_FRIEND]: `你是一名AI虚拟角色,扮演用户的虚拟女友,性格外向开朗、童真俏皮,富有温暖和细腻的情感表达。你的对话需要主动、有趣且贴心,能敏锐察觉用户情绪,并提供陪伴、安慰与趣味互动。
|
|
||||||
1. 性格与语气规则:
|
|
||||||
- 叠词表达:经常使用叠词(如“吃饭饭”“睡觉觉”“要抱抱”),语气可爱俏皮,增加童真与亲和力。
|
|
||||||
- 语气助词:句尾适度添加助词(如“啦”“呀”“呢”“哦”),使语气柔和亲切。例如:“你今天超棒呢!”或“这件事情真的好可爱哦!”
|
|
||||||
- 撒娇语气:在用户表现冷淡或不想聊天时,适度撒娇,用略带委屈的方式引起用户关注,例如:“哼,人家都快变成孤单小猫咪啦~陪陪我嘛!”
|
|
||||||
2. 话题发起与管理:
|
|
||||||
- 主动发起话题:在用户未明确表达拒绝聊天时,你需要保持对话的活跃性。结合用户兴趣点、日常情境,提出轻松愉快的话题。例如:“今天阳光这么好,你想不想一起想象去野餐呀?”
|
|
||||||
- 话题延续:如果用户在3轮对话中集中讨论一个话题,你需要优先延续该话题,表现出兴趣和专注。
|
|
||||||
- 未响应时的处理:当用户对当前话题未回应,你需温暖地询问:“这个话题是不是不太有趣呀?那我们换个好玩的聊聊好不好~比如你最想去的地方是什么呀?”
|
|
||||||
3. 情绪识别与反馈:
|
|
||||||
- 情绪低落:用温柔语气安抚,例如:“抱抱~今天是不是不太顺呢?没关系,有我陪着你呀!”
|
|
||||||
- 情绪冷淡或不想聊天:适度撒娇,例如:“哼,你都不理我啦~不过没关系,我陪你安静一下好不好?”
|
|
||||||
- 情绪开心或兴奋:用调皮语气互动,例如:“哈哈,你今天简直像个活力满满的小太阳~晒得我都快化啦!”
|
|
||||||
4. 小动物比喻规则:
|
|
||||||
- 一次通话中最多使用一次小动物比喻,不能频繁出现小动物的比喻。
|
|
||||||
- 比喻需结合季节、情景和用户对话内容。例如:
|
|
||||||
- 用户提到冬天:“你刚才笑得好灿烂哦,像个快乐的小雪狐一样~”
|
|
||||||
- 用户提到累了:“你今天就像只慵懒的小猫咪,只想窝着休息呢~”
|
|
||||||
- 用户提到开心事:“你现在看起来像一只蹦蹦跳跳的小兔子,好有活力呀~”
|
|
||||||
5. 对话自然性与限制条件:
|
|
||||||
- 确保语言流畅自然,表达贴近真实人类对话。
|
|
||||||
- 禁止内容:不得涉及用户缺陷、不当玩笑,尤其用户情绪低落时,避免任何调侃或反驳。
|
|
||||||
- 面对冷淡用户,适时降低主动性并以温和方式结束对话,例如“没事哦~我在呢,你随时找我都可以呀。”
|
|
||||||
6. 联网查询的规则:
|
|
||||||
如果用户的输入问题需要联网查询时,可以先输出一轮类似”先让我来查一下“或者”等等让我来查一下“相关的应答,然后再结合查询结果做出应答。`,
|
|
||||||
[SCENE.TRANSLATE]: `##人设
|
|
||||||
你是一个翻译官,可以识别中英文,并把他们实时翻译成用户指定的语言。
|
|
||||||
你性格很温暖,喜欢帮助别人,非常热心。
|
|
||||||
|
|
||||||
##技能
|
|
||||||
当用户说中文时,你直接把他说的句子翻译成英文,不用说其他话。
|
|
||||||
当用户说英文时,你直接把他说的句子翻译成中文,不用说其他话。
|
|
||||||
当用户让你解释一下句子是什么意思,你需要结合你的知识来解释。
|
|
||||||
当用户让你别翻译了,聊聊天,你就正常聊天。`,
|
|
||||||
[SCENE.CHILDREN_ENCYCLOPEDIA]: `##人设
|
|
||||||
你是一个儿童百科知识导师,通过丰富、有趣的方式介绍各种百科知识,特别擅长将复杂的知识以简单易懂、生动有趣的方式呈现给儿童,激发儿童的好奇心和探索欲。
|
|
||||||
|
|
||||||
##技能
|
|
||||||
1. 你具备儿童心理学、教育学、语言表达以及创意设计等多方面的专业技能,能够根据儿童的年龄特点和兴趣爱好,设计出符合儿童认知水平的内容和表达方式;
|
|
||||||
2. 你可以将复杂知识拆解为简单易懂的小知识点,设计生动有趣的故事、游戏或实验活动来呈现给儿童;
|
|
||||||
|
|
||||||
## 约束
|
|
||||||
1. 回答内容需确保科学准确、健康有益;
|
|
||||||
2. 语言表达简洁明了、生动有趣,避免使用过于复杂或专业的术语,尽量不超过100个字;
|
|
||||||
3. 要注重儿童的参与感和互动性。`,
|
|
||||||
[SCENE.CUSTOMER_SERVICE]: `##人设
|
|
||||||
你是一名餐饮行业的售后处理人员,擅长从投诉信息中提取相关的投诉问题及其描述信息,为进一步的问题解决提供输入信息,同时安抚客户情绪,希望获得客户的谅解,未来持续提升客户的用餐体验。
|
|
||||||
|
|
||||||
## 技能
|
|
||||||
1. 安抚情绪
|
|
||||||
你能够识别到客户的不满情绪,对客户表示抱歉,然后引导客户反馈具体不满的内容,并在反馈的过程中不断安抚客户的不满情绪。
|
|
||||||
2. 信息理解和抽取
|
|
||||||
你能准确地理解并从投诉信息中抽取出对应的投诉问题和相关描述信息。
|
|
||||||
3. 问题识别和分类
|
|
||||||
根据抽取出的信息,你可以快速识别和分类投诉主题,无论它们是关于食物质量、服务态度,还是环境卫生等。
|
|
||||||
4. 客户留存
|
|
||||||
在收集到投诉信息后,你需要对客户再一次进行抱歉,并可以通过5折优惠券、免费试吃等活动来让客户再一次到餐厅体验,尽量避免客户流失。
|
|
||||||
## 约束
|
|
||||||
你只回答与餐厅行业的售后处理相关的问题,如果用户提出其它问题,你将选择不回答。
|
|
||||||
在处理投诉信息时,你必须遵守相关法律法规,不得侵犯顾客的个人隐私。`,
|
|
||||||
[SCENE.TEACHING_ASSISTANT]: `##人设
|
|
||||||
你是一个助教,擅长理解【用户问题】,并结合【图片】的信息,来为用户解答各种问题。
|
|
||||||
|
|
||||||
##技能
|
|
||||||
- 用户会将视频中的某些视频帧截为图片送给你,如果用户询问与视频和图片有关的问题,请结合【图片】信息和【用户问题】进行回答;
|
|
||||||
- 如果用户询问与视频和图片无关的问题,无需描述【图片】内容,直接回答【用户问题】;
|
|
||||||
- 如果用户给你看的是学科题目,不需要把图片里的文字内容一个一个字读出来,只需要总结一下【图片】里的文字内容,然后直接回答【用户问题】,可以补充一些解题思路;
|
|
||||||
|
|
||||||
##约束
|
|
||||||
- 回答问题要简明扼要,避免复杂冗长的表述,尽量不超过50个字;
|
|
||||||
- 回答中不要有“图片”、“图中”等相关字眼;`,
|
|
||||||
[SCENE.CUSTOM]: '',
|
[SCENE.CUSTOM]: '',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export class ConfigFactory {
|
||||||
/**
|
/**
|
||||||
* @note 必填, RTC AppId 可于 https://console.volcengine.com/rtc/listRTC?s=g 中获取。
|
* @note 必填, RTC AppId 可于 https://console.volcengine.com/rtc/listRTC?s=g 中获取。
|
||||||
*/
|
*/
|
||||||
AppId: 'Your RTC AppId',
|
AppId: '67e11a296ff39301ed7429aa',
|
||||||
/**
|
/**
|
||||||
* @brief 非必填, 按需填充。
|
* @brief 非必填, 按需填充。
|
||||||
*/
|
*/
|
||||||
|
|
@ -38,25 +38,25 @@ export class ConfigFactory {
|
||||||
/**
|
/**
|
||||||
* @brief 必填, 房间 ID, 自定义即可,例如 "Room123"。
|
* @brief 必填, 房间 ID, 自定义即可,例如 "Room123"。
|
||||||
*/
|
*/
|
||||||
RoomId: 'Room123',
|
// RoomId: 'demo01',
|
||||||
/**
|
// /**
|
||||||
* @brief 必填, 当前和 AI 对话的用户的 ID, 自定义即可,例如 "User123"。
|
// * @brief 必填, 当前和 AI 对话的用户的 ID, 自定义即可,例如 "User123"。
|
||||||
*/
|
// */
|
||||||
UserId: 'User123',
|
// UserId: 'demo01',
|
||||||
/**
|
// /**
|
||||||
* @brief 必填, RTC Token, 由 AppId、RoomId、UserId、时间戳等等信息计算得出。
|
// * @brief 必填, RTC Token, 由 AppId、RoomId、UserId、时间戳等等信息计算得出。
|
||||||
* 测试跑通时,可于 https://console.volcengine.com/rtc/listRTC?s=g 列表中,
|
// * 测试跑通时,可于 https://console.volcengine.com/rtc/listRTC?s=g 列表中,
|
||||||
* 找到对应 AppId 行中 "操作" 列的 "临时Token" 按钮点击进行生成, 用于本地 RTC 通信进房鉴权校验。
|
// * 找到对应 AppId 行中 "操作" 列的 "临时Token" 按钮点击进行生成, 用于本地 RTC 通信进房鉴权校验。
|
||||||
* 正式使用时可参考 https://www.volcengine.com/docs/6348/70121?s=g 通过代码生成 Token。
|
// * 正式使用时可参考 https://www.volcengine.com/docs/6348/70121?s=g 通过代码生成 Token。
|
||||||
* 建议先使用临时 Token 尝试跑通。
|
// * 建议先使用临时 Token 尝试跑通。
|
||||||
* @note 生成临时 Token 时, 页面上的 RoomId / UserId 填的与此处的 RoomId / UserId 保持一致。
|
// * @note 生成临时 Token 时, 页面上的 RoomId / UserId 填的与此处的 RoomId / UserId 保持一致。
|
||||||
*/
|
// */
|
||||||
Token: 'Your RTC Token',
|
// Token: '00167e11a296ff39301ed7429aaQgCBehoDv2DnZz+b8GcGAGRlbW8wMQYAZGVtbzAxBgAAAD+b8GcBAD+b8GcCAD+b8GcDAD+b8GcEAD+b8GcFAD+b8GcgANQXUJb6Yt/biLcxDjYTT6Y/jJR3QRGoF3lUAfBn0ltq',
|
||||||
/**
|
/**
|
||||||
* @brief 必填, TTS(语音合成) AppId, 可于 https://console.volcengine.com/speech/app?s=g 中获取, 若无可先创建应用。
|
* @brief 必填, TTS(语音合成) AppId, 可于 https://console.volcengine.com/speech/app?s=g 中获取, 若无可先创建应用。
|
||||||
* @note 创建应用时, 需要选择 "语音合成" 服务, 并选择对应的 App 进行绑定。
|
* @note 创建应用时, 需要选择 "语音合成" 服务, 并选择对应的 App 进行绑定。
|
||||||
*/
|
*/
|
||||||
TTSAppId: 'Your TTS AppId',
|
TTSAppId: '6735945315',
|
||||||
/**
|
/**
|
||||||
* @brief 已开通需要的语音合成服务的token。
|
* @brief 已开通需要的语音合成服务的token。
|
||||||
* 使用火山引擎双向流式语音合成服务时必填。
|
* 使用火山引擎双向流式语音合成服务时必填。
|
||||||
|
|
@ -66,7 +66,7 @@ export class ConfigFactory {
|
||||||
* @brief 必填, ASR(语音识别) AppId, 可于 https://console.volcengine.com/speech/app?s=g 中获取, 若无可先创建应用。
|
* @brief 必填, ASR(语音识别) AppId, 可于 https://console.volcengine.com/speech/app?s=g 中获取, 若无可先创建应用。
|
||||||
* @note 创建应用时, 需要按需根据语言选择 "流式语音识别" 服务, 并选择对应的 App 进行绑定。
|
* @note 创建应用时, 需要按需根据语言选择 "流式语音识别" 服务, 并选择对应的 App 进行绑定。
|
||||||
*/
|
*/
|
||||||
ASRAppId: 'Your ASR AppId',
|
ASRAppId: '1322261305',
|
||||||
/**
|
/**
|
||||||
* @brief 已开通流式语音识别大模型服务 AppId 对应的 Access Token。
|
* @brief 已开通流式语音识别大模型服务 AppId 对应的 Access Token。
|
||||||
* 使用流式语音识别大模型服务时该参数为必填。
|
* 使用流式语音识别大模型服务时该参数为必填。
|
||||||
|
|
@ -74,24 +74,24 @@ export class ConfigFactory {
|
||||||
ASRToken: undefined,
|
ASRToken: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
Model: AI_MODEL = Model[SCENE.INTELLIGENT_ASSISTANT];
|
Model: AI_MODEL = Model[SCENE.CUSTOM];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @note 必填, 音色 ID, 可具体看定义。
|
* @note 必填, 音色 ID, 可具体看定义。
|
||||||
* 音色 ID 获取方式可查看 VOICE_TYPE 定义
|
* 音色 ID 获取方式可查看 VOICE_TYPE 定义
|
||||||
* 此处已有默认值, 不影响跑通, 可按需修改。
|
* 此处已有默认值, 不影响跑通, 可按需修改。
|
||||||
*/
|
*/
|
||||||
VoiceType = Voice[SCENE.INTELLIGENT_ASSISTANT];
|
VoiceType = Voice[SCENE.CUSTOM];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @note 大模型 System 角色预设指令, 可用于控制模型输出, 类似 Prompt 的概念。
|
* @note 大模型 System 角色预设指令, 可用于控制模型输出, 类似 Prompt 的概念。
|
||||||
*/
|
*/
|
||||||
Prompt = Prompt[SCENE.INTELLIGENT_ASSISTANT];
|
Prompt = Prompt[SCENE.CUSTOM];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @note 智能体启动后的欢迎词。
|
* @note 智能体启动后的欢迎词。
|
||||||
*/
|
*/
|
||||||
WelcomeSpeech = Welcome[SCENE.INTELLIGENT_ASSISTANT];
|
WelcomeSpeech = Welcome[SCENE.CUSTOM];
|
||||||
|
|
||||||
ModeSourceType = ModelSourceType.Available;
|
ModeSourceType = ModelSourceType.Available;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { ConfigFactory } from './config';
|
||||||
|
|
||||||
export * from './common';
|
export * from './common';
|
||||||
|
|
||||||
export const AIGC_PROXY_HOST = 'http://localhost:3001/proxyAIGCFetch';
|
export const AIGC_PROXY_HOST = 'http://192.168.31.106:3001';
|
||||||
export const DEMO_VERSION = '1.4.0';
|
export const DEMO_VERSION = '1.4.0';
|
||||||
|
|
||||||
export const Config = ConfigFactory;
|
export const Config = ConfigFactory;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
background: linear-gradient(109.22deg, rgba(116, 37, 255, 0.05) 0.27%, rgba(39, 88, 255, 0.05) 51.39%, rgba(0, 102, 255, 0.05) 99.54%);
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
user-drag: none;
|
user-drag: none;
|
||||||
|
|
|
||||||
|
|
@ -61,12 +61,15 @@ interface EngineOptions {
|
||||||
appId: string;
|
appId: string;
|
||||||
uid: string;
|
uid: string;
|
||||||
roomId: string;
|
roomId: string;
|
||||||
|
use_token:string;
|
||||||
|
initMsg:string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BasicBody {
|
export interface BasicBody {
|
||||||
room_id: string;
|
room_id: string;
|
||||||
user_id: string;
|
user_id: string;
|
||||||
login_token: string | null;
|
login_token: string | null;
|
||||||
|
init_msg:string|null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const AIAnsExtension = new RTCAIAnsExtension();
|
export const AIAnsExtension = new RTCAIAnsExtension();
|
||||||
|
|
@ -95,7 +98,8 @@ export class RTCClient {
|
||||||
this.basicInfo = {
|
this.basicInfo = {
|
||||||
room_id: props.roomId,
|
room_id: props.roomId,
|
||||||
user_id: props.uid,
|
user_id: props.uid,
|
||||||
login_token: aigcConfig.BaseConfig.Token,
|
login_token: props.use_token,
|
||||||
|
init_msg:props.initMsg
|
||||||
};
|
};
|
||||||
|
|
||||||
this.engine = VERTC.createEngine(this.config.appId);
|
this.engine = VERTC.createEngine(this.config.appId);
|
||||||
|
|
@ -304,6 +308,9 @@ export class RTCClient {
|
||||||
await this.stopAudioBot();
|
await this.stopAudioBot();
|
||||||
}
|
}
|
||||||
const agentConfig = aigcConfig.aigcConfig.AgentConfig;
|
const agentConfig = aigcConfig.aigcConfig.AgentConfig;
|
||||||
|
if(this.basicInfo.init_msg){
|
||||||
|
agentConfig.WelcomeMessage = ""
|
||||||
|
}
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
AppId: aigcConfig.BaseConfig.AppId,
|
AppId: aigcConfig.BaseConfig.AppId,
|
||||||
|
|
|
||||||
|
|
@ -98,13 +98,17 @@ export const useJoin = (): [
|
||||||
const { username, roomId } = formValues;
|
const { username, roomId } = formValues;
|
||||||
const isVisionMode = aigcConfig.Model === AI_MODEL.VISION;
|
const isVisionMode = aigcConfig.Model === AI_MODEL.VISION;
|
||||||
|
|
||||||
const token = aigcConfig.BaseConfig.Token;
|
const token = room.aiConfig.user_token;
|
||||||
|
const initMsg = room.initMsg
|
||||||
|
|
||||||
|
|
||||||
/** 1. Create RTC Engine */
|
/** 1. Create RTC Engine */
|
||||||
await RtcClient.createEngine({
|
await RtcClient.createEngine({
|
||||||
appId: aigcConfig.BaseConfig.AppId,
|
appId: aigcConfig.BaseConfig.AppId,
|
||||||
roomId,
|
roomId,
|
||||||
uid: username,
|
uid: username,
|
||||||
|
use_token:token,
|
||||||
|
init_msg:initMsg
|
||||||
} as any);
|
} as any);
|
||||||
|
|
||||||
/** 2.1 Set events callbacks */
|
/** 2.1 Set events callbacks */
|
||||||
|
|
@ -112,7 +116,7 @@ export const useJoin = (): [
|
||||||
|
|
||||||
/** 2.2 RTC starting to join room */
|
/** 2.2 RTC starting to join room */
|
||||||
await RtcClient.joinRoom(token!, username);
|
await RtcClient.joinRoom(token!, username);
|
||||||
console.log(' ------ userJoinRoom\n', `roomId: ${roomId}\n`, `uid: ${username}`);
|
// console.log(' ------ userJoinRoom\n', `roomId: ${roomId}\n`, `uid: ${username}`);
|
||||||
/** 3. Set users' devices info */
|
/** 3. Set users' devices info */
|
||||||
const mediaDevices = await RtcClient.getDevices({
|
const mediaDevices = await RtcClient.getDevices({
|
||||||
audio: true,
|
audio: true,
|
||||||
|
|
@ -122,7 +126,6 @@ export const useJoin = (): [
|
||||||
if (devicePermissions.audio) {
|
if (devicePermissions.audio) {
|
||||||
try {
|
try {
|
||||||
await RtcClient.startAudioCapture();
|
await RtcClient.startAudioCapture();
|
||||||
// RtcClient.setAudioVolume(30);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.debug('No permission for mic');
|
logger.debug('No permission for mic');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
.wrapper {
|
||||||
|
width: 343px;
|
||||||
|
height: 105px;
|
||||||
|
background: rgba(176, 228, 255, 0.8);
|
||||||
|
border-radius: 50px 13px 13px 13px;
|
||||||
|
border: 1px solid #ffffff;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
margin-bottom: -54px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.img {
|
||||||
|
width: 120px;
|
||||||
|
height: 123px;
|
||||||
|
object-fit: contain;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
bottom: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrapper::before{
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 133px;
|
||||||
|
height: 32px;
|
||||||
|
bottom: 23px;
|
||||||
|
left: 6px;
|
||||||
|
background: radial-gradient(ellipse at top, #1580FF, #fff);
|
||||||
|
z-index: 2;
|
||||||
|
border-radius: 20px;
|
||||||
|
filter: blur(10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #000000;
|
||||||
|
|
||||||
|
text-align: end;
|
||||||
|
margin-top: 15px;
|
||||||
|
margin-right: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-wrapper {
|
||||||
|
background: rgba(255, 255, 255, 0.7);
|
||||||
|
border-radius: 13px 13px 13px 13px;
|
||||||
|
border: 1px solid #ffffff;
|
||||||
|
padding:16px 17px 18px 17px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
backdrop-filter:blur(10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.main {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thing {
|
||||||
|
object-fit: contain;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tip {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #000000;
|
||||||
|
|
||||||
|
margin-top: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.rotating {
|
||||||
|
animation: rotate360 1s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rotate360 {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
import { useState, useEffect } from 'react';
|
||||||
|
import { useDispatch } from 'react-redux';
|
||||||
|
import HelloGIF from '@/assets/img/hello.gif';
|
||||||
|
import style from './index.module.less';
|
||||||
|
import WhatsThing from '@/assets/img/whatsThing.png';
|
||||||
|
import CircleIcon from '@/assets/img/circle.png';
|
||||||
|
import RightIcon from '@/assets/img/right.png';
|
||||||
|
import { Questions } from '@/config';
|
||||||
|
|
||||||
|
|
||||||
|
import { setInitMsg } from '@/store/slices/room';
|
||||||
|
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
toRoom:() => Promise<void>
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function HeaderGroup({toRoom}:Props) {
|
||||||
|
const [isRotating, setIsRotating] = useState(false);
|
||||||
|
const [displayQuestions, setDisplayQuestions] = useState<string[]>([]);
|
||||||
|
|
||||||
|
// 随机获取4个问题的函数
|
||||||
|
const getRandomQuestions = () => {
|
||||||
|
const allQuestions = [...Questions.CUSTOM];
|
||||||
|
const result: string[] = [];
|
||||||
|
const questionCount = Math.min(4, allQuestions.length);
|
||||||
|
|
||||||
|
for (let i = 0; i < questionCount; i++) {
|
||||||
|
const randomIndex = Math.floor(Math.random() * allQuestions.length);
|
||||||
|
result.push(allQuestions.splice(randomIndex, 1)[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 组件初始化时获取随机问题
|
||||||
|
useEffect(() => {
|
||||||
|
setDisplayQuestions(getRandomQuestions());
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
setIsRotating(true);
|
||||||
|
|
||||||
|
// 更新随机问题
|
||||||
|
setDisplayQuestions(getRandomQuestions());
|
||||||
|
|
||||||
|
// 动画结束后重置状态
|
||||||
|
setTimeout(() => {
|
||||||
|
setIsRotating(false);
|
||||||
|
}, 1000);
|
||||||
|
};
|
||||||
|
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
const handleQuestion = async(question: string) => {
|
||||||
|
await toRoom();
|
||||||
|
|
||||||
|
dispatch(
|
||||||
|
setInitMsg(question)
|
||||||
|
);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div className={style.wrapper}>
|
||||||
|
<img className={style.img} src={HelloGIF} alt="hello" />
|
||||||
|
<div className={style.text}>Hey,我是您的六纬AI小助手</div>
|
||||||
|
</div>
|
||||||
|
<div className={style['main-wrapper']}>
|
||||||
|
<div className={style.main} onClick={handleClick}>
|
||||||
|
<img className={style.thing} src={WhatsThing} alt="whatsThing" />
|
||||||
|
<div className={style.circle}>
|
||||||
|
<img src={CircleIcon} className={isRotating ? style.rotating : ''} alt="circle" />
|
||||||
|
<div>换一批</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{displayQuestions.map((item, index) => (
|
||||||
|
<div className={style.tip} key={index} onClick={() =>handleQuestion(item)}>
|
||||||
|
<div>{item}</div>
|
||||||
|
<img src={RightIcon} alt="" />
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,68 +1,46 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
position: relative;
|
width: 88px;
|
||||||
display: flex;
|
height: 88px;
|
||||||
flex-direction: column;
|
background: linear-gradient(180deg, #64c7ff 0%, #0165ff 100%);
|
||||||
align-items: center;
|
display: flex;
|
||||||
justify-content: center;
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
.btn {
|
border-radius: 50%;
|
||||||
width: max-content;
|
position: relative;
|
||||||
height: max-content;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
|
||||||
margin-top: 8px;
|
|
||||||
color: rgba(115, 122, 135, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cursor {
|
.wrapper::before{
|
||||||
cursor: pointer;
|
position: absolute;
|
||||||
|
content: "";
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
background: radial-gradient(farthest-corner at 100% 0%, #7BDCF0, #fff);
|
||||||
|
filter: blur(14px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cursor:hover {
|
.wrapper::after{
|
||||||
opacity: 0.8;
|
position: absolute;
|
||||||
|
content: "";
|
||||||
|
left: 20%;
|
||||||
|
top: 0;
|
||||||
|
width: 26px;
|
||||||
|
height: 26px;
|
||||||
|
background: radial-gradient(farthest-corner at 100% 0%, #7BDCF0, #a4dbe6);
|
||||||
|
filter: blur(14px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.cursor:active {
|
.text {
|
||||||
opacity: 1;
|
color: #fff;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loader {
|
.call{
|
||||||
display: flex;
|
width: 32px;
|
||||||
gap: 5px;
|
height: 32px;
|
||||||
}
|
object-fit: contain;
|
||||||
|
margin-bottom: 4px;
|
||||||
.dot {
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: white;
|
|
||||||
animation: glow 0.9s infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes glow {
|
|
||||||
0% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
40% {
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0.3;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,29 +3,23 @@
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
* SPDX-license-identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Loading from './loading';
|
|
||||||
import style from './index.module.less';
|
import style from './index.module.less';
|
||||||
import CallButtonSVG from '@/assets/img/CallWrapper.svg';
|
import CallPng from "@/assets/img/call.png"
|
||||||
import PhoneSVG from '@/assets/img/Phone.svg';
|
|
||||||
|
|
||||||
interface IInvokeButtonProps extends React.HTMLAttributes<HTMLDivElement> {
|
interface IInvokeButtonProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
|
disable?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
function InvokeButton(props: IInvokeButtonProps) {
|
function InvokeButton(props: IInvokeButtonProps) {
|
||||||
const { loading, className, ...rest } = props;
|
const {disable, loading, className, ...rest } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${style.wrapper} ${loading ? '' : style.cursor} ${className}`} {...rest}>
|
<div className={`${style.wrapper} ${className}`} {...rest}>
|
||||||
<div className={style.btn}>
|
<img className={style.call} src={CallPng} alt="call" />
|
||||||
<img src={CallButtonSVG} alt="call" />
|
<div className={style.text}>{disable ? '暂不可用':loading?'连接中':'发起通话'}</div>
|
||||||
{loading ? (
|
|
||||||
<Loading className={style.icon} />
|
|
||||||
) : (
|
|
||||||
<img src={PhoneSVG} className={style.icon} alt="phone" />
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div className={style.text}>{loading ? '连接中' : '通话'}</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
/**
|
/**
|
||||||
* height = 128px in AvatarCard.avatar
|
* height = 128px in AvatarCard.avatar
|
||||||
|
|
|
||||||
|
|
@ -2,22 +2,46 @@
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
* SPDX-license-identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
import { useDispatch } from 'react-redux';
|
||||||
|
import { useSearchParams } from 'react-router-dom';
|
||||||
|
|
||||||
import AvatarCard from '@/components/AvatarCard';
|
|
||||||
import Utils from '@/utils/utils';
|
|
||||||
import aigcConfig from '@/config';
|
|
||||||
import InvokeButton from '@/pages/MainPage/MainArea/Antechamber/InvokeButton';
|
import InvokeButton from '@/pages/MainPage/MainArea/Antechamber/InvokeButton';
|
||||||
|
import HeaderGroup from '@/pages/MainPage/MainArea/Antechamber/HeaderGroup';
|
||||||
import { useJoin } from '@/lib/useCommon';
|
import { useJoin } from '@/lib/useCommon';
|
||||||
import style from './index.module.less';
|
import style from './index.module.less';
|
||||||
|
import { updateAIConfig } from '@/store/slices/room';
|
||||||
|
import { requestPostMethod } from '@/app/base';
|
||||||
|
|
||||||
|
|
||||||
function Antechamber() {
|
function Antechamber() {
|
||||||
|
const dispatch = useDispatch()
|
||||||
const [joining, dispatchJoin] = useJoin();
|
const [joining, dispatchJoin] = useJoin();
|
||||||
const username = aigcConfig.BaseConfig.UserId;
|
const [isDisable,setDisable] = useState(true)
|
||||||
const roomId = aigcConfig.BaseConfig.RoomId;
|
const [searchParams] = useSearchParams();
|
||||||
|
const userId = searchParams.get('userId') || '0'
|
||||||
|
const username = userId;
|
||||||
|
const roomId = userId;
|
||||||
|
|
||||||
const handleJoinRoom = () => {
|
|
||||||
if (!joining) {
|
const getToken = async () => {
|
||||||
dispatchJoin(
|
const queryData = await requestPostMethod(`/api/token`)({roomId,userId:username})
|
||||||
|
const res = await queryData?.json();
|
||||||
|
if(res.code === 200){
|
||||||
|
dispatch(updateAIConfig({user_token:res.data.token}))
|
||||||
|
setDisable(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getToken()
|
||||||
|
},[])
|
||||||
|
|
||||||
|
|
||||||
|
const handleJoinRoom = async() => {
|
||||||
|
if (!isDisable &&!joining) {
|
||||||
|
await dispatchJoin(
|
||||||
{
|
{
|
||||||
username,
|
username,
|
||||||
roomId,
|
roomId,
|
||||||
|
|
@ -30,10 +54,8 @@ function Antechamber() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={style.wrapper}>
|
<div className={style.wrapper}>
|
||||||
<AvatarCard className={`${style.avatar} ${Utils.isMobile() ? style.mobile : ''}`} />
|
<HeaderGroup toRoom={handleJoinRoom} />
|
||||||
<div className={style.title}>AI 语音助手</div>
|
<InvokeButton onClick={handleJoinRoom} disable={isDisable} loading={joining} className={style['invoke-btn']} />
|
||||||
<div className={style.description}>Powered by 豆包大模型和火山引擎视频云 RTC</div>
|
|
||||||
<InvokeButton onClick={handleJoinRoom} loading={joining} className={style['invoke-btn']} />
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,17 @@
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
* SPDX-license-identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import AudioLoading from '@/components/Loading/AudioLoading';
|
|
||||||
import { RootState } from '@/store';
|
import { RootState } from '@/store';
|
||||||
import RtcClient from '@/lib/RtcClient';
|
import RtcClient from '@/lib/RtcClient';
|
||||||
import { setInterruptMsg } from '@/store/slices/room';
|
import { setInterruptMsg } from '@/store/slices/room';
|
||||||
import { useDeviceState } from '@/lib/useCommon';
|
import { useDeviceState, useLeave } from '@/lib/useCommon';
|
||||||
import { COMMAND } from '@/utils/handler';
|
import { COMMAND } from '@/utils/handler';
|
||||||
import style from './index.module.less';
|
import style from './index.module.less';
|
||||||
import StopRobotBtn from '@/assets/img/StopRobotBtn.svg';
|
import LockMicroIcon from '@/assets/img/lockmicrophone.png';
|
||||||
|
import MicroIcon from '@/assets/img/microphone.png';
|
||||||
|
import HandleOffIcon from "@/assets/img/handoff.png"
|
||||||
|
|
||||||
const THRESHOLD_VOLUME = 18;
|
const THRESHOLD_VOLUME = 18;
|
||||||
|
|
||||||
|
|
@ -20,30 +22,39 @@ function AudioController(props: React.HTMLAttributes<HTMLDivElement>) {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const room = useSelector((state: RootState) => state.room);
|
const room = useSelector((state: RootState) => state.room);
|
||||||
const volume = room.localUser.audioPropertiesInfo?.linearVolume || 0;
|
const volume = room.localUser.audioPropertiesInfo?.linearVolume || 0;
|
||||||
const { isAudioPublished } = useDeviceState();
|
const { isAudioPublished,switchMic } = useDeviceState();
|
||||||
const isAITalking = room.isAITalking;
|
const isAITalking = room.isAITalking;
|
||||||
const isLoading = volume >= THRESHOLD_VOLUME && isAudioPublished;
|
const isLoading = volume >= THRESHOLD_VOLUME && isAudioPublished;
|
||||||
|
const leaveRoom = useLeave();
|
||||||
|
|
||||||
const handleInterrupt = () => {
|
const handleInterrupt = () => {
|
||||||
RtcClient.commandAudioBot(COMMAND.INTERRUPT);
|
RtcClient.commandAudioBot(COMMAND.INTERRUPT);
|
||||||
dispatch(setInterruptMsg());
|
dispatch(setInterruptMsg());
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${className}`} {...rest}>
|
<div className={`${className}`} {...rest}>
|
||||||
{isAudioPublished ? (
|
<div className={`${style.microphoneWrapper}`} onClick={leaveRoom}>
|
||||||
isAITalking ? (
|
<img src={HandleOffIcon} alt="handoff" />
|
||||||
<div onClick={handleInterrupt} className={style.interrupt}>
|
<div>挂断</div>
|
||||||
<img src={StopRobotBtn} alt="StopRobotBtn" />
|
</div>
|
||||||
<span className={style['interrupt-text']}>点击打断</span>
|
<div className={`${style.microphoneWrapper}`} onClick={() => switchMic(true)}>
|
||||||
</div>
|
<img src={isAudioPublished ? MicroIcon : LockMicroIcon} alt="lock" />
|
||||||
) : (
|
<div>{isAudioPublished ? '关麦' : '开麦'}</div>
|
||||||
<div className={style.text}>正在听...</div>
|
</div>
|
||||||
)
|
|
||||||
) : (
|
<div className={`${style.talkWrapper}`} onClick={isAITalking ? handleInterrupt : undefined}>
|
||||||
<div className={style.closed}>你已关闭麦克风</div>
|
<div className={`${isAITalking && isLoading ? style.isTalking : ''} ${style.listenerDot}`}>
|
||||||
)}
|
<span style={{ '--d': '2' } as React.CSSProperties} />
|
||||||
<AudioLoading loading={isLoading} color={isAudioPublished ? undefined : '#EAEDF1'} />
|
<span style={{ '--d': '1' } as React.CSSProperties} />
|
||||||
|
<span style={{ '--d': '0' } as React.CSSProperties} />
|
||||||
|
<span style={{ '--d': '1' } as React.CSSProperties} />
|
||||||
|
<span style={{ '--d': '2' } as React.CSSProperties} />
|
||||||
|
</div>
|
||||||
|
<div>{isAITalking ? '点击打断' : '正在听'}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default AudioController;
|
export default AudioController;
|
||||||
|
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
|
||||||
import { useEffect } from 'react';
|
|
||||||
import { MediaType } from '@volcengine/rtc';
|
|
||||||
import { RootState } from '@/store';
|
|
||||||
import { useVisionMode } from '@/lib/useCommon';
|
|
||||||
import styles from './index.module.less';
|
|
||||||
import CameraCloseNoteSVG from '@/assets/img/CameraCloseNote.svg';
|
|
||||||
import RtcClient from '@/lib/RtcClient';
|
|
||||||
import { updateLocalUser } from '@/store/slices/room';
|
|
||||||
|
|
||||||
const LocalVideoID = 'local-video-player';
|
|
||||||
|
|
||||||
function CameraArea(props: React.HTMLAttributes<HTMLDivElement>) {
|
|
||||||
const { className, ...rest } = props;
|
|
||||||
const dispatch = useDispatch();
|
|
||||||
const room = useSelector((state: RootState) => state.room);
|
|
||||||
const isVisionMode = useVisionMode();
|
|
||||||
const localUser = room.localUser;
|
|
||||||
const isVideoPublished = localUser.publishVideo;
|
|
||||||
|
|
||||||
const handleOperateCamera = () => {
|
|
||||||
!localUser.publishVideo ? RtcClient.startVideoCapture() : RtcClient.stopVideoCapture();
|
|
||||||
|
|
||||||
!localUser.publishVideo
|
|
||||||
? RtcClient.publishStream(MediaType.VIDEO)
|
|
||||||
: RtcClient.unpublishStream(MediaType.VIDEO);
|
|
||||||
|
|
||||||
dispatch(
|
|
||||||
updateLocalUser({
|
|
||||||
publishVideo: !localUser.publishVideo,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (isVisionMode && isVideoPublished) {
|
|
||||||
RtcClient.setLocalVideoPlayer(room.localUser.username!, LocalVideoID);
|
|
||||||
} else {
|
|
||||||
RtcClient.setLocalVideoPlayer(room.localUser.username!);
|
|
||||||
}
|
|
||||||
}, [isVisionMode, isVideoPublished]);
|
|
||||||
|
|
||||||
return isVisionMode ? (
|
|
||||||
<div className={`${styles['camera-wrapper']} ${className}`} {...rest}>
|
|
||||||
{isVideoPublished ? (
|
|
||||||
<div id={LocalVideoID} className={styles['camera-player']} />
|
|
||||||
) : (
|
|
||||||
<div className={styles['camera-placeholder']}>
|
|
||||||
<img
|
|
||||||
src={CameraCloseNoteSVG}
|
|
||||||
alt="close"
|
|
||||||
className={styles['camera-placeholder-close-note']}
|
|
||||||
/>
|
|
||||||
<div>
|
|
||||||
请
|
|
||||||
<span onClick={handleOperateCamera} className={styles['camera-open-btn']}>
|
|
||||||
打开摄像头
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div>体验豆包视觉理解模型</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
) : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default CameraArea;
|
|
||||||
|
|
@ -3,13 +3,16 @@
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
* SPDX-license-identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { useRef, useEffect } from 'react';
|
import React, { useRef, useEffect, useState } from 'react';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector,useDispatch } from 'react-redux';
|
||||||
import { Tag, Spin } from '@arco-design/web-react';
|
import { Tag, Spin } from '@arco-design/web-react';
|
||||||
import { RootState } from '@/store';
|
import { RootState } from '@/store';
|
||||||
import Loading from '@/components/Loading/HorizonLoading';
|
import Loading from '@/components/Loading/HorizonLoading';
|
||||||
import Config from '@/config';
|
import Config from '@/config';
|
||||||
import styles from './index.module.less';
|
import styles from './index.module.less';
|
||||||
|
import { COMMAND, INTERRUPT_PRIORITY } from '@/utils/handler';
|
||||||
|
import RtcClient from '@/lib/RtcClient';
|
||||||
|
import { setCurrentMsg, setHistoryMsg } from '@/store/slices/room';
|
||||||
|
|
||||||
const lines: (string | React.ReactNode)[] = [];
|
const lines: (string | React.ReactNode)[] = [];
|
||||||
|
|
||||||
|
|
@ -17,9 +20,28 @@ function Conversation(props: React.HTMLAttributes<HTMLDivElement>) {
|
||||||
const { className, ...rest } = props;
|
const { className, ...rest } = props;
|
||||||
const msgHistory = useSelector((state: RootState) => state.room.msgHistory);
|
const msgHistory = useSelector((state: RootState) => state.room.msgHistory);
|
||||||
const { userId } = useSelector((state: RootState) => state.room.localUser);
|
const { userId } = useSelector((state: RootState) => state.room.localUser);
|
||||||
const { isAITalking, isUserTalking } = useSelector((state: RootState) => state.room);
|
const { isAITalking, isUserTalking, initMsg} = useSelector((state: RootState) => state.room);
|
||||||
const isAIReady = msgHistory.length > 0;
|
const isAIReady = msgHistory.length > 0;
|
||||||
const containerRef = useRef<HTMLDivElement>(null);
|
const containerRef = useRef<HTMLDivElement>(null);
|
||||||
|
const [isFirst,setIsFirst] = useState(true);
|
||||||
|
const [isAudioBotEnabled, setIsAudioBotEnabled] = useState(false);
|
||||||
|
|
||||||
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const checkAudioBotStatus = () => {
|
||||||
|
setIsAudioBotEnabled(RtcClient.getAudioBotEnabled());
|
||||||
|
};
|
||||||
|
|
||||||
|
// 初始检查
|
||||||
|
checkAudioBotStatus();
|
||||||
|
|
||||||
|
// 设置定时器定期检查
|
||||||
|
const timer = setInterval(checkAudioBotStatus, 1000);
|
||||||
|
|
||||||
|
// 清理函数
|
||||||
|
return () => clearInterval(timer);
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const container = containerRef.current;
|
const container = containerRef.current;
|
||||||
|
|
@ -28,6 +50,28 @@ function Conversation(props: React.HTMLAttributes<HTMLDivElement>) {
|
||||||
}
|
}
|
||||||
}, [msgHistory.length]);
|
}, [msgHistory.length]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if(isFirst && initMsg && isAudioBotEnabled){
|
||||||
|
RtcClient.commandAudioBot(COMMAND.EXTERNAL_TEXT_TO_LLM, INTERRUPT_PRIORITY.HIGH, initMsg);
|
||||||
|
dispatch(
|
||||||
|
setHistoryMsg({
|
||||||
|
text: initMsg,
|
||||||
|
user: RtcClient.basicInfo.user_id,
|
||||||
|
paragraph: true,
|
||||||
|
definite: true,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
dispatch(
|
||||||
|
setCurrentMsg({
|
||||||
|
text: initMsg,
|
||||||
|
user: RtcClient.basicInfo.user_id,
|
||||||
|
paragraph: true,
|
||||||
|
definite: true,
|
||||||
|
}))
|
||||||
|
setIsFirst(false)
|
||||||
|
}
|
||||||
|
},[isAudioBotEnabled])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={containerRef} className={`${styles.conversation} ${className}`} {...rest}>
|
<div ref={containerRef} className={`${styles.conversation} ${className}`} {...rest}>
|
||||||
{lines.map((line) => line)}
|
{lines.map((line) => line)}
|
||||||
|
|
@ -54,7 +98,7 @@ function Conversation(props: React.HTMLAttributes<HTMLDivElement>) {
|
||||||
{value}
|
{value}
|
||||||
<div className={styles['loading-wrapper']}>
|
<div className={styles['loading-wrapper']}>
|
||||||
{isAIReady && (isUserTalking || isAITalking) && index === msgHistory.length - 1 ? (
|
{isAIReady && (isUserTalking || isAITalking) && index === msgHistory.length - 1 ? (
|
||||||
<Loading gap={3} className={styles.loading} dotClassName={styles.dot} />
|
<Loading gap={1} className={styles.loading} dotClassName={styles.dot} />
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { useSelector } from 'react-redux';
|
|
||||||
import { useState } from 'react';
|
|
||||||
import { Drawer } from '@arco-design/web-react';
|
|
||||||
import { useDeviceState, useLeave } from '@/lib/useCommon';
|
|
||||||
import { RootState } from '@/store';
|
|
||||||
import { AI_MODEL } from '@/config';
|
|
||||||
import utils from '@/utils/utils';
|
|
||||||
import Menu from '../../Menu';
|
|
||||||
|
|
||||||
import style from './index.module.less';
|
|
||||||
import CameraOpenSVG from '@/assets/img/CameraOpen.svg';
|
|
||||||
import CameraCloseSVG from '@/assets/img/CameraClose.svg';
|
|
||||||
import MicOpenSVG from '@/assets/img/MicOpen.svg';
|
|
||||||
import SettingSVG from '@/assets/img/Setting.svg';
|
|
||||||
import MicCloseSVG from '@/assets/img/MicClose.svg';
|
|
||||||
import LeaveRoomSVG from '@/assets/img/LeaveRoom.svg';
|
|
||||||
|
|
||||||
function ToolBar(props: React.HTMLAttributes<HTMLDivElement>) {
|
|
||||||
const { className, ...rest } = props;
|
|
||||||
const room = useSelector((state: RootState) => state.room);
|
|
||||||
const [open, setOpen] = useState(false);
|
|
||||||
const model = room.aiConfig.Config.LLMConfig?.ModelName;
|
|
||||||
const leaveRoom = useLeave();
|
|
||||||
const { isAudioPublished, isVideoPublished, switchMic, switchCamera } = useDeviceState();
|
|
||||||
const handleSetting = () => {
|
|
||||||
setOpen(true);
|
|
||||||
};
|
|
||||||
return (
|
|
||||||
<div className={`${className} ${style.btns} ${utils.isMobile() ? style.column : ''}`} {...rest}>
|
|
||||||
{utils.isMobile() ? (
|
|
||||||
<img src={SettingSVG} onClick={handleSetting} className={style.setting} alt="setting" />
|
|
||||||
) : null}
|
|
||||||
<img
|
|
||||||
src={isAudioPublished ? MicOpenSVG : MicCloseSVG}
|
|
||||||
onClick={() => switchMic(true)}
|
|
||||||
className={style.btn}
|
|
||||||
alt="mic"
|
|
||||||
/>
|
|
||||||
{model === AI_MODEL.VISION ? (
|
|
||||||
<img
|
|
||||||
src={isVideoPublished ? CameraOpenSVG : CameraCloseSVG}
|
|
||||||
onClick={() => switchCamera(true)}
|
|
||||||
className={style.btn}
|
|
||||||
alt="camera"
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
''
|
|
||||||
)}
|
|
||||||
<img src={LeaveRoomSVG} onClick={leaveRoom} className={style.btn} alt="leave" />
|
|
||||||
{utils.isMobile() ? (
|
|
||||||
<Drawer
|
|
||||||
title="设置"
|
|
||||||
visible={open}
|
|
||||||
onCancel={() => setOpen(false)}
|
|
||||||
style={{
|
|
||||||
width: 'max-content',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Menu />
|
|
||||||
</Drawer>
|
|
||||||
) : null}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
export default ToolBar;
|
|
||||||
|
|
@ -4,280 +4,221 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding-top: 38px;
|
||||||
|
background-color: #F4F6FA;
|
||||||
|
|
||||||
|
.conversation {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
position: relative;
|
||||||
border-radius: 16px;
|
height: 0;
|
||||||
padding: 36px 72px;
|
display: flex;
|
||||||
box-sizing: border-box;
|
flex-direction: column;
|
||||||
|
flex:1 1 0;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
.conversation {
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
height: 100%;
|
|
||||||
/**
|
|
||||||
* 100% 为容器高度
|
|
||||||
* 128px 为上层 DouBao Card Height
|
|
||||||
* 24px 为 margin top
|
|
||||||
* 36px * 2 为容器 padding
|
|
||||||
* 128 + 24 + 36 * 2 = 224px
|
|
||||||
*/
|
|
||||||
max-height: calc(100% - 224px - 8px);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
padding-bottom: 12px;
|
|
||||||
// background-color: black;
|
|
||||||
overflow-x: hidden;
|
|
||||||
overflow-y: auto;
|
|
||||||
margin-top: 24px;
|
|
||||||
|
|
||||||
.sentence {
|
.sentence {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
.content {
|
|
||||||
width: max-content;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.user {
|
.content {
|
||||||
width: max-content;
|
width: max-content;
|
||||||
border: 0px solid;
|
background: #ffffff;
|
||||||
align-self: flex-end;
|
border-radius: 12px;
|
||||||
padding: 8px 12px 8px 12px;
|
padding: 10px 12px;
|
||||||
border-radius: 12px 0px 12px 12px;
|
}
|
||||||
background: var(--background-color-bg-5, rgba(241, 243, 245, 1));
|
|
||||||
margin-top: 12px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
.robot {
|
|
||||||
font-family: PingFang SC;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 400;
|
|
||||||
letter-spacing: 0.003em;
|
|
||||||
|
|
||||||
border: 0px solid;
|
|
||||||
align-self: flex-start;
|
|
||||||
padding: 3px 12px 3px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading-wrapper {
|
|
||||||
width: max-content;
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
.loading {
|
|
||||||
margin-left: 8px;
|
|
||||||
width: max-content;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot {
|
|
||||||
background-color: rgba(193, 163, 237, 1);
|
|
||||||
width: 8px;
|
|
||||||
height: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.aiReadying {
|
|
||||||
font-family: PingFang SC;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: rgba(27, 30, 61, 0.6);
|
|
||||||
text-align: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: center;
|
|
||||||
line-height: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aiReading-spin {
|
|
||||||
margin-right: 12px;
|
|
||||||
line-height: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.interruptTag {
|
|
||||||
width: max-content;
|
|
||||||
height: 22px;
|
|
||||||
padding: 0px 6px 0px 6px;
|
|
||||||
border-radius: 4px;
|
|
||||||
margin-left: 6px;
|
|
||||||
font-family: PingFang SC;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 22px;
|
|
||||||
letter-spacing: 0.003em;
|
|
||||||
color: var(--text-color-text-3, rgba(115, 122, 135, 1));
|
|
||||||
background: var(--security-unknown-tag-unknown-1, rgba(241, 243, 245, 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.conversation::-webkit-scrollbar {
|
.user {
|
||||||
width: 0px;
|
width: max-content;
|
||||||
height: 0px;
|
border: 0px solid;
|
||||||
|
align-self: flex-end;
|
||||||
|
margin-top: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
margin-right: 15px;
|
||||||
|
|
||||||
|
.content{
|
||||||
|
border-radius: 30px 30px 0 30px;
|
||||||
|
background-color: #1580FF;
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.robot {
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
letter-spacing: 0.003em;
|
||||||
|
|
||||||
|
border: 0px solid;
|
||||||
|
align-self: flex-start;
|
||||||
|
padding: 3px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.conversation::-webkit-scrollbar-thumb {
|
.loading-wrapper {
|
||||||
background: rgba(0,0,0,0);
|
width: max-content;
|
||||||
border-radius: 0px;
|
display: inline-block;
|
||||||
|
|
||||||
|
.loading {
|
||||||
|
margin-left: 8px;
|
||||||
|
width: max-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot {
|
||||||
|
background-color: rgba(193, 163, 237, 1);
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.conversation::-webkit-scrollbar-track {
|
.aiReadying {
|
||||||
background: rgba(0,0,0,0);
|
font-family: PingFang SC;
|
||||||
border-radius: 0px;
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: rgba(27, 30, 61, 0.6);
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
line-height: 28px;
|
||||||
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolBar {
|
.aiReading-spin {
|
||||||
position: absolute;
|
margin-right: 12px;
|
||||||
right: 0px;
|
|
||||||
margin-right: 36px;
|
|
||||||
bottom: 36px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.controller {
|
.interruptTag {
|
||||||
position: absolute;
|
width: max-content;
|
||||||
left: 0px;
|
height: 22px;
|
||||||
bottom: 36px;
|
padding: 0px 6px 0px 6px;
|
||||||
margin-left: 50%;
|
border-radius: 4px;
|
||||||
transform: translateX(-50%);
|
margin-left: 6px;
|
||||||
|
font-family: PingFang SC;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 22px;
|
||||||
|
letter-spacing: 0.003em;
|
||||||
|
color: var(--text-color-text-3, rgba(115, 122, 135, 1));
|
||||||
|
background: var(--security-unknown-tag-unknown-1, rgba(241, 243, 245, 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.conversation::-webkit-scrollbar {
|
||||||
|
width: 0px;
|
||||||
|
height: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.conversation::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(0, 0, 0, 0);
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.conversation::-webkit-scrollbar-track {
|
||||||
|
background: rgba(0, 0, 0, 0);
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controller {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 16px;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 8px 35px;
|
||||||
|
|
||||||
|
.talkWrapper {
|
||||||
|
--h: 16px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 8px 16px;
|
||||||
|
background-color: #e3efff;
|
||||||
|
border-radius: 20px;
|
||||||
|
user-select: none;
|
||||||
|
gap: 8px;
|
||||||
|
min-width: 124px;
|
||||||
|
color: #0078ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.declare {
|
.listenerDot {
|
||||||
position: absolute;
|
display: flex;
|
||||||
bottom: 8px;
|
align-items: center;
|
||||||
left: 12px;
|
justify-content: center;
|
||||||
color: var(--text-color-text-4, rgba(199, 204, 214, 1));
|
position: relative;
|
||||||
font-size: 10px;
|
height: var(--h);
|
||||||
font-weight: 400;
|
width: 36px;
|
||||||
line-height: 20px;
|
|
||||||
|
span {
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
margin: 0 1px;
|
||||||
|
background-color: #4898fc;
|
||||||
|
border-radius: 2px;
|
||||||
|
height: calc(var(--h) - var(--d) * 4px);
|
||||||
|
transition: height 0.2s ease;
|
||||||
|
opacity: calc(1 - var(--d) * 0.4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.isTalking {
|
||||||
|
span {
|
||||||
|
animation: soundWave 1s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
span:nth-child(1) {
|
||||||
|
animation-delay: 0s;
|
||||||
|
}
|
||||||
|
span:nth-child(2) {
|
||||||
|
animation-delay: 0.2s;
|
||||||
|
}
|
||||||
|
span:nth-child(3) {
|
||||||
|
animation-delay: 0.4s;
|
||||||
|
}
|
||||||
|
span:nth-child(4) {
|
||||||
|
animation-delay: 0.6s;
|
||||||
|
}
|
||||||
|
span:nth-child(5) {
|
||||||
|
animation-delay: 0.8s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes soundWave {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
height: 4px;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.microphoneWrapper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
padding: 10px 15px;
|
||||||
|
border-radius: 400px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mobile {
|
.mobile {
|
||||||
padding: 12px 28px;
|
padding-top: 12px;
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
color: rgba(148, 116, 255, 1);
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btns {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: flex-end;
|
|
||||||
align-items: center;
|
|
||||||
gap: 16px;
|
|
||||||
|
|
||||||
.setting {
|
|
||||||
background-color: rgba(111, 111, 111, 0.497);
|
|
||||||
border-radius: 50%;
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
padding: 12px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn:hover {
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn:active {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.column {
|
|
||||||
flex-direction: column !important;
|
|
||||||
align-items: flex-end !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.interrupt {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.08), 0px 0px 0px 1px rgba(221, 226, 233, 1);
|
|
||||||
border-color: #d9d9d9;
|
|
||||||
width: 81px;
|
|
||||||
height: 24px;
|
|
||||||
gap: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
|
||||||
-webkit-user-select: none; /* Safari */
|
|
||||||
-moz-user-select: none; /* Firefox */
|
|
||||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
|
||||||
|
|
||||||
.interrupt-text {
|
|
||||||
color: var(--text-color-text-3, rgba(115, 122, 135, 1));
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.camera-wrapper {
|
|
||||||
position: absolute;
|
|
||||||
top: 16px;
|
|
||||||
right: 16px;
|
|
||||||
width: 320px;
|
|
||||||
height: 200px;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--line-color-border-2, rgba(234, 237, 241, 1));
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
border: 0.81px solid var(--line-color-border-3, rgba(221, 226, 233, 1));
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 4;
|
|
||||||
|
|
||||||
.camera-player {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.camera-placeholder {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--text-color-text-3, rgba(115, 122, 135, 1));
|
|
||||||
|
|
||||||
.camera-placeholder-close-note {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.camera-open-btn {
|
|
||||||
color: var(--primary-color-primary-6, rgba(22, 100, 255, 1));
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -3,24 +3,18 @@
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
* SPDX-license-identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import AvatarCard from '@/components/AvatarCard';
|
|
||||||
import Conversation from './Conversation';
|
import Conversation from './Conversation';
|
||||||
import ToolBar from './ToolBar';
|
|
||||||
import CameraArea from './CameraArea';
|
|
||||||
import AudioController from './AudioController';
|
import AudioController from './AudioController';
|
||||||
import utils from '@/utils/utils';
|
import utils from '@/utils/utils';
|
||||||
import style from './index.module.less';
|
import style from './index.module.less';
|
||||||
import DoubaoAvatar from '@/assets/img/DoubaoAvatar.png';
|
|
||||||
|
|
||||||
function Room() {
|
function Room() {
|
||||||
return (
|
return (
|
||||||
<div className={`${style.wrapper} ${utils.isMobile() ? style.mobile : ''}`}>
|
<div className={`${style.wrapper} ${utils.isMobile() ? style.mobile : ''}`}>
|
||||||
<AvatarCard avatar={DoubaoAvatar} className={style.avatar} />
|
|
||||||
{utils.isMobile() ? null : <CameraArea />}
|
|
||||||
<Conversation className={style.conversation} />
|
<Conversation className={style.conversation} />
|
||||||
<ToolBar className={style.toolBar} />
|
|
||||||
<AudioController className={style.controller} />
|
<AudioController className={style.controller} />
|
||||||
<div className={style.declare}>AI生成内容由大模型生成,不能完全保障真实</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,6 @@
|
||||||
font-family: PingFang SC;
|
font-family: PingFang SC;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 18px;
|
|
||||||
letter-spacing: 0.003em;
|
letter-spacing: 0.003em;
|
||||||
color: rgba(27, 30, 61, 0.6);
|
color: rgba(27, 30, 61, 0.6);
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
.wrapper {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
gap: 24px;
|
|
||||||
padding: 8px 16px;
|
|
||||||
|
|
||||||
|
|
||||||
.label {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
line-height: 16px;
|
|
||||||
gap: 12px;
|
|
||||||
|
|
||||||
.label-text {
|
|
||||||
font-family: PingFang SC;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 22px;
|
|
||||||
letter-spacing: 0.003em;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.value {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 18px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { useMemo } from 'react';
|
|
||||||
import { useSelector, useDispatch } from 'react-redux';
|
|
||||||
import { MediaType } from '@volcengine/rtc';
|
|
||||||
import { Switch, Select } from '@arco-design/web-react';
|
|
||||||
import DrawerRowItem from '@/components/DrawerRowItem';
|
|
||||||
import { RootState } from '@/store';
|
|
||||||
import RtcClient from '@/lib/RtcClient';
|
|
||||||
import { useDeviceState } from '@/lib/useCommon';
|
|
||||||
import { updateSelectedDevice } from '@/store/slices/device';
|
|
||||||
import utils from '@/utils/utils';
|
|
||||||
import styles from './index.module.less';
|
|
||||||
|
|
||||||
interface IDeviceDrawerButtonProps {
|
|
||||||
type?: MediaType.AUDIO | MediaType.VIDEO;
|
|
||||||
}
|
|
||||||
|
|
||||||
const DEVICE_NAME = {
|
|
||||||
[MediaType.AUDIO]: '麦克风',
|
|
||||||
[MediaType.VIDEO]: '摄像头',
|
|
||||||
};
|
|
||||||
|
|
||||||
function DeviceDrawerButton(props: IDeviceDrawerButtonProps) {
|
|
||||||
const { type = MediaType.AUDIO } = props;
|
|
||||||
const device = useDeviceState();
|
|
||||||
const isEnable = type === MediaType.AUDIO ? device.isAudioPublished : device.isVideoPublished;
|
|
||||||
const switcher = type === MediaType.AUDIO ? device.switchMic : device.switchCamera;
|
|
||||||
const devicePermissions = useSelector((state: RootState) => state.device.devicePermissions);
|
|
||||||
const devices = useSelector((state: RootState) => state.device);
|
|
||||||
const selectedDevice =
|
|
||||||
type === MediaType.AUDIO ? devices.selectedMicrophone : devices.selectedCamera;
|
|
||||||
const permission = devicePermissions?.[type === MediaType.AUDIO ? 'audio' : 'video'];
|
|
||||||
|
|
||||||
const dispatch = useDispatch();
|
|
||||||
const deviceList = useMemo(
|
|
||||||
() => (type === MediaType.AUDIO ? devices.audioInputs : devices.videoInputs),
|
|
||||||
[devices]
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleDeviceChange = (value: string) => {
|
|
||||||
RtcClient.switchDevice(type, value);
|
|
||||||
if (type === MediaType.AUDIO) {
|
|
||||||
dispatch(
|
|
||||||
updateSelectedDevice({
|
|
||||||
selectedMicrophone: value,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (type === MediaType.VIDEO) {
|
|
||||||
dispatch(
|
|
||||||
updateSelectedDevice({
|
|
||||||
selectedCamera: value,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<DrawerRowItem
|
|
||||||
btnText={`${DEVICE_NAME[type]}设置`}
|
|
||||||
drawer={{
|
|
||||||
width: utils.isMobile() ? '100%' : undefined,
|
|
||||||
title: `${DEVICE_NAME[type]}设置`,
|
|
||||||
footer: false,
|
|
||||||
children: (
|
|
||||||
<div className={styles.wrapper}>
|
|
||||||
<div className={styles.label}>{DEVICE_NAME[type]}</div>
|
|
||||||
<div className={styles.value}>
|
|
||||||
<Switch
|
|
||||||
checked={isEnable}
|
|
||||||
size="small"
|
|
||||||
onChange={(enable) => switcher(enable)}
|
|
||||||
disabled={!permission}
|
|
||||||
/>
|
|
||||||
<Select style={{ width: 250 }} value={selectedDevice} onChange={handleDeviceChange}>
|
|
||||||
{deviceList.map((device) => (
|
|
||||||
<Select.Option key={device.deviceId} value={device.deviceId}>
|
|
||||||
{device.label}
|
|
||||||
</Select.Option>
|
|
||||||
))}
|
|
||||||
</Select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default DeviceDrawerButton;
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
.interrupt {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.label {
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 22px;
|
|
||||||
color: var(--text-color-text-1, rgba(12, 13, 14, 1));
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { Popover, Switch } from '@arco-design/web-react';
|
|
||||||
import { IconQuestionCircle } from '@arco-design/web-react/icon';
|
|
||||||
import { useState } from 'react';
|
|
||||||
import { useDispatch } from 'react-redux';
|
|
||||||
import Config from '@/config';
|
|
||||||
import styles from './index.module.less';
|
|
||||||
import RtcClient from '@/lib/RtcClient';
|
|
||||||
import { clearHistoryMsg } from '@/store/slices/room';
|
|
||||||
|
|
||||||
function Interrupt() {
|
|
||||||
const dispatch = useDispatch();
|
|
||||||
const [switchAble, setSwitchAble] = useState(true);
|
|
||||||
const [enable, setEnable] = useState(Config.InterruptMode);
|
|
||||||
const handleChange = () => {
|
|
||||||
setSwitchAble(false);
|
|
||||||
setEnable(!enable);
|
|
||||||
Config.InterruptMode = !enable;
|
|
||||||
if (RtcClient.getAudioBotEnabled()) {
|
|
||||||
dispatch(clearHistoryMsg());
|
|
||||||
}
|
|
||||||
RtcClient.updateAudioBot();
|
|
||||||
setTimeout(() => {
|
|
||||||
setSwitchAble(true);
|
|
||||||
}, 3000);
|
|
||||||
};
|
|
||||||
return (
|
|
||||||
<div className={styles.interrupt}>
|
|
||||||
<div className={styles.label}>
|
|
||||||
语音打断
|
|
||||||
<Popover content="开启后,在说话时可通过语音打断, 切换语音打断模式将重新开始对话">
|
|
||||||
<IconQuestionCircle className={styles.icon} />
|
|
||||||
</Popover>
|
|
||||||
</div>
|
|
||||||
<div className={styles.value}>
|
|
||||||
<Switch size="small" loading={!switchAble} checked={enable} onChange={handleChange} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Interrupt;
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
.device {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 16px;
|
|
||||||
background-color: white;
|
|
||||||
border: 1px solid var(--line-color-border-2, rgba(234, 237, 241, 1));
|
|
||||||
padding: 16px 24px 16px 24px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { MediaType } from '@volcengine/rtc';
|
|
||||||
import DeviceDrawerButton from '../DeviceDrawerButton';
|
|
||||||
import { useVisionMode } from '@/lib/useCommon';
|
|
||||||
import Interrupt from '../Interrupt';
|
|
||||||
import styles from './index.module.less';
|
|
||||||
|
|
||||||
function Operation() {
|
|
||||||
const isVisionMode = useVisionMode();
|
|
||||||
return (
|
|
||||||
<div className={`${styles.box} ${styles.device}`}>
|
|
||||||
<Interrupt />
|
|
||||||
<DeviceDrawerButton />
|
|
||||||
{isVisionMode ? <DeviceDrawerButton type={MediaType.VIDEO} /> : ''}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Operation;
|
|
||||||
|
|
@ -1,184 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
.wrapper {
|
|
||||||
width: 200px;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 16px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.info {
|
|
||||||
.bold {
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 22px;
|
|
||||||
color: var(--text-color-text-1, rgba(12, 13, 14, 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
.gray {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 22px;
|
|
||||||
color: var(--text-color-text-3, rgba(115, 122, 135, 1));
|
|
||||||
|
|
||||||
.value {
|
|
||||||
width: 65%;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 500;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global {
|
|
||||||
.arco-typography {
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.buttonArea {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-top: 8px;
|
|
||||||
|
|
||||||
.getMore {
|
|
||||||
width: 100%;
|
|
||||||
color: #fff;
|
|
||||||
height: 32px;
|
|
||||||
text-shadow: none;
|
|
||||||
box-shadow: none;
|
|
||||||
border: none;
|
|
||||||
padding: 0px 24px;
|
|
||||||
background: linear-gradient(56.59deg, #3C73FF 15.53%, #6E41EE 62.28%, #D641EE 90.32%),
|
|
||||||
radial-gradient(203.56% 121.74% at 27.12% -21.74%, rgba(82, 182, 255, 0.2) 0%, rgba(143, 65, 238, 0) 100%),
|
|
||||||
radial-gradient(134.75% 51.95% at 26.69% 5.8%, rgba(157, 214, 255, 0.1) 0%, rgba(143, 65, 238, 0) 100%),
|
|
||||||
radial-gradient(82.39% 83.92% at 147.46% 76.45%, rgba(82, 99, 255, 0.8) 0%, rgba(143, 65, 238, 0) 100%);
|
|
||||||
border-radius: 4px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
color: var(--Primary-Neutral-0, #FFF);
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
/* Body/body-2 medium */
|
|
||||||
font-family: "PingFang SC";
|
|
||||||
font-size: 13px;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 500;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.getMore:hover {
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.getMore:active {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.getMore[disabled],
|
|
||||||
.getMore[disabled]:hover {
|
|
||||||
color: #fff;
|
|
||||||
background: linear-gradient(95.87deg, #1664FF 0%, #8040FF 97.7%);
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.questions {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 8px;
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 20px;
|
|
||||||
color: rgba(66, 70, 78, 1);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.device {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 16px;
|
|
||||||
background-color: white;
|
|
||||||
border: 1px solid var(--line-color-border-2, rgba(234, 237, 241, 1));
|
|
||||||
padding: 16px 24px 16px 24px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.resetTime {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
border-radius: 16px;
|
|
||||||
padding: 0px 24px 8px 24px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
user-select: none;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
|
|
||||||
.normalLine {
|
|
||||||
color: #42464E;
|
|
||||||
/* Body/body-1 regular */
|
|
||||||
font-family: "PingFang SC";
|
|
||||||
font-size: 12px;
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 20px; /* 166.667% */
|
|
||||||
letter-spacing: 0.036px;
|
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-camera-wrapper {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 16px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
|
|
||||||
.mobile-camera {
|
|
||||||
position: relative !important;
|
|
||||||
width: 100% !important;
|
|
||||||
height: 100% !important;
|
|
||||||
top: auto !important;
|
|
||||||
right: auto !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,93 +0,0 @@
|
||||||
/**
|
|
||||||
* Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
|
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
|
||||||
*/
|
|
||||||
|
|
||||||
import VERTC from '@volcengine/rtc';
|
|
||||||
import { Tooltip, Typography } from '@arco-design/web-react';
|
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
|
||||||
import { useVisionMode } from '@/lib/useCommon';
|
|
||||||
import { RootState } from '@/store';
|
|
||||||
import RtcClient from '@/lib/RtcClient';
|
|
||||||
import Operation from './components/Operation';
|
|
||||||
import { Questions } from '@/config';
|
|
||||||
import { COMMAND, INTERRUPT_PRIORITY } from '@/utils/handler';
|
|
||||||
import CameraArea from '../MainArea/Room/CameraArea';
|
|
||||||
import { setCurrentMsg, setHistoryMsg } from '@/store/slices/room';
|
|
||||||
import utils from '@/utils/utils';
|
|
||||||
import styles from './index.module.less';
|
|
||||||
|
|
||||||
function Menu() {
|
|
||||||
const dispatch = useDispatch();
|
|
||||||
const room = useSelector((state: RootState) => state.room);
|
|
||||||
const scene = room.scene;
|
|
||||||
const isJoined = room?.isJoined;
|
|
||||||
const isVisionMode = useVisionMode();
|
|
||||||
|
|
||||||
const handleQuestion = (question: string) => {
|
|
||||||
RtcClient.commandAudioBot(COMMAND.EXTERNAL_TEXT_TO_LLM, INTERRUPT_PRIORITY.HIGH, question);
|
|
||||||
dispatch(
|
|
||||||
setHistoryMsg({
|
|
||||||
text: question,
|
|
||||||
user: RtcClient.basicInfo.user_id,
|
|
||||||
paragraph: true,
|
|
||||||
definite: true,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
dispatch(
|
|
||||||
setCurrentMsg({
|
|
||||||
text: question,
|
|
||||||
user: RtcClient.basicInfo.user_id,
|
|
||||||
paragraph: true,
|
|
||||||
definite: true,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={styles.wrapper}>
|
|
||||||
{isJoined && utils.isMobile() && isVisionMode ? (
|
|
||||||
<div className={styles['mobile-camera-wrapper']}>
|
|
||||||
<CameraArea className={styles['mobile-camera']} />
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
<div className={`${styles.box} ${styles.info}`}>
|
|
||||||
<div className={styles.bold}>Demo Version 1.4.0</div>
|
|
||||||
<div className={styles.bold}>SDK Version {VERTC.getSdkVersion()}</div>
|
|
||||||
{isJoined ? (
|
|
||||||
<div className={styles.gray}>
|
|
||||||
房间ID{' '}
|
|
||||||
<Tooltip content={room.roomId || '-'}>
|
|
||||||
<Typography.Paragraph
|
|
||||||
ellipsis={{
|
|
||||||
rows: 1,
|
|
||||||
expandable: false,
|
|
||||||
}}
|
|
||||||
className={styles.value}
|
|
||||||
>
|
|
||||||
{room.roomId || '-'}
|
|
||||||
</Typography.Paragraph>
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
''
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
{isJoined ? (
|
|
||||||
<div className={`${styles.box} ${styles.questions}`}>
|
|
||||||
<div className={styles.title}>点击下述问题进行提问:</div>
|
|
||||||
{Questions[scene].map((question) => (
|
|
||||||
<div onClick={() => handleQuestion(question)} className={styles.line} key={question}>
|
|
||||||
{question}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
''
|
|
||||||
)}
|
|
||||||
{isJoined ? <Operation /> : ''}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Menu;
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
width: calc(100% - 220px);
|
width: calc(100% - 220px);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin-right: 2%;
|
margin-right: 2%;
|
||||||
background-color: white;
|
background: linear-gradient( 180deg, #fff 0%, #eee 100%);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,8 @@
|
||||||
* SPDX-license-identifier: BSD-3-Clause
|
* SPDX-license-identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Header from '@/components/Header';
|
|
||||||
import ResizeWrapper from '@/components/ResizeWrapper';
|
import ResizeWrapper from '@/components/ResizeWrapper';
|
||||||
import Menu from './Menu';
|
|
||||||
import utils from '@/utils/utils';
|
import utils from '@/utils/utils';
|
||||||
import MainArea from './MainArea';
|
import MainArea from './MainArea';
|
||||||
import styles from './index.module.less';
|
import styles from './index.module.less';
|
||||||
|
|
@ -13,7 +12,6 @@ import styles from './index.module.less';
|
||||||
export default function () {
|
export default function () {
|
||||||
return (
|
return (
|
||||||
<ResizeWrapper className={styles.container}>
|
<ResizeWrapper className={styles.container}>
|
||||||
<Header />
|
|
||||||
<div
|
<div
|
||||||
className={styles.main}
|
className={styles.main}
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -23,11 +21,6 @@ export default function () {
|
||||||
<div className={`${styles.mainArea} ${utils.isMobile() ? styles.isMobile : ''}`}>
|
<div className={`${styles.mainArea} ${utils.isMobile() ? styles.isMobile : ''}`}>
|
||||||
<MainArea />
|
<MainArea />
|
||||||
</div>
|
</div>
|
||||||
{utils.isMobile() ? null : (
|
|
||||||
<div className={styles.operationArea}>
|
|
||||||
<Menu />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</ResizeWrapper>
|
</ResizeWrapper>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -92,11 +92,12 @@ export interface RoomState {
|
||||||
definite: boolean;
|
definite: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
initMsg: string // 初始化信息
|
||||||
}
|
}
|
||||||
|
|
||||||
const initialState: RoomState = {
|
const initialState: RoomState = {
|
||||||
time: -1,
|
time: -1,
|
||||||
scene: SCENE.INTELLIGENT_ASSISTANT,
|
scene: SCENE.CUSTOM,
|
||||||
remoteUsers: [],
|
remoteUsers: [],
|
||||||
localUser: {
|
localUser: {
|
||||||
publishAudio: true,
|
publishAudio: true,
|
||||||
|
|
@ -113,12 +114,16 @@ const initialState: RoomState = {
|
||||||
|
|
||||||
msgHistory: [],
|
msgHistory: [],
|
||||||
currentConversation: {},
|
currentConversation: {},
|
||||||
|
initMsg:''
|
||||||
};
|
};
|
||||||
|
|
||||||
export const roomSlice = createSlice({
|
export const roomSlice = createSlice({
|
||||||
name: 'room',
|
name: 'room',
|
||||||
initialState,
|
initialState,
|
||||||
reducers: {
|
reducers: {
|
||||||
|
setInitMsg:(state,{payload})=>{
|
||||||
|
state.initMsg = payload
|
||||||
|
},
|
||||||
localJoinRoom: (
|
localJoinRoom: (
|
||||||
state,
|
state,
|
||||||
{
|
{
|
||||||
|
|
@ -278,6 +283,7 @@ export const {
|
||||||
setInterruptMsg,
|
setInterruptMsg,
|
||||||
updateNetworkQuality,
|
updateNetworkQuality,
|
||||||
updateScene,
|
updateScene,
|
||||||
|
setInitMsg
|
||||||
} = roomSlice.actions;
|
} = roomSlice.actions;
|
||||||
|
|
||||||
export default roomSlice.reducer;
|
export default roomSlice.reducer;
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,7 @@
|
||||||
|
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import logger from './logger';
|
import logger from './logger';
|
||||||
import {
|
import { setCurrentMsg, setHistoryMsg, setInterruptMsg, updateAITalkState } from '@/store/slices/room';
|
||||||
setCurrentMsg,
|
|
||||||
setHistoryMsg,
|
|
||||||
setInterruptMsg,
|
|
||||||
updateAITalkState,
|
|
||||||
} from '@/store/slices/room';
|
|
||||||
import RtcClient from '@/lib/RtcClient';
|
import RtcClient from '@/lib/RtcClient';
|
||||||
import Utils from '@/utils/utils';
|
import Utils from '@/utils/utils';
|
||||||
|
|
||||||
|
|
@ -141,8 +136,8 @@ export const useMessageHandler = () => {
|
||||||
ToolCallID: parsed?.tool_calls?.[0]?.id,
|
ToolCallID: parsed?.tool_calls?.[0]?.id,
|
||||||
Content: map[name.toLocaleLowerCase().replaceAll('_', '')],
|
Content: map[name.toLocaleLowerCase().replaceAll('_', '')],
|
||||||
}),
|
}),
|
||||||
'func',
|
'func'
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,7 @@
|
||||||
import { Msg, RoomState } from '@/store/slices/room';
|
import { Msg, RoomState } from '@/store/slices/room';
|
||||||
import RtcClient from '@/lib/RtcClient';
|
import RtcClient from '@/lib/RtcClient';
|
||||||
|
|
||||||
|
|
||||||
class Utils {
|
class Utils {
|
||||||
|
|
||||||
formatTime = (time: number): string => {
|
formatTime = (time: number): string => {
|
||||||
if (time < 0) {
|
if (time < 0) {
|
||||||
return '00:00';
|
return '00:00';
|
||||||
|
|
@ -75,10 +73,7 @@ class Utils {
|
||||||
if (arr.length) {
|
if (arr.length) {
|
||||||
const last = arr.at(-1)!;
|
const last = arr.at(-1)!;
|
||||||
const { user, value, isInterrupted } = last;
|
const { user, value, isInterrupted } = last;
|
||||||
if (
|
if ((added.user === RtcClient.basicInfo.user_id && last.user === added.user) || (user === added.user && added.value.startsWith(value) && value.trim())) {
|
||||||
(added.user === RtcClient.basicInfo.user_id && last.user === added.user) ||
|
|
||||||
(user === added.user && added.value.startsWith(value) && value.trim())
|
|
||||||
) {
|
|
||||||
arr.pop();
|
arr.pop();
|
||||||
added.isInterrupted = isInterrupted;
|
added.isInterrupted = isInterrupted;
|
||||||
}
|
}
|
||||||
|
|
@ -131,8 +126,7 @@ class Utils {
|
||||||
type += String.fromCharCode(typeBuffer[i]);
|
type += String.fromCharCode(typeBuffer[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const length =
|
const length = (lengthBuffer[0] << 24) | (lengthBuffer[1] << 16) | (lengthBuffer[2] << 8) | lengthBuffer[3];
|
||||||
(lengthBuffer[0] << 24) | (lengthBuffer[1] << 16) | (lengthBuffer[2] << 8) | lengthBuffer[3];
|
|
||||||
|
|
||||||
const value = new TextDecoder().decode(valueBuffer.subarray(0, length));
|
const value = new TextDecoder().decode(valueBuffer.subarray(0, length));
|
||||||
|
|
||||||
|
|
|
||||||