Skip to content

refactor - #3

Merged
NachoOFC merged 2 commits into
mainfrom
feature/funcionalidades
Aug 19, 2026
Merged

NachoOFC merged 2 commits into
mainfrom
feature/funcionalidades

Conversation

@NachoOFC

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings August 19, 2026 03:50
@NachoOFC
NachoOFC merged commit 7c11087 into main Aug 19, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the extension’s UX around image usage by surfacing “used vs unused” status in the explorer (via file decorations) and by making image tree entries more descriptive. It also removes a markdown test reference file and adjusts the debug launch configuration.

Changes:

  • Update image tree node descriptions to show which files reference an image (or mark it as unused).
  • Add a FileDecorationProvider to badge images as used/unused in the explorer.
  • Remove the debug preLaunchTask from .vscode/launch.json (affects local debugging workflow).

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/imageTreeProvider.ts Changes image node descriptions to list referencing files instead of ref counts.
src/imageDecorationProvider.ts New provider that computes used/unused images and returns explorer decorations.
src/extension.ts Registers the decoration provider during activation and disposes it on deactivation.
.vscode/launch.json Removes preLaunchTask from the extension host debug configuration.
test-reference.md Deletes a markdown test/reference file.
test-images/hola.png Adds a new test image asset.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/imageTreeProvider.ts
Comment on lines +70 to +72
node.description = item.references.length > 0
? `in: ${[...new Set(item.references.map(r => path.basename(r.file.fsPath)))].join(', ')}`
: 'unused';
Comment on lines +24 to +40
const changed: vscode.Uri[] = [];

for (const img of images) {
const key = img.uri.toString();
if (img.references.length > 0) {
this.usedImages.add(key);
}
if (this.usedImages.has(key) !== prev.has(key)) {
changed.push(img.uri);
}
}

for (const key of prev) {
if (!this.usedImages.has(key)) {
changed.push(vscode.Uri.parse(key));
}
}
Comment thread src/extension.ts
Comment on lines +14 to +18
decorationProvider = new ImageDecorationProvider(scanner);

context.subscriptions.push(
vscode.window.registerFileDecorationProvider(decorationProvider)
);
Comment thread src/extension.ts
Comment on lines +14 to +18
decorationProvider = new ImageDecorationProvider(scanner);

context.subscriptions.push(
vscode.window.registerFileDecorationProvider(decorationProvider)
);
Comment thread .vscode/launch.json
Comment on lines 15 to +17
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
]
Comment on lines +13 to +17
constructor(private scanner: ImageScanner) {
this.disposables.push(
this.scanner.onDidChange(() => this.refresh())
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants