display not implemented for translation. Show selected prompt
This commit is contained in:
parent
1effd5f9d4
commit
e80f7259ab
1 changed files with 10 additions and 5 deletions
|
@ -35,7 +35,9 @@ class CliHandler:
|
||||||
try:
|
try:
|
||||||
match choice:
|
match choice:
|
||||||
case "translate":
|
case "translate":
|
||||||
return "translate"
|
# TODO: Implement translation
|
||||||
|
print("Not implemented yet!")
|
||||||
|
input("Press Enter to continue...")
|
||||||
case "prompts":
|
case "prompts":
|
||||||
self.handle_prompts_menu()
|
self.handle_prompts_menu()
|
||||||
case "settings":
|
case "settings":
|
||||||
|
@ -52,7 +54,7 @@ class CliHandler:
|
||||||
def handle_prompts_menu(self):
|
def handle_prompts_menu(self):
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
print(fancy_headline("Prompts Menu", "rounded"))
|
# print(fancy_headline("Prompts Menu", "rounded"))
|
||||||
|
|
||||||
prompts = self.prompts_manager.get_all_prompts()
|
prompts = self.prompts_manager.get_all_prompts()
|
||||||
prompts_menu = PromptMenu(prompts)
|
prompts_menu = PromptMenu(prompts)
|
||||||
|
@ -63,7 +65,7 @@ class CliHandler:
|
||||||
elif choice == 'main':
|
elif choice == 'main':
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
print(f"Selected prompt: {name}: {choice}")
|
# print(f"Selected prompt: {name}: {choice}")
|
||||||
self.select_prompt(name, choice)
|
self.select_prompt(name, choice)
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
@ -77,6 +79,7 @@ class CliHandler:
|
||||||
name = input("Enter prompt name: ").strip()
|
name = input("Enter prompt name: ").strip()
|
||||||
if not name:
|
if not name:
|
||||||
print("❌ Prompt name cannot be empty!")
|
print("❌ Prompt name cannot be empty!")
|
||||||
|
input("Press Enter to continue...")
|
||||||
return
|
return
|
||||||
if self.prompts_manager.prompt_exists(name):
|
if self.prompts_manager.prompt_exists(name):
|
||||||
print(f"❌ Prompt '{name}' already exists!")
|
print(f"❌ Prompt '{name}' already exists!")
|
||||||
|
@ -107,8 +110,10 @@ class CliHandler:
|
||||||
print("❌ No option selected!")
|
print("❌ No option selected!")
|
||||||
return
|
return
|
||||||
|
|
||||||
if choice == "select":
|
if choice == "show":
|
||||||
pass
|
print(f"Prompt name: {prompt[0]}")
|
||||||
|
print(f"Prompt description: {prompt[1]}")
|
||||||
|
input("Press Enter to continue...")
|
||||||
elif choice == "edit":
|
elif choice == "edit":
|
||||||
self.edit_prompt(*prompt)
|
self.edit_prompt(*prompt)
|
||||||
elif choice == "delete":
|
elif choice == "delete":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue