feat(desktop): add log viewer entry points (NavRail + Help menu)

This commit is contained in:
zhayujie
2026-06-22 16:30:11 +08:00
parent c432681b2b
commit 215ed24401
3 changed files with 25 additions and 5 deletions

View File

@@ -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[] = [