fix(rules): inject end-marker prompt for every non-no-reply discord turn

This commit is contained in:
2026-02-26 01:47:27 +00:00
parent ca96779159
commit 46ea43b3fe
2 changed files with 10 additions and 12 deletions

View File

@@ -63,9 +63,6 @@ function pruneDecisionMap(now = Date.now()) {
}
}
function shouldInjectEndMarker(reason: string): boolean {
return reason.startsWith("end_symbol:");
}
function getLivePluginConfig(api: OpenClawPluginApi, fallback: WhisperGateConfig): WhisperGateConfig {
const root = (api.config as Record<string, unknown>) || {};
@@ -335,7 +332,7 @@ export default {
}
sessionDecision.delete(key);
if (!shouldInjectEndMarker(rec.decision.reason)) return;
if (!rec.decision.shouldInjectEndMarkerPrompt) return;
api.logger.info(`whispergate: prepend end marker instruction for session=${key}, reason=${rec.decision.reason}`);
return { prependContext: END_MARKER_INSTRUCTION };