package fakeclaude import ( "strings" "time" ) // GlancePrefix opens the runner's glance prompt (thin's glancePrefix): // the fake answers such a prompt as the small model would, by its // newest message alone. const GlancePrefix = "Write the line a person sees while their assistant starts on their message." // Glance answers a glance prompt: "Looking into that now", and "Looking // into that again" when the conversation already held earlier turns (a // glance must see the newest message alone). In the message, glanceslow // takes five seconds, glancefail fails and glanceteam names the team. ok // is false for any other prompt. func Glance(prompt string, earlier bool) (line string, pause time.Duration, fail, ok bool) { if !strings.HasPrefix(prompt, GlancePrefix) { return "", 0, false, false } _, message, _ := strings.Cut(prompt, "\n") message, _, _ = strings.Cut(message, "\n") line = "Looking into that now" if earlier { line = "Looking into that again" } switch { case strings.Contains(message, "glanceslow"): pause = 5 * time.Second case strings.Contains(message, "glancefail"): fail = true case strings.Contains(message, "glanceteam"): line = "Asking the team about it" } return line, pause, fail, true }