Update app.py
Browse files
app.py
CHANGED
@@ -1036,24 +1036,20 @@ def create_ui() -> gr.Blocks:
|
|
1036 |
return gr.update(visible=False), hf_url
|
1037 |
return gr.update(visible=False), ""
|
1038 |
|
1039 |
-
def handle_explore_repo(repo_id: str) -> Tuple[Any, Any,
|
1040 |
-
"""Handle navigating to the repo explorer
|
1041 |
if repo_id and repo_id.strip():
|
1042 |
-
logger.info(f"User chose to explore
|
1043 |
-
|
1044 |
-
# Call the repository loading function directly
|
1045 |
-
status, context = handle_load_repository(repo_id.strip())
|
1046 |
-
|
1047 |
return (
|
1048 |
-
gr.update(visible=False),
|
1049 |
-
gr.update(selected="repo_explorer_tab"),
|
1050 |
-
gr.update(value=repo_id.strip())
|
1051 |
-
status, # update status display in repo explorer
|
1052 |
-
context # update context summary state in repo explorer
|
1053 |
)
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
|
|
|
|
1057 |
|
1058 |
def handle_cancel_modal() -> Any:
|
1059 |
"""Handle closing the modal."""
|
@@ -1204,9 +1200,7 @@ def create_ui() -> gr.Blocks:
|
|
1204 |
outputs=[
|
1205 |
repo_action_modal,
|
1206 |
tabs,
|
1207 |
-
repo_components["repo_explorer_input"]
|
1208 |
-
repo_components["repo_status_display"],
|
1209 |
-
repo_states["repo_context_summary"]
|
1210 |
],
|
1211 |
js="() => { setTimeout(() => { window.scrollTo({top: 0, behavior: 'smooth'}); window.dispatchEvent(new Event('repoExplorerNavigation')); }, 150); }"
|
1212 |
)
|
|
|
1036 |
return gr.update(visible=False), hf_url
|
1037 |
return gr.update(visible=False), ""
|
1038 |
|
1039 |
+
def handle_explore_repo(repo_id: str) -> Tuple[Any, Any, Any]:
|
1040 |
+
"""Handle navigating to the repo explorer and populating the ID."""
|
1041 |
if repo_id and repo_id.strip():
|
1042 |
+
logger.info(f"User chose to explore: {repo_id.strip()}")
|
|
|
|
|
|
|
|
|
1043 |
return (
|
1044 |
+
gr.update(visible=False), # close modal
|
1045 |
+
gr.update(selected="repo_explorer_tab"), # switch tab
|
1046 |
+
gr.update(value=repo_id.strip()) # update input field
|
|
|
|
|
1047 |
)
|
1048 |
+
return (
|
1049 |
+
gr.update(visible=False),
|
1050 |
+
gr.update(),
|
1051 |
+
gr.update()
|
1052 |
+
)
|
1053 |
|
1054 |
def handle_cancel_modal() -> Any:
|
1055 |
"""Handle closing the modal."""
|
|
|
1200 |
outputs=[
|
1201 |
repo_action_modal,
|
1202 |
tabs,
|
1203 |
+
repo_components["repo_explorer_input"]
|
|
|
|
|
1204 |
],
|
1205 |
js="() => { setTimeout(() => { window.scrollTo({top: 0, behavior: 'smooth'}); window.dispatchEvent(new Event('repoExplorerNavigation')); }, 150); }"
|
1206 |
)
|