This commit is contained in:
Yiorgis Gozadinos 2026-04-03 19:54:35 +03:00
parent 367accb814
commit a118ee7aaa
No known key found for this signature in database
4 changed files with 8 additions and 15 deletions

View file

@ -3,7 +3,7 @@
### Added
- **S3/Object storage support**: Connect to LanceDB on S3, GCS, Azure Blob, or HDFS via `lancedb.uri` and `storage_options` config. Supports S3-compatible stores (MinIO, Tigris) with custom endpoints.
- **S3/Object storage support**: Connect to LanceDB on S3, GCS, Azure Blob, or HDFS via `lancedb.uri` and `storage_options` config. Supports S3-compatible stores with custom endpoints.
- **Remote skill generation**: `create-skill` now supports remote databases — omit `--db` and provide `--config-file` to generate skills that connect to object storage at runtime instead of bundling the database.
## [0.38.0] - 2026-04-07

View file

@ -45,11 +45,10 @@ class HaikuRAGApp: # pragma: no cover
self.before = before
self.console = Console()
@property
def _is_local(self) -> bool:
from haiku.rag.store.engine import ConnectionMode
return ConnectionMode.from_config(self.config) == ConnectionMode.LOCAL
self._is_local = ConnectionMode.from_config(self.config) == ConnectionMode.LOCAL
self._display_path = self.db_path if self._is_local else self.config.lancedb.uri
async def init(self):
"""Initialize a new database."""
@ -62,9 +61,8 @@ class HaikuRAGApp: # pragma: no cover
# Create the database
client = HaikuRAG(db_path=self.db_path, config=self.config, create=True)
client.close()
display_path = self.config.lancedb.uri if not self._is_local else self.db_path
self.console.print(
f"[bold green]Database initialized at {display_path}[/bold green]"
f"[bold green]Database initialized at {self._display_path}[/bold green]"
)
async def info(self):
@ -74,9 +72,8 @@ class HaikuRAGApp: # pragma: no cover
# Basic: show path/URI
self.console.print("[bold]haiku.rag database info[/bold]")
display_path = self.config.lancedb.uri if not self._is_local else self.db_path
self.console.print(
f" [repr.attrib_name]path[/repr.attrib_name]: {display_path}"
f" [repr.attrib_name]path[/repr.attrib_name]: {self._display_path}"
)
if self._is_local and not self.db_path.exists():

View file

@ -71,18 +71,16 @@ class InfoModal(ModalScreen):
# Path
lines.append(f"[bold $accent]path[/bold $accent]: {self.db_path}")
is_local = (
ConnectionMode.from_config(self.client.store._config)
== ConnectionMode.LOCAL
)
is_local = self.client.store._connection_mode == ConnectionMode.LOCAL
if is_local and not self.db_path.exists():
lines.append("[red]Database path does not exist.[/red]")
self._content_widget.update("\n".join(lines))
return
# Connect to get table info
config = self.client.store._config
try:
db = connect_lancedb(self.client.store._config, self.db_path)
db = connect_lancedb(config, self.db_path)
table_names = set(db.list_tables().tables)
except Exception as e:
lines.append(f"[red]Failed to open database: {e}[/red]")

View file

@ -19,8 +19,6 @@ from haiku.rag.store.exceptions import MigrationRequiredError, ReadOnlyError
logger = logging.getLogger(__name__)
OBJECT_STORAGE_PREFIXES = ("s3://", "gs://", "az://", "hdfs://")
class ConnectionMode(Enum):
LOCAL = "local"