feat(scenarios): link scenarios to a default environment
- add optional ManyToOne relation from scenario to environment entity - expose environmentId in create/update DTOs, service, and MCP tools - pre-select linked environment in run modals on detail and list pages - add environment selector to create/edit scenario forms - show linked environment as a navigable link on scenario detail page
This commit is contained in:
@@ -472,13 +472,18 @@ export class McpService {
|
||||
.string()
|
||||
.optional()
|
||||
.describe("Optional markdown description"),
|
||||
environmentId: z
|
||||
.uuid()
|
||||
.optional()
|
||||
.describe("Optional linked environment ID"),
|
||||
},
|
||||
},
|
||||
async ({ name, description }) => {
|
||||
async ({ name, description, environmentId }) => {
|
||||
try {
|
||||
const scenario = await this.scenarioService.create({
|
||||
name,
|
||||
description,
|
||||
environmentId,
|
||||
});
|
||||
return {
|
||||
content: [
|
||||
@@ -505,13 +510,19 @@ export class McpService {
|
||||
.string()
|
||||
.optional()
|
||||
.describe("New markdown description"),
|
||||
environmentId: z
|
||||
.uuid()
|
||||
.nullable()
|
||||
.optional()
|
||||
.describe("Linked environment ID (null to unlink)"),
|
||||
},
|
||||
},
|
||||
async ({ id, name, description }) => {
|
||||
async ({ id, name, description, environmentId }) => {
|
||||
try {
|
||||
const scenario = await this.scenarioService.update(id, {
|
||||
name,
|
||||
description,
|
||||
environmentId,
|
||||
});
|
||||
return {
|
||||
content: [
|
||||
|
||||
Reference in New Issue
Block a user