Skip to content

Commit

Permalink
Add agent wrapping to pipeline config command
Browse files Browse the repository at this point in the history
  • Loading branch information
bwateratmsft committed Apr 22, 2024
1 parent b64b4d8 commit b7ccaed
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ext/vscode/src/commands/pipeline.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Licensed under the MIT License.

import * as vscode from 'vscode';
import { IActionContext } from '@microsoft/vscode-azext-utils';
Expand All @@ -10,7 +10,14 @@ import { TelemetryId } from '../telemetry/telemetryId';
import { isTreeViewModel, TreeViewModel } from '../utils/isTreeViewModel';
import { AzureDevCliApplication } from '../views/workspace/AzureDevCliApplication';

export async function pipelineConfig(context: IActionContext, selectedItem?: vscode.Uri | TreeViewModel): Promise<void> {
/**
* A tuple representing the arguments that must be passed to the `init` command when executed via {@link vscode.commands.executeCommand}
*/
export type PipelineConfigCommandArguments = [ vscode.Uri | undefined, boolean? ];

export async function pipelineConfig(context: IActionContext, selectedItem?: vscode.Uri | TreeViewModel, fromAgent: boolean = false): Promise<void> {
context.telemetry.properties.fromAgent = fromAgent.toString();

const selectedFile = isTreeViewModel(selectedItem) ? selectedItem.unwrap<AzureDevCliApplication>().context.configurationFile : selectedItem;
const workingFolder = await getWorkingFolder(context, selectedFile);

Expand Down

0 comments on commit b7ccaed

Please sign in to comment.