Skip to content

Commit 0401412

Browse files
committed
build(dependencies): Update ai-commit configuration and dependencies
- Change model reference from "gpt-4o" to "openai/gpt-4o-mini" in .ai-commit.json - Modify composer-updater to ensure proper command execution with escaped arguments - Upgrade orchestra/testbench dependency to version "^7.55" - Add new dependencies for "rector/jack" and upgrade "rector/swiss-knife" to "^2.3" - Refactor "ai-commit" command to use an array format for better execution handling - Introduce various new commands related to "jack" for enhanced functionality - Add vendor-bin/ai-commit/composer.json to manage dev dependencies for the ai-commit tool These changes enhance compatibility and improve command execution within the project setup.
1 parent 7243d8f commit 0401412

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

.ai-commit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"github_models_cli": {
1313
"driver": "github_models_cli",
1414
"binary": "gh",
15-
"model": "gpt-4o",
15+
"model": "openai/gpt-4o-mini",
1616
"options": {
1717
"--max-tokens": null,
1818
"--system-prompt": "You are a git commit message generator.",

composer-dependency-analyser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
)
4747
->ignoreErrorsOnPackages(
4848
[
49-
'guanguans/ai-commit',
49+
// 'guanguans/ai-commit',
5050
],
5151
[ErrorType::DEV_DEPENDENCY_IN_PROD]
5252
);

composer-updater

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ $status = (new SingleCommandApplication)
205205
$output = $this
206206
->mustRunCommand("$this->highestComposerBinary outdated --format=json --direct --ansi")
207207
->getOutput(),
208-
strpos($output, '{'.\PHP_EOL)
208+
(int) strpos($output, '{'.\PHP_EOL)
209209
),
210210
true
211211
)['installed'],
@@ -234,8 +234,8 @@ $status = (new SingleCommandApplication)
234234
{
235235
return \sprintf(
236236
'%s %s',
237-
$phpBinary ?? (new PhpExecutableFinder)->find(),
238-
$composerBinary ?? (new ExecutableFinder)->find('composer')
237+
escapeshellarg($phpBinary ?? (new PhpExecutableFinder)->find()),
238+
escapeshellarg($composerBinary ?? (new ExecutableFinder)->find('composer'))
239239
);
240240
}
241241

composer.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,11 @@
9898
"ergebnis/composer-normalize": "^2.47",
9999
"ergebnis/json-printer": "^3.7",
100100
"ergebnis/rector-rules": "^1.4",
101-
"guanguans/ai-commit": "dev-main",
102101
"guanguans/monorepo-builder-worker": "^2.0",
103102
"laravel/facade-documenter": "dev-main",
104103
"mockery/mockery": "^1.6",
105104
"nette/utils": "^4.0",
106-
"orchestra/testbench": "^7.54 || ^8.0 || ^9.0 || ^10.0",
105+
"orchestra/testbench": "^7.55 || ^8.0 || ^9.0 || ^10.0",
107106
"pestphp/pest": "^1.23 || ^2.0 || ^3.0",
108107
"pestphp/pest-plugin-faker": "^1.0 || ^2.0 || ^3.0",
109108
"pestphp/pest-plugin-laravel": "^1.4 || ^2.0 || ^3.0",
@@ -112,8 +111,9 @@
112111
"phpstan/phpstan": "^2.1",
113112
"phpstan/phpstan-deprecation-rules": "^2.0",
114113
"phpstan/phpstan-webmozart-assert": "^2.0",
114+
"rector/jack": "^0.2",
115115
"rector/rector": "^2.0",
116-
"rector/swiss-knife": "^2.2",
116+
"rector/swiss-knife": "^2.3",
117117
"rector/type-perfect": "^2.1",
118118
"shipmonk/composer-dependency-analyser": "^1.8",
119119
"shipmonk/phpstan-baseline-per-identifier": "^2.1",
@@ -199,7 +199,10 @@
199199
"post-update-cmd": [
200200
"@cghooks update"
201201
],
202-
"ai-commit": "@php ./vendor/bin/ai-commit commit --ansi",
202+
"ai-commit": [
203+
"@putenvs",
204+
"$PHP82 ./vendor-bin/ai-commit/vendor/guanguans/ai-commit/ai-commit commit --ansi"
205+
],
203206
"ai-commit-bito": "@ai-commit --generator=bito_cli",
204207
"ai-commit-bito-no-verify": "@ai-commit-bito --no-verify",
205208
"ai-commit-github-copilot": "@ai-commit --generator=github_copilot_cli",
@@ -240,6 +243,15 @@
240243
"@putenvs",
241244
"$PHP81 -f ./vendor/bin/facade.php -- Guanguans\\\\LaravelExceptionNotify\\\\Facades\\\\ExceptionNotify"
242245
],
246+
"jack": "@php vendor/bin/jack --ansi -v",
247+
"jack-breakpoint": "@jack breakpoint --limit=5",
248+
"jack-breakpoint-dev": "@jack-breakpoint --dev",
249+
"jack-open-versions": "@jack open-versions --limit=99",
250+
"jack-open-versions-dev": "@jack-open-versions --dev",
251+
"jack-open-versions-dev-dry-run": "@jack-open-versions-dev --dry-run",
252+
"jack-open-versions-dry-run": "@jack-open-versions --dry-run",
253+
"jack-raise-to-installed": "@jack raise-to-installed",
254+
"jack-raise-to-installed-dry-run": "@jack-raise-to-installed --dry-run",
243255
"lint": [
244256
"@putenvs",
245257
"for DIR in .; do find $DIR -maxdepth 1 -type f -name '*.php' -type f ! -name 'xxx.php' -exec $PHP80 -l {} \\; 2>&1 | (! grep -v '^No syntax errors detected'); done",
@@ -324,6 +336,7 @@
324336
"test-phpunit-coverage": "@test --coverage-html=./.build/phpunit/ --coverage-clover=clover.xml",
325337
"test-type-coverage": "@pest-type-coverage",
326338
"test-update-snapshots": "@pest-update-snapshots",
339+
"testbench": "@php vendor/bin/testbench --ansi",
327340
"time-end": "@php -r 'date_default_timezone_set('\\''Asia/Shanghai'\\''); echo \"\\nTime: \".round(time() - (int) getenv('\\''START_TIME'\\'')).'\\'' seconds, Memory: '\\''.round(memory_get_peak_usage(true) / 1024 / 1024, 2).\" MB\\n\";'",
328341
"time-start": "@putenv START_TIME=$(date +%s);",
329342
"trufflehog": "trufflehog git https://github.com/guanguans/notify --only-verified",

vendor-bin/ai-commit/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require-dev": {
3+
"guanguans/ai-commit": "dev-main"
4+
}
5+
}

0 commit comments

Comments
 (0)