Fix: deep link extension installation to show dialog for headers configuration (#4150)
This commit is contained in:
@@ -166,9 +166,13 @@ export async function addExtensionFromDeepLink(
|
|||||||
: getSseConfig(remoteUrl, name, description || '', timeout)
|
: getSseConfig(remoteUrl, name, description || '', timeout)
|
||||||
: getStdioConfig(cmd!, parsedUrl, name, description || '', timeout);
|
: getStdioConfig(cmd!, parsedUrl, name, description || '', timeout);
|
||||||
|
|
||||||
// Check if extension requires env vars and go to settings if so
|
// Check if extension requires env vars or headers and go to settings if so
|
||||||
if (config.envs && Object.keys(config.envs).length > 0) {
|
const hasEnvVars = config.envs && Object.keys(config.envs).length > 0;
|
||||||
console.log('Environment variables required, redirecting to settings');
|
const hasHeaders =
|
||||||
|
config.type === 'streamable_http' && config.headers && Object.keys(config.headers).length > 0;
|
||||||
|
|
||||||
|
if (hasEnvVars || hasHeaders) {
|
||||||
|
console.log('Environment variables or headers required, redirecting to settings');
|
||||||
console.log('Calling setView with:', { deepLinkConfig: config, showEnvVars: true });
|
console.log('Calling setView with:', { deepLinkConfig: config, showEnvVars: true });
|
||||||
setView('settings', { deepLinkConfig: config, showEnvVars: true });
|
setView('settings', { deepLinkConfig: config, showEnvVars: true });
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user