fix: handle case of empty token list in TokenManager to prevent errors

This commit is contained in:
Junyan Qin
2025-12-29 12:18:45 +08:00
parent de8a7df6c2
commit b788858f9e

View File

@@ -18,6 +18,8 @@ class TokenManager:
self.using_token_index = 0
def get_token(self) -> str:
if len(self.tokens) == 0:
return ''
return self.tokens[self.using_token_index]
def next_token(self):