feat: implement multi-message mode and shuffle mode features
- Add multi-message mode with start/end/prompt markers - Implement turn order shuffling with /turn-shuffling command - Add channel mode state management - Update hooks to handle multi-message mode behavior - Update plugin config with new markers - Update TASKLIST.md with completed tasks
This commit is contained in:
@@ -2,6 +2,7 @@ import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
||||
import { evaluateDecision, type Decision, type DirigentConfig } from "../rules.js";
|
||||
import { checkTurn } from "../turn-manager.js";
|
||||
import { deriveDecisionInputFromPrompt } from "../decision-input.js";
|
||||
import { isMultiMessageMode } from "../core/channel-modes.js";
|
||||
|
||||
type DebugConfig = {
|
||||
enableDebugLogs?: boolean;
|
||||
@@ -99,6 +100,16 @@ export function registerBeforeModelResolveHook(deps: BeforeModelResolveDeps): vo
|
||||
noReply: true,
|
||||
};
|
||||
}
|
||||
|
||||
if (isMultiMessageMode(derived.channelId)) {
|
||||
sessionAllowed.set(key, false);
|
||||
api.logger.info(`dirigent: before_model_resolve forcing no-reply for multi-message mode channel=${derived.channelId} session=${key}`);
|
||||
return {
|
||||
model: ctx.model,
|
||||
provider: ctx.provider,
|
||||
noReply: true,
|
||||
};
|
||||
}
|
||||
}
|
||||
const resolvedAccountId = resolveAccountId(api, ctx.agentId || "");
|
||||
if (resolvedAccountId) {
|
||||
|
||||
Reference in New Issue
Block a user