fix(rules): inject end-marker prompt for every non-no-reply discord turn
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user