Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 26 additions & 22 deletions src/dbtPowerUserExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,29 +94,33 @@ export class DBTPowerUserExtension implements Disposable {
}

async activate(context: ExtensionContext): Promise<void> {
await this.mcpServer.updateMcpExtensionApi();
this.dbtProjectContainer.setContext(context);
this.dbtProjectContainer.initializeWalkthrough();
await this.dbtProjectContainer.detectDBT();
await this.dbtProjectContainer.initializeDBTProjects();
await this.statusBars.initialize();
// Ask to reload the window if the dbt integration changes
const dbtIntegration = workspace
.getConfiguration("dbt")
.get<string>("dbtIntegration", "core");
workspace.onDidChangeConfiguration((e) => {
if (!e.affectsConfiguration("dbt")) {
return;
}
const newDbtIntegration = workspace
try {
await this.mcpServer.updateMcpExtensionApi();
this.dbtProjectContainer.setContext(context);
this.dbtProjectContainer.initializeWalkthrough();
await this.dbtProjectContainer.detectDBT();
await this.dbtProjectContainer.initializeDBTProjects();
await this.statusBars.initialize();
// Ask to reload the window if the dbt integration changes
const dbtIntegration = workspace
.getConfiguration("dbt")
.get<string>("dbtIntegration", "core");
if (
dbtIntegration !== newDbtIntegration &&
["core", "cloud", "corecommand", "fusion"].includes(newDbtIntegration)
) {
commands.executeCommand("workbench.action.reloadWindow");
}
});
workspace.onDidChangeConfiguration((e) => {
if (!e.affectsConfiguration("dbt")) {
return;
}
const newDbtIntegration = workspace
.getConfiguration("dbt")
.get<string>("dbtIntegration", "core");
if (
dbtIntegration !== newDbtIntegration &&
["core", "cloud", "corecommand", "fusion"].includes(newDbtIntegration)
) {
commands.executeCommand("workbench.action.reloadWindow");
}
});
} catch (error) {
this.telemetry.sendTelemetryError("extensionActivationError", error);
}
}
}
Loading