feat: update TeamProvisioningService and teams.ts for improved DM forwarding and constant imports

- Added AGENT_BLOCK constants import to teams.ts for better organization.
- Cleared silentUserDmForward flag in TeamProvisioningService after successful and errored turns to ensure accurate state management.
This commit is contained in:
iliya 2026-03-05 18:09:58 +02:00
parent d2bb734af6
commit b1ee82ba0e
2 changed files with 5 additions and 0 deletions

View file

@ -74,6 +74,7 @@ import {
validateTeammateName,
validateTeamName,
} from './guards';
import { AGENT_BLOCK_CLOSE, AGENT_BLOCK_OPEN } from '@shared/constants/agentBlocks';
/** Track rate limit message keys already notified to avoid duplicate OS notifications across refreshes. */
const notifiedRateLimitKeys = new Set<string>();

View file

@ -2984,6 +2984,8 @@ export class TeamProvisioningService {
});
}
}
// Clear silent relay flag after any successful turn.
run.silentUserDmForward = null;
if (!run.provisioningComplete && !run.cancelRequested) {
void this.handleProvisioningTurnComplete(run);
}
@ -2994,6 +2996,8 @@ export class TeamProvisioningService {
if (run.leadRelayCapture) {
run.leadRelayCapture.rejectOnce(errorMsg);
}
// Clear silent relay flag after any errored turn.
run.silentUserDmForward = null;
if (!run.provisioningComplete && !run.cancelRequested) {
const progress = updateProgress(
run,