devika icon indicating copy to clipboard operation
devika copied to clipboard

get-agent-state state null

Open sangkyuleeKOR opened this issue 2 years ago • 7 comments

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?

devika ollama ui

It seems the agent is not connected to the project.

sangkyuleeKOR avatar Mar 24 '24 06:03 sangkyuleeKOR

edit cody.py " response = response.strip()

    response = response.split("```", 1)[1]
    response = response[:response.rfind("```")]"

Mason-zy avatar Mar 24 '24 06:03 Mason-zy

thanks for your reply! I edited ~~~ to ```, and then I tried it. But it still hangs indefinitely.

sangkyuleeKOR avatar Mar 24 '24 06:03 sangkyuleeKOR

I am also facing this problem? any suggestions? Devika's Internal Monologue 😴

Manoj-Madushantha avatar Mar 24 '24 07:03 Manoj-Madushantha

same here

abinovarghese avatar Mar 24 '24 12:03 abinovarghese

me too

Wenqiaog avatar Mar 24 '24 13:03 Wenqiaog

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 = "";

  }

miterfrants avatar Mar 24 '24 19:03 miterfrants

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 = "";

}

ndizeye-patrick avatar Mar 25 '24 07:03 ndizeye-patrick

fetch the latest changes. already fixed

ARajgor avatar Apr 03 '24 18:04 ARajgor