mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 03:13:41 +08:00
feat(chat-console): surface Sessions admin via header menu (#183)
This commit is contained in:
parent
82540a5fcb
commit
fe62a98c8f
@ -181,6 +181,7 @@ export default {
|
||||
startNewChat: 'Start a new chat above',
|
||||
messages: '{count} messages',
|
||||
configModel: 'Configure Model',
|
||||
openSessions: 'Session Admin',
|
||||
clearMessages: 'Clear Messages',
|
||||
goToModelSettings: 'Go to Model Settings',
|
||||
configModelFirst: 'Please configure a model first',
|
||||
|
||||
@ -181,6 +181,7 @@ export default {
|
||||
startNewChat: '开始新对话吧',
|
||||
messages: '{count} 条消息',
|
||||
configModel: '配置模型',
|
||||
openSessions: '会话管理',
|
||||
clearMessages: '清空消息',
|
||||
goToModelSettings: '前往模型设置',
|
||||
configModelFirst: '请先配置模型',
|
||||
|
||||
@ -274,8 +274,17 @@ const router = createRouter({
|
||||
component: () => import('@/views/Forbidden.vue'),
|
||||
meta: { title: 'Forbidden' },
|
||||
},
|
||||
// ==================== Sessions admin ====================
|
||||
// Cross-channel conversation manager. Surfaced from ChatConsole's
|
||||
// header overflow menu so the user can audit / switch model per
|
||||
// conversation without leaving the chat surface.
|
||||
{
|
||||
path: 'sessions',
|
||||
name: 'Sessions',
|
||||
component: () => import('@/views/Sessions.vue'),
|
||||
meta: { title: 'sessions.title' },
|
||||
},
|
||||
// ==================== Redirects (backward compatibility) ====================
|
||||
{ path: 'sessions', redirect: '/chat' },
|
||||
{ path: 'workspace', redirect: '/settings/agent-context' },
|
||||
{ path: 'security/workspaces', redirect: '/settings/workspaces' },
|
||||
{ path: 'security/members', redirect: '/settings/members' },
|
||||
|
||||
@ -366,12 +366,14 @@ const headerBtnRef = ref<HTMLElement | null>(null)
|
||||
|
||||
const headerMenuItems = computed<DropdownMenuItem[]>(() => [
|
||||
{ key: 'config', label: t('chat.configModel') },
|
||||
{ key: 'sessions', label: t('chat.openSessions') },
|
||||
{ divider: true },
|
||||
{ key: 'clear', label: t('chat.clearMessages'), danger: true },
|
||||
])
|
||||
|
||||
function onHeaderMenuSelect(item: DropdownMenuItem) {
|
||||
if (item.key === 'config') goToModelSettings()
|
||||
else if (item.key === 'sessions') router.push('/sessions')
|
||||
else if (item.key === 'clear') clearMessages()
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user