From a6afe30b7fe04d1885e728194e5e3369850b85a4 Mon Sep 17 00:00:00 2001 From: karoel2 Date: Wed, 15 Jun 2022 10:51:36 +0200 Subject: [PATCH] Resolve merges --- system/generator_jezyka_nautalnego.py | 24 ++++++++++++++++++++++++ system/monitor_stanu_dialogowego.py | 1 - 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/system/generator_jezyka_nautalnego.py b/system/generator_jezyka_nautalnego.py index fdb4d13..ee27fde 100644 --- a/system/generator_jezyka_nautalnego.py +++ b/system/generator_jezyka_nautalnego.py @@ -79,6 +79,7 @@ def generator_jezyka_nautalnego(frame, tactic, state, text): elif tactic[0] == True: _, act, req_args, opt_args = tactic print('DEBUG: ', act, 'req', req_args, opt_args,sep = '\n') + if act == 'help': print(random.choice(help)) print("Dostępne komendy: \n - " + '\n - '.join(commands)) @@ -109,7 +110,30 @@ def generator_jezyka_nautalnego(frame, tactic, state, text): print(pr['state']) print() + elif act == 'brefing': + print("Podsumowanie w repozytorium " + find(req_args, 'repo')[0] + ":") + brefings = getBrefing() + for brefing in brefings: + print(brefing['name']) + print(brefing['description']) + print() + elif act == 'tests': + print("Lista testów w repozytorium " + find(req_args, 'repo')[0] + ":") + tests = listRepositoryTests(find(req_args, 'repo')[0]) + for test in tests: + print(test['name']) + print(test['description']) + print(test['status']) + print() + + elif act == 'notifications': + print("Lista powidomień w repozytorium " + find(req_args, 'repo')[0] + ":") + notifications = listNotifications(find(req_args, 'repo')[0]) + for notification in notifications: + print(notification['name']) + print(notification['description']) + print() # # elif tactic[0] == 'QUESTION' and act[0] == 'repo': # print("Dodaj nazwę repozytorium na końcu komendy") diff --git a/system/monitor_stanu_dialogowego.py b/system/monitor_stanu_dialogowego.py index 3ba6566..090462e 100644 --- a/system/monitor_stanu_dialogowego.py +++ b/system/monitor_stanu_dialogowego.py @@ -40,7 +40,6 @@ def monitor_stanu_dialogowego(frame): def append_or_merge_frame(frame, dialogue_state): act = frame['act'] - act_from_state = list(filter(lambda x: x['act'] == act, dialogue_state['topics'])) if len(act_from_state) > 0: append_or_merge_slots(frame['slots'], act_from_state[0]['slots'])