(updates: {
permissionMode?: PermissionMode;
model?: string | null;
modelReasoningEffort?: ReasoningEffort | null;
collaborationMode?: EnhancedMode['collaborationMode'];
} | undefined)
| 111 | }; |
| 112 | |
| 113 | const applySlashUpdates = (updates: { |
| 114 | permissionMode?: PermissionMode; |
| 115 | model?: string | null; |
| 116 | modelReasoningEffort?: ReasoningEffort | null; |
| 117 | collaborationMode?: EnhancedMode['collaborationMode']; |
| 118 | } | undefined): void => { |
| 119 | if (!updates) return; |
| 120 | if (updates.permissionMode !== undefined) { |
| 121 | currentPermissionMode = updates.permissionMode; |
| 122 | } |
| 123 | if (updates.model !== undefined) { |
| 124 | currentModel = updates.model ?? undefined; |
| 125 | } |
| 126 | if (updates.modelReasoningEffort !== undefined) { |
| 127 | currentModelReasoningEffort = updates.modelReasoningEffort ?? undefined; |
| 128 | } |
| 129 | if (updates.collaborationMode !== undefined) { |
| 130 | currentCollaborationMode = updates.collaborationMode; |
| 131 | } |
| 132 | applyCurrentConfigToSession(); |
| 133 | }; |
| 134 | |
| 135 | const syncCurrentConfigFromSession = (): void => { |
| 136 | const sessionPermissionMode = sessionWrapperRef.current?.getPermissionMode(); |
no test coverage detected