Co-Authored-By: Quentin Torroba <quentin.torroba@mistral.ai>
This commit is contained in:
Mathias Gesbert 2025-12-18 18:12:18 +01:00 committed by Quentin
parent d8dbeeb31e
commit 402e898f39
10 changed files with 26 additions and 17 deletions

View file

@ -3,4 +3,4 @@ from __future__ import annotations
from pathlib import Path
VIBE_ROOT = Path(__file__).parent
__version__ = "1.2.0"
__version__ = "1.2.1"

View file

@ -105,7 +105,7 @@ def parse_arguments() -> argparse.Namespace:
def check_and_resolve_trusted_folder() -> None:
cwd = Path.cwd()
if not (cwd / ".vibe").exists():
if not (cwd / ".vibe").exists() or cwd.resolve() == Path.home().resolve():
return
is_folder_trusted = trusted_folders_manager.is_trusted(cwd)

View file

@ -1130,7 +1130,7 @@ class VibeApp(App):
warning = (
f"⚠ WARNING: {reason}\n\nRunning in this location is not recommended."
)
await self._mount_and_scroll(UserCommandMessage(warning))
await self._mount_and_scroll(WarningMessage(warning, show_border=False))
async def _finalize_current_streaming_message(self) -> None:
if self._current_streaming_message is None:

View file

@ -189,12 +189,14 @@ class ErrorMessage(Static):
class WarningMessage(Static):
def __init__(self, message: str) -> None:
def __init__(self, message: str, show_border: bool = True) -> None:
super().__init__()
self.add_class("warning-message")
self._message = message
self._show_border = show_border
def compose(self) -> ComposeResult:
with Horizontal(classes="warning-container"):
yield ExpandingBorder(classes="warning-border")
if self._show_border:
yield ExpandingBorder(classes="warning-border")
yield Static(self._message, markup=False, classes="warning-content")