feat(codex-bridge): the AITURK work line is part of Codex Baglama
The instruction is added for Codex Desktop whenever this computer has an AITURK command that can send work (aiturk is); no separate switch, no bridge.json entry. The bridge fills in the chat id; the command runs in Codex's own folder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
615fedde01
commit
48103b9ad3
3 files changed
+122
-17
No files matched your search
@@ -246,6 +246,23 @@ def catalog_refresh_loop():
|
||||
|
||||
threading.Thread(target=catalog_refresh_loop, daemon=True).start()
|
||||
|
||||
# ---- AITURK is hatti: isi gonderebilen AITURK komutu (is_hatti.py). Kurulum sonradan gelebilir: yoksa 2 dk'da bir bakilir.
|
||||
HAT_KOMUT = [None]
|
||||
|
||||
def hat_komut_loop():
|
||||
while True:
|
||||
try:
|
||||
if (CFG.get("aiturk_hat") or {}).get("enabled") is not False:
|
||||
bulunan = is_hatti.komut_bul()
|
||||
if bulunan != HAT_KOMUT[0]:
|
||||
HAT_KOMUT[0] = bulunan
|
||||
log(f"AITURK is hatti: {'acik, komut ' + bulunan if bulunan else 'kapali (aiturk is komutu yok)'}")
|
||||
except Exception as e:
|
||||
log(f"AITURK is hatti komutu aranamadi: {type(e).__name__}: {e}")
|
||||
time.sleep(600 if HAT_KOMUT[0] else 120)
|
||||
|
||||
threading.Thread(target=hat_komut_loop, daemon=True).start()
|
||||
|
||||
LAST_MODELS = {} # hesap kimligi -> son basarili model listesi (chatgpt.com hata verirse bu verilir)
|
||||
CACHE_DIR = os.path.join(LOGDIR, "son-liste")
|
||||
|
||||
@@ -913,7 +930,8 @@ class H(http.server.BaseHTTPRequestHandler):
|
||||
durum, _, sayi = (IDE_DURUM[0] or "kapali, 0 model").partition(", ")
|
||||
return self._send_json(200, {"ok": ZSTD_OK, "surum": SURUM, "kod": KOD, "zstd": ZSTD_OK, "ide_durum": durum,
|
||||
"ide_model": int((sayi.split() or ["0"])[0]),
|
||||
"ozet": bool((CFG.get("ozet_kopru") or {}).get("enabled", False))})
|
||||
"ozet": bool((CFG.get("ozet_kopru") or {}).get("enabled", False)),
|
||||
"is_hatti": bool(HAT_KOMUT[0])})
|
||||
if self.command == "POST" and path.rstrip("/").endswith("/stop"):
|
||||
self._send_json(200, {"ok": True})
|
||||
log("AITURK IDE istegiyle kapatiliyor")
|
||||
@@ -1272,7 +1290,8 @@ class H(http.server.BaseHTTPRequestHandler):
|
||||
# Model, sohbetin modelinin soylenerek degistirilebildigini bilsin; yoksa "degistiremem" diyor.
|
||||
if CFG.get("sesle_model", True) and CFG.get("model_bilgi", True) and sohbet and model_gecis.bilgi_ekle(req):
|
||||
govde_degisti = True
|
||||
if is_hatti.masaustu_mu(kaynak) and is_hatti.ekle(req, is_hatti.talimat(CFG.get("aiturk_hat"))):
|
||||
if is_hatti.masaustu_mu(kaynak) and is_hatti.ekle(
|
||||
req, is_hatti.talimat(CFG.get("aiturk_hat"), HAT_KOMUT[0], sohbet)):
|
||||
govde_degisti = True
|
||||
except Exception as e:
|
||||
log(f"[{n} {slug}] is hatti talimati atlandi: {type(e).__name__}: {e}")
|
||||
|
||||
Reference in new issue
Block a user