AI Assistant: in-editor scene-editing agent (experiment) - #1449
Open
nearnshaw wants to merge 5 commits into
Open
AI Assistant: in-editor scene-editing agent (experiment)#1449nearnshaw wants to merge 5 commits into
nearnshaw wants to merge 5 commits into
Conversation
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 this is
An experimental AI Assistant panel inside the Creator Hub editor: a chat sidebar that edits the open scene's files locally using a coding agent, with real-time streaming, per-scene conversation persistence, and subscription-based sign-in. The agent runs entirely on the user's machine against the scene folder — no server component.
How it works
Agent harness
@mariozechner/pi-coding-agent, the agent underlying OpenDCL) directly in RPC/JSONL mode, one process per open scene, bridged to the renderer chat UI over IPC (main/src/modules/ai.ts).@dcl-regenesislabs/opendclpackage is kept purely as an asset carrier: we build the system prompt from itsprompts/system.md+ SDK7 context docs, and cherry-pick two of its extensions —dcl-context(injects scene.json metadata into the prompt) anddcl-validate(auto-runstsc --noEmitafter every TypeScript write).dcl-asset-pathis deliberately excluded: its case-sensitive path guard rejects the Creator Hubassets/Models/convention and steers downloads to a rootmodels/dir the Creator Hub can't see.Official SDK skills, auto-installed
decentraland/sdk-skillsare downloaded (cached app-wide by commit sha, 24h refresh) and synced into<project>/.agents/skills/(main/src/modules/sdk-skills.ts). A marker file tracks ownership so user-added skills are never touched and upstream removals are cleaned up. opendcl's bundled (outdated) skills are only an offline-first-run fallback.Auth: sign in with an existing AI subscription
main/src/modules/ai-auth.ts) — browser-based PKCE for Anthropic/Codex, device-code for Copilot — with progress, device-code instructions, and manual-code fallback streamed to the UI. An Anthropic API key remains available as the manual alternative.~/.opendcl/agent/auth.json; the spawned agent reads and auto-refreshes them itself (PI_CODING_AGENT_DIRis passed explicitly so main-process writes and agent reads can never diverge).Conversation persistence
--continue, and pi keys sessions by cwd — so history is per scene and survives panel close and app restarts.get_messagesRPC command (request/response correlation with timeouts inai.ts); a header button starts a fresh conversation vianew_session.Editor integration
Testing
claude-sonnet-4-5, session restore + fresh-session both work against a real scene.🤖 Generated with Claude Code