fix: align discussion workspace and tool schemas
This commit is contained in:
@@ -21,6 +21,7 @@ type BeforeModelResolveDeps = {
|
||||
sessionAllowed: Map<string, boolean>;
|
||||
sessionChannelId: Map<string, string>;
|
||||
sessionAccountId: Map<string, string>;
|
||||
recordDiscussionSession?: (channelId: string, sessionKey: string) => void;
|
||||
forceNoReplySessions: Set<string>;
|
||||
policyState: { channelPolicies: Record<string, unknown> };
|
||||
DECISION_TTL_MS: number;
|
||||
@@ -43,6 +44,7 @@ export function registerBeforeModelResolveHook(deps: BeforeModelResolveDeps): vo
|
||||
sessionAllowed,
|
||||
sessionChannelId,
|
||||
sessionAccountId,
|
||||
recordDiscussionSession,
|
||||
forceNoReplySessions,
|
||||
policyState,
|
||||
DECISION_TTL_MS,
|
||||
@@ -92,6 +94,7 @@ export function registerBeforeModelResolveHook(deps: BeforeModelResolveDeps): vo
|
||||
|
||||
if (derived.channelId) {
|
||||
sessionChannelId.set(key, derived.channelId);
|
||||
recordDiscussionSession?.(derived.channelId, key);
|
||||
if (discussionService?.isClosedDiscussion(derived.channelId)) {
|
||||
sessionAllowed.set(key, false);
|
||||
api.logger.info(`dirigent: before_model_resolve forcing no-reply for closed discussion channel=${derived.channelId} session=${key}`);
|
||||
|
||||
Reference in New Issue
Block a user