gitea_connector.py aktualisiert

This commit is contained in:
2026-03-06 14:01:18 +00:00
parent 877cbd5e93
commit f778138381

View File

@@ -1,7 +1,7 @@
""" """
title: Gitea Connector title: Gitea Connector
author: H5N3RG author: H5N3RG
version: 0.1 version: 0.2
license: MIT license: MIT
description: Allows Open WebUI LLMs to read and edit Gitea repositories. description: Allows Open WebUI LLMs to read and edit Gitea repositories.
""" """
@@ -58,8 +58,14 @@ class Tools:
def __init__(self): def __init__(self):
self.valves = self.Valves() self.valves = self.Valves()
# FIX: GiteaAPI wird NICHT mehr hier instanziiert.
# Stattdessen wird self.api als Property definiert,
# damit die Valve-Werte immer aktuell sind wenn OWUI sie injiziert.
self.api = GiteaAPI(self.valves.GITEA_URL, self.valves.API_TOKEN) @property
def api(self) -> GiteaAPI:
"""Lazy property: baut GiteaAPI immer frisch mit den aktuellen Valve-Werten."""
return GiteaAPI(self.valves.GITEA_URL, self.valves.API_TOKEN)
# -------------------------------------------------- # --------------------------------------------------
# LIST FILES # LIST FILES