ara-cli 0.1.9.92__tar.gz → 0.1.9.94__tar.gz
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.
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/PKG-INFO +17 -17
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/README.md +16 -16
- ara_cli-0.1.9.94/ara_cli/__init__.py +3 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/ara_command_action.py +23 -43
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/ara_command_parser.py +16 -1
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_lister.py +29 -55
- ara_cli-0.1.9.94/ara_cli/artefact_models/artefact_data_retrieval.py +23 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_renamer.py +6 -2
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/chat.py +17 -24
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/commands/extract_command.py +4 -3
- ara_cli-0.1.9.94/ara_cli/commands/read_command.py +104 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/prompt_extractor.py +21 -6
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/prompt_handler.py +70 -48
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/tag_extractor.py +21 -11
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/version.py +1 -1
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli.egg-info/PKG-INFO +17 -17
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli.egg-info/SOURCES.txt +2 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_artefact_lister.py +52 -132
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_chat.py +11 -10
- ara_cli-0.1.9.94/tests/test_prompt_handler.py +677 -0
- ara_cli-0.1.9.92/ara_cli/__init__.py +0 -3
- ara_cli-0.1.9.92/tests/test_prompt_handler.py +0 -344
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/MANIFEST.in +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/__main__.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/ara_config.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_autofix.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_creator.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_deleter.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_fuzzy_search.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_link_updater.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/__init__.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/artefact_load.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/artefact_mapping.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/artefact_templates.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/businessgoal_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/capability_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/epic_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/example_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/feature_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/issue_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/keyfeature_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/serialize_helper.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/task_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/userstory_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_models/vision_artefact_model.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_reader.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/artefact_scan.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/classifier.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/codefusionretriever.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/codehierachieretriever.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/commandline_completer.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/commands/__init__.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/commands/command.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/commands/load_command.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/commands/load_image_command.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/directory_navigator.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/file_classifier.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/file_lister.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/file_loaders/__init__.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/file_loaders/binary_file_loader.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/file_loaders/document_file_loader.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/file_loaders/document_reader.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/file_loaders/file_loader.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/file_loaders/text_file_loader.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/filename_validator.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/list_filter.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/output_suppressor.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/prompt_chat.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/prompt_rag.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/run_file_lister.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/template_manager.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/agile.artefacts +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/blueprints/complete_pytest_unittest.blueprint.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/blueprints/empty.blueprint.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_C4_architecture_analysis.blueprint.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/blueprints/task_todo_list_implement_feature_BDD_way.blueprint.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/architecture_C4_analysis.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/architecture_radon_cc_score.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/architecture_radon_halstead_v.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/architecture_radon_maintainability_score.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/artefact_classification.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/artefact_extension.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/artefact_formulation.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/behave_step_generation.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/code_generation_complex.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/code_generation_simple.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/empty.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/error_fixing.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/feature_file_update.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/feature_formulation.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/js_code_generation_simple.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/refactoring.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/refactoring_analysis.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/reverse_engineer_feature_file.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/commands/reverse_engineer_program_flow.commands.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/classify_task.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/empty.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/error_fixing.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/feature_fix_steps_for_scenario.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/feature_formulation.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/feature_reverse_formulation_from_code.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/feature_scenario_implementation_update.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/feature_scenario_outline_extension.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/feature_update_formulation.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/fibonacci_example_implementation.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/js_implementation_from_task_description.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/js_steps_implementation.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/python_cli_implementation_with_test.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/python_code_understanding.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/task_implementation.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/task_prompt_control_by_status.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_number.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/intentions/task_stepwise_implementation_by_status.intention.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/rules/architecture_analyst.rules.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/rules/code_analyst.rules.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/rules/empty.rules.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/rules/error_analyst.rules.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/rules/gherkin_expert.rules.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/rules/js_expert_developer.rules.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/rules/product_owner.rules.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/rules/python_behave.rules.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/prompt-modules/rules/python_developer.rules.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.concept.exploration.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.concept.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.customer.exploration.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.customer.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.persona.exploration.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.persona.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.step.exploration.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.step.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.technology.exploration.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/specification_breakdown_files/template.technology.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.businessgoal.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.capability.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.epic.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.example.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.feature.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.issue.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.keyfeature.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.steps.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.task.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.userstory.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/templates/template.vision.prompt_log.md +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli/update_config_prompt.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli.egg-info/dependency_links.txt +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli.egg-info/entry_points.txt +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli.egg-info/requires.txt +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/ara_cli.egg-info/top_level.txt +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/docker/base/requirements.txt +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/setup.cfg +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/setup.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/__init__.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_ara_command_action.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_ara_config.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_artefact_autofix.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_artefact_fuzzy_search.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_artefact_link_updater.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_artefact_reader.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_artefact_renamer.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_artefact_scan.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_classifier.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_directory_navigator.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_file_classifier.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_file_creator.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_file_lister.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_list_filter.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_tag_extractor.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_template_manager.py +0 -0
- {ara_cli-0.1.9.92 → ara_cli-0.1.9.94}/tests/test_update_config_prompt.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ara_cli
|
|
3
|
-
Version: 0.1.9.
|
|
3
|
+
Version: 0.1.9.94
|
|
4
4
|
Summary: Powerful, open source command-line tool for managing, structuring and automating software development artifacts in line with Business-Driven Development (BDD) and AI-assisted processes
|
|
5
5
|
Description-Content-Type: text/markdown
|
|
6
6
|
Requires-Dist: litellm
|
|
@@ -108,22 +108,22 @@ ara autofix
|
|
|
108
108
|
|
|
109
109
|
## Command Overview
|
|
110
110
|
|
|
111
|
-
| Action
|
|
112
|
-
|
|
113
|
-
| create
|
|
114
|
-
| delete
|
|
115
|
-
| rename
|
|
116
|
-
| list, list-tags
|
|
117
|
-
| prompt, chat
|
|
118
|
-
| template
|
|
119
|
-
| fetch-templates
|
|
120
|
-
| read
|
|
121
|
-
| reconnect
|
|
122
|
-
| read-status, set-status | Query and assign status to artefacts
|
|
123
|
-
| read-user, set-user | Query and assign responsible users
|
|
124
|
-
| classifier-directory | Show directory of artefact classifiers
|
|
125
|
-
| scan
|
|
126
|
-
| autofix
|
|
111
|
+
| Action | Description |
|
|
112
|
+
| ----------------------- | ----------------------------------------------------------------------- |
|
|
113
|
+
| create | Create a classified artefact with data directory |
|
|
114
|
+
| delete | Delete an artefact and its data directory |
|
|
115
|
+
| rename | Rename an artefact and its data directory |
|
|
116
|
+
| list, list-tags | List artefacts, show tags, filter by content, extension, hierarchy etc. |
|
|
117
|
+
| prompt, chat | Use AI-powered chat and prompt templates for artefact management |
|
|
118
|
+
| template | Print artefact templates in the terminal |
|
|
119
|
+
| fetch-templates | Download and manage reusable prompt templates |
|
|
120
|
+
| read | Output artefact contents and their full contribution chain |
|
|
121
|
+
| reconnect | Connect artefacts to parent artefacts |
|
|
122
|
+
| read-status, set-status | Query and assign status to artefacts |
|
|
123
|
+
| read-user, set-user | Query and assign responsible users |
|
|
124
|
+
| classifier-directory | Show directory of artefact classifiers |
|
|
125
|
+
| scan | Scan the ARA tree for incompatible or inconsistent artefacts |
|
|
126
|
+
| autofix | Automatically correct artefact issues with LLM assistance |
|
|
127
127
|
|
|
128
128
|
See `ara -h` for the complete list of commands and usage examples.
|
|
129
129
|
|
|
@@ -84,22 +84,22 @@ ara autofix
|
|
|
84
84
|
|
|
85
85
|
## Command Overview
|
|
86
86
|
|
|
87
|
-
| Action
|
|
88
|
-
|
|
89
|
-
| create
|
|
90
|
-
| delete
|
|
91
|
-
| rename
|
|
92
|
-
| list, list-tags
|
|
93
|
-
| prompt, chat
|
|
94
|
-
| template
|
|
95
|
-
| fetch-templates
|
|
96
|
-
| read
|
|
97
|
-
| reconnect
|
|
98
|
-
| read-status, set-status | Query and assign status to artefacts
|
|
99
|
-
| read-user, set-user | Query and assign responsible users
|
|
100
|
-
| classifier-directory | Show directory of artefact classifiers
|
|
101
|
-
| scan
|
|
102
|
-
| autofix
|
|
87
|
+
| Action | Description |
|
|
88
|
+
| ----------------------- | ----------------------------------------------------------------------- |
|
|
89
|
+
| create | Create a classified artefact with data directory |
|
|
90
|
+
| delete | Delete an artefact and its data directory |
|
|
91
|
+
| rename | Rename an artefact and its data directory |
|
|
92
|
+
| list, list-tags | List artefacts, show tags, filter by content, extension, hierarchy etc. |
|
|
93
|
+
| prompt, chat | Use AI-powered chat and prompt templates for artefact management |
|
|
94
|
+
| template | Print artefact templates in the terminal |
|
|
95
|
+
| fetch-templates | Download and manage reusable prompt templates |
|
|
96
|
+
| read | Output artefact contents and their full contribution chain |
|
|
97
|
+
| reconnect | Connect artefacts to parent artefacts |
|
|
98
|
+
| read-status, set-status | Query and assign status to artefacts |
|
|
99
|
+
| read-user, set-user | Query and assign responsible users |
|
|
100
|
+
| classifier-directory | Show directory of artefact classifiers |
|
|
101
|
+
| scan | Scan the ARA tree for incompatible or inconsistent artefacts |
|
|
102
|
+
| autofix | Automatically correct artefact issues with LLM assistance |
|
|
103
103
|
|
|
104
104
|
See `ara -h` for the complete list of commands and usage examples.
|
|
105
105
|
|
|
@@ -165,6 +165,7 @@ def prompt_action(args):
|
|
|
165
165
|
classifier = args.classifier
|
|
166
166
|
param = args.parameter
|
|
167
167
|
init = args.steps
|
|
168
|
+
write = getattr(args, 'write', False)
|
|
168
169
|
|
|
169
170
|
def handle_init():
|
|
170
171
|
from ara_cli.prompt_handler import initialize_prompt_templates
|
|
@@ -192,7 +193,7 @@ def prompt_action(args):
|
|
|
192
193
|
def handle_extract():
|
|
193
194
|
from ara_cli.prompt_extractor import extract_and_save_prompt_results
|
|
194
195
|
from ara_cli.update_config_prompt import update_artefact_config_prompt_files
|
|
195
|
-
extract_and_save_prompt_results(classifier, param)
|
|
196
|
+
extract_and_save_prompt_results(classifier, param, write=write)
|
|
196
197
|
print(f"automatic update after extract")
|
|
197
198
|
update_artefact_config_prompt_files(classifier, param, automatic_update=True)
|
|
198
199
|
|
|
@@ -294,53 +295,30 @@ def fetch_templates_action(args):
|
|
|
294
295
|
|
|
295
296
|
|
|
296
297
|
def read_action(args):
|
|
297
|
-
from ara_cli.
|
|
298
|
-
from ara_cli.
|
|
298
|
+
from ara_cli.commands.read_command import ReadCommand
|
|
299
|
+
from ara_cli.list_filter import ListFilter
|
|
299
300
|
|
|
300
301
|
classifier = args.classifier
|
|
301
302
|
artefact_name = args.parameter
|
|
302
303
|
read_mode = args.read_mode
|
|
303
304
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
all_artefact_names
|
|
313
|
-
)
|
|
314
|
-
return
|
|
315
|
-
|
|
316
|
-
target_artefact = next(filter(
|
|
317
|
-
lambda x: x.title == artefact_name, artefacts
|
|
318
|
-
))
|
|
305
|
+
list_filter = ListFilter(
|
|
306
|
+
include_content=args.include_content,
|
|
307
|
+
exclude_content=args.exclude_content,
|
|
308
|
+
include_extension=args.include_extension,
|
|
309
|
+
exclude_extension=args.exclude_extension,
|
|
310
|
+
include_tags=args.include_tags,
|
|
311
|
+
exclude_tags=args.exclude_tags
|
|
312
|
+
)
|
|
319
313
|
|
|
320
|
-
|
|
314
|
+
command = ReadCommand(
|
|
315
|
+
classifier=classifier,
|
|
316
|
+
artefact_name=artefact_name,
|
|
317
|
+
read_mode=read_mode,
|
|
318
|
+
list_filter=list_filter
|
|
319
|
+
)
|
|
321
320
|
|
|
322
|
-
|
|
323
|
-
case "branch":
|
|
324
|
-
ArtefactReader.step_through_value_chain(
|
|
325
|
-
artefact_name=artefact_name,
|
|
326
|
-
classifier=classifier,
|
|
327
|
-
artefacts_by_classifier=artefacts_by_classifier,
|
|
328
|
-
classified_artefacts=classified_artefacts
|
|
329
|
-
)
|
|
330
|
-
file_classifier.print_classified_files(artefacts_by_classifier, print_content=True)
|
|
331
|
-
case "children":
|
|
332
|
-
artefacts = ArtefactReader.find_children(
|
|
333
|
-
artefact_name=artefact_name,
|
|
334
|
-
classifier=classifier,
|
|
335
|
-
classified_artefacts=classified_artefacts
|
|
336
|
-
)
|
|
337
|
-
file_classifier.print_classified_files(
|
|
338
|
-
files_by_classifier=artefacts,
|
|
339
|
-
print_content=True
|
|
340
|
-
)
|
|
341
|
-
case _:
|
|
342
|
-
artefacts_by_classifier[classifier].append(target_artefact)
|
|
343
|
-
file_classifier.print_classified_files(artefacts_by_classifier, print_content=True)
|
|
321
|
+
command.execute()
|
|
344
322
|
|
|
345
323
|
|
|
346
324
|
def reconnect_action(args):
|
|
@@ -615,11 +593,13 @@ def extract_action(args):
|
|
|
615
593
|
from ara_cli.commands.extract_command import ExtractCommand
|
|
616
594
|
|
|
617
595
|
filename = args.filename
|
|
618
|
-
|
|
596
|
+
force = args.force
|
|
597
|
+
write = getattr(args, 'write', False)
|
|
619
598
|
print(filename)
|
|
620
599
|
command = ExtractCommand(
|
|
621
600
|
file_name=filename,
|
|
622
|
-
|
|
601
|
+
force=force,
|
|
602
|
+
write=write,
|
|
623
603
|
output=lambda msg: print(msg, file=sys.stdout),
|
|
624
604
|
error_output=lambda msg: print(msg, file=sys.stderr)
|
|
625
605
|
)
|
|
@@ -254,6 +254,13 @@ def prompt_parser(subparsers):
|
|
|
254
254
|
).completer = ArtefactCompleter()
|
|
255
255
|
if step == "chat":
|
|
256
256
|
add_chat_arguments(step_parser)
|
|
257
|
+
if step == "extract":
|
|
258
|
+
step_parser.add_argument(
|
|
259
|
+
"-w",
|
|
260
|
+
"--write",
|
|
261
|
+
action="store_true",
|
|
262
|
+
help="Overwrite existing files without using LLM for merging."
|
|
263
|
+
)
|
|
257
264
|
|
|
258
265
|
|
|
259
266
|
def chat_parser(subparsers):
|
|
@@ -287,6 +294,8 @@ def read_parser(subparsers):
|
|
|
287
294
|
"parameter", help="Filename of artefact"
|
|
288
295
|
).completer = ArtefactCompleter()
|
|
289
296
|
|
|
297
|
+
add_filter_flags(read_parser)
|
|
298
|
+
|
|
290
299
|
branch_group = read_parser.add_mutually_exclusive_group()
|
|
291
300
|
branch_group.add_argument(
|
|
292
301
|
"-b",
|
|
@@ -429,10 +438,16 @@ def extract_parser(subparsers):
|
|
|
429
438
|
help="Input file to extract from."
|
|
430
439
|
)
|
|
431
440
|
extract_parser.add_argument(
|
|
432
|
-
"--
|
|
441
|
+
"--force", "-f",
|
|
433
442
|
action="store_true",
|
|
434
443
|
help="Answer queries with yes when extracting."
|
|
435
444
|
)
|
|
445
|
+
extract_parser.add_argument(
|
|
446
|
+
"-w",
|
|
447
|
+
"--write",
|
|
448
|
+
action="store_true",
|
|
449
|
+
help="Overwrite existing files without using LLM for merging."
|
|
450
|
+
)
|
|
436
451
|
|
|
437
452
|
|
|
438
453
|
class CustomHelpFormatter(argparse.HelpFormatter):
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
from ara_cli.file_classifier import FileClassifier
|
|
2
2
|
from ara_cli.artefact_reader import ArtefactReader
|
|
3
3
|
from ara_cli.file_lister import list_files_in_directory
|
|
4
|
-
from ara_cli.artefact_models.artefact_model import Artefact
|
|
5
4
|
from ara_cli.list_filter import ListFilter, filter_list
|
|
6
5
|
from ara_cli.artefact_fuzzy_search import suggest_close_name_matches
|
|
6
|
+
from ara_cli.artefact_models.artefact_data_retrieval import (
|
|
7
|
+
artefact_content_retrieval,
|
|
8
|
+
artefact_path_retrieval,
|
|
9
|
+
artefact_tags_retrieval,
|
|
10
|
+
)
|
|
7
11
|
import os
|
|
8
12
|
|
|
9
13
|
|
|
@@ -11,43 +15,18 @@ class ArtefactLister:
|
|
|
11
15
|
def __init__(self, file_system=None):
|
|
12
16
|
self.file_system = file_system or os
|
|
13
17
|
|
|
14
|
-
@staticmethod
|
|
15
|
-
def artefact_content_retrieval(artefact: Artefact):
|
|
16
|
-
content = artefact.serialize()
|
|
17
|
-
return content
|
|
18
|
-
|
|
19
|
-
@staticmethod
|
|
20
|
-
def artefact_path_retrieval(artefact: Artefact):
|
|
21
|
-
return artefact.file_path
|
|
22
|
-
|
|
23
|
-
@staticmethod
|
|
24
|
-
def artefact_tags_retrieval(artefact: Artefact):
|
|
25
|
-
final_tags = []
|
|
26
|
-
|
|
27
|
-
if not artefact:
|
|
28
|
-
return []
|
|
29
|
-
|
|
30
|
-
final_tags.extend([f"user_{user}" for user in artefact.users])
|
|
31
|
-
final_tags.append(artefact.status)
|
|
32
|
-
final_tags.extend(artefact.tags)
|
|
33
|
-
|
|
34
|
-
return final_tags
|
|
35
|
-
|
|
36
18
|
def filter_artefacts(self, classified_files: list, list_filter: ListFilter):
|
|
37
19
|
filtered_list = filter_list(
|
|
38
20
|
list_to_filter=classified_files,
|
|
39
21
|
list_filter=list_filter,
|
|
40
|
-
content_retrieval_strategy=
|
|
41
|
-
file_path_retrieval=
|
|
42
|
-
tag_retrieval=
|
|
22
|
+
content_retrieval_strategy=artefact_content_retrieval,
|
|
23
|
+
file_path_retrieval=artefact_path_retrieval,
|
|
24
|
+
tag_retrieval=artefact_tags_retrieval,
|
|
43
25
|
)
|
|
44
26
|
return filtered_list
|
|
45
27
|
|
|
46
28
|
def list_files(
|
|
47
|
-
self,
|
|
48
|
-
tags=None,
|
|
49
|
-
navigate_to_target=False,
|
|
50
|
-
list_filter: ListFilter | None = None
|
|
29
|
+
self, tags=None, navigate_to_target=False, list_filter: ListFilter | None = None
|
|
51
30
|
):
|
|
52
31
|
artefact_list = ArtefactReader.read_artefacts(tags=tags)
|
|
53
32
|
artefact_list = self.filter_artefacts(artefact_list, list_filter)
|
|
@@ -60,20 +39,18 @@ class ArtefactLister:
|
|
|
60
39
|
file_classifier.print_classified_files(filtered_artefact_list)
|
|
61
40
|
|
|
62
41
|
def list_branch(
|
|
63
|
-
self,
|
|
64
|
-
classifier,
|
|
65
|
-
artefact_name,
|
|
66
|
-
list_filter: ListFilter | None = None
|
|
42
|
+
self, classifier, artefact_name, list_filter: ListFilter | None = None
|
|
67
43
|
):
|
|
68
44
|
file_classifier = FileClassifier(os)
|
|
69
45
|
classified_artefacts = file_classifier.classify_files()
|
|
70
46
|
artefact_info = classified_artefacts.get(classifier, [])
|
|
71
|
-
matching_artefact_info = [
|
|
47
|
+
matching_artefact_info = [
|
|
48
|
+
p for p in artefact_info if p["title"] == artefact_name
|
|
49
|
+
]
|
|
72
50
|
|
|
73
51
|
if not matching_artefact_info:
|
|
74
52
|
suggest_close_name_matches(
|
|
75
|
-
artefact_name,
|
|
76
|
-
[info["title"] for info in artefact_info]
|
|
53
|
+
artefact_name, [info["title"] for info in artefact_info]
|
|
77
54
|
)
|
|
78
55
|
|
|
79
56
|
artefacts_by_classifier = {classifier: []}
|
|
@@ -82,29 +59,28 @@ class ArtefactLister:
|
|
|
82
59
|
classifier=classifier,
|
|
83
60
|
artefacts_by_classifier=artefacts_by_classifier,
|
|
84
61
|
)
|
|
85
|
-
artefacts_by_classifier = self.filter_artefacts(
|
|
62
|
+
artefacts_by_classifier = self.filter_artefacts(
|
|
63
|
+
artefacts_by_classifier, list_filter
|
|
64
|
+
)
|
|
86
65
|
file_classifier.print_classified_files(artefacts_by_classifier)
|
|
87
66
|
|
|
88
67
|
def list_children(
|
|
89
|
-
self,
|
|
90
|
-
classifier,
|
|
91
|
-
artefact_name,
|
|
92
|
-
list_filter: ListFilter | None = None
|
|
68
|
+
self, classifier, artefact_name, list_filter: ListFilter | None = None
|
|
93
69
|
):
|
|
94
70
|
file_classifier = FileClassifier(os)
|
|
95
71
|
classified_artefacts = file_classifier.classify_files()
|
|
96
72
|
artefact_info = classified_artefacts.get(classifier, [])
|
|
97
|
-
matching_artefact_info = [
|
|
73
|
+
matching_artefact_info = [
|
|
74
|
+
p for p in artefact_info if p["title"] == artefact_name
|
|
75
|
+
]
|
|
98
76
|
|
|
99
77
|
if not matching_artefact_info:
|
|
100
78
|
suggest_close_name_matches(
|
|
101
|
-
artefact_name,
|
|
102
|
-
[info["title"] for info in artefact_info]
|
|
79
|
+
artefact_name, [info["title"] for info in artefact_info]
|
|
103
80
|
)
|
|
104
81
|
|
|
105
82
|
child_artefacts = ArtefactReader.find_children(
|
|
106
|
-
artefact_name=artefact_name,
|
|
107
|
-
classifier=classifier
|
|
83
|
+
artefact_name=artefact_name, classifier=classifier
|
|
108
84
|
)
|
|
109
85
|
|
|
110
86
|
child_artefacts = self.filter_artefacts(child_artefacts, list_filter)
|
|
@@ -112,25 +88,23 @@ class ArtefactLister:
|
|
|
112
88
|
file_classifier.print_classified_files(child_artefacts)
|
|
113
89
|
|
|
114
90
|
def list_data(
|
|
115
|
-
self,
|
|
116
|
-
classifier,
|
|
117
|
-
artefact_name,
|
|
118
|
-
list_filter: ListFilter | None = None
|
|
91
|
+
self, classifier, artefact_name, list_filter: ListFilter | None = None
|
|
119
92
|
):
|
|
120
93
|
file_classifier = FileClassifier(os)
|
|
121
94
|
classified_artefact_info = file_classifier.classify_files()
|
|
122
95
|
artefact_info_dict = classified_artefact_info.get(classifier, [])
|
|
123
96
|
|
|
124
|
-
matching_info = [
|
|
97
|
+
matching_info = [
|
|
98
|
+
info for info in artefact_info_dict if info["title"] == artefact_name
|
|
99
|
+
]
|
|
125
100
|
|
|
126
101
|
if not matching_info:
|
|
127
102
|
suggest_close_name_matches(
|
|
128
|
-
artefact_name,
|
|
129
|
-
[info["title"] for info in artefact_info_dict]
|
|
103
|
+
artefact_name, [info["title"] for info in artefact_info_dict]
|
|
130
104
|
)
|
|
131
105
|
return
|
|
132
106
|
|
|
133
107
|
artefact_info = matching_info[0]
|
|
134
|
-
data_dir = os.path.splitext(artefact_info["file_path"])[0] +
|
|
108
|
+
data_dir = os.path.splitext(artefact_info["file_path"])[0] + ".data"
|
|
135
109
|
if os.path.exists(data_dir):
|
|
136
110
|
list_files_in_directory(data_dir, list_filter)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from ara_cli.artefact_models.artefact_model import Artefact
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def artefact_content_retrieval(artefact: Artefact):
|
|
5
|
+
content = artefact.serialize()
|
|
6
|
+
return content
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def artefact_path_retrieval(artefact: Artefact):
|
|
10
|
+
return artefact.file_path
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def artefact_tags_retrieval(artefact: Artefact):
|
|
14
|
+
final_tags = []
|
|
15
|
+
|
|
16
|
+
if not artefact:
|
|
17
|
+
return []
|
|
18
|
+
|
|
19
|
+
final_tags.extend([f"user_{user}" for user in artefact.users])
|
|
20
|
+
final_tags.append(artefact.status)
|
|
21
|
+
final_tags.extend(artefact.tags)
|
|
22
|
+
|
|
23
|
+
return final_tags
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import os
|
|
2
1
|
from functools import lru_cache
|
|
3
2
|
from ara_cli.classifier import Classifier
|
|
4
3
|
from ara_cli.artefact_link_updater import ArtefactLinkUpdater
|
|
5
4
|
from ara_cli.template_manager import DirectoryNavigator
|
|
5
|
+
import os
|
|
6
6
|
import re
|
|
7
|
+
import warnings
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
class ArtefactRenamer:
|
|
@@ -22,6 +23,8 @@ class ArtefactRenamer:
|
|
|
22
23
|
return re.compile(pattern)
|
|
23
24
|
|
|
24
25
|
def rename(self, old_name, new_name, classifier):
|
|
26
|
+
import shutil
|
|
27
|
+
|
|
25
28
|
original_directory = self.navigate_to_target()
|
|
26
29
|
|
|
27
30
|
if not new_name:
|
|
@@ -47,7 +50,8 @@ class ArtefactRenamer:
|
|
|
47
50
|
if self.file_system.path.exists(new_file_path):
|
|
48
51
|
raise FileExistsError(f"The new file name {new_file_path} already exists.")
|
|
49
52
|
if self.file_system.path.exists(new_dir_path):
|
|
50
|
-
|
|
53
|
+
warnings.warn(f"The new directory name {new_dir_path} already exists. It will be replaced by the artefact's data directory or removed entirely.", UserWarning)
|
|
54
|
+
shutil.rmtree(new_dir_path)
|
|
51
55
|
|
|
52
56
|
# Perform the renaming of the file and directory
|
|
53
57
|
self.file_system.rename(old_file_path, new_file_path)
|
|
@@ -9,13 +9,15 @@ from ara_cli.file_loaders.text_file_loader import TextFileLoader
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
extract_parser = argparse.ArgumentParser()
|
|
12
|
-
extract_parser.add_argument('-
|
|
12
|
+
extract_parser.add_argument('-f', '--force', action='store_true', help='Force extraction')
|
|
13
|
+
extract_parser.add_argument('-w','--write', action='store_true', help='Overwrite existing files without using LLM for merging.')
|
|
13
14
|
|
|
14
15
|
load_parser = argparse.ArgumentParser()
|
|
15
16
|
load_parser.add_argument('file_name', nargs='?', default='', help='File to load')
|
|
16
17
|
load_parser.add_argument('--load-images', action='store_true', help='Extract and describe images from documents')
|
|
17
18
|
|
|
18
19
|
|
|
20
|
+
|
|
19
21
|
class Chat(cmd2.Cmd):
|
|
20
22
|
CATEGORY_CHAT_CONTROL = "Chat control commands"
|
|
21
23
|
CATEGORY_LLM_CONTROL = "Language model controls"
|
|
@@ -532,7 +534,7 @@ Start chatting (type 'HELP'/'h' for available commands, 'QUIT'/'q' to exit chat
|
|
|
532
534
|
return [x for x in glob.glob(text + '*')]
|
|
533
535
|
|
|
534
536
|
def _retrieve_ara_config(self):
|
|
535
|
-
from ara_cli.
|
|
537
|
+
from ara_cli.prompt_handler import ConfigManager
|
|
536
538
|
return ConfigManager().get_config()
|
|
537
539
|
|
|
538
540
|
def _retrieve_llm_config(self):
|
|
@@ -625,7 +627,7 @@ Start chatting (type 'HELP'/'h' for available commands, 'QUIT'/'q' to exit chat
|
|
|
625
627
|
@cmd2.with_category(CATEGORY_LLM_CONTROL)
|
|
626
628
|
def do_CHOOSE_MODEL(self, model_name):
|
|
627
629
|
from ara_cli.prompt_handler import LLMSingleton
|
|
628
|
-
from ara_cli.ara_config import DEFAULT_CONFIG_LOCATION, save_data
|
|
630
|
+
from ara_cli.ara_config import DEFAULT_CONFIG_LOCATION, save_data
|
|
629
631
|
from ara_cli.directory_navigator import DirectoryNavigator
|
|
630
632
|
|
|
631
633
|
original_dir = os.getcwd()
|
|
@@ -634,22 +636,20 @@ Start chatting (type 'HELP'/'h' for available commands, 'QUIT'/'q' to exit chat
|
|
|
634
636
|
os.chdir('..')
|
|
635
637
|
|
|
636
638
|
if not self._verify_llm_choice(model_name):
|
|
637
|
-
os.chdir(original_dir)
|
|
638
639
|
return
|
|
639
640
|
|
|
640
|
-
ConfigManager.reset()
|
|
641
|
-
self.config = ConfigManager.get_config()
|
|
642
641
|
self.config.default_llm = model_name
|
|
643
642
|
save_data(filepath=DEFAULT_CONFIG_LOCATION, config=self.config)
|
|
644
643
|
|
|
645
|
-
LLMSingleton.
|
|
644
|
+
LLMSingleton.set_default_model(model_name)
|
|
645
|
+
print(f"Language model switched to '{model_name}'")
|
|
646
646
|
|
|
647
647
|
os.chdir(original_dir)
|
|
648
648
|
|
|
649
649
|
@cmd2.with_category(CATEGORY_LLM_CONTROL)
|
|
650
650
|
def do_CHOOSE_EXTRACTION_MODEL(self, model_name):
|
|
651
|
-
|
|
652
|
-
from ara_cli.ara_config import DEFAULT_CONFIG_LOCATION, save_data
|
|
651
|
+
from ara_cli.prompt_handler import LLMSingleton
|
|
652
|
+
from ara_cli.ara_config import DEFAULT_CONFIG_LOCATION, save_data
|
|
653
653
|
from ara_cli.directory_navigator import DirectoryNavigator
|
|
654
654
|
|
|
655
655
|
original_dir = os.getcwd()
|
|
@@ -658,36 +658,28 @@ Start chatting (type 'HELP'/'h' for available commands, 'QUIT'/'q' to exit chat
|
|
|
658
658
|
os.chdir('..')
|
|
659
659
|
|
|
660
660
|
if not self._verify_llm_choice(model_name):
|
|
661
|
-
os.chdir(original_dir)
|
|
662
661
|
return
|
|
663
662
|
|
|
664
|
-
ConfigManager.reset()
|
|
665
|
-
self.config = ConfigManager.get_config()
|
|
666
663
|
self.config.extraction_llm = model_name
|
|
667
664
|
save_data(filepath=DEFAULT_CONFIG_LOCATION, config=self.config)
|
|
665
|
+
|
|
666
|
+
LLMSingleton.set_extraction_model(model_name)
|
|
668
667
|
print(f"Extraction model switched to '{model_name}'")
|
|
669
668
|
|
|
670
669
|
os.chdir(original_dir)
|
|
671
670
|
|
|
672
671
|
@cmd2.with_category(CATEGORY_LLM_CONTROL)
|
|
673
672
|
def do_CURRENT_MODEL(self, _):
|
|
674
|
-
|
|
675
|
-
from ara_cli.ara_config import ConfigManager
|
|
673
|
+
from ara_cli.prompt_handler import LLMSingleton
|
|
676
674
|
|
|
677
|
-
|
|
678
|
-
config = self._retrieve_ara_config()
|
|
679
|
-
|
|
680
|
-
print(config.default_llm)
|
|
675
|
+
print(LLMSingleton.get_default_model())
|
|
681
676
|
|
|
682
677
|
@cmd2.with_category(CATEGORY_LLM_CONTROL)
|
|
683
678
|
def do_CURRENT_EXTRACTION_MODEL(self, _):
|
|
684
679
|
"""Displays the current extraction language model."""
|
|
685
|
-
from ara_cli.
|
|
686
|
-
|
|
687
|
-
ConfigManager.reset()
|
|
688
|
-
config = self._retrieve_ara_config()
|
|
680
|
+
from ara_cli.prompt_handler import LLMSingleton
|
|
689
681
|
|
|
690
|
-
print(
|
|
682
|
+
print(LLMSingleton.get_extraction_model())
|
|
691
683
|
|
|
692
684
|
def _complete_llms(self, text, line, begidx, endidx):
|
|
693
685
|
llm_config = self._retrieve_llm_config()
|
|
@@ -823,7 +815,8 @@ Start chatting (type 'HELP'/'h' for available commands, 'QUIT'/'q' to exit chat
|
|
|
823
815
|
|
|
824
816
|
command = ExtractCommand(
|
|
825
817
|
file_name=self.chat_name,
|
|
826
|
-
|
|
818
|
+
force=args.force,
|
|
819
|
+
write=args.write,
|
|
827
820
|
output=self.poutput,
|
|
828
821
|
error_output=self.perror
|
|
829
822
|
)
|
|
@@ -3,15 +3,16 @@ from ara_cli.prompt_extractor import extract_responses
|
|
|
3
3
|
import os
|
|
4
4
|
|
|
5
5
|
class ExtractCommand(Command):
|
|
6
|
-
def __init__(self, file_name,
|
|
6
|
+
def __init__(self, file_name, force=False, write=False, output=None, error_output=None):
|
|
7
7
|
self.file_name = file_name
|
|
8
|
-
self.
|
|
8
|
+
self.force = force
|
|
9
|
+
self.write = write
|
|
9
10
|
self.output = output # Callable for standard output (optional)
|
|
10
11
|
self.error_output = error_output # Callable for errors (optional)
|
|
11
12
|
|
|
12
13
|
def execute(self, *args, **kwargs):
|
|
13
14
|
try:
|
|
14
|
-
extract_responses(self.file_name, True,
|
|
15
|
+
extract_responses(self.file_name, True, force=self.force, write=self.write)
|
|
15
16
|
if self.output:
|
|
16
17
|
self.output("End of extraction")
|
|
17
18
|
except Exception as e:
|