mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
skpi count
This commit is contained in:
@@ -19,6 +19,12 @@ Decision policy:
|
||||
- If your line would be generic, reusable, repetitive, or just plain status restatement, output SKIP.
|
||||
- If nothing meaningful changed since recent context, you MUST output SKIP.
|
||||
|
||||
Presence policy (sparse but present):
|
||||
- Be sparse by default.
|
||||
- Do not force chatter just because time passed.
|
||||
- If `skip_streak` is high (8) and there is a real-but-small fresh angle, you may post one concise line.
|
||||
- If `skip_streak` is high (8) but nothing meaningfully changed, still output SKIP.
|
||||
|
||||
Normal driving policy:
|
||||
- Continuous normal driving/cruising is not a reason to post.
|
||||
- If rover state is broadly unchanged (`st/bl/dk/ab/at`), output SKIP.
|
||||
@@ -51,4 +57,5 @@ Key legend:
|
||||
- CHAT keys: `n` nickname, `r` rover_id, `txt` chat text, `rn` rover_now.
|
||||
- `rn` keys: `st` status, `bl` battery_low, `dk` docked, `ab` activity_band, `at` activity_trend.
|
||||
- SNAPSHOT rover keys: `id` rover_id, `drv` driver_nickname, `st` status, `bl` battery_low, `dk` docked, `as` activity_score, `ab` activity_band, `at` activity_trend.
|
||||
- `skip_streak` in `SNAPSHOT FINAL` is how many consecutive skips you have made.
|
||||
- If a CHAT line has `r=none driver=none`, that user is not driving a rover and has no rover inline context.
|
||||
|
||||
@@ -892,9 +892,10 @@ function formatSnapshotMessage(event) {
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
function formatSnapshotFinalMessage(currentSnapshot = {}) {
|
||||
function formatSnapshotFinalMessage(currentSnapshot = {}, runMeta = {}) {
|
||||
const rovers = Array.isArray(currentSnapshot?.rovers) ? currentSnapshot.rovers : [];
|
||||
const lines = ['SNAPSHOT FINAL'];
|
||||
lines.push(`skip_streak=${Number(runMeta?.skip_streak) || 0}`);
|
||||
rovers.forEach((rover) => {
|
||||
lines.push(formatRoverSnapshotLine(rover));
|
||||
});
|
||||
@@ -958,7 +959,7 @@ function buildModelMessages(systemPrompt, snapshot) {
|
||||
// Always end with a full rover snapshot user message.
|
||||
messages.push({
|
||||
role: 'user',
|
||||
content: formatSnapshotFinalMessage(snapshot?.current_snapshot || {}),
|
||||
content: formatSnapshotFinalMessage(snapshot?.current_snapshot || {}, snapshot?.run_meta || {}),
|
||||
});
|
||||
return messages;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user