deepcode-hku 1.0.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 (44) hide show
  1. cli/__init__.py +18 -0
  2. cli/cli_app.py +296 -0
  3. cli/cli_interface.py +744 -0
  4. cli/cli_launcher.py +155 -0
  5. cli/main_cli.py +243 -0
  6. cli/workflows/__init__.py +11 -0
  7. cli/workflows/cli_workflow_adapter.py +336 -0
  8. deepcode.py +219 -0
  9. deepcode_hku-1.0.1.dist-info/METADATA +695 -0
  10. deepcode_hku-1.0.1.dist-info/RECORD +44 -0
  11. deepcode_hku-1.0.1.dist-info/WHEEL +5 -0
  12. deepcode_hku-1.0.1.dist-info/entry_points.txt +2 -0
  13. deepcode_hku-1.0.1.dist-info/licenses/LICENSE +21 -0
  14. deepcode_hku-1.0.1.dist-info/top_level.txt +6 -0
  15. tools/__init__.py +0 -0
  16. tools/code_implementation_server.py +1045 -0
  17. tools/code_indexer.py +1657 -0
  18. tools/code_reference_indexer.py +486 -0
  19. tools/command_executor.py +324 -0
  20. tools/git_command.py +356 -0
  21. tools/pdf_converter.py +640 -0
  22. tools/pdf_downloader.py +1370 -0
  23. tools/pdf_utils.py +52 -0
  24. ui/__init__.py +43 -0
  25. ui/app.py +13 -0
  26. ui/components.py +1450 -0
  27. ui/handlers.py +773 -0
  28. ui/layout.py +106 -0
  29. ui/streamlit_app.py +38 -0
  30. ui/styles.py +2116 -0
  31. utils/__init__.py +17 -0
  32. utils/cli_interface.py +459 -0
  33. utils/dialogue_logger.py +671 -0
  34. utils/file_processor.py +426 -0
  35. utils/simple_llm_logger.py +198 -0
  36. workflows/__init__.py +31 -0
  37. workflows/agent_orchestration_engine.py +1371 -0
  38. workflows/agents/__init__.py +13 -0
  39. workflows/agents/code_implementation_agent.py +1093 -0
  40. workflows/agents/memory_agent_concise.py +923 -0
  41. workflows/agents/memory_agent_concise_index.py +935 -0
  42. workflows/code_implementation_workflow.py +924 -0
  43. workflows/code_implementation_workflow_index.py +931 -0
  44. workflows/codebase_index_workflow.py +726 -0
ui/layout.py ADDED
@@ -0,0 +1,106 @@
1
+ """
2
+ Streamlit Page Layout Module
3
+
4
+ Contains main page layout and flow control
5
+ """
6
+
7
+ import streamlit as st
8
+
9
+ from .components import (
10
+ display_header,
11
+ display_features,
12
+ sidebar_control_panel,
13
+ input_method_selector,
14
+ results_display_component,
15
+ footer_component,
16
+ )
17
+ from .handlers import (
18
+ initialize_session_state,
19
+ handle_start_processing_button,
20
+ handle_error_display,
21
+ )
22
+ from .styles import get_main_styles
23
+
24
+
25
+ def setup_page_config():
26
+ """Setup page configuration"""
27
+ st.set_page_config(
28
+ page_title="DeepCode - AI Research Engine",
29
+ page_icon="🧬",
30
+ layout="wide",
31
+ initial_sidebar_state="expanded",
32
+ )
33
+
34
+
35
+ def apply_custom_styles():
36
+ """Apply custom styles"""
37
+ st.markdown(get_main_styles(), unsafe_allow_html=True)
38
+
39
+
40
+ def render_main_content():
41
+ """Render main content area"""
42
+ # Display header and features
43
+ display_header()
44
+ display_features()
45
+ st.markdown("---")
46
+
47
+ # Display results if available
48
+ if st.session_state.show_results and st.session_state.last_result:
49
+ results_display_component(
50
+ st.session_state.last_result, st.session_state.task_counter
51
+ )
52
+ st.markdown("---")
53
+ return
54
+
55
+ # Show input interface only when not displaying results
56
+ if not st.session_state.show_results:
57
+ render_input_interface()
58
+
59
+ # Display error messages if any
60
+ handle_error_display()
61
+
62
+
63
+ def render_input_interface():
64
+ """Render input interface"""
65
+ # Get input source and type
66
+ input_source, input_type = input_method_selector(st.session_state.task_counter)
67
+
68
+ # Processing button
69
+ if input_source and not st.session_state.processing:
70
+ if st.button("🚀 Start Processing", type="primary", use_container_width=True):
71
+ handle_start_processing_button(input_source, input_type)
72
+
73
+ elif st.session_state.processing:
74
+ st.info("🔄 Processing in progress... Please wait.")
75
+ st.warning("⚠️ Do not refresh the page or close the browser during processing.")
76
+
77
+ elif not input_source:
78
+ st.info("👆 Please upload a file or enter a URL to start processing.")
79
+
80
+
81
+ def render_sidebar():
82
+ """Render sidebar"""
83
+ return sidebar_control_panel()
84
+
85
+
86
+ def main_layout():
87
+ """Main layout function"""
88
+ # Initialize session state
89
+ initialize_session_state()
90
+
91
+ # Setup page configuration
92
+ setup_page_config()
93
+
94
+ # Apply custom styles
95
+ apply_custom_styles()
96
+
97
+ # Render sidebar
98
+ sidebar_info = render_sidebar()
99
+
100
+ # Render main content
101
+ render_main_content()
102
+
103
+ # Display footer
104
+ footer_component()
105
+
106
+ return sidebar_info
ui/streamlit_app.py ADDED
@@ -0,0 +1,38 @@
1
+ """
2
+ DeepCode - AI Research Engine
3
+
4
+ Streamlit Web Interface Main Application File
5
+ """
6
+
7
+ import os
8
+ import sys
9
+
10
+ # Disable .pyc file generation
11
+ os.environ["PYTHONDONTWRITEBYTECODE"] = "1"
12
+
13
+ # Add parent directory to path for module imports
14
+ current_dir = os.path.dirname(os.path.abspath(__file__))
15
+ parent_dir = os.path.dirname(current_dir)
16
+ if parent_dir not in sys.path:
17
+ sys.path.insert(0, parent_dir)
18
+
19
+ # Import UI modules
20
+ from ui.layout import main_layout
21
+
22
+
23
+ def main():
24
+ """
25
+ Main function - Streamlit application entry
26
+
27
+ All UI logic has been modularized into ui/ folder
28
+ """
29
+ # Run main layout
30
+ sidebar_info = main_layout()
31
+
32
+ # Additional global logic can be added here if needed
33
+
34
+ return sidebar_info
35
+
36
+
37
+ if __name__ == "__main__":
38
+ main()