@brian-mulier-p just a comment that if we don't make this one in 0.13.0 it's fine, just an edge case 

[UI] Add a better error message when trying to create a flow file with the wrong extension e.g. `flow.py`
### Feature description

Currently, if you add a flow in the `_flows` directory:
1.  Without any extension e.g. "myflow" -- it works - kestra will create a flow "myflow" and will add it as a file `myflow.yml`
2. With the wrong extension e.g. "myflow.py" or "myflow.txt", it will create the flow properly "myflow.yml" but it will also show an error page, even though the flow gets added correctly:

![image](https://github.com/kestra-io/kestra/assets/86264395/2307287b-60e8-498b-9df1-f03ec94770c1)

So we need to either:
1. Display an error message that only ".yml" extension is allowed when adding files to the `_flows` directory
2. Fix the API response to avoid the error page 
ui/src/components/namespace/Editor.vue
ui/src/components/namespace/Editor.vue
diff --git a/ui/src/components/namespace/Editor.vue b/ui/src/components/namespace/Editor.vue
index 046c74829f..6442817617 100644
--- a/ui/src/components/namespace/Editor.vue
+++ b/ui/src/components/namespace/Editor.vue
@@ -70,9 +70,12 @@
             window.addEventListener("message", (event) => {
                 const message = event.data;
                 if (message.type === "kestra.tabFileChanged") {
-                    const path = `/${this.namespace}/_flows/`;
-                    if (message.filePath.path.startsWith(path)) {
-                        this.flow = message.filePath.path.split(path)[1].replace(".yml", "");
+                    const flowsFolderPath = `/${this.namespace}/_flows/`;
+                    const filePath = message.filePath.path;
+                    if (filePath.startsWith(flowsFolderPath)) {
+                        const fileName = filePath.split(flowsFolderPath)[1];
+                        // trim the eventual extension
+                        this.flow = fileName.split(".")[0];
                     } else {
                         this.flow = null;
                     }
