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

Function enhance_input_preview

scripts/python_ui/streamlit.py:1228–1249  ·  view source on GitHub ↗

Display a preview of the input content with basic statistics. Shows: - Input text preview - Character count - Word count

()

Source from the content-addressed store, hash-verified

1226
1227
1228def enhance_input_preview():
1229 """Display a preview of the input content with basic statistics.
1230
1231 Shows:
1232 - Input text preview
1233 - Character count
1234 - Word count
1235 """
1236 if "input_content" in st.session_state and st.session_state.input_content:
1237 with st.expander("Input Preview", expanded=True):
1238 st.markdown("### Current Input")
1239 st.code(st.session_state.input_content, language="text")
1240
1241 # Basic statistics
1242 char_count = len(st.session_state.input_content)
1243 word_count = len(st.session_state.input_content.split())
1244
1245 col1, col2 = st.columns(2)
1246 with col1:
1247 st.metric("Characters", char_count)
1248 with col2:
1249 st.metric("Words", word_count)
1250
1251
1252def get_clipboard_content() -> Tuple[bool, str, str]:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected