MCPcopy Create free account
hub / github.com/danielmiessler/Fabric / star_output

Function star_output

scripts/python_ui/streamlit.py:683–714  ·  view source on GitHub ↗

Star/favorite an output log. Args: log_index: Index of the output log to star custom_name: Optional custom name for the starred output Returns: bool: True if output was starred successfully, False otherwise

(log_index: int, custom_name: str = "")

Source from the content-addressed store, hash-verified

681
682
683def star_output(log_index: int, custom_name: str = "") -> bool:
684 """Star/favorite an output log.
685
686 Args:
687 log_index: Index of the output log to star
688 custom_name: Optional custom name for the starred output
689
690 Returns:
691 bool: True if output was starred successfully, False otherwise
692 """
693 try:
694 if 0 <= log_index < len(st.session_state.output_logs):
695 log_entry = st.session_state.output_logs[log_index].copy()
696 log_entry["is_starred"] = True
697 log_entry["custom_name"] = (
698 custom_name
699 or f"Starred Output #{len(st.session_state.starred_outputs) + 1}"
700 )
701
702 # Check if this output is already starred (by timestamp)
703 if not any(
704 s["timestamp"] == log_entry["timestamp"]
705 for s in st.session_state.starred_outputs
706 ):
707 st.session_state.starred_outputs.append(log_entry)
708 save_outputs() # Save after starring
709 return True
710
711 return False
712 except Exception as e:
713 logger.error(f"Error starring output: {str(e)}")
714 return False
715
716
717def unstar_output(log_index: int):

Callers 1

handle_star_name_inputFunction · 0.85

Calls 1

save_outputsFunction · 0.85

Tested by

no test coverage detected