From c1f88eb0ad24f05a2c224a5d97403f653f1e547b Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 2 May 2024 12:49:25 -0700 Subject: [PATCH 01/39] Update chat.cy.ts --- cypress/e2e/chat.cy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/chat.cy.ts b/cypress/e2e/chat.cy.ts index fce786272..3fafde837 100644 --- a/cypress/e2e/chat.cy.ts +++ b/cypress/e2e/chat.cy.ts @@ -21,14 +21,14 @@ describe('Settings', () => { // Click on the model selector cy.get('button[aria-label="Select a model"]').click(); // Select the first model - cy.get('div[role="option"][data-value]').first().click(); + cy.get('div[role="menuitem"][data-value]').first().click(); }); it('user can perform text chat', () => { // Click on the model selector cy.get('button[aria-label="Select a model"]').click(); // Select the first model - cy.get('div[role="option"][data-value]').first().click(); + cy.get('div[role="menuitem"][data-value]').first().click(); // Type a message cy.get('#chat-textarea').type('Hi, what can you do? A single sentence only please.', { force: true From 2789102d270f8f5415ac2d209179a5087100eb2a Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 2 May 2024 12:54:28 -0700 Subject: [PATCH 02/39] Update chat.cy.ts --- cypress/e2e/chat.cy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/chat.cy.ts b/cypress/e2e/chat.cy.ts index 3fafde837..afb299608 100644 --- a/cypress/e2e/chat.cy.ts +++ b/cypress/e2e/chat.cy.ts @@ -21,14 +21,14 @@ describe('Settings', () => { // Click on the model selector cy.get('button[aria-label="Select a model"]').click(); // Select the first model - cy.get('div[role="menuitem"][data-value]').first().click(); + cy.get('div[role="menuitem"]').first().click(); }); it('user can perform text chat', () => { // Click on the model selector cy.get('button[aria-label="Select a model"]').click(); // Select the first model - cy.get('div[role="menuitem"][data-value]').first().click(); + cy.get('div[role="menuitem"]').first().click(); // Type a message cy.get('#chat-textarea').type('Hi, what can you do? A single sentence only please.', { force: true From a79618ee3e011d04b758f256fd9d26cfe74f9162 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 2 May 2024 13:25:44 -0700 Subject: [PATCH 03/39] fix: selector input issue --- .../components/chat/ModelSelector/Selector.svelte | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/lib/components/chat/ModelSelector/Selector.svelte b/src/lib/components/chat/ModelSelector/Selector.svelte index 98c63fc06..3e5256f6e 100644 --- a/src/lib/components/chat/ModelSelector/Selector.svelte +++ b/src/lib/components/chat/ModelSelector/Selector.svelte @@ -27,6 +27,8 @@ export let className = 'max-w-lg'; + let show = false; + let selectedModel = ''; $: selectedModel = items.find((item) => item.value === value) ?? ''; @@ -181,6 +183,7 @@ { searchValue = ''; window.setTimeout(() => document.getElementById('model-search-input')?.focus(), 0); @@ -214,6 +217,7 @@ bind:value={searchValue} class="w-full text-sm bg-transparent outline-none" placeholder={searchPlaceholder} + autocomplete="off" /> @@ -222,10 +226,12 @@
{#each filteredItems as item} - { value = item.value; + + show = false; }} >
@@ -294,7 +300,7 @@
{/if} -
+ {:else}
From a19d4267f705ccdcc97bffe2d166d41a7f274ef0 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 2 May 2024 14:20:53 -0700 Subject: [PATCH 04/39] fix: integration test --- cypress/e2e/chat.cy.ts | 4 ++-- src/lib/components/chat/ModelSelector/Selector.svelte | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/chat.cy.ts b/cypress/e2e/chat.cy.ts index afb299608..f46bef57b 100644 --- a/cypress/e2e/chat.cy.ts +++ b/cypress/e2e/chat.cy.ts @@ -21,14 +21,14 @@ describe('Settings', () => { // Click on the model selector cy.get('button[aria-label="Select a model"]').click(); // Select the first model - cy.get('div[role="menuitem"]').first().click(); + cy.get('button[aria-label="model-item"]').first().click(); }); it('user can perform text chat', () => { // Click on the model selector cy.get('button[aria-label="Select a model"]').click(); // Select the first model - cy.get('div[role="menuitem"]').first().click(); + cy.get('button[aria-label="model-item"]').first().click(); // Type a message cy.get('#chat-textarea').type('Hi, what can you do? A single sentence only please.', { force: true diff --git a/src/lib/components/chat/ModelSelector/Selector.svelte b/src/lib/components/chat/ModelSelector/Selector.svelte index 3e5256f6e..379375031 100644 --- a/src/lib/components/chat/ModelSelector/Selector.svelte +++ b/src/lib/components/chat/ModelSelector/Selector.svelte @@ -227,6 +227,7 @@
{#each filteredItems as item}
+ +
+
{$i18n.t('Symbol startup prompt')}
+
+ +
+
+
+
+
+ {$i18n.t('Symbol startup prompt to activate RAG')} +
+ +
+
+ # +
+
+
+ +
+
+ {$i18n.t('Symbol startup prompt to activate Chat Prompts')} +
+ +
+
+ / +
+
+
+ +
+
+ {$i18n.t('Symbol startup prompt to activate Specific Models')} +
+ +
+
+ @ +
+
+
+
+
+
-
- +