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

Function enhance_input_preview

scripts/python_ui/streamlit.py:1229–1250  ·  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

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

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected