Skip to content
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

Modified SDK for Quickstart Playground - Chat Style #3908

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ parameters:
variables:
# MSIXVersion's second part should always be odd to account for stub app's version
MSIXVersion: '0.1801'
VersionOfSDK: '0.700'
VersionOfSDK: '0.800'
solution: '**/DevHome.sln'
appxPackageDir: 'AppxPackages'
testOutputArtifactDir: 'TestResults'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,18 @@
};
}

// Used by the extension to provide information on the chat style generation
[experimental]
[contract(Microsoft.Windows.DevHome.SDK.DevHomeContract, 8)]
runtimeclass QuickStartChatStyleResult
{

Check failure on line 1528 in extensionsdk/Microsoft.Windows.DevHome.SDK/Microsoft.Windows.DevHome.SDK.idl

View workflow job for this annotation

GitHub Actions / build-and-test (Debug, x86, windows-latest, 8.0.x)

[msg]The contract version specified must be less than or equal to the corresponding API contract version.
Copy link
Member

Choose a reason for hiding this comment

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

Do we think we want a class to provide flexibility for the chat result for the future rather than just using string below in the async operation?

// The result object returned to Dev Home when the chat response is received.
QuickStartChatStyleResult(String chatResponse);

// The response of the chat to the user to help the user refine the prompt.
String ChatResponse { get; };
}

// Passed back to Dev Home to provide the progress in generating a quick start project.
// This is used by Dev Home to show progress to the user while the project is being generated.
[experimental]
Expand Down Expand Up @@ -1590,6 +1602,17 @@
Windows.Foundation.IAsyncOperationWithProgress<QuickStartProjectResult, QuickStartProjectProgress> GenerateAsync();
}

// Used to create a response based on whether the user's prompt is a valid prompt.
[experimental]
[contract(Microsoft.Windows.DevHome.SDK.DevHomeContract, 8)]
interface IQuickStartChatStyleGenerationOperation
{
// Starts the operation which generates a response based on the user's prompt to the chat UI. The response
// will denote whether the user has entered a meaningful and valid prompt that can be used to generate
// a codespace.
Windows.Foundation.IAsyncOperation<QuickStartChatStyleResult> GenerateChatStyleResponse();
}

// Extensions can implement this provider to provide a way to
// create a project based on a prompt as part of the Dev Home
// quick start project feature.
Expand Down Expand Up @@ -1643,5 +1666,13 @@
IQuickStartProjectGenerationOperation CreateProjectGenerationOperation(String prompt, Windows.Storage.StorageFolder outputFolder);
}

// Used to create the chat style messages between the user and the chat UI.
[experimental]
[contract(Microsoft.Windows.DevHome.SDK.DevHomeContract, 8)]
interface IQuickStartProjectProvider2 requires IQuickStartProjectProvider
{
IQuickStartChatStyleGenerationOperation CreateChatStyleGenerationOperation(String prompt);
}

// End of QuickStartProject APIs
}
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
<ClInclude Include="OpenConfigurationSetResult.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="ProviderOperationResult.h" />
<ClCompile Include="QuickStartChatStyleResult.h" />
<ClInclude Include="QuickStartProjectAdaptiveCardResult.h" />
<ClInclude Include="QuickStartProjectResult.h" />
<ClInclude Include="RepositoriesResult.h" />
Expand Down Expand Up @@ -266,6 +267,7 @@
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="ProviderOperationResult.cpp" />
<ClCompile Include="QuickStartChatStyleResult.cpp" />
<ClCompile Include="QuickStartProjectAdaptiveCardResult.cpp" />
<ClCompile Include="QuickStartProjectResult.cpp" />
<ClCompile Include="RepositoriesResult.cpp" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include "pch.h"
#include "QuickStartChatStyleResult.h"
#include "QuickStartChatStyleResult.g.cpp"

namespace winrt::Microsoft::Windows::DevHome::SDK::implementation
{
QuickStartChatStyleResult::QuickStartChatStyleResult(hstring const& chatResponse) :
_ChatResponse(chatResponse)
{
}

hstring QuickStartChatStyleResult::ChatResponse()
{
return _ChatResponse;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#pragma once
#include "QuickStartChatStyleResult.g.h"

namespace winrt::Microsoft::Windows::DevHome::SDK::implementation
{
struct QuickStartChatStyleResult : QuickStartChatStyleResultT<QuickStartChatStyleResult>
{
QuickStartChatStyleResult() = default;

QuickStartChatStyleResult(hstring const& chatResponse);
hstring ChatResponse();

private:
hstring const _ChatResponse;
};
}

namespace winrt::Microsoft::Windows::DevHome::SDK::factory_implementation
{
struct QuickStartChatStyleResult : QuickStartChatStyleResultT<QuickStartChatStyleResult, implementation::QuickStartChatStyleResult>
{
};
}
Loading