-
Notifications
You must be signed in to change notification settings - Fork 1
Command mode experiment #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…e2e example; plugin fallback+filters
…date system prompt and tool reference
…mmand; concise tool overview and guidance-only notes
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds command mode experiment support, introducing a unified command interface for interacting with Roblox Studio through a text-based command system. The changes implement a new run_command tool that provides simplified syntax for common operations like creating models, parts, setting properties, and asset manipulation.
Key changes:
- Added
run_commandtool with text-based command parsing (create_model, create_part, set_props, rename, delete, insert_asset) - Implemented manual mode for asset-restricted builds with improved fallback mechanisms
- Enhanced asset search and insertion with scoring, sorting, and failure tracking systems
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vector/plugin/src/main.server.lua | Core plugin enhancements with asset search improvements, scoring system, and manual mode support |
| vector/plugin/src/tools/create_instance.lua | Added idempotency check to reuse existing instances with matching names and classes |
| vector/apps/web/lib/orchestrator/index.ts | Major orchestrator updates with run_command tool, manual mode logic, and asset-first enforcement |
| vector/apps/web/lib/tools/schemas.ts | Added run_command tool schema definition |
| vector/apps/web/lib/orchestrator/taskState.ts | Extended task state with manual mode and asset operation counters |
| vector/apps/web/scripts/test-workflow-hospital.ts | New workflow test script for hospital building scenarios |
| vector/apps/web/package.json | Added test script for hospital workflow |
| vector/apps/web/lib/orchestrator/prompts/examples.ts | Simplified prompt examples focusing on command-based approach |
| vector/apps/web/lib/orchestrator/README.md | Updated documentation explaining manual mode behavior |
| vector/apps/web/lib/catalog/search.ts | Enhanced catalog search with creator metadata and higher limits |
| vector/apps/web/app/api/proposals/[id]/apply/route.ts | Added manual mode state management and verbose asset operation logging |
| vector/apps/web/app/api/assets/search/route.ts | Increased search limit from 50 to 60 results |
| vector/plugin/Vector.rbxmx | Duplicate of main.server.lua changes in the plugin bundle |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if ROBLOX_ONLY and not isRobloxEntry(entry) then | ||
| -- skip non-Roblox entries when filter is active | ||
| else | ||
| seenAsset[assetId] = true | ||
| entry.__score = computeCatalogScore(entry, pageIndex * 100 + resultIndex) | ||
| entry.__pageIndex = pageIndex | ||
| entry.__resultIndex = resultIndex | ||
| table.insert(candidates, entry) | ||
| end |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The if-else structure for ROBLOX_ONLY filtering has inconsistent indentation and could be simplified for better readability. Consider extracting the filtering logic or restructuring the conditional flow.
| if ROBLOX_ONLY and not isRobloxEntry(entry) then | ||
| -- skip | ||
| else | ||
| seenAsset[assetId] = true | ||
| entry.__score = computeCatalogScore(entry, pageIndex * 100 + resultIndex) | ||
| entry.__pageIndex = pageIndex | ||
| entry.__resultIndex = resultIndex | ||
| table.insert(candidates, entry) | ||
| end |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is duplicate logic from lines 1036-1044. Consider extracting this filtering and scoring logic into a helper function to reduce code duplication.
| } | ||
|
|
||
| if (!fallbacksDisabled) { | ||
| if (fallbacksDisabled) { |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic error: the condition should be !fallbacksDisabled to match the comment and intended behavior. The current condition will trigger the error message when fallbacks are disabled, but the surrounding logic expects this block to run when fallbacks are enabled.
| if (fallbacksDisabled) { | |
| if (!fallbacksDisabled) { |
| } | ||
| if (!state.policy || typeof state.policy !== 'object') { | ||
| state.policy = { geometryOps: 0, luauEdits: 0 } | ||
| state.policy = { geometryOps: 0, luauEdits: 0, assetSearches: 0, assetInserts: 0, manualMode: false } |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The policy object initialization is duplicated on line 138 with the same structure. Consider extracting this to a helper function createDefaultPolicy() to ensure consistency and reduce duplication.
| url.searchParams.set('includeOnlyVerifiedCreators', 'false') | ||
| // Free-only via price caps in cents | ||
| if (String(process.env.CATALOG_FREE_ONLY || '0') === '1') { | ||
| if (String(process.env.CATALOG_FREE_ONLY || '1') === '1') { |
Copilot
AI
Oct 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value for CATALOG_FREE_ONLY has changed from '0' to '1', but this differs from the Roblox catalog implementation on line 122 which still uses '0'. This inconsistency could lead to different filtering behavior between catalog sources.
| if (String(process.env.CATALOG_FREE_ONLY || '1') === '1') { | |
| if (String(process.env.CATALOG_FREE_ONLY || '0') === '1') { |
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||||||||
…lete blocks; keep run_command flow
…st_children with applied ops
PR Type
Enhancement
Description
Add run_command tool for unified object operations
Implement manual mode with asset filtering and fallback
Simplify system prompt and tool guidance
Enhance asset search with limit 60 and filtering
Diagram Walkthrough
flowchart LR A["User Request"] --> B["run_command Tool"] B --> C["Parse Command Verbs"] C --> D["create_model/create_part/set_props"] A --> E["Asset Search"] E --> F{"Manual Mode?"} F -->|Yes| G["Block Assets"] F -->|No| H["Enhanced Filtering"] H --> I["Fallback to Manual"] I --> G G --> J["Manual Geometry"]File Walkthrough
9 files
Add run_command tool and manual mode logicIncrease search limit to 60 and add metadataAdd manual mode state and asset loggingAdd manual mode and asset counters to stateUpdate search limit to 60Add run_command tool schemaAdd asset filtering and fallback mechanismsAdd idempotency check for existing instancesUpdate plugin with asset filtering and fallback2 files
Simplify system prompt and tool guidanceDocument manual mode and plan behavior1 files
Add hospital workflow end-to-end test1 files
Add hospital workflow test script