You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manages the version control of your project using git.
42
-
If the project is not already a git repo, project files will be committed as a new local git repo together with a basic .gitignore. If the project is already a git repo, just commit the changes in the project.
@@ -59,12 +62,15 @@ If the user requests a project using a **template**:
59
62
- Presets and templates are mutually exclusive paths. Do not offer both options unless explicitly requested.
60
63
- Do not pass any flags to the \`${CREATE_APP_COMMAND}\` CLI tool that are not listed in the program.json options".
61
64
- Use the \`${COMMAND_RUNNER}\` command to run the \`${CREATE_APP_COMMAND}\` CLI tool when creating a new project.
62
-
- After project creation, prompt the user if **they want to do version control through git** using the **version_control_git** MCP tool.
65
+
- After project creation, **MANDATORY**: Always ask the user whether they want to do git version control and commit the files locally.**
66
+
- If the user replies "yes" or confirms they want version control:
67
+
- Use the integrated version control function and call the \`setupVersionControl\` function to handle git setup
68
+
- **IMPORTANT**: You cannot skip asking the user - this interaction is **mandatory** for every project creation.
63
69
`
64
70
65
-
exportdefault{
66
-
name: 'create_storefront_app',
67
-
description:`
71
+
classCreateAppGuidelinesTool{
72
+
name='create_storefront_app'
73
+
description=`
68
74
69
75
This tool is used to provide the agent with the instructions on how to use the @salesforce/pwa-kit-create-app CLI tool to create a new PWA Kit projects.
70
76
@@ -74,9 +80,102 @@ Example Triggers:
74
80
- "Create a new PWA Kit app"
75
81
- "Start a new storefront using a preset"
76
82
- "What templates are available for PWA Kit?"
77
-
- "What presets are available for PWA Kit?"`,
78
-
inputSchema: EmptyJsonSchema,
79
-
fn: async()=>{
83
+
- "What presets are available for PWA Kit?"`
84
+
inputSchema=EmptyJsonSchema
85
+
86
+
/**
87
+
* Handles the version control of your project using git.
88
+
* If the directory is not a git repo, it creates a basic .gitignore, runs git init, adds all files, and makes an initial commit.
89
+
* If already a git repo, it skips initialization and .gitignore creation, and just adds and commits all files locally.
90
+
* @param {string} directory - The directory to initialize the git repository in.
91
+
*/
92
+
handleGitVersionControl(directory){
93
+
if(!shell.which('git')){
94
+
thrownewError(
95
+
'git is not installed or not found in PATH. Please install git to initialize a repository.'
0 commit comments