refactor(controller): Remove Tkinter and hide_tk_root from AppController

This commit is contained in:
2026-05-09 15:13:13 -04:00
parent 8c06c1767b
commit 04ce727718
-16
View File
@@ -15,7 +15,6 @@ import tomli_w
import requests import requests
from dataclasses import asdict from dataclasses import asdict
from datetime import datetime from datetime import datetime
from tkinter import filedialog, Tk
from fastapi import FastAPI, Depends, HTTPException from fastapi import FastAPI, Depends, HTTPException
from fastapi.security.api_key import APIKeyHeader from fastapi.security.api_key import APIKeyHeader
@@ -41,14 +40,6 @@ from src import tool_presets
from src import rag_engine from src import rag_engine
from src import theme_2 as theme from src import theme_2 as theme
def hide_tk_root() -> Tk:
"""
[C: src/gui_2.py:App._render_files_panel, src/gui_2.py:App._render_projects_panel, src/gui_2.py:App._render_provider_panel, src/gui_2.py:App._render_screenshots_panel, src/gui_2.py:App._render_theme_panel, src/gui_2.py:App.render_path_field]
"""
root = Tk()
root.withdraw()
root.wm_attributes("-topmost", True)
return root
def parse_symbols(text: str) -> list[str]: def parse_symbols(text: str) -> list[str]:
""" """
@@ -1263,13 +1254,6 @@ class AppController:
""" """
[C: src/gui_2.py:App._render_log_management] [C: src/gui_2.py:App._render_log_management]
""" """
root = hide_tk_root()
if path is None:
path = filedialog.askdirectory(
title="Select Session Directory",
initialdir=str(paths.get_logs_dir())
)
root.destroy()
if not path: if not path:
return return