INNER CODE UNIT · Python
truncation_ratio
mrwadams/stride-gpt · apps/web/main.py:613
truncation_ratio = (analysis_token_limit * 0.7) / readme_tokens
max_readme_chars = int(len(readme_content) * truncation_ratio)
readme_content = (
readme_content[:max_readme_chars] + "...\n(README truncated due to length)\n\n"
)
readme_tokens = estimate_tokens(readme_content, token_estimation_model)
# Update progress
progress_bar.progress(0.2)
status_text.text("Analyzing code files...")
# Get all code files
code_files = [
file
for file in tree.tree
if file.type == "blob"
and file.path.endswith(
(