still working on crashes
This commit is contained in:
@ -17,8 +17,10 @@ from routers import transcribe, export, ai, captions, audio
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Dev log file — frontend forwards console.error/warn here so the agent can read it
|
||||
DEV_LOG_PATH = Path(__file__).parent.parent / "webview.log"
|
||||
# Dev log file — keep outside workspace to avoid dev watcher reload loops.
|
||||
DEV_LOG_PATH = Path(
|
||||
os.environ.get("TALKEDIT_DEV_LOG_PATH", str(Path(tempfile.gettempdir()) / "talkedit-webview.log"))
|
||||
)
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
@ -205,6 +207,7 @@ async def dev_log(request: Request):
|
||||
if args:
|
||||
line += " " + " ".join(args)
|
||||
line += "\n"
|
||||
DEV_LOG_PATH.parent.mkdir(parents=True, exist_ok=True)
|
||||
with open(DEV_LOG_PATH, "a") as f:
|
||||
f.write(line)
|
||||
return {"ok": True}
|
||||
return {"ok": True, "path": str(DEV_LOG_PATH)}
|
||||
|
||||
Reference in New Issue
Block a user