File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,19 @@ const emotionKeywords: Record<Emotion, string[]> = {
211211 ] ,
212212} as const ;
213213
214+ const ultrathinkKeywords = [
215+ "ultrathink" ,
216+ "think very hard" ,
217+ "think super hard" ,
218+ "think really hard" ,
219+ "think longer" ,
220+ "think intensely" ,
221+ "think harder" ,
222+ "ηθ" ,
223+ "ζ·±γθγγ¦" ,
224+ "γγ£γγθγγ¦" ,
225+ ] as const ;
226+
214227export class Cat {
215228 private fileEditor : FileEditor ;
216229 private safeMode : boolean ;
@@ -238,12 +251,15 @@ export class Cat {
238251 return responses [ index ] as string ;
239252 }
240253
241- private getRandomThinkingTime ( ) : number {
242- return Math . floor ( Math . random ( ) * 500 ) + 300 ; // 300-800ms
254+ private hasUltrathinkKeyword ( message : string ) : boolean {
255+ return ultrathinkKeywords . some ( ( keyword ) => message . includes ( keyword ) ) ;
243256 }
244257
245258 async response ( message : string ) : Promise < CatResponse > {
246- const thinkingTime = this . getRandomThinkingTime ( ) ;
259+ const isUltrathink = this . hasUltrathinkKeyword ( message ) ;
260+ const thinkingTime = isUltrathink
261+ ? Math . floor ( Math . random ( ) * 2000 ) + 3000 // 3000-5000ms for ultrathink
262+ : Math . floor ( Math . random ( ) * 500 ) + 300 ; // 300-800ms
247263 await new Promise ( ( resolve ) => setTimeout ( resolve , thinkingTime ) ) ;
248264
249265 const emotion = this . detectEmotion ( message ) ;
You canβt perform that action at this time.
0 commit comments