mirror of
https://github.com/harivansh-afk/veet-code.git
synced 2026-04-15 08:03:46 +00:00
auto-update vite in bg
This commit is contained in:
parent
800d1b7792
commit
fcb740f0c2
1 changed files with 22 additions and 0 deletions
|
|
@ -428,6 +428,28 @@ class VeetcodeApp(App):
|
||||||
def on_mount(self) -> None:
|
def on_mount(self) -> None:
|
||||||
self.theme = "gruvbox"
|
self.theme = "gruvbox"
|
||||||
self.push_screen(ProblemListScreen())
|
self.push_screen(ProblemListScreen())
|
||||||
|
self.auto_update()
|
||||||
|
|
||||||
|
@work(thread=True)
|
||||||
|
def auto_update(self) -> None:
|
||||||
|
"""Silently update veetcode in background."""
|
||||||
|
import subprocess
|
||||||
|
repo = Path(__file__).parent.parent
|
||||||
|
try:
|
||||||
|
subprocess.run(
|
||||||
|
["git", "pull", "--quiet"],
|
||||||
|
cwd=repo,
|
||||||
|
capture_output=True,
|
||||||
|
timeout=10,
|
||||||
|
)
|
||||||
|
subprocess.run(
|
||||||
|
["uv", "sync", "--quiet"],
|
||||||
|
cwd=repo,
|
||||||
|
capture_output=True,
|
||||||
|
timeout=30,
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
pass # Silently fail - don't disrupt user
|
||||||
|
|
||||||
|
|
||||||
def run_app() -> None:
|
def run_app() -> None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue