initialize Electron desktop app and remove unused files
Build / build (push) Canceled after 0s
Playwright / browser (push) Canceled after 0s

This commit is contained in:
2026-10-25 01:09:01 +08:00
commit 01d9e301fc
877 changed files with 262513 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import { describe, expect, it } from 'vitest'
import {
MAX_CHAT_INPUT_HEIGHT,
MIN_CHAT_INPUT_HEIGHT,
clampChatInputHeight,
isMobileChatInputViewport,
} from '@/utils/chat-input-height'
describe('chat input height utils', () => {
it('clamps configured heights into the supported range', () => {
expect(clampChatInputHeight(undefined)).toBeNull()
expect(clampChatInputHeight(null)).toBeNull()
expect(clampChatInputHeight('')).toBeNull()
expect(clampChatInputHeight(MIN_CHAT_INPUT_HEIGHT - 100)).toBe(MIN_CHAT_INPUT_HEIGHT)
expect(clampChatInputHeight(MAX_CHAT_INPUT_HEIGHT + 100)).toBe(MAX_CHAT_INPUT_HEIGHT)
expect(clampChatInputHeight(157.6)).toBe(158)
})
it('treats the existing mobile breakpoint as mobile-only behavior', () => {
expect(isMobileChatInputViewport(768)).toBe(true)
expect(isMobileChatInputViewport(769)).toBe(false)
})
})