From 231f7778c34472f795046d2a8eecba825292dc12 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 19 Jun 2024 09:31:32 +0100 Subject: [PATCH] Update AI error assistant (#18968) * Update styles to match designs * Use Notification for errors and update error message * Add feedback stories and update styles * Update prompt * Accept terms after suggest fix started * Add translations for AI error assistant * Add tooltips for feedback buttons * Allow empty file extension * Handle rate limit response GitOrigin-RevId: e75c949f3a1b39594e94e300df717de414fdf70c --- .../web/frontend/extracted-translations.json | 28 +++++++++++++++++++ services/web/locales/en.json | 28 +++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 9f19d5b2be..526f65cb94 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -18,6 +18,7 @@ "about_to_trash_projects": "", "accept": "", "accept_all": "", + "accept_and_continue": "", "accept_invitation": "", "accept_or_reject_each_changes_individually": "", "accept_terms_and_conditions": "", @@ -65,6 +66,14 @@ "aggregate_changed": "", "aggregate_to": "", "agree_with_the_terms": "", + "ai_can_make_mistakes": "", + "ai_feedback_do_you_have_any_thoughts_or_suggestions": "", + "ai_feedback_tell_us_what_was_wrong_so_we_can_improve": "", + "ai_feedback_the_answer_was_too_long": "", + "ai_feedback_the_answer_wasnt_detailed_enough": "", + "ai_feedback_the_suggestion_didnt_fix_the_error": "", + "ai_feedback_the_suggestion_wasnt_the_best_fix_available": "", + "ai_feedback_there_was_no_code_fix_suggested": "", "alignment": "", "all_borders": "", "all_premium_features": "", @@ -78,6 +87,7 @@ "anonymous": "", "anyone_with_link_can_edit": "", "anyone_with_link_can_view": "", + "apply_suggestion": "", "archive": "", "archive_projects": "", "archived": "", @@ -104,6 +114,7 @@ "back_to_editor": "", "back_to_subscription": "", "back_to_your_projects": "", + "before_you_use_the_ai_error_assistant": "", "beta_program_already_participating": "", "beta_program_benefits": "", "beta_program_not_participating": "", @@ -223,6 +234,7 @@ "continue_to": "", "copied": "", "copy": "", + "copy_code": "", "copy_project": "", "copy_response": "", "copying": "", @@ -413,6 +425,7 @@ "find_out_more_about_institution_login": "", "find_out_more_about_the_file_outline": "", "find_out_more_nt": "", + "finding_a_fix": "", "first_name": "", "fit_to_height": "", "fit_to_width": "", @@ -682,6 +695,7 @@ "length_unit": "", "let_us_know": "", "let_us_know_how_we_can_help": "", + "lets_fix_your_errors": "", "library": "", "license_for_educational_purposes": "", "limited_offer": "", @@ -861,6 +875,7 @@ "open_advanced_reference_search": "", "open_file": "", "open_link": "", + "open_path": "", "open_project": "", "open_target": "", "optional": "", @@ -995,6 +1010,7 @@ "react_history_tutorial_content": "", "react_history_tutorial_title": "", "reactivate_subscription": "", + "read_lines_from_path": "", "read_more_about_free_compile_timeouts_servers": "", "read_only": "", "read_only_token": "", @@ -1126,6 +1142,7 @@ "search_search_for": "", "search_whole_word": "", "search_within_selection": "", + "searched_path_for_lines_containing": "", "security": "", "see_changes_in_your_documents_live": "", "select_a_column_or_a_merged_cell_to_align": "", @@ -1209,6 +1226,7 @@ "something_went_wrong_rendering_pdf_expected": "", "something_went_wrong_server": "", "somthing_went_wrong_compiling": "", + "sorry_it_looks_like_that_didnt_work_this_time": "", "sorry_the_connection_to_the_server_is_down": "", "sorry_your_table_cant_be_displayed_at_the_moment": "", "sort_by": "", @@ -1262,6 +1280,7 @@ "sso_user_explanation_ready_with_group_name": "", "start_a_free_trial": "", "start_by_adding_your_email": "", + "start_by_fixing_the_first_error_in_your_doc": "", "start_free_trial": "", "start_free_trial_without_exclamation": "", "start_typing_find_your_company": "", @@ -1287,7 +1306,10 @@ "subscription_will_remain_active_until_end_of_billing_period_x": "", "subscription_will_remain_active_until_end_of_trial_period_x": "", "success_sso_set_up": "", + "suggest_a_different_fix": "", + "suggest_fix": "", "suggested": "", + "suggested_fix_for_error_in_path": "", "sure_you_want_to_cancel_plan_change": "", "sure_you_want_to_change_plan": "", "sure_you_want_to_delete": "", @@ -1326,6 +1348,7 @@ "test_configuration_successful": "", "tex_live_version": "", "thank_you_exclamation": "", + "thank_you_for_your_feedback": "", "thanks_for_confirming_your_email_address": "", "thanks_for_subscribing": "", "thanks_for_subscribing_you_help_sl": "", @@ -1333,6 +1356,7 @@ "the_following_files_already_exist_in_this_project": "", "the_following_folder_already_exists_in_this_project": "", "the_following_folder_already_exists_in_this_project_plural": "", + "the_original_text_has_changed": "", "the_target_folder_could_not_be_found": "", "the_width_you_choose_here_is_based_on_the_width_of_the_text_in_your_document": "", "their_projects_will_be_transferred_to_another_user": "", @@ -1352,6 +1376,8 @@ "this_project_will_appear_in_your_dropbox_folder_at": "", "this_tool_helps_you_insert_figures": "", "this_tool_helps_you_insert_simple_tables_into_your_project_without_writing_latex_code_give_feedback": "", + "this_was_helpful": "", + "this_wasnt_helpful": "", "timedout": "", "tip": "", "title": "", @@ -1432,6 +1458,7 @@ "trial_remaining_days": "", "tried_to_log_in_with_email": "", "tried_to_register_with_email": "", + "troubleshooting_tip": "", "try_again": "", "try_it_for_free": "", "try_now": "", @@ -1592,6 +1619,7 @@ "you_are_on_x_plan_as_member_of_group_subscription_y_administered_by_z": "", "you_can_now_enable_sso": "", "you_can_now_log_in_sso": "", + "you_can_request_a_maximum_of_limit_fixes_per_day": "", "you_cant_add_or_change_password_due_to_sso": "", "you_cant_join_this_group_subscription": "", "you_dont_have_any_repositories": "", diff --git a/services/web/locales/en.json b/services/web/locales/en.json index c4c7e4dff4..96cd323982 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -30,6 +30,7 @@ "abstract": "Abstract", "accept": "Accept", "accept_all": "Accept all", + "accept_and_continue": "Accept and continue", "accept_invitation": "Accept invitation", "accept_or_reject_each_changes_individually": "Accept or reject each change individually", "accept_terms_and_conditions": "Accept terms and conditions", @@ -91,6 +92,14 @@ "aggregate_changed": "Changed", "aggregate_to": "to", "agree_with_the_terms": "I agree with the Overleaf terms", + "ai_can_make_mistakes": "AI can make mistakes. Review fixes before you apply them.", + "ai_feedback_do_you_have_any_thoughts_or_suggestions": "Do you have any thoughts or suggestions for improving this feature?", + "ai_feedback_tell_us_what_was_wrong_so_we_can_improve": "Tell us what was wrong so we can improve.", + "ai_feedback_the_answer_was_too_long": "The answer was too long", + "ai_feedback_the_answer_wasnt_detailed_enough": "The answer wasn’t detailed enough", + "ai_feedback_the_suggestion_didnt_fix_the_error": "The suggestion didn’t fix the error", + "ai_feedback_the_suggestion_wasnt_the_best_fix_available": "The suggestion wasn’t the best fix available", + "ai_feedback_there_was_no_code_fix_suggested": "There was no code fix suggested", "alignment": "Alignment", "all": "All", "all_borders": "All borders", @@ -118,6 +127,7 @@ "app_on_x": "__appName__ on __social__", "apply_educational_discount": "Apply educational discount", "apply_educational_discount_info": "Overleaf offers a 40% educational discount for groups of 10 or more. Applies to students or faculty using Overleaf for teaching.", + "apply_suggestion": "Apply suggestion", "april": "April", "archive": "Archive", "archive_projects": "Archive Projects", @@ -156,6 +166,7 @@ "back_to_your_projects": "Back to your projects", "basic": "Basic", "become_an_advisor": "Become an __appName__ advisor", + "before_you_use_the_ai_error_assistant": "Before you use the AI error assistant", "best_choices_companies_universities_non_profits": "Best choice for companies, universities and non-profits", "beta": "Beta", "beta_feature_badge": "Beta feature badge", @@ -326,6 +337,7 @@ "continue_with_service": "Continue with __service__", "copied": "Copied", "copy": "Copy", + "copy_code": "Copy code", "copy_project": "Copy Project", "copy_response": "Copy response", "copying": "Copying", @@ -608,6 +620,7 @@ "find_out_more_about_institution_login": "Find out more about institutional login", "find_out_more_about_the_file_outline": "Find out more about the file outline", "find_out_more_nt": "Find out more.", + "finding_a_fix": "Finding a fix", "first_name": "First Name", "fit_to_height": "Fit to height", "fit_to_width": "Fit to width", @@ -1005,6 +1018,7 @@ "let_us_know": "Let us know", "let_us_know_how_we_can_help": "Let us know how we can help", "let_us_know_what_you_think": "Let us know what you think", + "lets_fix_your_errors": "Let’s fix your errors", "library": "Library", "license": "License", "license_for_educational_purposes": "This license is for educational purposes (applies to students or faculty using __appName__ for teaching)", @@ -1269,6 +1283,7 @@ "open_as_template": "Open as Template", "open_file": "Edit file", "open_link": "Go to page", + "open_path": "Open __path__", "open_project": "Open Project", "open_target": "Go to target", "opted_out_linking": "You’ve opted out from linking your __email__ __appName__ account to your institutional account.", @@ -1465,6 +1480,7 @@ "react_history_tutorial_content": "To compare a range of versions, use the <0> on the versions you want at the start and end of the range. To add a label or to download a version use the options in the three-dot menu. <1>Learn more about using Overleaf History.", "react_history_tutorial_title": "History actions have a new home", "reactivate_subscription": "Reactivate your subscription", + "read_lines_from_path": "Read lines from __path__", "read_more_about_free_compile_timeouts_servers": "Read more about changes to free compile timeouts and servers", "read_only": "Read Only", "read_only_token": "Read-Only Token", @@ -1644,6 +1660,7 @@ "search_search_for": "Search for", "search_whole_word": "Whole word", "search_within_selection": "Within selection", + "searched_path_for_lines_containing": "Searched __path__ for lines containing \"__query__\"", "secondary_email_password_reset": "That email is registered as a secondary email. Please enter the primary email for your account.", "security": "Security", "see_changes_in_your_documents_live": "See changes in your documents, live", @@ -1744,6 +1761,7 @@ "something_went_wrong_server": "Something went wrong. Please try again.", "somthing_went_wrong_compiling": "Sorry, something went wrong and your project could not be compiled. Please try again in a few moments.", "sorry_detected_sales_restricted_region": "Sorry, we’ve detected that you are in a region from which we cannot presently accept payments. If you think you’ve received this message in error, please contact us with details of your location, and we will look into this for you. We apologize for the inconvenience.", + "sorry_it_looks_like_that_didnt_work_this_time": "Sorry! It looks like that didn’t work this time. Please try again.", "sorry_something_went_wrong_opening_the_document_please_try_again": "Sorry, an unexpected error occurred when trying to open this content on Overleaf. Please try again.", "sorry_the_connection_to_the_server_is_down": "Sorry, the connection to the server is down.", "sorry_this_account_has_been_suspended": "Sorry, this account has been suspended.", @@ -1808,6 +1826,7 @@ "standard": "Standard", "start_a_free_trial": "Start a free trial", "start_by_adding_your_email": "Start by adding your email address.", + "start_by_fixing_the_first_error_in_your_doc": "Start by fixing the first error in your doc to avoid problems later on.", "start_free_trial": "Start Free Trial!", "start_free_trial_without_exclamation": "Start Free Trial", "start_typing_find_your_company": " Start typing to find your company", @@ -1843,7 +1862,10 @@ "subscription_will_remain_active_until_end_of_billing_period_x": "Your subscription will remain active until the end of your billing period, <0>__terminationDate__.", "subscription_will_remain_active_until_end_of_trial_period_x": "Your subscription will remain active until the end of your trial period, <0>__terminationDate__.", "success_sso_set_up": "Success! Single sign-on is all set up for you.", + "suggest_a_different_fix": "Suggest a different fix", + "suggest_fix": "Suggest fix", "suggested": "Suggested", + "suggested_fix_for_error_in_path": "Suggested fix for error in __path__", "suggestion": "Suggestion", "support": "Support", "sure_you_want_to_cancel_plan_change": "Are you sure you want to revert your scheduled plan change? You will remain subscribed to the <0>__planName__ plan.", @@ -1902,6 +1924,7 @@ "thank_you_exclamation": "Thank you!", "thank_you_for_being_part_of_our_beta_program": "Thank you for being part of our Beta Program, where you can have <0>early access to new features and help us understand your needs better", "thank_you_for_being_part_of_our_labs_program": "Thank you for being part of our Labs program, where you can have <0>early access to experimental features and help us explore innovative ideas that help you work more quickly and effectively", + "thank_you_for_your_feedback": "Thank you for your feedback!", "thanks": "Thanks", "thanks_for_confirming_your_email_address": "Thanks for confirming your email address", "thanks_for_subscribing": "Thanks for subscribing!", @@ -1911,6 +1934,7 @@ "the_following_files_already_exist_in_this_project": "The following files already exist in this project:", "the_following_folder_already_exists_in_this_project": "The following folder already exists in this project:", "the_following_folder_already_exists_in_this_project_plural": "The following folders already exist in this project:", + "the_original_text_has_changed": "The original text has changed, so this suggestion can’t be applied", "the_project_that_contains_this_file_is_not_shared_with_you": "The project that contains this file is not shared with you", "the_requested_conversion_job_was_not_found": "The link to open this content on Overleaf specified a conversion job that could not be found. It’s possible that the job has expired and needs to be run again. If this keeps happening for links on a particular site, please report this to them.", "the_requested_publisher_was_not_found": "The link to open this content on Overleaf specified a publisher that could not be found. If this keeps happening for links on a particular site, please report this to them.", @@ -1940,6 +1964,8 @@ "this_project_will_appear_in_your_dropbox_folder_at": "This project will appear in your Dropbox folder at ", "this_tool_helps_you_insert_figures": "This tool helps you insert figures into your project without needing to write the LaTeX code. The following information explains more about the options in the tool and how to further customize your figures.", "this_tool_helps_you_insert_simple_tables_into_your_project_without_writing_latex_code_give_feedback": "This tool helps you insert simple tables into your project without writing LaTeX code. This tool is new, so please <0>give us feedback and look out for additional functionality coming soon.", + "this_was_helpful": "This was helpful", + "this_wasnt_helpful": "This wasn’t helpful", "thousands_templates": "Thousands of templates", "thousands_templates_info": "Produce beautiful documents starting from our gallery of LaTeX templates for journals, conferences, theses, reports, CVs and much more.", "three_free_collab": "Three free collaborators", @@ -2029,6 +2055,7 @@ "trial_remaining_days": "__days__ more days on your Overleaf Premium trial", "tried_to_log_in_with_email": "You’ve tried to log in with __email__.", "tried_to_register_with_email": "You’ve tried to register with __email__, which is already registered with __appName__ as an institutional account.", + "troubleshooting_tip": "Troubleshooting tip", "try_again": "Please try again", "try_for_free": "Try for free", "try_it_for_free": "Try it for free", @@ -2234,6 +2261,7 @@ "you_can_opt_in_and_out_of_overleaf_labs_at_any_time_on_this_page": "You can <0>opt in and out of Overleaf Labs at any time on this page", "you_can_opt_in_and_out_of_the_program_at_any_time_on_this_page": "You can <0>opt in and out of the program at any time on this page", "you_can_opt_in_to_individual_experiments": "You will be asked to opt in and out of individual experiments; each experiment may have unique partners, requirements, terms and conditions, etc. that must be opted in to for that specific experiment", + "you_can_request_a_maximum_of_limit_fixes_per_day": "You can request a maximum of __limit__ fixes per day. Please try again tomorrow.", "you_cant_add_or_change_password_due_to_sso": "You can’t add or change your password because your group or organization uses <0>single sign-on (SSO).", "you_cant_join_this_group_subscription": "You can’t join this group subscription", "you_cant_reset_password_due_to_sso": "You can’t reset your password because your group or organization uses SSO. <0>Log in with SSO.",