perf: remove raw field from timeline items to reduce payload size
Remove the `raw` field that was duplicating provider data in timeline items, reducing WebSocket payload sizes by 64-85%: - session_state: ~320KB → ~48KB - agent_stream_snapshot: ~320KB → ~114KB Changes: - Remove raw from AgentTimelineItem, AgentStreamEvent, AgentPermissionRequest - Remove raw assignments from claude-agent.ts and codex-agent.ts - Remove provider_event handling from stream.ts (only used for Codex raw) - Update tests to reflect new behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -352,14 +352,13 @@ export class AgentManager {
|
||||
recordUserMessage(
|
||||
agentId: string,
|
||||
text: string,
|
||||
options?: { messageId?: string; raw?: unknown }
|
||||
options?: { messageId?: string }
|
||||
): void {
|
||||
const agent = this.requireAgent(agentId);
|
||||
const item: AgentTimelineItem = {
|
||||
type: "user_message",
|
||||
text,
|
||||
messageId: options?.messageId,
|
||||
raw: options?.raw,
|
||||
};
|
||||
agent.updatedAt = new Date();
|
||||
agent.lastUserMessageAt = agent.updatedAt;
|
||||
|
||||
Reference in New Issue
Block a user