Skip to content

Playground: add video generation support and refactor token context setup - #3

Merged
LJR199887 merged 2 commits into
mainfrom
codex/find-project-purpose-8t1iot
Mar 28, 2026
Merged

Playground: add video generation support and refactor token context setup#3
LJR199887 merged 2 commits into
mainfrom
codex/find-project-purpose-8t1iot

Conversation

@LJR199887

Copy link
Copy Markdown
Owner

Motivation

  • Add first-class video generation support in the Playground including UI controls, request building, and task fetching.
  • Ensure token/context setup for playground routes is centralized and reused across chat and video flows.
  • Extend request schema to include common video parameters so the relay can pass them upstream.

Description

  • Introduce setupPlaygroundTokenContext to centralize writing user context and temporary token setup and update Playground to use it via Relay.
  • Add PlaygroundVideoSubmit and PlaygroundVideoFetch handlers and register new routes POST /pg/video/generations and GET /pg/video/generations/:task_id in the router.
  • Extend GeneralOpenAIRequest with seconds and quality fields to support video generation parameters.
  • Frontend changes: add video controls to SettingsPanel (size, seconds, quality), add constants and defaults in playground.constants.js, and wire those fields into payload construction in helpers/api.js where video requests force non-streaming and set size, seconds, and quality.
  • Update useApiRequest hook to detect video payloads, build a simplified video request payload from the last user message (extracting text and image), route requests to API_ENDPOINTS.VIDEO_GENERATIONS, handle non-stream responses for video tasks by summarizing task info into the message, and ensure streaming logic respects endpoints that must be non-streaming.

Testing

  • Ran backend unit tests with go test ./... which completed successfully.
  • Built the frontend with yarn build and ran type checks/linting, which succeeded.
  • Performed integration smoke checks by exercising the new /pg/video/generations submit and fetch flows which returned expected task summaries in the Playground UI.

Codex Task

@LJR199887
LJR199887 merged commit 8e89b09 into main Mar 28, 2026
@LJR199887
LJR199887 deleted the codex/find-project-purpose-8t1iot branch March 28, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant