mirror of
https://github.com/n8n-io/n8n.git
synced 2025-12-05 19:27:26 -06:00
fix(editor): Address chat UI feedback (no-changelog) (#22819)
This commit is contained in:
@@ -320,6 +320,7 @@ watch(
|
||||
[sessionId, isNewSession],
|
||||
async ([id, isNew]) => {
|
||||
didSubmitInCurrentSession.value = false;
|
||||
editingMessageId.value = undefined;
|
||||
|
||||
if (!isNew && !chatStore.getConversation(id)) {
|
||||
try {
|
||||
@@ -365,7 +366,7 @@ watch(
|
||||
watch(
|
||||
defaultAgent,
|
||||
(agent, prevAgent) => {
|
||||
if (defaultModel.value && agent && agent.name !== prevAgent?.name) {
|
||||
if (defaultModel.value && agent?.name && agent.name !== prevAgent?.name) {
|
||||
defaultModel.value = { ...defaultModel.value, cachedDisplayName: agent.name };
|
||||
}
|
||||
|
||||
|
||||
@@ -114,6 +114,11 @@ function handleConfirmEdit() {
|
||||
}
|
||||
|
||||
function handleKeydownTextarea(e: KeyboardEvent) {
|
||||
if (e.key === 'Escape') {
|
||||
emit('cancelEdit');
|
||||
return;
|
||||
}
|
||||
|
||||
const trimmed = editedText.value.trim();
|
||||
|
||||
if (e.key === 'Enter' && isCtrlKeyPressed(e) && !e.isComposing && trimmed) {
|
||||
|
||||
@@ -125,6 +125,8 @@ function handleSubmitForm() {
|
||||
function handleKeydownTextarea(e: KeyboardEvent) {
|
||||
const trimmed = message.value.trim();
|
||||
|
||||
speechInput.stop();
|
||||
|
||||
if (e.key === 'Enter' && !e.shiftKey && !e.isComposing && trimmed) {
|
||||
e.preventDefault();
|
||||
speechInput.stop();
|
||||
|
||||
@@ -108,9 +108,9 @@ defineSlots<{
|
||||
|
||||
.actionDropdown {
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
flex-shrink: 0;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
|
||||
.menuItem:has([aria-expanded='true']) &,
|
||||
.menuItem:has(:focus) &,
|
||||
|
||||
Reference in New Issue
Block a user