8ce35a1e8e
Add chapter reorder, search replace, inspiration capture, and AI chat with context editing, settings, offline handling, and naming checks. Fix dev black screen by keeping process.env reads in the main process only. Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
520 B
TypeScript
13 lines
520 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import { AiClientService } from '../../src/main/services/ai-client.service'
|
|
import { DEFAULT_AI_CONFIG } from '../../src/shared/types'
|
|
|
|
describe('AiClientService', () => {
|
|
const client = new AiClientService(() => DEFAULT_AI_CONFIG)
|
|
|
|
it('IT-AI-01: chat returns non-empty content from LM Studio', async () => {
|
|
const content = await client.chat([{ role: 'user', content: '回复一个字:好' }])
|
|
expect(content.trim().length).toBeGreaterThan(0)
|
|
}, 90_000)
|
|
})
|