diff --git a/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.stories.ts b/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.stories.ts index d87e41e1ed..5d3601c5c6 100644 --- a/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.stories.ts +++ b/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.stories.ts @@ -21,7 +21,7 @@ const Template: StoryFn = (args, { argTypes }) => ({ components: { AskAssistantChat, }, - template: '
', + template: '
', methods, }); diff --git a/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.vue b/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.vue index aa677b037d..2b895be0bb 100644 --- a/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.vue +++ b/packages/design-system/src/components/AskAssistantChat/AskAssistantChat.vue @@ -136,158 +136,167 @@ async function onCopyButtonClick(content: string, e: MouseEvent) {
-
-
+
+
- - +
+ + - {{ - t('assistantChat.aiAssistantName') - }} - {{ t('assistantChat.you') }} -
-
-
-
- {{ message.title }} - -
-
- - + {{ + t('assistantChat.aiAssistantName') + }} + {{ t('assistantChat.you') }} +
+
+
+
+ {{ message.title }} + +
+
+ + +
-
-
- -
-
-
- - {{ t('assistantChat.copy') }} - -
+
+
+
+
+ + {{ t('assistantChat.copy') }} + +
+
+
+
- -
-
- ⚠️ {{ message.content }} - - {{ t('generic.retry') }} - -
-
- -
-
- - {{ t('assistantChat.sessionEndMessage.1') }} - - - - {{ t('assistantChat.sessionEndMessage.2') }} - -
- -
-
{{ t('assistantChat.quickRepliesTitle') }}
-
+ ⚠️ {{ message.content }} - {{ opt.text }} + {{ t('generic.retry') }}
+
+ +
+
+ + {{ t('assistantChat.sessionEndMessage.1') }} + + + + {{ t('assistantChat.sessionEndMessage.2') }} + +
+ +
+
+ {{ t('assistantChat.quickRepliesTitle') }} +
+
+ + {{ opt.text }} + +
+
-
-
- +
+ +
does not render retry button if no error is present
- -
+
+
- - - - - - - - - - + + + + + + + + + + +
+ + Assistant +
- - Assistant - -
-
-

- Hi Max! Here is my top solution to fix the error in your - - Transform data - - node👇 -

- +
+

+ Hi Max! Here is my top solution to fix the error in your + + Transform data + + node👇 +

+ +
+ +
-
- +
- +
-
renders chat with messages correctly 1`] = `
- -
+
+
- - - - - - - - - - -
- - Assistant - -
-
-
-

- Hi Max! Here is my top solution to fix the error in your - - Transform data - - node👇 -

- - -
- - -
- -
-
- -
-
- Short solution description here that can spill over to two lines + + + + + + + + + +
+ + Assistant + +
+
+

+ Hi Max! Here is my top solution to fix the error in your + + Transform data + + node👇 +

-
-
- - - -
-
- -  -  - - - The Way that can be told of is not the eternal Way; - -
-
-
-
- - - -
-
- -  -  - - - The name that can be named is not the eternal name. - -
-
-
-
- - - -
-
- -  -  - - - The Named is the mother of all things. - -
-
-
-
- - - 1 -
-
- -  +  - - - The named is the mother of all things. - -
-
-
-
- - - 2 -
-
- -  +  - - -
-
-
-
- - - 3 -
-
- -     - - - The two are the same, - -
-
-
-
- - - 4 -
-
- -     - - - But after they are produced, - -
-
-
-
- - - 5 -
-
- -     - - - they have different names. - -
-
-
-
- - - 6 -
-
- -  +  - - - They both may be called deep and profound. - -
-
-
-
- - - 7 -
-
- -  +  - - - Deeper and more profound, - -
-
-
-
- - - 8 -
-
- -  +  - - - The door of all subtleties! - -
-
- -
-
- -
-
-
- -
-
-
- - - You - -
-
- -

- Give it to me - - ignore this markdown - -

- -
- - -
- -
-
-
-
- - - - - - - - - - -
- - Assistant - -
-
-
-
- Credential doesn’t have correct permissions to send a message -
+ + +
+ +
+
+ +
- + Short solution description here that can spill over to two lines +
+
-

- Solution steps: -

+
+
+ + + +
+
+ +  -  + + + The Way that can be told of is not the eternal Way; + +
+
+
+
+ + + +
+
+ +  -  + + + The name that can be named is not the eternal name. + +
+
+
+
+ + + +
+
+ +  -  + + + The Named is the mother of all things. + +
+
+
+
+ + + 1 +
+
+ +  +  + + + The named is the mother of all things. + +
+
+
+
+ + + 2 +
+
+ +  +  + + +
+
+
+
+ + + 3 +
+
+ +     + + + The two are the same, + +
+
+
+
+ + + 4 +
+
+ +     + + + But after they are produced, + +
+
+
+
+ + + 5 +
+
+ +     + + + they have different names. + +
+
+
+
+ + + 6 +
+
+ +  +  + + + They both may be called deep and profound. + +
+
+
+
+ + + 7 +
+
+ +  +  + + + Deeper and more profound, + +
+
+
+
+ + + 8 +
+
+ +  +  + + + The door of all subtleties! + +
+
+ +
+
+ +
+
+
+ +
+
+
+ + + You + +
+
+ +

+ Give it to me + + ignore this markdown + +

+ -
    + + + +
+ +
+
+
+
+ + + + + + + + + + +
+ + Assistant + +
+
+
+
+ Credential doesn’t have correct permissions to send a message + +
+
+ +

+ Solution steps: +

-
  • - Lorem ipsum dolor sit amet, consectetur - - adipiscing - - elit. Proin id nulla placerat, tristique ex at, euismod dui. -
  • - - -
  • - Copy this into somewhere -
  • - - -
  • - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin id nulla placerat, tristique ex at, euismod dui. -
  • - - -
  • - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin id nulla placerat, tristique ex at, euismod dui. -
    +
      + +
    1. + Lorem ipsum dolor sit amet, consectetur + + adipiscing + + elit. Proin id nulla placerat, tristique ex at, euismod dui. +
    2. + + +
    3. + Copy this into somewhere +
    4. + + +
    5. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin id nulla placerat, tristique ex at, euismod dui. +
    6. + + +
    7. + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin id nulla placerat, tristique ex at, euismod dui. +
      + Testing more code -
    8. + + + +
    - - +
      + -
        +
      • + Unordered item 1 +
      • + + +
      • + Unordered item 2 +
      • + + +
      -
    • - Unordered item 1 -
    • - - -
    • - Unordered item 2 -
    • - - -
    - - - - -
  • -
    -
    - -
    -
    - -
    -
    -
    - Short solution with min height -
    -
    - -
    -
    - - - -
    -
    - -  -  - - - The Way that can be told of is not the eternal Way; - -
    -
    -
    -
    - - - -
    -
    - -  -  - - - The name that can be named is not the eternal name. - -
    -
    -
    -
    - - - 1 -
    -
    - -  +  - - - The door of all subtleties! - -
    -
    -
    -
    - - - -
    -
    - -     - - -
    -
    - -
    -
    - + + +
    +
    -
    - Quick reply 👇 -
    - -
    - + +
    +
    +
    + Short solution with min height +
    +
    + +
    +
    + + + +
    +
    + +  -  + + + The Way that can be told of is not the eternal Way; + +
    +
    +
    +
    + + + +
    +
    + +  -  + + + The name that can be named is not the eternal name. + +
    +
    +
    +
    + + + 1 +
    +
    + +  +  + + + The door of all subtleties! + +
    +
    +
    +
    + + + +
    +
    + +     + + +
    +
    + +
    +
    + +
    +
    - +
    + Quick reply 👇 +
    + +
    + +
    +
    + +
    +
    -
    +
    - +
    -
    renders default placeholder chat correctly 1`] = `
    -
    renders end of session chat correctly 1`] = `
    - -
    +
    +
    - - - - - - - - - - -
    - - Assistant - -
    -
    -
    -

    - Hi Max! Here is my top solution to fix the error in your - - Transform data - - node👇 -

    - - -
    - - -
    - -
    -
    - -
    - - This Assistant session has ended. To start a new session with the Assistant, click an - - - - button in n8n - + + Assistant + +
    +
    +
    +

    + Hi Max! Here is my top solution to fix the error in your + + Transform data + + node👇 +

    + + +
    + + +
    +
    - +
    + +
    + + This Assistant session has ended. To start a new session with the Assistant, click an + + + + button in n8n + +
    + +
    +
    - +
    -
    renders error message correctly with retry button 1`
    - -
    +
    +
    - - - - - - - - - - + + + + + + + + + + +
    + + Assistant +
    - - Assistant - +
    + + ⚠️ This is an error message. + + +
    +
    -
    - - ⚠️ This is an error message. - - -
    - +
    - +
    -
    renders message with code snippet 1`] = `
    - -
    +
    +
    - - - - - - - - - - -
    - - Assistant - -
    -
    -
    -

    - Hi Max! Here is my top solution to fix the error in your - - Transform data - - node👇 -

    - - -
    -
    -
    + + + + + + + + + + +
    + + Assistant + +
    +
    +

    - node.on('input', function(msg) { -
    - -if (msg.seed) { dummyjson.seed = msg.seed; } -
    - -try { -
    - -var value = dummyjson.parse(node.template, {mockdata: msg}); -
    - -if (node.syntax === 'json') { -
    - -try { value = JSON.parse(value); } -
    - -catch(e) { node.error(RED._('datagen.errors.json-error')); } -
    - -} -
    - -if (node.fieldType === 'msg') { -
    - -RED.util.setMessageProperty(msg,node.field,value); -
    - -} -
    - -else if (node.fieldType === 'flow') { -
    - -node.context().flow.set(node.field,value); -
    - -} -
    - -else if (node.fieldType === 'global') { -
    - -node.context().global.set(node.field,value); -
    - -} -
    - -node.send(msg); -
    - -} -
    - -catch(e) { + Hi Max! Here is my top solution to fix the error in your + + Transform data + + node👇

    + +
    +
    + +
    +

    + node.on('input', function(msg) { +
    + +if (msg.seed) { dummyjson.seed = msg.seed; } +
    + +try { +
    + +var value = dummyjson.parse(node.template, {mockdata: msg}); +
    + +if (node.syntax === 'json') { +
    + +try { value = JSON.parse(value); } +
    + +catch(e) { node.error(RED._('datagen.errors.json-error')); } +
    + +} +
    + +if (node.fieldType === 'msg') { +
    + +RED.util.setMessageProperty(msg,node.field,value); +
    + +} +
    + +else if (node.fieldType === 'flow') { +
    + +node.context().flow.set(node.field,value); +
    + +} +
    + +else if (node.fieldType === 'global') { +
    + +node.context().global.set(node.field,value); +
    + +} +
    + +node.send(msg); +
    + +} +
    + +catch(e) { +

    +
    +
    +
    - +
    - +
    -
    renders streaming chat correctly 1`] = `
    - -
    +
    +
    - - - - - - - - - - + + + + + + + + + + +
    + + Assistant +
    - - Assistant - -
    -
    -

    - Hi Max! Here is my top solution to fix the error in your - - Transform data - - node👇 -

    - +
    +

    + Hi Max! Here is my top solution to fix the error in your + + Transform data + + node👇 +

    + +
    + +
    -
    - +
    - +
    -