codeui-python 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. codeui/__init__.py +1 -1
  2. codeui/agent/context.py +19 -3
  3. codeui/analysis/dead_code.py +13 -2
  4. codeui/analysis/undefined.py +70 -0
  5. codeui/analysis/unresolved_import.py +34 -4
  6. codeui/cli/main.py +101 -7
  7. codeui/core/cache.py +54 -0
  8. codeui/core/graph.py +233 -3
  9. codeui/core/override.py +1 -0
  10. codeui/core/resolver.py +51 -37
  11. codeui/errors.py +10 -0
  12. codeui/lang/base.py +5 -2
  13. codeui/lang/cpp.py +271 -0
  14. codeui/lang/csharp.py +262 -0
  15. codeui/lang/dart.py +278 -0
  16. codeui/lang/generic.py +6 -4
  17. codeui/lang/go.py +5 -2
  18. codeui/lang/java.py +320 -0
  19. codeui/lang/kotlin.py +303 -0
  20. codeui/lang/php.py +275 -0
  21. codeui/lang/python.py +49 -7
  22. codeui/lang/registry.py +22 -2
  23. codeui/lang/ruby.py +270 -0
  24. codeui/lang/rust.py +5 -2
  25. codeui/lang/scala.py +290 -0
  26. codeui/lang/swift.py +276 -0
  27. codeui/lang/ts.py +99 -8
  28. codeui/report/sarif_emitter.py +2 -1
  29. codeui/server/server.py +156 -85
  30. codeui/server/static/css/styles.css +1609 -0
  31. codeui/server/static/index.html +199 -0
  32. codeui/server/static/js/api.js +485 -0
  33. codeui/server/static/js/app.js +1044 -0
  34. codeui/server/static/js/graph_canvas.js +1485 -0
  35. codeui/server/static/js/minimap.js +383 -0
  36. codeui/server/static/js/sidebar.js +268 -0
  37. codeui/server/static/js/state.js +83 -0
  38. codeui/server/static/js/subgraph_window.js +1208 -0
  39. codeui/server/static/js/theme.js +332 -0
  40. codeui/tracer/__init__.py +4 -1
  41. codeui/tracer/tracer.py +109 -118
  42. codeui_python-0.1.1.dist-info/METADATA +171 -0
  43. codeui_python-0.1.1.dist-info/RECORD +71 -0
  44. {codeui_python-0.1.0.dist-info → codeui_python-0.1.1.dist-info}/licenses/LICENSE +1 -1
  45. codeui_python-0.1.0.dist-info/METADATA +0 -191
  46. codeui_python-0.1.0.dist-info/RECORD +0 -52
  47. {codeui_python-0.1.0.dist-info → codeui_python-0.1.1.dist-info}/WHEEL +0 -0
  48. {codeui_python-0.1.0.dist-info → codeui_python-0.1.1.dist-info}/entry_points.txt +0 -0
  49. {codeui_python-0.1.0.dist-info → codeui_python-0.1.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Application State container for CodeUI interactive explorer.
3
+ */
4
+ class AppState {
5
+ constructor() {
6
+ this.rawGraph = { files: [], symbols: [], edges: [], files_info: {} };
7
+ this.defectsData = [];
8
+ this.graphMode = "files"; // "files" | "symbols"
9
+ this.layoutMode = "force"; // "force" | "hierarchical" | "radial" | "clusters"
10
+ this.colorMode = "layer"; // "layer" | "feature"
11
+ this.theme = "dark";
12
+ this.searchQuery = "";
13
+ this.activeLayerFilter = "all";
14
+ this.selectedFileNodeId = null;
15
+ this.focusedNeighborhood = null;
16
+
17
+ // Path tracer state
18
+ this.tracerActive = false;
19
+ this.traceStartNode = null;
20
+ this.traceEndNode = null;
21
+ this.activeTracePath = [];
22
+ this.currentTraceHopIdx = 0;
23
+
24
+ // Visual toggles
25
+ this.unusedHighlightMode = false;
26
+ this.directDiskWrite = false;
27
+ this.hudExplicitlyClosed = false;
28
+ this.clusterHullsMode = true;
29
+
30
+ // Symbol filter toggles for symbols view (dynamically populated from AST symbols)
31
+ this.symbolKindFilters = {};
32
+
33
+ // SubGraph window management
34
+ this.activeSubgraphs = new Map();
35
+ this.nextWindowOffset = 20;
36
+
37
+ // Color maps
38
+ this.LAYER_COLORS = {
39
+ entry: "#a855f7",
40
+ frontend: "#3b82f6",
41
+ backend: "#22c55e",
42
+ shared: "#06b6d4",
43
+ test: "#eab308",
44
+ tests: "#eab308",
45
+ external: "#64748b",
46
+ other: "#64748b"
47
+ };
48
+ }
49
+
50
+ getFeatureColor(feature) {
51
+ if (!feature || feature === "root" || feature === "external") return "#64748b";
52
+ const palette = [
53
+ "#ec4899", "#8b5cf6", "#3b82f6", "#06b6d4",
54
+ "#10b981", "#f59e0b", "#ef4444", "#a855f7"
55
+ ];
56
+ let hash = 0;
57
+ for (let i = 0; i < feature.length; i++) {
58
+ hash = (hash << 5) - hash + feature.charCodeAt(i);
59
+ }
60
+ return palette[Math.abs(hash) % palette.length];
61
+ }
62
+
63
+ getUnusedNodeIds() {
64
+ if (!this.rawGraph) return new Set();
65
+ const nodes = this.graphMode === "files" ? (this.rawGraph.files || []) : (this.rawGraph.symbols || []);
66
+ const edges = this.rawGraph.edges || [];
67
+ const targetIds = new Set(edges.map(e => e.target_id));
68
+ const unused = new Set();
69
+
70
+ nodes.forEach(n => {
71
+ const id = typeof n === "string" ? n : n.id;
72
+ if (!targetIds.has(id)) {
73
+ const layer = (this.rawGraph.files_info && this.rawGraph.files_info[id]?.layer) || (typeof n === "object" ? n.layer : "");
74
+ if (layer !== "entry" && layer !== "test" && layer !== "tests") {
75
+ unused.add(id);
76
+ }
77
+ }
78
+ });
79
+ return unused;
80
+ }
81
+ }
82
+
83
+ window.appState = new AppState();