-
Notifications
You must be signed in to change notification settings - Fork 49k
feat(core): New 'chat' execution mode for Chat hub (no-changelog) #21306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
BundleMonUnchanged files (2)
No change in files bundle size Groups updated (2)
Final result: ✅ View report in BundleMon website ➡️ |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
6184ed7 to
cc1f904
Compare
cc1f904 to
f0f4326
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 9 files
Prompt for AI agents (all 2 issues)
Understand the root cause of the following 2 issues and fix them.
<file name="packages/cli/src/modules/chat-hub/chat-hub.service.ts">
<violation number="1" location="packages/cli/src/modules/chat-hub/chat-hub.service.ts:825">
Construction of `IRunExecutionData` for chat message workflows duplicates logic in `prepareCustomAgentWorkflow` and `prepareChatWorkflow`. This pattern should be extracted into a shared private helper function.</violation>
</file>
<file name="packages/frontend/editor-ui/src/features/execution/executions/components/global/GlobalExecutionsListItem.vue">
<violation number="1" location="packages/frontend/editor-ui/src/features/execution/executions/components/global/GlobalExecutionsListItem.vue:266">
Please source the tooltip content from locale.baseText (or equivalent i18n) instead of hardcoding English strings so these labels localize correctly.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| waitingExecutionSource: {}, | ||
| }, | ||
| manualData: { | ||
| userId: user.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Construction of IRunExecutionData for chat message workflows duplicates logic in prepareCustomAgentWorkflow and prepareChatWorkflow. This pattern should be extracted into a shared private helper function.
Prompt for AI agents
Address the following comment on packages/cli/src/modules/chat-hub/chat-hub.service.ts at line 825:
<comment>Construction of `IRunExecutionData` for chat message workflows duplicates logic in `prepareCustomAgentWorkflow` and `prepareChatWorkflow`. This pattern should be extracted into a shared private helper function.</comment>
<file context>
@@ -797,42 +789,48 @@ export class ChatHubService {
+ waitingExecutionSource: {},
+ },
+ manualData: {
+ userId: user.id,
+ },
+ };
</file context>
| </td> | ||
| <td> | ||
| <N8nIcon v-if="execution.mode === 'manual'" icon="flask-conical" /> | ||
| <N8nTooltip v-if="execution.mode === 'manual'" content="Manual Execution" placement="top"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please source the tooltip content from locale.baseText (or equivalent i18n) instead of hardcoding English strings so these labels localize correctly.
Prompt for AI agents
Address the following comment on packages/frontend/editor-ui/src/features/execution/executions/components/global/GlobalExecutionsListItem.vue at line 266:
<comment>Please source the tooltip content from locale.baseText (or equivalent i18n) instead of hardcoding English strings so these labels localize correctly.</comment>
<file context>
@@ -263,7 +263,12 @@ async function handleActionItemClick(commandData: Command) {
</td>
<td>
- <N8nIcon v-if="execution.mode === 'manual'" icon="flask-conical" />
+ <N8nTooltip v-if="execution.mode === 'manual'" content="Manual Execution" placement="top">
+ <N8nIcon icon="flask-conical" />
+ </N8nTooltip>
</file context>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| waitingExecutionSource: {}, | ||
| }, | ||
| manualData: { | ||
| userId: user.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not much, it's just execution metadata, this way it also gets passed also to queue workers in queue mode and gets copied to https://github.com/n8n-io/n8n/blob/master/packages/cli/src/scaling/job-processor.ts#L201 execution data here in that case I believe.
This is similar to what manual executions did before - chat executions should still count as executions triggered by users so I kept this
|
E2E Tests: n8n tests passed after 7m 32.1s Run Details
Groups
This message was posted automatically by
currents.dev | Integration Settings
|
Summary
This PR adds a new
chatexecution mode, to be used with chat workflow executions on the n8n Chat tool.Before these executions were manual, but now they can be differentiated from other executions.
Also changed slightly how we invoke the executions, as the logic specific to manual executions doesn't apply anymore.
We can later filter executions by this execution mode.
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/CHA-24/new-execution-mode-for-chats
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)