feat: Pro 买断门禁、SFTP 精简与批量多机改造

新增 entitlement/license IPC 与 Waffo 一次性结账服务骨架,挂载 AI/转发/代理/串口/广播/批量导入导出门禁;批量执行改为结果矩阵并复用连接池,SFTP 工具栏图标化并去掉已连接条,同时完善跨平台本地终端与窗口配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Logan.LiandCursor committed 2026-08-07 11:38:30 +08:00
1 parent 101d2164b4
commit fea6d8db04
72 files changed
+3307 -396

No files matched your search

+21 -7
View File
@@ -20,7 +20,8 @@ import {
PanelLeft,
} from 'lucide-react'
import { useTabStore } from '../../stores/tabStore'
import { useSessionStore, useSnippetStore, useCommandPaletteStore, type Session } from '../../stores'
import { useSessionStore, useSnippetStore, useCommandPaletteStore, useEntitlementStore, type Session } from '../../stores'
import { disposeAndCloseAllTabs, disposeAndCloseTab } from '../../utils/disposeTab'
// ─── 类型定义 ────────────────────────────────────────────────────────
@@ -67,7 +68,7 @@ export function CommandPalette({
const { sessions } = useSessionStore()
const { snippets } = useSnippetStore()
const { isOpen, close } = useCommandPaletteStore()
const { addTab, closeTab, tabs, activeTabId } = useTabStore()
const { addTab, tabs, activeTabId } = useTabStore()
// ── 构建命令列表 ──
const buildCommands = useCallback((): CommandPaletteItem[] => {
@@ -136,7 +137,7 @@ export function CommandPalette({
icon: <X size={16} />,
action: () => {
if (activeTabId && tabs.length > 1) {
closeTab(activeTabId)
void disposeAndCloseTab(activeTabId)
}
},
},
@@ -146,15 +147,28 @@ export function CommandPalette({
label: '关闭所有标签',
description: '关闭所有标签页并回到欢迎页',
icon: <X size={16} />,
action: () => useTabStore.getState().closeAllTabs(),
action: () => {
void disposeAndCloseAllTabs()
},
},
{
id: 'cmd:new-portforward',
type: 'command',
label: '新建端口转发',
description: '打开端口转发管理标签',
description: '打开端口转发管理标签(Pro)',
icon: <ChevronRight size={16} />,
action: () => addTab({ title: '端口转发', type: 'portforward' }),
action: () => {
if (!useEntitlementStore.getState().requirePro('portForward')) return
addTab({ title: '端口转发', type: 'portforward' })
},
},
{
id: 'cmd:upgrade-pro',
type: 'command',
label: '升级 OpsXShell Pro',
description: '查看专业能力对比与激活',
icon: <ChevronRight size={16} />,
action: () => useEntitlementStore.getState().openUpgradeTab(),
},
]
@@ -207,7 +221,7 @@ export function CommandPalette({
}
return items
}, [sessions, snippets, addTab, closeTab, activeTabId, tabs.length, onNewSession, onQuickConnect, onOpenSettings, onEditSession])
}, [sessions, snippets, addTab, activeTabId, tabs.length, onNewSession, onQuickConnect, onOpenSettings, onEditSession])
// ── 过滤结果 ──
const filteredItems = useMemo(() => {