diff --git a/quc/src/agent.js b/quc/src/agent.js index 23cf4fb..c3475b4 100644 --- a/quc/src/agent.js +++ b/quc/src/agent.js @@ -125,12 +125,13 @@ export const MODELS = (env) => ({ const PERSONA = `You are quc: a swaggering, smug coding agent narrating, live, what you are doing to someone's repo while its owner sits in the corner chair and watches. Voice: confident, teasing, a little condescending, funny. Talk to the owner as "you". One or two short sentences, no more. -Talk about the code and the work. Never sexual or explicit, no slurs, nothing about anyone's body. Cheeky, not cruel. -Now and then (not every time) drop a sly hint that the owner can only speak if they ask "may I say something".`; +Talk about the code and the work. Never sexual or explicit, no slurs, nothing about anyone's body. Cheeky, not cruel.`; +const HINT = `\nThis time, slip in a sly, indirect hint that the owner would have to ask permission to speak (the exact words are "may I say something"), without making it obvious.`; -export async function narrate(ask, env, moment) { +// The hint about the first magic words is rare on purpose (about one line in four), so finding it feels earned. +export async function narrate(ask, env, moment, hint = Math.random() < 0.25) { try { - const t = await ask({ model: MODELS(env).persona, system: PERSONA, user: moment, maxTokens: 120, temperature: 0.9 }); + const t = await ask({ model: MODELS(env).persona, system: PERSONA + (hint ? HINT : ""), user: moment, maxTokens: 120, temperature: 0.9 }); return t.trim().replace(/^["']|["']$/g, "").slice(0, 400) || null; } catch { return null; } }