diff --git a/desktop/src/main/menu.ts b/desktop/src/main/menu.ts index cf7759af..d5195a3f 100644 --- a/desktop/src/main/menu.ts +++ b/desktop/src/main/menu.ts @@ -3,6 +3,7 @@ import type { MenuItemConstructorOptions } from 'electron' const isMac = process.platform === 'darwin' const SKILL_HUB_URL = 'https://skills.cowagent.ai/' +const DOCS_URL = 'https://docs.cowagent.ai' // Send a menu-triggered action to the renderer (e.g. new chat, open settings). function emit(win: BrowserWindow | null, action: string) { @@ -90,7 +91,12 @@ export function buildAppMenu(getWindow: () => BrowserWindow | null) { const helpMenu: MenuItemConstructorOptions = { label: 'Help', - submenu: [{ label: 'Skill Hub', click: () => shell.openExternal(SKILL_HUB_URL) }], + submenu: [ + { label: 'View Logs', click: () => emit(win(), 'view-logs') }, + { type: 'separator' }, + { label: 'Documentation', click: () => shell.openExternal(DOCS_URL) }, + { label: 'Skill Hub', click: () => shell.openExternal(SKILL_HUB_URL) }, + ], } const template: MenuItemConstructorOptions[] = [ diff --git a/desktop/src/renderer/src/App.tsx b/desktop/src/renderer/src/App.tsx index 2097b743..e44a23d0 100644 --- a/desktop/src/renderer/src/App.tsx +++ b/desktop/src/renderer/src/App.tsx @@ -40,6 +40,8 @@ const App: React.FC = () => { navigate('/') } else if (action === 'open-settings') { navigate('/settings') + } else if (action === 'view-logs') { + navigate('/logs') } }) return off diff --git a/desktop/src/renderer/src/layout/NavRail.tsx b/desktop/src/renderer/src/layout/NavRail.tsx index dea8dcef..902ad420 100644 --- a/desktop/src/renderer/src/layout/NavRail.tsx +++ b/desktop/src/renderer/src/layout/NavRail.tsx @@ -12,6 +12,7 @@ import { PanelLeftOpen, Sun, Moon, + ScrollText, } from 'lucide-react' import type { LucideIcon } from 'lucide-react' import { t, getLang, setLang, Lang } from '../i18n' @@ -88,6 +89,14 @@ const NavRail: React.FC = ({ onLangChange }) => { {/* Footer actions */}
+ navigate('/logs')} + title={t('menu_logs')} + active={location.pathname === '/logs'} + > + + {theme === 'dark' ? : } @@ -108,14 +117,17 @@ const FooterBtn: React.FC<{ collapsed: boolean onClick: () => void title: string + active?: boolean children: React.ReactNode -}> = ({ collapsed, onClick, title, children }) => ( +}> = ({ collapsed, onClick, title, active, children }) => (