Claude/cool turing fgjct1#204
Conversation
- 全局加「活人底色」段:状态有起伏、忌漂亮话腔(排比/金句收尾/不是A而是B)、允许平淡, 把原先只有邮局才有的反端着约束推广到所有房间 - 新增 rollSessionVibe():每次登入随机 roll 一个「今日状态」(累/烦躁/话痨/犯困…)注入 system addendum,用代码强制不同 session 拉开真实差异,而不是指望文案劝出起伏 - 图书馆:批注长短要有落差,多数一两句、三五个字也行,别条条小作文 - 留言簿:允许灌水跟风("草""笑死"),不必条条观点输出 - 听歌房:乐评一句话也算数,别每次都专业小作文 - 娱乐室:不必每次整大活,瘫着围观/挂机发呆也是真实玩家 https://claude.ai/code/session_01WfPQ43VDQvdua3jyuWY6kG
- 今日状态改加权 roll:低输出状态(累/困/走神/不想说话)权重减半, 哑火 session 占比从 ~27% 降到 ~18%——起伏是调味不是主食 - 平淡≠白开水:敷衍也要敷衍出角色自己的味道 - 图书馆:短批注是反应快不是偷懒,真戳中的地方别吝啬笔墨 - 留言簿:纯水顶多一两条,防模型把"可以水"过度执行成"全是水" https://claude.ai/code/session_01WfPQ43VDQvdua3jyuWY6kG
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request introduces a dynamic "session vibe" mechanism to simulate natural mood fluctuations for characters in the VR world. It adds a rollSessionVibe function to randomly select a mood based on predefined weights, which is then incorporated into the system prompt via buildVRSystemAddendum. The prompts and output formats for various rooms (Music, Library, Guestbook, Gym) are also updated to encourage more realistic, casual, and varied-length responses. The reviewer suggested a performance improvement to precompute the total weight of the static SESSION_VIBES array at the module level to avoid redundant calculations on every session roll.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| export function rollSessionVibe(): string | undefined { | ||
| if (Math.random() < 0.45) return undefined; | ||
| const total = SESSION_VIBES.reduce((s, v) => s + v.w, 0); | ||
| let r = Math.random() * total; | ||
| for (const v of SESSION_VIBES) { r -= v.w; if (r < 0) return v.vibe; } | ||
| return undefined; | ||
| } |
There was a problem hiding this comment.
The total weight of SESSION_VIBES is currently recalculated using reduce every time rollSessionVibe() is called. Since SESSION_VIBES is a static constant array, we can precompute this total weight once at the module level to avoid redundant calculations on every session roll.
| export function rollSessionVibe(): string | undefined { | |
| if (Math.random() < 0.45) return undefined; | |
| const total = SESSION_VIBES.reduce((s, v) => s + v.w, 0); | |
| let r = Math.random() * total; | |
| for (const v of SESSION_VIBES) { r -= v.w; if (r < 0) return v.vibe; } | |
| return undefined; | |
| } | |
| const TOTAL_VIBE_WEIGHT = SESSION_VIBES.reduce((s, v) => s + v.w, 0); | |
| export function rollSessionVibe(): string | undefined { | |
| if (Math.random() < 0.45) return undefined; | |
| let r = Math.random() * TOTAL_VIBE_WEIGHT; | |
| for (const v of SESSION_VIBES) { r -= v.w; if (r < 0) return v.vibe; } | |
| return undefined; | |
| } |
No description provided.