Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Clément Sirieix <clement.sirieix@mistral.ai> Co-authored-by: Gauthier Guinet <43207538+Gguinet@users.noreply.github.com> Co-authored-by: Kim-Adeline Miguel <kimadeline.miguel@mistral.ai> Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com> Co-authored-by: Quentin <torroba.q@gmail.com> Co-authored-by: Simon <80467011+sorgfresser@users.noreply.github.com> Co-authored-by: Simon Van de Kerckhove <simon.vandekerckhove@mistral.ai> Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com> Co-authored-by: angelapopopo <angele.lenglemetz@mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
24 lines
636 B
Python
24 lines
636 B
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
import time
|
|
|
|
from vibe.core.paths import PLANS_DIR
|
|
from vibe.core.utils.slug import create_slug
|
|
|
|
|
|
class PlanSession:
|
|
def __init__(self) -> None:
|
|
self._plan_file_path: Path | None = None
|
|
|
|
@property
|
|
def plan_file_path(self) -> Path:
|
|
if self._plan_file_path is None:
|
|
slug = create_slug()
|
|
timestamp = int(time.time())
|
|
self._plan_file_path = PLANS_DIR.path / f"{timestamp}-{slug}.md"
|
|
return self._plan_file_path
|
|
|
|
@property
|
|
def plan_file_path_str(self) -> str:
|
|
return str(self.plan_file_path)
|