- Add optional `saveSession` boolean parameter to CreateScenarioRunDto
- Add `saveSession` column to ScenarioRunEntity
- When saveSession=true and run completes, preserve the browser context as a named explore session instead of closing it
- Session name follows pattern: run-{runId}
- Automatically extracts token and localStorage for session persistence
- Injected SessionService and SessionContextService into ScenarioSchedulerService
- Updated MCP run_scenario tool to accept saveSession parameter
- Updated UI run dialog with checkbox to enable session preservation
- Client API updated to pass saveSession flag
12 lines
226 B
TypeScript
12 lines
226 B
TypeScript
import { IsBoolean, IsNotEmpty, IsOptional, IsUUID } from "class-validator";
|
|
|
|
export class CreateScenarioRunDto {
|
|
@IsUUID()
|
|
@IsNotEmpty()
|
|
environmentId: string;
|
|
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
saveSession?: boolean;
|
|
}
|