Skip to main content

ralph/commands/prompt/
types.rs

1//! Shared prompt preview option types.
2//!
3//! Responsibilities:
4//! - Define preview modes and option structs shared across prompt helpers.
5//! - Keep reusable public types separate from management and rendering code.
6//!
7//! Not handled here:
8//! - Prompt construction logic.
9//! - CLI parsing and config resolution.
10//!
11//! Invariants/assumptions:
12//! - Worker prompt previews simulate runtime behavior closely.
13//! - Explain flags only affect wrapper headers, not core prompt content.
14
15use std::path::PathBuf;
16
17#[derive(Debug, Clone, Copy, PartialEq, Eq)]
18pub enum WorkerMode {
19    Phase1,
20    Phase2,
21    Phase3,
22    Single,
23}
24
25#[derive(Debug, Clone)]
26pub struct WorkerPromptOptions {
27    pub task_id: Option<String>,
28    pub mode: WorkerMode,
29    pub repoprompt_plan_required: bool,
30    pub repoprompt_tool_injection: bool,
31    pub iterations: u8,
32    pub iteration_index: u8,
33    pub plan_file: Option<PathBuf>,
34    pub plan_text: Option<String>,
35    pub explain: bool,
36}
37
38#[derive(Debug, Clone)]
39pub struct ScanPromptOptions {
40    pub focus: String,
41    pub mode: crate::cli::scan::ScanMode,
42    pub repoprompt_tool_injection: bool,
43    pub explain: bool,
44}
45
46#[derive(Debug, Clone)]
47pub struct TaskBuilderPromptOptions {
48    pub request: String,
49    pub hint_tags: String,
50    pub hint_scope: String,
51    pub repoprompt_tool_injection: bool,
52    pub explain: bool,
53}