You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This PR is based on PR #197 (analysis modes) and must be merged after it.**
4
+
5
+
---
6
+
7
+
## Data Tab: Downloadable Datasets
8
+
9
+
Adds a new **Data** tab to the UI where users can download all datasets generated during a session. Also renames "Additional information" → "Figures".
10
+
11
+
### What's new
12
+
13
+
-**`downloadable_datasets` tracking** — a new field on `AgentState` that accumulates dataset entries (`{label, path, source}`) as they're created throughout the pipeline
14
+
-**Climate model CSVs** — tracked after `write_climate_data_manifest()` in `data_agent`
15
+
-**ERA5 climatology JSON** — tracked in `prepare_predefined_data()` after extraction
16
+
-**ERA5 time series Zarr** — tracked in `data_analysis_agent` after `retrieve_era5_data` tool execution
17
+
-**DestinE time series Zarr** — tracked in `data_analysis_agent` after `retrieve_destine_data` tool execution
18
+
-**Data tab in UI** — lists all tracked datasets with download buttons; Zarr directories are zipped on the fly, JSON/CSV files download directly
-**Data tab always visible** — shown regardless of whether figures are available
21
+
22
+
### Pipeline fix
23
+
24
+
Each agent node now **returns**`downloadable_datasets` in its return dict so LangGraph properly merges state across stages (in-place mutation alone is not enough).
25
+
26
+
### Files changed
27
+
28
+
| File | Change |
29
+
|------|--------|
30
+
|`climsight_classes.py`| Add `downloadable_datasets: list = []` to `AgentState`|
31
+
|`climsight_engine.py`| Track datasets in `data_agent`, `prepare_predefined_data`, pass through `combine_agent`|
32
+
|`data_analysis_agent.py`| Track ERA5/DestinE Zarr outputs from tool intermediate steps |
33
+
|`streamlit_interface.py`| Rename tab, add Data tab with download buttons |
34
+
35
+
### Works in all modes
36
+
37
+
-**fast** — climate model CSVs + ERA5 climatology JSON
Copy file name to clipboardExpand all lines: src/climsight/streamlit_interface.py
+50-21Lines changed: 50 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -196,22 +196,6 @@ def _on_mode_change():
196
196
withcol1:
197
197
# Always show additional information (removed toggle per user request)
198
198
show_add_info=True
199
-
smart_agent=st.toggle("Use extra search", value=False, help="""If this is activated, ClimSight will make additional requests to Wikipedia and RAG, which can significantly increase response time.""")
200
-
use_era5_data=st.toggle(
201
-
"Enable ERA5 data",
202
-
value=config.get("use_era5_data", False),
203
-
help="Allow the data analysis agent to retrieve ERA5 data into the sandbox.",
204
-
)
205
-
use_destine_data=st.toggle(
206
-
"Enable DestinE data",
207
-
value=config.get("use_destine_data", False),
208
-
help="Allow retrieval of DestinE Climate DT projections (SSP3-7.0, 82 parameters).",
0 commit comments