add llm config

This commit is contained in:
Chuck1sn
2025-05-24 13:29:09 +08:00
parent 43728ee733
commit c2d5fddcc0
22 changed files with 675 additions and 38 deletions

View File

@@ -16,6 +16,7 @@ export enum RoutePath {
POSITIONVIEW = "positions",
CREATEUSERVIEW = "create-user",
AICHATVIEW = "ai/chat",
LLMCONFIGVIEW = "llm/config",
SCHEDULERVIEW = "scheduler",
UPSERTUSERVIEW = "upsert-user",
UPSERTROLEVIEW = "upsert-role",
@@ -41,6 +42,7 @@ export enum RouteName {
POSITIONVIEW = "positions",
CREATEUSERVIEW = "create-user",
AICHATVIEW = "ai/chat",
LLMCONFIGVIEW = "llm/config",
SCHEDULERVIEW = "scheduler",
UPSERTUSERVIEW = "upsert-user",
UPSERTROLEVIEW = "upsert-role",
@@ -67,4 +69,6 @@ export enum EPermission {
WRITE_USER_ROLE_PERMISSION = "WRITE_USER_ROLE_PERMISSION",
DELETE_USER_ROLE_PERMISSION = "DELETE_USER_ROLE_PERMISSION",
READ_USER_ROLE_PERMISSION = "READ_USER_ROLE_PERMISSION",
READ_LLM_CONFIG_PERMISSION = "READ_LLM_CONFIG_PERMISSION",
WRITE_LLM_CONFIG_PERMISSION = "WRITE_LLM_CONFIG_PERMISSION",
}

View File

@@ -8,7 +8,15 @@ const aiRoutes: RouteRecordRaw[] = [
component: () => import("@/views/AiChatView.vue"),
meta: {
requiresAuth: true,
// hasPermission: EPermission.READ_USER_ROLE_PERMISSION,
},
},
{
path: RoutePath.LLMCONFIGVIEW,
name: RouteName.LLMCONFIGVIEW,
component: () => import("@/views/LlmConfigView.vue"),
meta: {
requiresAuth: true,
hasPermission: EPermission.READ_LLM_CONFIG_PERMISSION,
},
},
];