Skip to content

Commit 78af1cf

Browse files
committed
Update parameter command
1 parent 2acdb6b commit 78af1cf

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

src/TALXIS.CLI.MCP/CopilotInstructionsManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class CopilotInstructionsManager
1717
// Hardcoded instructions to be written within the marked section
1818
private const string TalxisInstructions = @"
1919
# Instructions for performing tasks over the repository
20-
This monorepo contains Power Platform solutions. TALXIS CLI MCP Server (alias 'txc-mcp') provides tools for developers to perform tasks over the repository.
20+
You work with a monorepo that contains Power Platform solutions. You must use TALXIS CLI MCP Server (alias 'txc-mcp') which provides tools for developers to perform tasks over the repository.
2121
2222
**MANDATORY: Use TALXIS CLI MCP Server Exclusively**
2323
@@ -47,7 +47,7 @@ public class CopilotInstructionsManager
4747
- Avoid speculation about functionality not confirmed by txc-mcp
4848
4949
6. **Default Values to use unless specified**
50-
- Always use `SolutionRootPath=Declarations` when passing parameter values to component create tool
50+
- You must always pass `SolutionRootPath=Declarations` when calling the tool for creating components
5151
5252
## Project Structure and Naming Conventions
5353

src/TALXIS.CLI.Workspace/ComponentParameterListCliCommand.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using DotMake.CommandLine;
2+
using Microsoft.TemplateEngine.Abstractions;
23
using TALXIS.CLI.Workspace.TemplateEngine;
34

45
namespace TALXIS.CLI.Workspace;
@@ -25,6 +26,13 @@ public int Run()
2526
return 0;
2627
}
2728
Console.WriteLine($"Parameters for template '{ShortName}':");
29+
30+
// Always show the mandatory output parameter first
31+
Console.WriteLine("--output (Project folder path) (text) <required>");
32+
Console.WriteLine(" Specifies the target project folder path where the component will be created.");
33+
Console.WriteLine(" Required for both creating new projects (solution, plugin, PCF, etc.) and adding components to existing projects.");
34+
Console.WriteLine(" Format: \"src\\Solutions.DataModel\"");
35+
2836
foreach (var p in parameters)
2937
{
3038
Console.Write($"--{p.Name}");
@@ -33,7 +41,9 @@ public int Run()
3341
Console.Write($" ({p.DataType})");
3442
if (!string.IsNullOrEmpty(p.DefaultValue?.ToString()))
3543
Console.Write($" [default: {p.DefaultValue}]");
36-
if (p.Precedence != null && p.Precedence.ToString() == "Required")
44+
// Check if parameter is required
45+
if (p.Precedence.IsRequired ||
46+
p.Precedence.PrecedenceDefinition == Microsoft.TemplateEngine.Abstractions.PrecedenceDefinition.Required)
3747
Console.Write(" <required>");
3848
if (p.Choices != null && p.Choices.Count > 0)
3949
{

src/TALXIS.CLI.Workspace/ComponentTypeListCliCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public async Task<int> RunAsync()
1818
Console.WriteLine("No components available.");
1919
return 0;
2020
}
21-
Console.WriteLine("Available components:");
2221
foreach (var template in templates)
2322
{
2423
var description = string.IsNullOrWhiteSpace(template.Description) ? "" : $" - {template.Description}";

src/TALXIS.CLI.Workspace/WorkspaceCliCommand.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ public void Run(CliContext context)
2828
2929
This repository is organized as a monorepo based on the .NET project system. It uses a Visual Studio solution file (.sln) to track all projects, and each project is defined by its own project file (.csproj, .cdsproj, or other .(x)proj formats). All projects are built using MSBuild.
3030
31-
• The root contains essential files such as README.md, .gitignore, and the .sln solution file.
32-
• The src/ directory holds all source code, organized into folders for different project types.
31+
• The root contains essential files such as README.md, .gitignore, and the .sln solution file
32+
• The src/ directory holds all source code, organized into folders for different project types
3333
3434
Project Types Supported:
35-
• Dataverse Solution (.cdsproj or .csproj): Used for defining Dataverse components and metadata.
36-
• Dataverse Package (.csproj): Bundles multiple solutions and custom logic for deployment; references other projects to form a unit of deployment.
37-
• Dataverse Plugin (.csproj): Contains custom business logic, event handlers, and automation for Dataverse.
38-
• Power Apps Component Framework control (.csproj): Implements custom controls for Power Apps.
39-
• Power Apps Script Library (.csproj): Provides reusable scripts for Power Platform solutions.
35+
• Dataverse Solution (.cdsproj or .csproj): Used for defining Dataverse components and metadata. Build artifact is solution ZIP file.
36+
• Dataverse Package (.csproj): Bundles multiple solutions and custom logic for deployment; references other projects to form a unit of deployment. Build artifact is package ZIP file which contains all solutions, import config, data and deployment automation/migration code.
37+
• Dataverse Plugin (.csproj): Contains custom business logic, event handlers, and automation for Dataverse. Build artifact is a plugin DLL file.
38+
• Power Apps Component Framework control (.csproj): Implements custom controls for Power Apps. Build artifact is a PCF control bundle JS.
39+
• Power Apps Script Library (.csproj): Provides reusable scripts for Power Platform solutions. Build artifact is a script bundle JS file.
4040
• Power Platform Connector (.csproj): Defines custom connectors for Power Platform integrations.
4141
• Code App (.csproj): Builds fully custom frontend SPA hosted in Power Apps.
4242
• Other .NET-based projects (.csproj, .xproj): Any additional supporting libraries or tools.
@@ -51,8 +51,8 @@ The Visual Studio solution file (.sln) and src folder MUST be initialized before
5151
4. Create src/ directory: mkdir src
5252
5353
Development and Build:
54-
Projects are added to the solution file (.sln) for easy management and building.
55-
• MSBuild is used to build all project types, ensuring compatibility and automation.
54+
All projects are added to the single solution file (.sln) which is placed in the root directory
55+
• MSBuild (dotnet build) is used to build all project types
5656
• Solution projects can have ProjectReferences to plugin, script, PCF, and Code App project types. When the solution is built, it pulls outputs of the referenced projects and places them into the solution artifact (the build output of the solution project).
5757
• Multiple solutions can be added as ProjectReferences to the package project. When the package is built, it composes ImportConfig.xml with the list of solutions and the order in which they are imported to Dataverse upon deployment.
5858
• Package project type can contain C# migration and deployment automation/infra code. Dataverse packages can also contain configuration and test data which needs to be deployed with the code/definitions.

0 commit comments

Comments
 (0)