mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-28 11:54:20 +08:00
* [improvement][Chat] Support agent permission management #1143 * [improvement][chat]Iterate LLM prompts of parsing and correction. * [improvement][headless]Clean code logic of headless core. * (fix) (chat) 记忆管理更新不生效 (#1912) * [improvement][headless-fe] Added null-check conditions to the data formatting function. * [improvement][headless]Clean code logic of headless translator. * [improvement][headless-fe] Added permissions management for agents. * [improvement][headless-fe] Unified the assistant's permission settings interaction to match the system style. * [improvement](Dict)Support returns dict task list of dimensions by page * [improvement][headless-fe] Revised the interaction for semantic modeling routing and implemented the initial version of metric management switching. * [improvement][launcher]Set system property `s2.test` in junit tests in order to facilitate conditional breakpoints. * [improvement][headless] add validateAndQuery interface in SqlQueryApiController * [improvement][launcher]Use API to get element ID avoiding hard-code. * [improvement][launcher]Support DuckDB database and refactor translator code structure. --------- Co-authored-by: lxwcodemonkey <jolunoluo@tencent.com> Co-authored-by: tristanliu <tristanliu@tencent.com> Co-authored-by: daikon12 <1059907724@qq.com> Co-authored-by: lexluo09 <39718951+lexluo09@users.noreply.github.com>
296 lines
7.6 KiB
TypeScript
296 lines
7.6 KiB
TypeScript
export const ROUTE_AUTH_CODES = { SYSTEM_ADMIN: 'SYSTEM_ADMIN' };
|
|
|
|
const ENV_KEY = {
|
|
CHAT: 'chat',
|
|
SEMANTIC: 'semantic',
|
|
};
|
|
|
|
const { APP_TARGET } = process.env;
|
|
|
|
const ROUTES = [
|
|
{
|
|
path: '/chat/mobile',
|
|
name: 'chat',
|
|
component: './ChatPage',
|
|
hideInMenu: true,
|
|
layout: false,
|
|
envEnableList: [ENV_KEY.CHAT],
|
|
},
|
|
{
|
|
path: '/chat/external',
|
|
name: 'chat',
|
|
component: './ChatPage',
|
|
hideInMenu: true,
|
|
layout: false,
|
|
envEnableList: [ENV_KEY.CHAT],
|
|
},
|
|
{
|
|
path: '/chat',
|
|
name: 'chat',
|
|
component: './ChatPage',
|
|
envEnableList: [ENV_KEY.CHAT],
|
|
},
|
|
// {
|
|
// path: '/chatSetting/model/:domainId?/:modelId?/:menuKey?',
|
|
// component: './SemanticModel/ChatSetting/ChatSetting',
|
|
// name: 'chatSetting',
|
|
// envEnableList: [ENV_KEY.CHAT],
|
|
// },
|
|
{
|
|
path: '/agent',
|
|
name: 'agent',
|
|
component: './Agent',
|
|
envEnableList: [ENV_KEY.CHAT],
|
|
},
|
|
{
|
|
path: '/plugin',
|
|
name: 'plugin',
|
|
component: './ChatPlugin',
|
|
envEnableList: [ENV_KEY.CHAT],
|
|
},
|
|
{
|
|
path: '/model/metric/edit/:metricId',
|
|
name: 'metricEdit',
|
|
hideInMenu: true,
|
|
component: './SemanticModel/Metric/Edit',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
},
|
|
{
|
|
path: '/model/',
|
|
component: './SemanticModel/',
|
|
name: 'semanticModel',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
routes: [
|
|
{
|
|
path: '/model/',
|
|
redirect: '/model/domain',
|
|
},
|
|
{
|
|
path: '/model/domain/',
|
|
component: './SemanticModel/OverviewContainer',
|
|
routes: [
|
|
{
|
|
path: '/model/domain/:domainId',
|
|
component: './SemanticModel/DomainManager',
|
|
routes: [
|
|
{
|
|
path: '/model/domain/:domainId/:menuKey',
|
|
component: './SemanticModel/DomainManager',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/model/domain/manager/:domainId/:modelId',
|
|
component: './SemanticModel/ModelManager',
|
|
routes: [
|
|
{
|
|
path: '/model/domain/manager/:domainId/:modelId/:menuKey',
|
|
component: './SemanticModel/ModelManager',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/model/metric/:domainId/:modelId/:metricId',
|
|
component: './SemanticModel/Metric/Edit',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
// routes: [
|
|
// {
|
|
// path: '/model/manager/:domainId/:modelId/:menuKey',
|
|
// component: './SemanticModel/ModelManager',
|
|
// },
|
|
// ],
|
|
},
|
|
// {
|
|
// path: '/model/manager/',
|
|
// component: './SemanticModel/OverviewContainer',
|
|
// routes: [
|
|
// {
|
|
// path: '/model/manager/:domainId/:modelId',
|
|
// component: './SemanticModel/ModelManager',
|
|
// routes: [
|
|
// {
|
|
// path: '/model/manager/:domainId/:modelId/:menuKey',
|
|
// component: './SemanticModel/ModelManager',
|
|
// },
|
|
// ],
|
|
// },
|
|
// ],
|
|
// },
|
|
// {
|
|
// path: '/model/:domainId',
|
|
// component: './SemanticModel/DomainManager',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// routes: [
|
|
// {
|
|
// path: '/model/:domainId/:menuKey',
|
|
// component: './SemanticModel/DomainManager',
|
|
// },
|
|
// ],
|
|
// },
|
|
// {
|
|
// path: '/model/manager/:domainId/:modelId',
|
|
// component: './SemanticModel/ModelManager',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// routes: [
|
|
// {
|
|
// path: '/model/manager/:domainId/:modelId/:menuKey',
|
|
// component: './SemanticModel/ModelManager',
|
|
// },
|
|
// ],
|
|
// },
|
|
|
|
// {
|
|
// path: '/model/:domainId/:modelId/:menuKey',
|
|
// component: './SemanticModel/DomainManager',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// },
|
|
// {
|
|
// path: '/model/:domainId/:modelId/metric',
|
|
// component: './SemanticModel/components/ModelMetric',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// routes: [
|
|
// {
|
|
// path: '/model/:domainId/:modelId/metric/list',
|
|
// component: './SemanticModel/components/ClassMetricTable',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// },
|
|
// ],
|
|
// },
|
|
],
|
|
},
|
|
// {
|
|
// path: '/model/',
|
|
// component: './SemanticModel/DomainManager',
|
|
// name: 'semanticModel',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// routes: [
|
|
// {
|
|
// path: '/model/:domainId/:modelId',
|
|
// component: './SemanticModel/DomainManager',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// },
|
|
// {
|
|
// path: '/model/:domainId/:modelId/:menuKey',
|
|
// component: './SemanticModel/DomainManager',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// },
|
|
// {
|
|
// path: '/model/:domainId/:modelId/metric',
|
|
// component: './SemanticModel/components/ModelMetric',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// routes: [
|
|
// {
|
|
// path: '/model/:domainId/:modelId/metric/list',
|
|
// component: './SemanticModel/components/ClassMetricTable',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// },
|
|
// ],
|
|
// },
|
|
// ],
|
|
// },
|
|
|
|
// {
|
|
// path: '/model/:domainId/:modelId/:menuKey',
|
|
// component: './SemanticModel/DomainManager',
|
|
// name: 'semanticModel',
|
|
// envEnableList: [ENV_KEY.SEMANTIC],
|
|
// },
|
|
|
|
{
|
|
path: '/metric',
|
|
name: 'metric',
|
|
component: './SemanticModel/Metric',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
routes: [
|
|
{
|
|
path: '/metric',
|
|
redirect: '/metric/market',
|
|
},
|
|
{
|
|
path: '/metric/market',
|
|
component: './SemanticModel/Metric/Market',
|
|
hideInMenu: true,
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
},
|
|
{
|
|
path: '/metric/detail/:metricId',
|
|
name: 'metricDetail',
|
|
hideInMenu: true,
|
|
component: './SemanticModel/Metric/Detail',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
},
|
|
{
|
|
path: '/metric/detail/edit/:metricId',
|
|
name: 'metricDetail',
|
|
hideInMenu: true,
|
|
component: './SemanticModel/Metric/Edit',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/tag',
|
|
name: 'tag',
|
|
component: './SemanticModel/Insights',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
hideInMenu: process.env.SHOW_TAG ? false : true,
|
|
routes: [
|
|
{
|
|
path: '/tag',
|
|
redirect: '/tag/market',
|
|
},
|
|
{
|
|
path: '/tag/market',
|
|
component: './SemanticModel/Insights/Market',
|
|
hideInMenu: true,
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
},
|
|
{
|
|
path: '/tag/detail/:tagId',
|
|
name: 'tagDetail',
|
|
hideInMenu: true,
|
|
component: './SemanticModel/Insights/Detail',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
},
|
|
],
|
|
},
|
|
|
|
{
|
|
path: '/login',
|
|
name: 'login',
|
|
layout: false,
|
|
hideInMenu: true,
|
|
component: './Login',
|
|
},
|
|
{
|
|
path: '/database',
|
|
name: 'database',
|
|
component: './SemanticModel/components/Database/DatabaseTable',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
},
|
|
{
|
|
path: '/llm',
|
|
name: 'llm',
|
|
component: './SemanticModel/components/LLM/LlmTable',
|
|
envEnableList: [ENV_KEY.SEMANTIC],
|
|
},
|
|
{
|
|
path: '/system',
|
|
name: 'system',
|
|
component: './System',
|
|
access: ROUTE_AUTH_CODES.SYSTEM_ADMIN,
|
|
},
|
|
{
|
|
path: '/',
|
|
redirect: '/model',
|
|
},
|
|
{
|
|
path: '/401',
|
|
component: './401',
|
|
},
|
|
];
|
|
|
|
export default ROUTES;
|