@n8n/chat 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
|
-
import type { PropType } from 'vue';
|
|
4
3
|
import { computed, toRefs } from 'vue';
|
|
5
4
|
import VueMarkdown from 'vue-markdown-render';
|
|
6
5
|
import hljs from 'highlight.js/lib/core';
|
|
@@ -9,12 +8,9 @@ import type MarkdownIt from 'markdown-it';
|
|
|
9
8
|
import type { ChatMessage, ChatMessageText } from '@n8n/chat/types';
|
|
10
9
|
import { useOptions } from '@n8n/chat/composables';
|
|
11
10
|
|
|
12
|
-
const props = defineProps
|
|
13
|
-
message:
|
|
14
|
-
|
|
15
|
-
required: true,
|
|
16
|
-
},
|
|
17
|
-
});
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
message: ChatMessage;
|
|
13
|
+
}>();
|
|
18
14
|
|
|
19
15
|
const { message } = toRefs(props);
|
|
20
16
|
const { options } = useOptions();
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import type { PropType } from 'vue';
|
|
3
2
|
import { computed } from 'vue';
|
|
4
3
|
import { Message } from './index';
|
|
5
4
|
import type { ChatMessage } from '@n8n/chat/types';
|
|
6
5
|
|
|
7
|
-
const props =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const props = withDefaults(
|
|
7
|
+
defineProps<{
|
|
8
|
+
animation?: 'bouncing' | 'scaling';
|
|
9
|
+
}>(),
|
|
10
|
+
{
|
|
11
|
+
animation: 'bouncing',
|
|
11
12
|
},
|
|
12
|
-
|
|
13
|
+
);
|
|
13
14
|
|
|
14
15
|
const message: ChatMessage = {
|
|
15
16
|
id: 'typing',
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import type { PropType } from 'vue';
|
|
3
2
|
import Message from '@n8n/chat/components/Message.vue';
|
|
4
3
|
import type { ChatMessage } from '@n8n/chat/types';
|
|
5
4
|
import MessageTyping from '@n8n/chat/components/MessageTyping.vue';
|
|
6
5
|
import { useChat } from '@n8n/chat/composables';
|
|
7
6
|
|
|
8
|
-
defineProps
|
|
9
|
-
messages:
|
|
10
|
-
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
});
|
|
7
|
+
defineProps<{
|
|
8
|
+
messages: ChatMessage[];
|
|
9
|
+
}>();
|
|
14
10
|
|
|
15
11
|
const chatStore = useChat();
|
|
16
12
|
|
package/vite.config.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { defineConfig } from 'vite';
|
|
2
|
-
import checker from 'vite-plugin-checker';
|
|
3
2
|
import { resolve } from 'path';
|
|
4
3
|
import vue from '@vitejs/plugin-vue';
|
|
5
4
|
import icons from 'unplugin-icons/vite';
|
|
@@ -8,21 +7,16 @@ import dts from 'vite-plugin-dts';
|
|
|
8
7
|
const includeVue = process.env.INCLUDE_VUE === 'true';
|
|
9
8
|
const srcPath = resolve(__dirname, 'src');
|
|
10
9
|
|
|
11
|
-
const plugins = [
|
|
12
|
-
vue(),
|
|
13
|
-
icons({
|
|
14
|
-
compiler: 'vue3',
|
|
15
|
-
autoInstall: true,
|
|
16
|
-
}),
|
|
17
|
-
dts(),
|
|
18
|
-
];
|
|
19
|
-
if (!process.env.VITEST) {
|
|
20
|
-
plugins.push(checker({ vueTsc: true }));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
10
|
// https://vitejs.dev/config/
|
|
24
11
|
export default defineConfig({
|
|
25
|
-
plugins
|
|
12
|
+
plugins: [
|
|
13
|
+
vue(),
|
|
14
|
+
icons({
|
|
15
|
+
compiler: 'vue3',
|
|
16
|
+
autoInstall: true,
|
|
17
|
+
}),
|
|
18
|
+
dts(),
|
|
19
|
+
],
|
|
26
20
|
resolve: {
|
|
27
21
|
alias: {
|
|
28
22
|
'@': srcPath,
|
|
@@ -52,7 +46,7 @@ export default defineConfig({
|
|
|
52
46
|
? {}
|
|
53
47
|
: {
|
|
54
48
|
vue: 'Vue',
|
|
55
|
-
|
|
49
|
+
},
|
|
56
50
|
},
|
|
57
51
|
},
|
|
58
52
|
},
|