mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-21 12:51:47 +08:00
- 新增独立内联补全模型配置与服务端透传 - 优化 SQL 编辑器 Alt+\\ 触发、ghost 延续与对象位补全 - 引入基于已存查询和执行日志的 SQL 记忆补全 - 补充前后端本地化、快捷键与补全回归测试
18 lines
722 B
TypeScript
18 lines
722 B
TypeScript
import { readFileSync } from 'node:fs';
|
|
import { describe, expect, it } from 'vitest';
|
|
|
|
const source = readFileSync(new URL('./QueryEditorToolbar.tsx', import.meta.url), 'utf8');
|
|
|
|
describe('QueryEditorToolbar AI trigger affordance', () => {
|
|
it('keeps a direct toolbar trigger for inline AI completion', () => {
|
|
expect(source).toContain('onMouseDown={onCaptureEditorCursorPosition}');
|
|
expect(source).toContain('onClick={onTriggerSqlAiCompletion}');
|
|
expect(source).toContain('triggerSqlAiCompletionLabel');
|
|
});
|
|
|
|
it('keeps the secondary AI dropdown for other actions', () => {
|
|
expect(source).toContain('icon={<DownOutlined />}');
|
|
expect(source).toContain('menu={{ items: aiMenuItems }}');
|
|
});
|
|
});
|