method-options.ts - 方法选项数据
概述
为 Monaco 编辑器自动补全提供方法选项数据,包含各种枚举类型的有效值列表。
⚠️ 注意: 此文件为自动生成,请勿手动编辑。运行
npm run docs:generate重新生成。
数据结构
METHOD_OPTIONS
export const METHOD_OPTIONS: Record<string, string[]>
方法名到有效选项值的映射。
TYPE_OPTIONS
export const TYPE_OPTIONS: Record<string, string[]>
类型名到有效选项值的映射,用于增强错误提示。
支持的选项类别
图像/视频相关
| 键 | 说明 | 示例值 |
|---|---|---|
aspectRatio | 宽高比 | 1:1, 16:9, 9:16 |
cameraBrand | 相机品牌 | sony, canon, nikon |
cameraModel | 相机型号 | sony-a7iv, canon-r5 |
lens | 镜头类型 | wide-angle, 50mm, 85mm |
lensBrand | 镜头品牌 | zeiss, leica, sigma |
filmStock | 胶片类型 | kodak-portra-400, ilford-hp5 |
shot | 景别 | close-up, wide, medium |
angle | 拍摄角度 | eye-level, low-angle, high-angle |
lighting | 光照类型 | natural, studio, dramatic |
timeOfDay | 时间段 | golden-hour, blue-hour, midnight |
weather | 天气 | sunny, cloudy, rainy |
look | 艺术风格 | photorealistic, cinematic, cyberpunk |
音频/音乐相关
| 键 | 说明 | 示例值 |
|---|---|---|
genre | 音乐类型 | pop, rock, jazz, electronic |
key | 调性 | C, Am, F#m |
timeSignature | 拍号 | 4/4, 3/4, 6/8 |
tempoMarking | 速度标记 | largo, allegro, presto |
vocalStyle | 人声风格 | male, female, choir, rap |
language | 语言 | english, chinese, instrumental |
instrument | 乐器 | piano, guitar, violin |
提示词相关
| 键 | 说明 | 示例值 |
|---|---|---|
tone | 语气 | professional, casual, friendly |
expertise | 专业领域 | coding, writing, analysis |
length | 输出长度 | brief, detailed, comprehensive |
style | 输出风格 | prose, bullet-points, table |
outputFormat | 输出格式 | text, json, markdown |
priority | 优先级 | accuracy, speed, creativity |
reasoningStyle | 推理方式 | step-by-step, chain-of-thought |
视频相关
| 键 | 说明 | 示例值 |
|---|---|---|
transition | 转场 | cut, fade, dissolve |
pacing | 节奏 | slow, medium, fast |
movement | 运动方式 | pan, tilt, dolly |
resolution | 分辨率 | 1080p, 4K |
使用示例
import { METHOD_OPTIONS, TYPE_OPTIONS } from '@/data/method-options';
// 获取 aspectRatio 方法的有效值
const ratios = METHOD_OPTIONS['aspectRatio'];
// ['1:1', '4:3', '3:2', '16:9', '21:9', '9:16', ...]
// 获取 MusicGenre 类型的有效值
const genres = TYPE_OPTIONS['MusicGenre'];
// ['pop', 'rock', 'jazz', ...]
// 验证值是否有效
function isValidOption(method: string, value: string): boolean {
const options = METHOD_OPTIONS[method];
return options?.includes(value) ?? false;
}
isValidOption('genre', 'rock'); // true
isValidOption('genre', 'invalid'); // false
IDE 集成
这些数据用于 Monaco 编辑器的自动补全功能:
- 当用户输入
.aspectRatio(时 - 编辑器查找
METHOD_OPTIONS['aspectRatio'] - 提供有效值作为补全建议
选项数量统计
| 类别 | 选项数量 |
|---|---|
| 胶片类型 | 70+ |
| 相机型号 | 45+ |
| 音乐类型 | 45+ |
| 乐器 | 50+ |
| 艺术风格 | 40+ |