Devika is the first open-source implementation of an Agentic Software Engineer. Initially started as an open-source alternative to Devin.
Python
fix: duplicate folder structure and not able to write in input message
[email protected]75df1c640357
diff --git a/src/agents/coder/coder.py b/src/agents/coder/coder.pyindex b6c6ee0..217a1dd 100644--- a/src/agents/coder/coder.py+++ b/src/agents/coder/coder.py@@ -69,13 +69,13 @@ class Coder:project_name = project_name.lower().replace(" ", "-")for file in response:- file_path = f"{self.project_dir}/{project_name}/{file['file']}"- file_path_dir = file_path[:file_path.rfind("/")]+ file_path = os.path.join(self.project_dir, project_name, file['file'])+ file_path_dir = os.path.dirname(file_path)os.makedirs(file_path_dir, exist_ok=True)-- with open(file_path, "w") as f:- f.write(file["code"])+ with open(file_path, "w", encoding="utf-8") as f:+ f.write(file["code"])+return file_path_dirdef get_project_path(self, project_name: str):diff --git a/ui/src/lib/components/MessageInput.svelte b/ui/src/lib/components/MessageInput.svelteindex d3839d6..64d2a98 100644--- a/ui/src/lib/components/MessageInput.svelte+++ b/ui/src/lib/components/MessageInput.svelte@@ -5,12 +5,14 @@import { onMount } from "svelte";import { Icons } from "../icons";- let isAgentActive = false;let inference_time = 0;- if ($agentState !== null) {- isAgentActive = $agentState.agent_is_active;- }+ agentState.subscribe((value) => {+ if (value !== null && value.agent_is_active == false) {+ isSending.set(false);+ }+ });+let messageInput = "";async function handleSendMessage() {const projectName = localStorage.getItem("selectedProject");