fix: use configured endSymbols in injected prompt and exempt gateway keywords
- buildEndMarkerInstruction() replaces hardcoded END_MARKER_INSTRUCTION, dynamically using the resolved policy's endSymbols - Instruction now explicitly exempts gateway keywords (NO_REPLY, HEARTBEAT_OK) from requiring end symbols - Export resolvePolicy from rules.ts for reuse in before_prompt_build hook
This commit is contained in:
@@ -46,7 +46,7 @@ function getLastChar(input: string): string {
|
||||
return t.length ? t[t.length - 1] : "";
|
||||
}
|
||||
|
||||
function resolvePolicy(config: WhisperGateConfig, channelId?: string, channelPolicies?: Record<string, ChannelPolicy>) {
|
||||
export function resolvePolicy(config: WhisperGateConfig, channelId?: string, channelPolicies?: Record<string, ChannelPolicy>) {
|
||||
const globalMode = config.listMode || "human-list";
|
||||
const globalHuman = config.humanList || config.bypassUserIds || [];
|
||||
const globalAgent = config.agentList || [];
|
||||
|
||||
Reference in New Issue
Block a user