Skip to content

Commit 60851d7

Browse files
committed
Merge branch 'main' into art-doco
2 parents ccdcf80 + 1ae687d commit 60851d7

File tree

3 files changed

+16
-106
lines changed

3 files changed

+16
-106
lines changed

src/Console/AddBoostTool.php

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/Console/InstallCommand.php

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ private function collectInstallationPreferences(): void
126126

127127
private function enact(): void
128128
{
129-
if ($this->installingGuidelines() && ! empty($this->selectedTargetAgents)) {
129+
if ($this->shouldInstallAiGuidelines() && ! empty($this->selectedTargetAgents)) {
130130
$this->enactGuidelines();
131131
}
132132

133133
usleep(750000);
134134

135-
if (($this->installingMcp() || $this->installingHerdMcp()) && $this->selectedTargetIdes->isNotEmpty()) {
135+
if (($this->shouldInstallMcp() || $this->shouldInstallHerdMcp()) && $this->selectedTargetIdes->isNotEmpty()) {
136136
$this->enactMcpServers();
137137
}
138138
}
@@ -171,11 +171,11 @@ private function outro(): void
171171

172172
// Guidelines installed (prefix: g)
173173
$guidelines = [];
174-
if ($this->installingGuidelines()) {
174+
if ($this->shouldInstallAiGuidelines()) {
175175
$guidelines[] = 'g:ai';
176176
}
177177

178-
if ($this->installingStyleGuidelines()) {
178+
if ($this->shouldInstallStyleGuidelines()) {
179179
$guidelines[] = 'g:style';
180180
}
181181

@@ -229,21 +229,20 @@ protected function determineTestEnforcement(bool $ask = true): bool
229229
*/
230230
private function selectBoostFeatures(): Collection
231231
{
232-
$defaultToInstallOptions = ['mcp_server', 'ai_guidelines'];
233-
$toInstallOptions = [
232+
$defaultInstallOptions = ['mcp_server', 'ai_guidelines'];
233+
$installOptions = [
234234
'mcp_server' => 'Boost MCP Server',
235235
'ai_guidelines' => 'Package AI Guidelines (i.e. Framework, Inertia, Pest)',
236-
// 'style_guidelines' => 'Laravel Style AI Guidelines',
237236
];
238237

239238
if ($this->herd->isMcpAvailable()) {
240-
$toInstallOptions['herd_mcp'] = 'Herd MCP Server';
239+
$installOptions['herd_mcp'] = 'Herd MCP Server';
241240
}
242241

243242
return collect(multiselect(
244243
label: 'What shall we install?',
245-
options: $toInstallOptions,
246-
default: $defaultToInstallOptions,
244+
options: $installOptions,
245+
default: $defaultInstallOptions,
247246
required: true,
248247
));
249248
}
@@ -401,7 +400,7 @@ private function selectTargetAgents(): Collection
401400

402401
protected function enactGuidelines(): void
403402
{
404-
if (! $this->installingGuidelines()) {
403+
if (! $this->shouldInstallAiGuidelines()) {
405404
return;
406405
}
407406

@@ -459,24 +458,22 @@ protected function enactGuidelines(): void
459458
}
460459
}
461460

462-
protected function installingGuidelines(): bool
461+
private function shouldInstallAiGuidelines(): bool
463462
{
464463
return $this->selectedBoostFeatures->contains('ai_guidelines');
465464
}
466465

467-
protected function installingStyleGuidelines(): bool
466+
private function shouldInstallStyleGuidelines(): bool
468467
{
469468
return false;
470-
471-
return $this->selectedBoostFeatures->contains('style_guidelines');
472469
}
473470

474-
protected function installingMcp(): bool
471+
private function shouldInstallMcp(): bool
475472
{
476473
return $this->selectedBoostFeatures->contains('mcp_server');
477474
}
478475

479-
protected function installingHerdMcp(): bool
476+
private function shouldInstallHerdMcp(): bool
480477
{
481478
return $this->selectedBoostFeatures->contains('herd_mcp');
482479
}
@@ -545,7 +542,7 @@ protected function enactMcpServers(): void
545542
$results = [];
546543

547544
// Install Laravel Boost MCP if enabled
548-
if ($this->installingMcp()) {
545+
if ($this->shouldInstallMcp()) {
549546
try {
550547
$result = $ide->installMcp('laravel-boost', 'php', ['./artisan', 'boost:mcp']);
551548

@@ -562,7 +559,7 @@ protected function enactMcpServers(): void
562559
}
563560

564561
// Install Herd MCP if enabled
565-
if ($this->installingHerdMcp()) {
562+
if ($this->shouldInstallHerdMcp()) {
566563
try {
567564
$result = $ide->installMcp(
568565
key: 'herd',

stubs/tool.stub.php

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)