MCPcopy
hub / github.com/codeaashu/claude-code / sendModeChangeToTeammate

Function sendModeChangeToTeammate

src/components/teams/TeamsDialog.tsx:645–660  ·  view source on GitHub ↗

* Send a mode change message to a single teammate * Also updates config.json directly so the UI reflects the change immediately

(teammateName: string, teamName: string, targetMode: PermissionMode)

Source from the content-addressed store, hash-verified

643 * Also updates config.json directly so the UI reflects the change immediately
644 */
645function sendModeChangeToTeammate(teammateName: string, teamName: string, targetMode: PermissionMode): void {
646 // Update config.json directly so UI shows the change immediately
647 setMemberMode(teamName, teammateName, targetMode);
648
649 // Also send message so teammate updates their local permission context
650 const message = createModeSetRequestMessage({
651 mode: targetMode,
652 from: 'team-lead'
653 });
654 void writeToMailbox(teammateName, {
655 from: 'team-lead',
656 text: jsonStringify(message),
657 timestamp: new Date().toISOString()
658 }, teamName);
659 logForDebugging(`[TeamsDialog] Sent mode change to ${teammateName}: ${targetMode}`);
660}
661
662/**
663 * Cycle a single teammate's mode

Callers 1

cycleTeammateModeFunction · 0.85

Calls 5

setMemberModeFunction · 0.85
writeToMailboxFunction · 0.85
jsonStringifyFunction · 0.85
logForDebuggingFunction · 0.85

Tested by

no test coverage detected