Skip to content

Commit

Permalink
Sweep: Fix issue with opening compiled SQL file from dbt target folder (
Browse files Browse the repository at this point in the history
#1182)

* Sweep: Hovering on a macro should show more details like description and arguments (#1179)

* feat: Updated 3 files

* fix: macro hover provider

* fix: popup ui

---------

Co-authored-by: sweep-ai[bot] <128439645+sweep-ai[bot]@users.noreply.github.com>
Co-authored-by: saravmajestic <sarav.majestic@gmail.com>

* Remove unused 'type' param from model lookup

* fix: right path for compiled/run files

---------

Co-authored-by: sweep-ai[bot] <128439645+sweep-ai[bot]@users.noreply.github.com>
Co-authored-by: saravmajestic <sarav.majestic@gmail.com>
Co-authored-by: anandgupta42 <93243293+anandgupta42@users.noreply.github.com>
  • Loading branch information
3 people authored May 31, 2024
1 parent 0a43e28 commit 956ffe0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/manifest/dbtProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,9 +931,13 @@ select * from renamed
if (!targetPath) {
return;
}
const baseName = path.basename(modelPath.fsPath);
const relativePath = path.relative(
this.projectRoot.fsPath,
modelPath.fsPath,
);

const targetModels = await workspace.findFiles(
new RelativePattern(targetPath, `${type}/**/${baseName}`),
new RelativePattern(targetPath, path.join(type, "**", relativePath)),
);
if (targetModels.length > 0) {
commands.executeCommand("vscode.open", targetModels[0], {
Expand Down

0 comments on commit 956ffe0

Please sign in to comment.