MCPcopy
hub / github.com/HKUDS/DeepCode / get_requirement_analysis_input

Method get_requirement_analysis_input

cli/cli_interface.py:728–841  ·  view source on GitHub ↗

Enhanced requirement analysis input interface (NEW: matching UI version)

(self)

Source from the content-addressed store, hash-verified

726 print(goodbye)
727
728 def get_requirement_analysis_input(self) -> str:
729 """Enhanced requirement analysis input interface (NEW: matching UI version)"""
730 self.print_separator("─", 79, Colors.BLUE)
731 print(
732 f"{Colors.BOLD}{Colors.BLUE}🧠 Requirement Analysis Interface{Colors.ENDC}"
733 )
734 print(
735 f"{Colors.CYAN}Describe your project idea or requirements briefly.{Colors.ENDC}"
736 )
737 print(
738 f"{Colors.CYAN}Our AI will generate guiding questions to help you refine your vision.{Colors.ENDC}"
739 )
740 self.print_separator("─", 79, Colors.BLUE)
741
742 # Display examples
743 print(f"\n{Colors.BOLD}{Colors.YELLOW}💡 Examples:{Colors.ENDC}")
744 print(
745 f"{Colors.CYAN} • 'I want to build a machine learning system for image recognition'{Colors.ENDC}"
746 )
747 print(
748 f"{Colors.CYAN} • 'Create a web app for project management with real-time collaboration'{Colors.ENDC}"
749 )
750 print(
751 f"{Colors.CYAN} • 'Develop a data analysis pipeline for financial forecasting'{Colors.ENDC}"
752 )
753
754 self.print_separator("─", 79, Colors.BLUE)
755
756 print(
757 f"\n{Colors.BOLD}{Colors.OKCYAN}✏️ Enter your initial requirements below:{Colors.ENDC}"
758 )
759 print(
760 f"{Colors.YELLOW}(Type your description, press Enter twice when finished, or Ctrl+C to cancel){Colors.ENDC}"
761 )
762
763 lines = []
764 empty_line_count = 0
765
766 while True:
767 try:
768 if len(lines) == 0:
769 print(f"{Colors.BOLD}> {Colors.ENDC}", end="")
770 else:
771 print(f"{Colors.BOLD} {Colors.ENDC}", end="")
772
773 line = input()
774
775 if line.strip() == "":
776 empty_line_count += 1
777 if empty_line_count >= 2:
778 break
779 lines.append("")
780 else:
781 empty_line_count = 0
782 lines.append(line)
783
784 except KeyboardInterrupt:
785 print(f"\n{Colors.WARNING}Input cancelled by user{Colors.ENDC}")

Callers 1

Calls 2

print_separatorMethod · 0.95
print_statusMethod · 0.95

Tested by

no test coverage detected