mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 17:26:23 +02:00
feat(new-chat): add filesystem backend interfaces and selection helpers
This commit is contained in:
parent
b067c92b4c
commit
749116e830
3 changed files with 75 additions and 0 deletions
|
|
@ -0,0 +1,33 @@
|
|||
"""Filesystem mode contracts and selection helpers for chat sessions."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from enum import StrEnum
|
||||
|
||||
|
||||
class FilesystemMode(StrEnum):
|
||||
"""Supported filesystem backends for agent tool execution."""
|
||||
|
||||
CLOUD = "cloud"
|
||||
DESKTOP_LOCAL_FOLDER = "desktop_local_folder"
|
||||
|
||||
|
||||
class ClientPlatform(StrEnum):
|
||||
"""Client runtime reported by the caller."""
|
||||
|
||||
WEB = "web"
|
||||
DESKTOP = "desktop"
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class FilesystemSelection:
|
||||
"""Resolved filesystem selection for a single chat request."""
|
||||
|
||||
mode: FilesystemMode = FilesystemMode.CLOUD
|
||||
client_platform: ClientPlatform = ClientPlatform.WEB
|
||||
local_root_path: str | None = None
|
||||
|
||||
@property
|
||||
def is_local_mode(self) -> bool:
|
||||
return self.mode == FilesystemMode.DESKTOP_LOCAL_FOLDER
|
||||
Loading…
Add table
Add a link
Reference in a new issue