Skip to content

Commit 488b2ad

Browse files
author
ityaozm@gmail.com
committed
refactor(namespace): Move Support classes to Clients namespace
- Rename files and classes from App\Support to App\Clients for better organization - Update all relevant imports in Generators and Unit tests to reflect the new namespace - This change improves clarity and maintains consistency within the codebase
1 parent c4d42bd commit 488b2ad

11 files changed

Lines changed: 16 additions & 13 deletions

File tree

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
* @see https://github.com/guanguans/ai-commit
1212
*/
1313

14-
namespace App\Support;
14+
namespace App\Clients;
1515

1616
use GuzzleHttp\Psr7\Utils;
1717
use Illuminate\Contracts\Container\BindingResolutionException;
1818
use Illuminate\Http\Client\PendingRequest;
1919
use Illuminate\Http\Client\RequestException;
2020
use Illuminate\Http\Client\Response;
21+
use function App\Support\validate;
2122

2223
/**
2324
* @see https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @see https://github.com/guanguans/ai-commit
1212
*/
1313

14-
namespace App\Support;
14+
namespace App\Clients;
1515

1616
use Composer\InstalledVersions;
1717
use GuzzleHttp\MessageFormatter;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
* @see https://github.com/guanguans/ai-commit
1212
*/
1313

14-
namespace App\Support;
14+
namespace App\Clients;
1515

1616
use GuzzleHttp\Psr7\Utils;
1717
use Illuminate\Contracts\Container\BindingResolutionException;
1818
use Illuminate\Http\Client\PendingRequest;
1919
use Illuminate\Http\Client\RequestException;
2020
use Illuminate\Http\Client\Response;
21+
use function App\Support\validate;
2122

2223
/**
2324
* @see https://platform.moonshot.cn/docs/api-reference
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @see https://github.com/guanguans/ai-commit
1212
*/
1313

14-
namespace App\Support;
14+
namespace App\Clients;
1515

1616
use GuzzleHttp\Middleware;
1717
use GuzzleHttp\Psr7\Utils;
@@ -20,6 +20,7 @@
2020
use Illuminate\Http\Client\RequestException;
2121
use Illuminate\Http\Client\Response;
2222
use Psr\Http\Message\ResponseInterface;
23+
use function App\Support\validate;
2324

2425
/**
2526
* @see https://beta.openai.com/docs/api-reference/introduction

app/Generators/ErnieBotGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace App\Generators;
1515

16-
use App\Support\Ernie;
16+
use App\Clients\Ernie;
1717
use Illuminate\Contracts\Container\BindingResolutionException;
1818
use Illuminate\Http\Client\RequestException;
1919
use Illuminate\Http\Client\Response;

app/Generators/MoonshotGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
namespace App\Generators;
1515

16-
use App\Support\FoundationSDK;
17-
use App\Support\Moonshot;
16+
use App\Clients\FoundationSDK;
17+
use App\Clients\Moonshot;
1818
use Illuminate\Http\Client\Response;
1919
use Illuminate\Support\Arr;
2020

app/Generators/OpenAIGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
namespace App\Generators;
1515

16-
use App\Support\FoundationSDK;
17-
use App\Support\OpenAI;
16+
use App\Clients\FoundationSDK;
17+
use App\Clients\OpenAI;
1818
use Illuminate\Support\Arr;
1919
use Illuminate\Support\Str;
2020

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @see https://github.com/guanguans/ai-commit
2323
*/
2424

25-
use App\Support\Ernie;
25+
use App\Clients\Ernie;
2626
use Illuminate\Http\Client\RequestException;
2727
use Illuminate\Http\Client\Response;
2828
use Illuminate\Support\Arr;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @see https://github.com/guanguans/ai-commit
2323
*/
2424

25-
use App\Support\OpenAI;
25+
use App\Clients\OpenAI;
2626
use Illuminate\Http\Client\PendingRequest;
2727
use Illuminate\Support\Arr;
2828
use Psr\Log\LoggerInterface;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* @see https://github.com/guanguans/ai-commit
2323
*/
2424

25-
use App\Support\Moonshot;
25+
use App\Clients\Moonshot;
2626
use Illuminate\Http\Client\Response;
2727
use Illuminate\Support\Arr;
2828
use Illuminate\Support\Facades\Http;

0 commit comments

Comments
 (0)