Skip to content

Commit 85be07f

Browse files
Increase version number
1 parent f07d93c commit 85be07f

File tree

2 files changed

+55
-51
lines changed

2 files changed

+55
-51
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Files2Prompt",
44
"icon": "./files2prompt-icon.webp",
55
"description": "Copy file contents for LLM prompts",
6-
"version": "1.7.3",
6+
"version": "1.8.0",
77
"publisher": "thomas-mckanna",
88
"keywords": [
99
"files",
@@ -201,4 +201,4 @@
201201
"fast-xml-parser": "^4.5.0",
202202
"ignore": "^6.0.2"
203203
}
204-
}
204+
}

src/extension.ts

Lines changed: 53 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -266,65 +266,69 @@ async function processXmlContent(xmlContent: string) {
266266
if (changedFiles.length > 0 || newFiles.length > 0) {
267267
// Create quick pick items for all changed/new files
268268
const quickPickItems: vscode.QuickPickItem[] = [
269-
...changedFiles.map(f => ({
269+
...changedFiles.map((f) => ({
270270
label: `📝 ${f.path}`,
271-
description: 'Modified',
272-
uri: f.uri
271+
description: "Modified",
272+
uri: f.uri,
273273
})),
274-
...newFiles.map(f => ({
274+
...newFiles.map((f) => ({
275275
label: `✨ ${f.path}`,
276-
description: 'New',
277-
uri: f.uri
278-
}))
276+
description: "New",
277+
uri: f.uri,
278+
})),
279279
];
280280

281281
// Show information message with multiple actions
282-
vscode.window.showInformationMessage(
283-
`Files have been updated successfully. ${changedFiles.length} modified, ${newFiles.length} new.`,
284-
'Show Details',
285-
'Open Changed Files'
286-
).then(async selection => {
287-
if (selection === 'Show Details') {
288-
// Create and show output channel with details and clickable links
289-
const channel = vscode.window.createOutputChannel('Files2Prompt Changes');
290-
channel.clear();
291-
292-
if (changedFiles.length > 0) {
293-
channel.appendLine('Modified files:');
294-
changedFiles.forEach(file => {
295-
channel.appendLine(`${file.path}`);
296-
});
297-
channel.appendLine('');
298-
}
299-
300-
if (newFiles.length > 0) {
301-
channel.appendLine('New files:');
302-
newFiles.forEach(file => {
303-
channel.appendLine(`${file.path}`);
282+
vscode.window
283+
.showInformationMessage(
284+
`Files have been updated successfully. ${changedFiles.length} modified, ${newFiles.length} new.`,
285+
"Show Details",
286+
"Open Changed Files"
287+
)
288+
.then(async (selection) => {
289+
if (selection === "Show Details") {
290+
// Create and show output channel with details and clickable links
291+
const channel = vscode.window.createOutputChannel(
292+
"Files2Prompt Changes"
293+
);
294+
channel.clear();
295+
296+
if (changedFiles.length > 0) {
297+
channel.appendLine("Modified files:");
298+
changedFiles.forEach((file) => {
299+
channel.appendLine(`${file.path}`);
300+
});
301+
channel.appendLine("");
302+
}
303+
304+
if (newFiles.length > 0) {
305+
channel.appendLine("New files:");
306+
newFiles.forEach((file) => {
307+
channel.appendLine(`${file.path}`);
308+
});
309+
}
310+
311+
channel.show();
312+
} else if (selection === "Open Changed Files") {
313+
// Show quick pick with all changed files
314+
const selected = await vscode.window.showQuickPick(quickPickItems, {
315+
placeHolder: "Select files to open",
316+
canPickMany: true,
304317
});
305-
}
306-
307-
channel.show();
308-
} else if (selection === 'Open Changed Files') {
309-
// Show quick pick with all changed files
310-
const selected = await vscode.window.showQuickPick(quickPickItems, {
311-
placeHolder: 'Select files to open',
312-
canPickMany: true
313-
});
314-
315-
if (selected) {
316-
// Open each selected file
317-
for (const item of selected) {
318-
const uri = (item as any).uri;
319-
if (uri) {
320-
const doc = await vscode.workspace.openTextDocument(uri);
321-
await vscode.window.showTextDocument(doc, { preview: false });
318+
319+
if (selected) {
320+
// Open each selected file
321+
for (const item of selected) {
322+
const uri = (item as any).uri;
323+
if (uri) {
324+
const doc = await vscode.workspace.openTextDocument(uri);
325+
await vscode.window.showTextDocument(doc, { preview: false });
326+
}
322327
}
323328
}
324329
}
325-
}
326-
});
330+
});
327331
} else {
328-
vscode.window.showInformationMessage('No files were changed.');
332+
vscode.window.showInformationMessage("No files were changed.");
329333
}
330334
}

0 commit comments

Comments
 (0)