diff --git a/packages/@n8n/chat/src/components/ChatFile.vue b/packages/@n8n/chat/src/components/ChatFile.vue index d3c3c2db7d..52b4acf789 100644 --- a/packages/@n8n/chat/src/components/ChatFile.vue +++ b/packages/@n8n/chat/src/components/ChatFile.vue @@ -30,22 +30,23 @@ const TypeIcon = computed(() => { }); function onClick() { - if (props.isRemovable) { - emit('remove', props.file); - } - if (props.isPreviewable) { window.open(URL.createObjectURL(props.file)); } } +function onDelete() { + emit('remove', props.file); +} @@ -80,12 +81,25 @@ function onClick() { .chat-file-preview { background: none; border: none; - display: none; + display: block; cursor: pointer; flex-shrink: 0; +} - .chat-file:hover & { - display: block; +.chat-file-delete { + position: relative; + &:hover { + color: red; + } + + /* Increase hit area for better clickability */ + &:before { + content: ''; + position: absolute; + top: -10px; + right: -10px; + bottom: -10px; + left: -10px; } } diff --git a/packages/@n8n/chat/src/components/Input.vue b/packages/@n8n/chat/src/components/Input.vue index 545d9aa1ed..2dfd6e754f 100644 --- a/packages/@n8n/chat/src/components/Input.vue +++ b/packages/@n8n/chat/src/components/Input.vue @@ -1,18 +1,28 @@ @@ -20,7 +23,12 @@ defineProps<{
- Latest Logs from {{ node?.name }} node + {{ locale.baseText('chat.window.logs') }} + + {{ + locale.baseText('chat.window.logsFromNode', { interpolate: { nodeName: node.name } }) + }} +
diff --git a/packages/editor-ui/src/components/CanvasChat/components/ChatMessagesPanel.vue b/packages/editor-ui/src/components/CanvasChat/components/ChatMessagesPanel.vue index e90299009f..cf7604ccbc 100644 --- a/packages/editor-ui/src/components/CanvasChat/components/ChatMessagesPanel.vue +++ b/packages/editor-ui/src/components/CanvasChat/components/ChatMessagesPanel.vue @@ -9,7 +9,7 @@ import type { ArrowKeyDownPayload } from '@n8n/chat/components/Input.vue'; import ChatInput from '@n8n/chat/components/Input.vue'; import { useMessage } from '@/composables/useMessage'; import { MODAL_CONFIRM } from '@/constants'; -import { ref } from 'vue'; +import { computed, ref } from 'vue'; import { useClipboard } from '@/composables/useClipboard'; import { useToast } from '@/composables/useToast'; @@ -20,6 +20,7 @@ interface Props { } const props = defineProps(); + const emit = defineEmits<{ displayExecution: [id: string]; sendMessage: [message: string]; @@ -33,6 +34,12 @@ const toast = useToast(); const previousMessageIndex = ref(0); +const inputPlaceholder = computed(() => { + if (props.messages.length > 0) { + return locale.baseText('chat.window.chat.placeholder'); + } + return locale.baseText('chat.window.chat.placeholderPristine'); +}); /** Checks if message is a text message */ function isTextMessage(message: ChatMessage): message is ChatMessageText { return message.type === 'text' || !message.type; @@ -61,11 +68,11 @@ async function onRefreshSession() { } const confirmResult = await messageComposable.confirm( - 'Are you sure you want to refresh the session? This will clear all messages and current execution data.', + locale.baseText('chat.window.session.reset.warning'), { - title: 'Confirm to refresh the session', + title: locale.baseText('chat.window.session.reset.title'), type: 'warning', - confirmButtonText: 'Refresh Session', + confirmButtonText: locale.baseText('chat.window.session.reset.confirm'), showClose: true, }, ); @@ -115,9 +122,9 @@ function copySessionId() {