get-agent-state state null
The installation appears to have been successful The api key was also written in config.toml, but no matter how many messages I sent to the UI, there was no response. What are the potential problems?
It seems the agent is not connected to the project.
edit cody.py " response = response.strip()
response = response.split("```", 1)[1]
response = response[:response.rfind("```")]"
thanks for your reply! I edited ~~~ to ```, and then I tried it. But it still hangs indefinitely.
I am also facing this problem? any suggestions? Devika's Internal Monologue 😴
same here
me too
try to edit MessageInput.svelte handleSendMessage function
async function handleSendMessage() {
const projectName = localStorage.getItem("selectedProject");
if (!projectName) {
alert("Please select a project first!");
return;
}
if (messageInput.trim() === "") {
messageInput = "";
return;
}
if (isAgentActive) {
console.log("Sending message", messageInput);
await sendMessage(messageInput);
messageInput = "";
}
console.log("Executing agent", messageInput);
await executeAgent(messageInput);
messageInput = "";
}
this can be better
async function handleSendMessage() {
const projectName = localStorage.getItem("selectedProject");
if (!projectName) {
alert("Please select a project first!");
return;
}
const trimmedInput = messageInput.trim(); // Trim the input to remove whitespace
if (trimmedInput === "") {
// Clear the message input if it's empty or contains only whitespace
messageInput = "";
return;
}
if (isAgentActive) {
console.log("Sending message", trimmedInput);
await sendMessage(trimmedInput);
} else {
console.log("Executing agent", trimmedInput);
await executeAgent(trimmedInput);
}
// Clear the message input after sending or executing
messageInput = "";
}
fetch the latest changes. already fixed