mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
feat(agent): split queue into steer() and followUp() APIs
Breaking change: replaces queueMessage() with two separate methods: - steer(msg): interrupt mid-run, delivered after current tool execution - followUp(msg): wait until agent finishes before delivery Also renames: - queueMode -> steeringMode/followUpMode - getQueuedMessages -> getSteeringMessages/getFollowUpMessages Refs #403
This commit is contained in:
parent
345fa975f1
commit
d0a4c37028
4 changed files with 175 additions and 90 deletions
|
|
@ -340,8 +340,8 @@ describe("agentLoop with AgentMessage", () => {
|
|||
const config: AgentLoopConfig = {
|
||||
model: createModel(),
|
||||
convertToLlm: identityConverter,
|
||||
getQueuedMessages: async () => {
|
||||
// Return queued message after first tool executes
|
||||
getSteeringMessages: async () => {
|
||||
// Return steering message after first tool executes
|
||||
if (executed.length === 1 && !queuedDelivered) {
|
||||
queuedDelivered = true;
|
||||
return [queuedUserMessage];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue