Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/services/agent-manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ export async function createAgentManager(agent: string, options: AgentManagerOpt
{ onMessage, onError: options.callbacks.onError },
options.externalId
);

const initPromise = retryOperation(
() =>
initializeStreamAndChat(
Expand Down Expand Up @@ -300,7 +299,11 @@ export async function createAgentManager(agent: string, options: AgentManagerOpt
};

const sendChatRequest = async (messages: Message[], chatId: string) => {
const chatRequestFn = isStreamsV2
// For playground mode, always use v1 path
const isPlayground = items.chatMode === ChatMode.Playground;
const useV2Path = isStreamsV2 && !isPlayground;

const chatRequestFn = useV2Path
? async () => {
await items.streamingManager?.sendTextMessage?.(userMessage);
return Promise.resolve({} as ChatResponse);
Expand Down