docs: fix GitHub demo 500 by reading the playground LibrarySpec - #1220
Closed
devin-ai-integration[bot] wants to merge 1 commit into
Closed
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
Superseded by #1222, which switched the route to |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
openui.com/demo/githubreturnsError: Server error 500on every generation. The route crashes at module init:generatePrompt()throwsCannot convert undefined or null to objectonObject.values(spec.components).Root cause: the route read
generated/playground-component-spec.json, which is produced byopenui generate --json-schema. Since #1095 regenerated it, that flag emits a raw JSON Schema ({ $schema, type, properties, $defs }) instead of aPromptSpec-shaped object, sospec.componentsis undefined.Changes
generated/playground-system-prompt.spec.json(theLibrarySpecsidecar the playground prompt step already emits:{ root, components, componentGroups, schema }) instead.--json-schemastep fromgenerate:promptsand delete the staleplayground-component-spec.json, so there is a single source for the playground spec.Test Plan
generatePrompt({...spec, tools, editMode, ...})throws with the old file and produces a 28.9k-char prompt with the new file.prettier --checkandeslintclean on changed files.POST /api/demo/github/streamreturns empty 500;/api/playground/streamreaches OpenRouter fine, so the key/env is not the issue).Checklist
Link to Devin session: https://app.devin.ai/sessions/ad40852cdb2f4b2495d98767eed82628
Open in Devin Desktop: https://app.devin.ai/desktop/session/ad40852cdb2f4b2495d98767eed82628?variant=devin
Requested by: @zahlekhan