fix(relay): send conversation history to SaaS relay (BUG-008)
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
SaaS Relay was sending only the current message without conversation history, giving LLM no context from previous turns. Root cause: streamStore passed only `content` string to chatStream(), and saas-relay-client hard-coded a single-element messages array. Fix: - GatewayClient.chatStream() opts: add `history` field - streamStore: extract last 20 messages as history before calling chatStream - saas-relay-client: build messages array from history + current message
This commit is contained in:
@@ -481,6 +481,8 @@ export class GatewayClient {
|
||||
reasoning_effort?: string;
|
||||
plan_mode?: boolean;
|
||||
subagent_enabled?: boolean;
|
||||
/** Conversation history for relay clients that need full context */
|
||||
history?: Array<{ role: string; content: string }>;
|
||||
}
|
||||
): Promise<{ runId: string }> {
|
||||
const agentId = opts?.agentId || this.defaultAgentId;
|
||||
|
||||
Reference in New Issue
Block a user