optionally show conversation

This commit is contained in:
easong-openai
2025-09-05 18:11:23 -07:00
parent 21ef6be571
commit 36803606a0
9 changed files with 278 additions and 63 deletions

View File

@@ -77,12 +77,20 @@ pub struct DiffSummary {
pub lines_removed: usize,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)]
pub struct TaskText {
pub prompt: Option<String>,
pub messages: Vec<String>,
}
#[async_trait::async_trait]
pub trait CloudBackend: Send + Sync {
async fn list_tasks(&self, env: Option<&str>) -> Result<Vec<TaskSummary>>;
async fn get_task_diff(&self, id: TaskId) -> Result<String>;
/// Return assistant output messages (no diff) when available.
async fn get_task_messages(&self, id: TaskId) -> Result<Vec<String>>;
/// Return the creating prompt and assistant messages (when available).
async fn get_task_text(&self, id: TaskId) -> Result<TaskText>;
async fn apply_task(&self, id: TaskId) -> Result<ApplyOutcome>;
async fn create_task(
&self,