refactor(controller): Remove Tkinter and hide_tk_root from AppController
This commit is contained in:
@@ -15,7 +15,6 @@ import tomli_w
|
||||
import requests
|
||||
from dataclasses import asdict
|
||||
from datetime import datetime
|
||||
from tkinter import filedialog, Tk
|
||||
|
||||
from fastapi import FastAPI, Depends, HTTPException
|
||||
from fastapi.security.api_key import APIKeyHeader
|
||||
@@ -41,14 +40,6 @@ from src import tool_presets
|
||||
from src import rag_engine
|
||||
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]:
|
||||
"""
|
||||
@@ -1263,13 +1254,6 @@ class AppController:
|
||||
"""
|
||||
[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:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user