@@ -204,6 +204,54 @@ export function isDatabaseDisabledByQueryParam(): boolean {
204204 return isDatabaseDisabled ( ) ;
205205}
206206
207+ /**
208+ * Checks if the download-as-zip feature is disabled.
209+ * Features can be disabled either at build time (via VITE_CAN_DOWNLOAD_ZIP env var)
210+ * or at runtime (via ?can-download-zip=no query parameter).
211+ *
212+ * @returns {boolean } True if download-as-zip is disabled, false otherwise.
213+ */
214+ export function isDownloadZipDisabled ( ) : boolean {
215+ if ( import . meta. env . VITE_CAN_DOWNLOAD_ZIP === 'no' ) {
216+ return true ;
217+ }
218+ return (
219+ new URL ( document . location . href ) . searchParams . get ( 'can-download-zip' ) === 'no'
220+ ) ;
221+ }
222+
223+ /**
224+ * Checks if the export-to-GitHub feature is disabled.
225+ * Features can be disabled either at build time (via VITE_CAN_EXPORT_GITHUB env var)
226+ * or at runtime (via ?can-export-github=no query parameter).
227+ *
228+ * @returns {boolean } True if export-to-GitHub is disabled, false otherwise.
229+ */
230+ export function isExportGithubDisabled ( ) : boolean {
231+ if ( import . meta. env . VITE_CAN_EXPORT_GITHUB === 'no' ) {
232+ return true ;
233+ }
234+ return (
235+ new URL ( document . location . href ) . searchParams . get ( 'can-export-github' ) === 'no'
236+ ) ;
237+ }
238+
239+ /**
240+ * Checks if the Blueprint tab is disabled.
241+ * Features can be disabled either at build time (via VITE_CAN_BLUEPRINT env var)
242+ * or at runtime (via ?can-blueprint=no query parameter).
243+ *
244+ * @returns {boolean } True if the Blueprint tab is disabled, false otherwise.
245+ */
246+ export function isBlueprintDisabled ( ) : boolean {
247+ if ( import . meta. env . VITE_CAN_BLUEPRINT === 'no' ) {
248+ return true ;
249+ }
250+ return (
251+ new URL ( document . location . href ) . searchParams . get ( 'can-blueprint' ) === 'no'
252+ ) ;
253+ }
254+
207255/**
208256 * Checks if the MCP server bridge is enabled via the `?mcp=yes` query parameter.
209257 */
0 commit comments