Greg647465374's picture
shorten the files
41c095f
{
"ast": {
"items": [
{
"use": {
"tree": {
"path": {
"ident": "dioxus",
"tree": {
"path": {
"ident": "prelude",
"tree": "*"
}
}
}
}
}
},
{
"use": {
"tree": {
"path": {
"ident": "std",
"tree": {
"path": {
"ident": "collections",
"tree": {
"ident": "HashSet"
}
}
}
}
}
}
},
{
"use": {
"tree": {
"path": {
"ident": "crate",
"tree": {
"path": {
"ident": "extractor",
"tree": {
"path": {
"ident": "types",
"tree": {
"group": [
{
"ident": "CodeSnippet"
},
{
"ident": "ExtractedFile"
}
]
}
}
}
}
}
}
}
}
},
{
"fn": {
"attrs": [
{
"meta": {
"path": {
"segments": [
{
"ident": "component"
}
]
}
},
"style": "outer"
}
],
"ident": "FileSummary",
"inputs": [
{
"typed": {
"pat": {
"ident": {
"ident": "file"
}
},
"ty": {
"path": {
"segments": [
{
"ident": "ExtractedFile"
}
]
}
}
}
},
{
"typed": {
"pat": {
"ident": {
"ident": "copied_snippets"
}
},
"ty": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "String"
}
]
}
}
}
]
}
},
"ident": "HashSet"
}
]
}
}
}
]
}
},
"ident": "Signal"
}
]
}
}
}
},
{
"typed": {
"pat": {
"ident": {
"ident": "copy_all_snippets"
}
},
"ty": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "CodeSnippet"
}
]
}
}
}
]
}
},
"ident": "Vec"
}
]
}
}
}
]
}
},
"ident": "EventHandler"
}
]
}
}
}
}
],
"output": {
"path": {
"segments": [
{
"ident": "Element"
}
]
}
},
"stmts": [
{
"macro": {
"delimiter": "brace",
"path": {
"segments": [
{
"ident": "rsx"
}
]
},
"tokens": [
{
"ident": "div"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "class"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"lit": "\"summary-stats\""
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "p"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"📊 Found {file.snippets.len()} code snippets in {file.total_lines} lines\""
}
]
}
},
{
"ident": "p"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"🔤 Languages: {file.snippets.iter().map(|s| s.language.as_str()).collect::<std::collections::HashSet<_>>().into_iter().collect::<Vec<_>>().join(\\\", \\\")}\""
}
]
}
},
{
"ident": "button"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "class"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "if"
},
{
"ident": "copied_snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "read"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "contains"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"lit": "\"all_snippets\""
}
]
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"copy-btn copied\""
}
]
}
},
{
"ident": "else"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"copy-btn\""
}
]
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "onclick"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "move"
},
{
"punct": {
"op": "|",
"spacing": "alone"
}
},
{
"ident": "_"
},
{
"punct": {
"op": "|",
"spacing": "alone"
}
},
{
"ident": "copy_all_snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "call"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"ident": "file"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
}
]
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "if"
},
{
"ident": "copied_snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "read"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "contains"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"lit": "\"all_snippets\""
}
]
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"✅ Copied All!\""
}
]
}
},
{
"ident": "else"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"📋 Copy All Snippets\""
}
]
}
}
]
}
}
]
}
}
]
}
}
],
"vis": "pub"
}
}
]
},
"file_path": "src\\extractor\\components\\filesummary.rs",
"summary": {
"emoji_counts_in_strings": {
"✅": 1,
"📊": 1,
"📋": 1,
"🔤": 1
},
"string_literals": [
"\"summary-stats\"",
"\"📊 Found {file.snippets.len()} code snippets in {file.total_lines} lines\"",
"\"🔤 Languages: {file.snippets.iter().map(|s| s.language.as_str()).collect::<std::collections::HashSet<_>>().into_iter().collect::<Vec<_>>().join(\\\", \\\")}\"",
"\"all_snippets\"",
"\"copy-btn copied\"",
"\"copy-btn\"",
"\"all_snippets\"",
"\"✅ Copied All!\"",
"\"📋 Copy All Snippets\""
],
"top_level_nodes": 1,
"total_nodes": 174,
"type_counts": {
"angle_bracketed": 4,
"args": 4,
"arguments": 4,
"attrs": 1,
"delimiter": 15,
"fn": 1,
"group": 15,
"ident": 51,
"inputs": 1,
"items": 1,
"lit": 9,
"macro": 1,
"meta": 1,
"op": 15,
"output": 1,
"pat": 3,
"path": 17,
"punct": 15,
"segments": 10,
"spacing": 15,
"stmts": 1,
"stream": 14,
"style": 1,
"tokens": 1,
"tree": 10,
"ty": 3,
"type": 4,
"typed": 3,
"use": 3,
"vis": 1
},
"word_counts": {
"_": 2,
"all": 2,
"all_snippets": 2,
"as_str": 1,
"btn": 2,
"code": 1,
"collect": 2,
"collections": 1,
"copied": 2,
"copy": 3,
"file": 3,
"found": 1,
"hash": 1,
"in": 1,
"into_iter": 1,
"iter": 1,
"join": 1,
"language": 1,
"languages": 1,
"len": 1,
"lines": 1,
"map": 1,
"s": 2,
"set": 1,
"snippets": 4,
"stats": 1,
"std": 1,
"summary": 1,
"total_lines": 1,
"vec": 1
},
"word_emoji_counts": {
"⏱️": 2,
"⬜": 2,
"📏": 1
}
},
"timestamp": 1751588232
}