-
Notifications
You must be signed in to change notification settings - Fork 17
Add Deploy to Container App with Copilot command
#965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
fe5e16d
initial
motm32 c5ad28e
changes
motm32 a2f1f9a
small changes
motm32 8971d68
more small changes
motm32 190c1ea
pass in loadingViewPanel
motm32 7d9f9e8
update utils
motm32 8194611
merge main
motm32 8349fbc
fix package-lock
motm32 b1d6e70
update
motm32 e03d51a
simplify
motm32 c02bd83
merge main
motm32 3ff8b07
fix license
motm32 4103480
change wording
motm32 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.md in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import { CopilotUserInput, type IActionContext } from "@microsoft/vscode-azext-utils"; | ||
| import * as vscode from 'vscode'; | ||
| import { type ContainerAppItem } from "../../tree/ContainerAppItem"; | ||
| import { SharedState } from "../../webviews/OpenConfirmationViewStep"; | ||
| import { deployContainerApp } from "../deployContainerApp/deployContainerApp"; | ||
|
|
||
| export async function deployWithCopilot(context: IActionContext, node: ContainerAppItem): Promise<void> { | ||
| context.ui = new CopilotUserInput(vscode, JSON.stringify(node.viewProperties), () => SharedState.currentPanel); | ||
| await deployContainerApp(context, node); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import { Spinner } from "@fluentui/react-components"; | ||
| import './loadingView.scss'; | ||
|
|
||
| export const LoadingView = () => | ||
| <div className='loadingView'> | ||
| <Spinner labelPosition="below" label="Generating Copilot responses..." /> | ||
| </div> | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.md in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import { ViewColumn } from "vscode"; | ||
| import { ext } from "../extensionVariables"; | ||
| import { WebviewController } from "./extension-server/WebviewController"; | ||
|
|
||
| export type LoadingViewControllerType = { | ||
| title: string; | ||
| } | ||
|
|
||
| export class LoadingViewController extends WebviewController<LoadingViewControllerType> { | ||
| constructor(viewConfiguration: LoadingViewControllerType) { | ||
| super(ext.context, viewConfiguration.title, 'loadingView', viewConfiguration, ViewColumn.Active); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.md in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import { AzureWizardPromptStep, type IActionContext } from "@microsoft/vscode-azext-utils"; | ||
| import * as vscode from 'vscode'; | ||
| import { localize } from "../utils/localize"; | ||
| import { LoadingViewController } from "./LoadingViewController"; | ||
| import { SharedState } from "./OpenConfirmationViewStep"; | ||
|
|
||
| export class OpenLoadingViewStep<T extends IActionContext> extends AzureWizardPromptStep<T> { | ||
| public async prompt(): Promise<void> { | ||
| const loadingView = new LoadingViewController({ title: localize('loadingViewTitle', 'Loading...') }); | ||
| loadingView.revealToForeground(vscode.ViewColumn.Active); | ||
| SharedState.currentPanel = loadingView.panel; | ||
| } | ||
|
|
||
| public shouldPrompt(): boolean { | ||
| return true; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| .loadingView { | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| height: 100vh; | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Right now, it's not a may, it's guaranteed that it needs to change, right?
Also maybe we should note that a changed input may lead to different prompts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how granular it needs to be? I will change it from may to need but I think the different prompts may be adding more info than necessary and will make the description longer. If you are that passionate about it though I can make that change 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should know that I'm not passionate about anything lol. It's also prefixed with a nit 😋