mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
feat: rename info to status, add /status slash command
Rename session info endpoint from /sessions/:id/info to /sessions/:id/status and update frontend tab label accordingly. Add /status slash command that displays current session metrics (message count, context usage, cache hit rate, used skills) as formatted text in any channel.
This commit is contained in:
@@ -289,11 +289,11 @@
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="activeRightTab === 'info'"
|
||||
v-if="activeRightTab === 'status'"
|
||||
class="absolute inset-0"
|
||||
>
|
||||
<SessionInfoPanel
|
||||
:visible="activeRightTab === 'info'"
|
||||
:visible="activeRightTab === 'status'"
|
||||
:override-model-id="overrideModelId"
|
||||
/>
|
||||
</div>
|
||||
@@ -398,7 +398,7 @@ const reasoningPopoverOpen = ref(false)
|
||||
|
||||
// ---- Right sidebar panel ----
|
||||
|
||||
type RightTabId = 'terminal' | 'files' | 'info'
|
||||
type RightTabId = 'terminal' | 'files' | 'status'
|
||||
|
||||
interface RightTab {
|
||||
id: RightTabId
|
||||
@@ -409,7 +409,7 @@ interface RightTab {
|
||||
const rightTabs = computed<RightTab[]>(() => [
|
||||
{ id: 'terminal', label: 'Terminal', icon: TerminalSquare },
|
||||
{ id: 'files', label: t('chat.files'), icon: FolderOpen },
|
||||
{ id: 'info', label: 'Info', icon: BarChart3 },
|
||||
{ id: 'status', label: 'Status', icon: BarChart3 },
|
||||
])
|
||||
|
||||
const activeRightTab = ref<RightTabId | null>(null)
|
||||
|
||||
@@ -104,7 +104,7 @@ import { storeToRefs } from 'pinia'
|
||||
import { useQuery } from '@pinia/colada'
|
||||
import { Sparkles, ExternalLink } from 'lucide-vue-next'
|
||||
import { ScrollArea } from '@memohai/ui'
|
||||
import { getBotsByBotIdSessionsBySessionIdInfo } from '@memohai/sdk'
|
||||
import { getBotsByBotIdSessionsBySessionIdStatus } from '@memohai/sdk'
|
||||
import type { HandlersSessionInfoResponse } from '@memohai/sdk'
|
||||
import { useChatStore } from '@/store/chat-list'
|
||||
import { openInFileManagerKey } from '../composables/useFileManagerProvider'
|
||||
@@ -119,9 +119,9 @@ const { currentBotId, sessionId } = storeToRefs(chatStore)
|
||||
const openInFileManager = inject(openInFileManagerKey, undefined)
|
||||
|
||||
const { data: info } = useQuery({
|
||||
key: () => ['session-info', currentBotId.value ?? '', sessionId.value ?? '', props.overrideModelId ?? ''],
|
||||
key: () => ['session-status', currentBotId.value ?? '', sessionId.value ?? '', props.overrideModelId ?? ''],
|
||||
query: async () => {
|
||||
const { data } = await getBotsByBotIdSessionsBySessionIdInfo({
|
||||
const { data } = await getBotsByBotIdSessionsBySessionIdStatus({
|
||||
path: {
|
||||
bot_id: currentBotId.value!,
|
||||
session_id: sessionId.value!,
|
||||
|
||||
Reference in New Issue
Block a user