feat: Pro 买断门禁、SFTP 精简与批量多机改造
新增 entitlement/license IPC 与 Waffo 一次性结账服务骨架,挂载 AI/转发/代理/串口/广播/批量导入导出门禁;批量执行改为结果矩阵并复用连接池,SFTP 工具栏图标化并去掉已连接条,同时完善跨平台本地终端与窗口配置。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
101d2164b4
commit
fea6d8db04
72 files changed
+3307
-396
No files matched your search
@@ -5,10 +5,12 @@ import TerminalWorkspace from '../../src/components/terminal/TerminalWorkspace'
|
||||
import { useAiProviderStore } from '../../src/stores/aiProviderStore'
|
||||
import { useSettingsStore } from '../../src/stores/settingsStore'
|
||||
import { useTabStore } from '../../src/stores/tabStore'
|
||||
import { unlockProForTests } from '../helpers/entitlement'
|
||||
|
||||
describe('AI entry points', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
unlockProForTests()
|
||||
useSettingsStore.setState({ isLoaded: true })
|
||||
useAiProviderStore.setState({
|
||||
providers: [],
|
||||
@@ -32,7 +34,7 @@ describe('AI entry points', () => {
|
||||
expect(screen.getByRole('button', { name: '添加' })).toBeVisible()
|
||||
})
|
||||
|
||||
it('keeps a prominent AI assistant control wired into every terminal workspace', () => {
|
||||
it('keeps a prominent AI assistant control on SSH terminal workspaces', () => {
|
||||
useTabStore.setState({
|
||||
tabs: [
|
||||
{
|
||||
@@ -56,4 +58,25 @@ describe('AI entry points', () => {
|
||||
fireEvent.click(entry)
|
||||
expect(entry).toHaveAttribute('aria-label', '关闭终端 AI 助手')
|
||||
})
|
||||
|
||||
it('hides the AI assistant control on local shell workspaces', () => {
|
||||
useTabStore.setState({
|
||||
tabs: [
|
||||
{
|
||||
id: 'local-ai-test',
|
||||
title: 'Local',
|
||||
type: 'terminal',
|
||||
isActive: false,
|
||||
isLocal: true,
|
||||
localShellKind: 'zsh',
|
||||
localShellPath: '/bin/zsh',
|
||||
},
|
||||
],
|
||||
activeTabId: null,
|
||||
})
|
||||
|
||||
render(<TerminalWorkspace tabId="local-ai-test" isActive={false} />)
|
||||
|
||||
expect(screen.queryByTestId('terminal-ai-button')).toBeNull()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user