Spaces:
Running
Running
Commit ·
1a5d4b8
1
Parent(s): 3a62e57
Fix timer arg mismatch that wipes alternative agents table; remove OpenHands Sub-agents (#36)
Browse files- Fix timer arg mismatch that wipes alternative agents table; remove OpenHands Sub-agents (70c525c7fcaa4341c423a8e368e4d73752ab78ca)
Co-authored-by: Simon Rosenberg <simonrosenberg1@users.noreply.huggingface.co>
Files changed (2)
- simple_data_loader.py+2-1
- ui_components.py+16-10
244 unmodified lines2452462472482492502511 unmodified line253254255256257258244 unmodified lines'acp-claude': 'Claude Code','acp-codex': 'Codex','acp-gemini': 'Gemini CLI','openhands_subagents': 'OpenHands Sub-agents',}alt_dir = self.config_path / "alternative_agents"if alt_dir.exists():1 unmodified lineif not type_dir.is_dir():continuedefault_name = agent_type_default_name.get(type_dir.name)for agent_dir in type_dir.iterdir():if not agent_dir.is_dir():continue244 unmodified lines2452462472482492501 unmodified line252253254255256257258259244 unmodified lines'acp-claude': 'Claude Code','acp-codex': 'Codex','acp-gemini': 'Gemini CLI',}alt_dir = self.config_path / "alternative_agents"if alt_dir.exists():1 unmodified lineif not type_dir.is_dir():continuedefault_name = agent_type_default_name.get(type_dir.name)if default_name is None:continue # skip unlisted agent types (e.g. openhands_subagents)for agent_dir in type_dir.iterdir():if not agent_dir.is_dir():continue
953 unmodified lines95495595695795895996053 unmodified lines1014101510161017101810191020102110221023102410251026102710281029953 unmodified linesif not new_df.empty:new_transformer = DataTransformer(new_df, new_tag_map)new_df_view_full, _ = new_transformer.view(tag=category_name, use_plotly=True)# Prepare both complete and all entries versionsif 'Categories Attempted' in new_df_view_full.columns:new_df_view_complete = new_df_view_full[new_df_view_full['Categories Attempted'] == '5/5'].copy()53 unmodified lines# Connect the timer to the refresh functionif show_incomplete_checkbox is not None:timer_inputs = [show_incomplete_checkbox]if show_open_only_checkbox is not None:timer_inputs.append(show_open_only_checkbox)timer_inputs.append(mark_by_dropdown) # Always include mark_bytimer_inputs.append(show_all_labels_checkbox)refresh_timer.tick(fn=check_and_refresh_data,inputs=timer_inputs,outputs=[dataframe_component, cost_plot_component, runtime_plot_component])else:# If no incomplete checkbox, always show all data (but still filter by open if needed)def check_and_refresh_all(show_open_only=False, mark_by=MARK_BY_DEFAULT, show_all_labels=False):953 unmodified lines95495595695795895996053 unmodified lines1014101510161017101810191020102110221023102410251026102710281029103010311032103310341035953 unmodified linesif not new_df.empty:new_transformer = DataTransformer(new_df, new_tag_map)new_df_view_full, _ = new_transformer.view(tag=category_name, use_plotly=True)# Prepare both complete and all entries versionsif 'Categories Attempted' in new_df_view_full.columns:new_df_view_complete = new_df_view_full[new_df_view_full['Categories Attempted'] == '5/5'].copy()53 unmodified lines# Connect the timer to the refresh functionif show_incomplete_checkbox is not None:if show_open_only_checkbox is not None:refresh_timer.tick(fn=check_and_refresh_data,inputs=[show_incomplete_checkbox, show_open_only_checkbox, mark_by_dropdown, show_all_labels_checkbox],outputs=[dataframe_component, cost_plot_component, runtime_plot_component])else:# No open/closed split in this dataset — gr.State can't fill the gap in a# timer tick (no session context), so use a wrapper that fixes show_open_only=False.def _timer_refresh_no_open(show_incomplete, mark_by, show_all_labels):return check_and_refresh_data(show_incomplete, False, mark_by, show_all_labels)refresh_timer.tick(fn=_timer_refresh_no_open,inputs=[show_incomplete_checkbox, mark_by_dropdown, show_all_labels_checkbox],outputs=[dataframe_component, cost_plot_component, runtime_plot_component])else:# If no incomplete checkbox, always show all data (but still filter by open if needed)def check_and_refresh_all(show_open_only=False, mark_by=MARK_BY_DEFAULT, show_all_labels=False):
simple_data_loader.py+2-1
ui_components.py+16-10