V0.8.0 async think loop #40

Merged
ton merged 50 commits from v0.8.0-async_think_loop into v0.8.0 2026-08-08 04:13:05 +00:00
Showing only changes of commit 4cb01c71bb - Show all commits
+5 -5
View File
@@ -81,7 +81,7 @@ function _agent_loop(agent::yiemAgent)
while msg === nothing
if isready(agent.inputChannel)
# message will be taken then process in _process_message()
# message will be taken in _process_message()
msg = fetch!(agent.inputChannel)
else
yield()
@@ -109,7 +109,7 @@ function _agent_loop(agent::yiemAgent)
# make active
if agent._state.activeRun == false
# Dispatch message through the processing pipeline
processing_task = @spawn _process_message(agent, msg)
processing_task = @spawn _process_message(agent)
agent._state.activeRun = true
end
@@ -173,7 +173,7 @@ should be implemented. Currently a placeholder that echoes back the received mes
julia> # Currently returns a placeholder echo response
```
"""
function _process_message(agent::yiemAgent, msg)::assistantMessage
function _process_message(agent::yiemAgent)::assistantMessage
# WORKING
# loop until llmCall() response didn't use tool calls
@@ -187,13 +187,13 @@ function _process_message(agent::yiemAgent, msg)::assistantMessage
# Call llmCall() (blocking — the task waits here)
# if LLM use tool calls
# if (LLM use tool calls)
# call executeToolCalls()
# save toolResults to agent._state.messages
# else
# else (LLM not use tool calls)
# break out of while loop
end