All files / web/src/lib/ai-usage features.ts

100% Statements 64/64
100% Branches 0/0
100% Functions 0/0
100% Lines 64/64

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 652x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x  
/**
 * Typed feature strings for AI usage tracking.
 *
 * Every AI API call must specify a feature from this const object.
 * This prevents typos and enables IDE autocomplete.
 */
export const AiFeature = {
  // Euclid geometry teacher
  EUCLID_CHAT: 'euclid:chat',
  EUCLID_THINK_HARD: 'euclid:think-hard',
  EUCLID_MARKUP: 'euclid:markup',
  EUCLID_SUMMARIZE: 'euclid:summarize',
  EUCLID_VOICE: 'euclid:voice',
 
  // Number line
  NUMBER_LINE_SCENARIO: 'number-line:scenario',
  NUMBER_LINE_SCENARIO_EVOLVE: 'number-line:scenario-evolve',
  NUMBER_LINE_VOICE: 'number-line:voice',
 
  // Worksheet / vision
  WORKSHEET_PARSE: 'worksheet:parse',
  WORKSHEET_GRADE: 'worksheet:grade',
 
  // TTS
  TTS_CLIP: 'tts:clip',
  TTS_BATCH: 'tts:batch',
  TTS_COLLECTED: 'tts:collected',
  TTS_PREVIEW: 'tts:preview',
 
  // Image generation
  IMAGE_GENERATE: 'image:generate',
  IMAGE_CONSTANT: 'image:constant',
  IMAGE_BLOG: 'image:blog',
  IMAGE_PROFILE: 'image:profile',
  IMAGE_PAGE_SPOT: 'image:page-spot',
  IMAGE_PHI_EXPLORE: 'image:phi-explore',
  IMAGE_POSTCARD_THUMB: 'image:postcard-thumb',
 
  // Music generation
  MUSIC_GENERATE: 'music:generate',
 
  // Session song lyrics
  SESSION_SONG_PROMPT: 'session-song:prompt',
 
  // Flowcharts
  FLOWCHART_GENERATE: 'flowchart:generate',
  FLOWCHART_REFINE: 'flowchart:refine',
  FLOWCHART_EMBED: 'flowchart:embed',
 
  // Moment cull
  MOMENT_CULL: 'moment:cull',
 
  // Postcards
  POSTCARD_REVIEW: 'postcard:review',
 
  // Blog / admin
  BLOG_REFINE_PROMPT: 'blog:refine-prompt',
  PAGE_SPOT_REFINE: 'page-spot:refine',
 
  // Chat
  CHAT_SUMMARIZE: 'chat:summarize',
} as const
 
export type AiFeatureValue = (typeof AiFeature)[keyof typeof AiFeature]