Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/kimi_cli/web/api/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,12 +524,15 @@ async def get_session_file(
)

if file_path.is_dir():
hidden_dirs = {".git"}
result: list[dict[str, str | int]] = []
for subpath in file_path.iterdir():
if restrict_sensitive_apis:
rel_subpath = rel_path / subpath.name
if _is_sensitive_relative_path(rel_subpath):
continue
if subpath.name.startswith(".") and subpath.name in hidden_dirs and subpath.is_dir():
continue
if subpath.is_dir():
result.append({"name": subpath.name, "type": "directory"})
else:
Expand Down