You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Default function to retrieve the last user message for navigation scenarios.
101
+
* Returns the last user message unchanged, ignoring the client and agent parameters.
102
+
*
103
+
* @param {SessionId} _ - The client session ID (unused).
104
+
* @param {string} lastMessage - The last user message to be returned.
105
+
* @param {AgentName} lastAgent - The previous agent name (unused).
106
+
* @returns {string} The last user message.
107
+
*/
108
+
constDEFAULT_LAST_MESSAGE_FN=(
109
+
_: SessionId,
110
+
lastMessage: string,
111
+
lastAgent: AgentName
112
+
)=>`User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation without navigation to ${lastAgent}`;
113
+
93
114
/**
94
115
* Creates a function to navigate to a specified agent for a given client, handling navigation, message execution, emission, and tool output.
95
116
* The factory generates a handler that checks navigation state, retrieves the last user message, commits tool outputs, and triggers execution or emission based on provided parameters.
`I have been talking with ${lastAgent}. The last message was: ${lastMessage}`;
78
+
`User changed conversation topic. The next message recieved: ${lastMessage}. Continue conversation based on the last message without navigating to ${defaultAgent}.`;
79
79
80
80
/**
81
81
* Creates a function to navigate to a triage agent for a specific client, handling navigation, message execution, and tool output.
0 commit comments