Skip to content

Real portraits, 3D office scene, and reliable streaming chat#1

Draft
FrameworkOPS wants to merge 1 commit into
mainfrom
claude/enhance-office-api-fix-jbK14
Draft

Real portraits, 3D office scene, and reliable streaming chat#1
FrameworkOPS wants to merge 1 commit into
mainfrom
claude/enhance-office-api-fix-jbK14

Conversation

@FrameworkOPS
Copy link
Copy Markdown
Owner

Summary

  • API now returns answers. The previous SSE route swallowed errors (e.g. missing ANTHROPIC_API_KEY), so the client only saw "Stream failed" and showed a generic message. Switched to the AI SDK's streamText + toTextStreamResponse, validated env + payload, and the client now parses the plain text stream and renders the actual error from the server when something goes wrong.
  • Real-looking people. Replaced the cartoon SVG agents with photo headshots via next/image (stable URLs from randomuser.me), with animated talking / thinking overlays, an active aura glow, a soft shadow, and online status dot.
  • A real 3D office, not a shell. Rebuilt OfficeFloor as a depth-sorted scene: back wall with a framed night-city window, ceiling light strips, framed art and a Framework HQ plaque; perspective floor grid; six workstation pods scaled by depth, each with a chair, a 3D desk (top / front / legs / nameplate), monitor, perspective keyboard, and per-agent accessories (coffee with steam, plant, notebook, papers); ambient color glows and floating dust particles.

Test plan

  • Visit / — six workstations are visibly arranged with depth (back row smaller, front row larger) against a windowed back wall.
  • Each agent shows a real photo portrait (not the old SVG cartoon).
  • Without ANTHROPIC_API_KEY set, sending a message renders ⚠️ ANTHROPIC_API_KEY is not set on the server… inside the chat bubble.
  • With ANTHROPIC_API_KEY set, sending a message streams a real reply from the agent and the portrait shows the talking indicator while streaming.
  • npm run lint and npm run build both pass clean.

Generated by Claude Code

The chat API was streaming SSE that failed silently when ANTHROPIC_API_KEY
was missing (or any other server error fired) — the client only saw "Stream
failed" and showed a generic message. Switched to the AI SDK's streamText +
toTextStreamResponse so the route surfaces real error JSON with a 4xx/5xx
status, and the client renders the actual error in the chat bubble.

For the characters and office:
- Replaced the cartoon SVG agents with real photo portraits (next/image
  loading stable headshots from randomuser.me) plus animated overlays for
  thinking/talking states and an active-aura glow.
- Rebuilt OfficeFloor as a depth-sorted scene: back wall with night-city
  window, framed art and ceiling light strips; perspective floor grid;
  workstation pods scaled by depth with chair, 3D desk (top/front/legs),
  monitor, keyboard and per-agent accessories; ambient color glows and
  dust particles.
- Removed the unused legacy AgentCharacter component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants