Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
Fix model name to gemini-1.5-flash v2.2.3
This commit is contained in:
+13
-4
@@ -11,15 +11,23 @@ class GeminiFixer
|
||||
|
||||
public function __construct(private readonly ?string $apiKey)
|
||||
{
|
||||
if ($this->apiKey && class_exists(Gemini::class)) {
|
||||
$this->client = Gemini::client($this->apiKey);
|
||||
if ($this->apiKey) {
|
||||
try {
|
||||
$this->client = \Gemini::client($this->apiKey);
|
||||
} catch (\Throwable) {
|
||||
$this->client = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function suggestFix(Violation $violation): ?string
|
||||
{
|
||||
if (!$this->apiKey) {
|
||||
return "Hata: GEMINI_API_KEY bulunamadı.";
|
||||
}
|
||||
|
||||
if (!$this->client) {
|
||||
return null;
|
||||
return "Hata: Gemini istemcisi başlatılamadı. Kütüphane eksik olabilir.";
|
||||
}
|
||||
|
||||
$prompt = <<<PROMPT
|
||||
@@ -37,7 +45,8 @@ If it's about ARIA roles, add the correct ones.
|
||||
PROMPT;
|
||||
|
||||
try {
|
||||
$result = $this->client->generativeModel('gemini-2.5-flash')->generateContent($prompt);
|
||||
// Stable model: gemini-1.5-flash
|
||||
$result = $this->client->generativeModel('gemini-1.5-flash')->generateContent($prompt);
|
||||
$suggestion = trim($result->text());
|
||||
|
||||
// Clean up if AI included markdown blocks anyway
|
||||
|
||||
Reference in New Issue
Block a user