mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Update Query History README (#20716)
* Add max entries to query history * Update query history README
This commit is contained in:
@@ -21,14 +21,15 @@ const DOUBLE_CLICK_TIMEOUT_MS = 500;
|
||||
|
||||
export async function activate(context: vscode.ExtensionContext): Promise<void> {
|
||||
// Create the global storage folder now for storing the query history persistance file
|
||||
const storageUri = context.globalStorageUri;
|
||||
try {
|
||||
await fs.mkdir(context.globalStorageUri.fsPath);
|
||||
await fs.mkdir(storageUri.fsPath);
|
||||
} catch (err) {
|
||||
if (err.code !== 'EEXIST') {
|
||||
console.error(`Error creating query history global storage folder ${context.globalStorageUri.fsPath}. ${err}`);
|
||||
}
|
||||
}
|
||||
const treeDataProvider = new QueryHistoryProvider(context);
|
||||
const treeDataProvider = new QueryHistoryProvider(context, storageUri);
|
||||
context.subscriptions.push(treeDataProvider);
|
||||
const treeView = vscode.window.createTreeView('queryHistory', {
|
||||
treeDataProvider,
|
||||
@@ -83,6 +84,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
||||
context.subscriptions.push(vscode.commands.registerCommand('queryHistory.enableCapture', async () => {
|
||||
return treeDataProvider.setCaptureEnabled(true);
|
||||
}));
|
||||
context.subscriptions.push(vscode.commands.registerCommand('queryHistory.openStorageFolder', async () => {
|
||||
return vscode.env.openExternal(storageUri);
|
||||
}));
|
||||
}
|
||||
|
||||
async function openQuery(item: QueryHistoryItem): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user