mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-18 20:17:09 +08:00
feat(desktop): add log viewer entry points (NavRail + Help menu)
This commit is contained in:
@@ -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[] = [
|
||||
|
||||
Reference in New Issue
Block a user