From d68cfb313ea710ba9becc65ec3e1661c00e00431 Mon Sep 17 00:00:00 2001 From: Akash K <57758277+amk-dev@users.noreply.github.com> Date: Tue, 30 Jul 2024 12:16:44 +0530 Subject: [PATCH] feat: hoppscotch-common & platform additions for ai experiments (#4222) Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com> --- packages/hoppscotch-common/locales/en.json | 8 +- .../components/collections/EditRequest.vue | 84 +++++++++++++++++-- .../collections/graphql/EditRequest.vue | 84 +++++++++++++++++-- .../components/collections/graphql/index.vue | 1 + .../src/components/collections/index.vue | 1 + .../src/newstore/settings.ts | 2 + .../hoppscotch-common/src/pages/graphql.vue | 7 ++ .../hoppscotch-common/src/pages/index.vue | 14 +++- .../hoppscotch-common/src/pages/settings.vue | 12 +++ .../src/platform/experiments.ts | 10 +++ .../hoppscotch-common/src/platform/index.ts | 2 + .../persistence/validation-schemas/index.ts | 1 + 12 files changed, 208 insertions(+), 18 deletions(-) create mode 100644 packages/hoppscotch-common/src/platform/experiments.ts diff --git a/packages/hoppscotch-common/locales/en.json b/packages/hoppscotch-common/locales/en.json index 3399bca45..e4bd4437c 100644 --- a/packages/hoppscotch-common/locales/en.json +++ b/packages/hoppscotch-common/locales/en.json @@ -612,7 +612,8 @@ "url": "URL", "url_placeholder": "Enter a URL or paste a cURL command", "variables": "Variables", - "view_my_links": "View my links" + "view_my_links": "View my links", + "generate_name_error": "Failed to generate request name." }, "response": { "audio": "Audio", @@ -672,6 +673,7 @@ "short_codes": "Short codes", "short_codes_description": "Short codes which were created by you.", "sidebar_on_left": "Sidebar on left", + "ai_experiments": "AI Experiments", "sync": "Synchronise", "sync_collections": "Collections", "sync_description": "These settings are synced to cloud.", @@ -1084,5 +1086,9 @@ "cli_command_generation_description_sh": "Copy the below command and run it from the CLI. Please specify a personal access token and verify the generated SH instance server URL.", "cli_command_generation_description_sh_with_server_url_placeholder": "Copy the below command and run it from the CLI. Please specify a personal access token and the SH instance server URL.", "run_collection": "Run collection" + }, + "ai_experiments": { + "generate_request_name": "Generate Request Name Using AI", + "generate_or_modify_request_body": "Generate or Modify Request Body" } } diff --git a/packages/hoppscotch-common/src/components/collections/EditRequest.vue b/packages/hoppscotch-common/src/components/collections/EditRequest.vue index 7d6140381..4ec3f1b41 100644 --- a/packages/hoppscotch-common/src/components/collections/EditRequest.vue +++ b/packages/hoppscotch-common/src/components/collections/EditRequest.vue @@ -6,13 +6,28 @@ @close="hideModal" >