Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 6x 1x 6x | import {
ArrayNotEmpty,
IsArray,
IsBoolean,
IsNotEmpty,
IsOptional,
IsString,
IsUUID,
ValidateNested,
} from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { Type } from 'class-transformer';
export class CreateSessionInputDto {
@ApiProperty({
description: 'User prompt text to send to LLM',
example: 'Create a new authentication module',
})
@IsString()
@IsNotEmpty()
user_prompt: string;
@ApiPropertyOptional({
description: 'UUID of context template to use for generating context',
format: 'uuid',
})
@IsOptional()
@IsUUID()
context_template_id?: string;
@ApiPropertyOptional({
description:
'Ad-hoc context definition (JSON or TEXT) for custom file/folder selection',
})
@IsOptional()
@IsString()
ad_hoc_context_definition?: string;
@ApiProperty({
description: 'Execution strategy for AI actions',
enum: ['review_first', 'apply_revert'],
example: 'review_first',
})
@IsString()
@IsNotEmpty()
execution_strategy: string;
@ApiPropertyOptional({
description:
'Skip creating SessionInput entity in database (used for native tool calling follow-ups)',
})
@IsOptional()
@IsBoolean()
skip_persistence?: boolean;
}
export class UpdateSessionInputDto {
@ApiProperty({
description: 'Modified user prompt text',
example: 'Create a new authentication module with OAuth2 support',
})
@IsString()
@IsNotEmpty()
user_prompt: string;
@ApiPropertyOptional({
description: 'UUID of context template to use',
format: 'uuid',
})
@IsOptional()
@IsUUID()
context_template_id?: string;
@ApiPropertyOptional({
description: 'Ad-hoc context definition (JSON or TEXT)',
})
@IsOptional()
@IsString()
ad_hoc_context_definition?: string;
@ApiPropertyOptional({
description: 'Execution strategy for AI actions',
enum: ['review_first', 'apply_revert'],
})
@IsOptional()
@IsString()
execution_strategy?: string;
}
export class ToolResultUpdateDto {
@ApiProperty({
description: 'Tool call ID to update (from AIAction.tool_call_id)',
})
@IsString()
@IsNotEmpty()
tool_call_id: string;
@ApiProperty({
description: 'New output content (replaces execution log output)',
})
@IsString()
output: string;
}
export class BatchToggleDiscardedDto {
@ApiProperty({
description: 'Array of input UUIDs to toggle',
type: [String],
format: 'uuid',
})
@IsArray()
@ArrayNotEmpty()
@IsUUID('4', { each: true })
input_ids: string[];
@ApiProperty({
description: 'Whether to discard (true) or restore (false) the inputs',
example: true,
})
@IsBoolean()
is_discarded: boolean;
}
export class UpdateSessionInputContentDto {
@ApiPropertyOptional({
description: 'Updated user prompt text (display only, not sent to LLM)',
})
@IsOptional()
@IsString()
user_prompt?: string;
@ApiPropertyOptional({ description: 'Updated LLM response text' })
@IsOptional()
@IsString()
raw_llm_response?: string;
@ApiPropertyOptional({ description: 'Updated explanation text' })
@IsOptional()
@IsString()
llm_response_explanation?: string;
@ApiPropertyOptional({
description:
'Updated generated context (this is what LLM sees for user turns)',
})
@IsOptional()
@IsString()
generated_context_string?: string;
@ApiPropertyOptional({ description: 'Updated thoughts/reasoning content' })
@IsOptional()
@IsString()
thoughts?: string;
@ApiPropertyOptional({
description: 'Tool results to redact (updates execution logs)',
type: [ToolResultUpdateDto],
})
@IsOptional()
@IsArray()
@ValidateNested({ each: true })
@Type(() => ToolResultUpdateDto)
tool_results?: ToolResultUpdateDto[];
}
|