Move prompt renderer to state model
This commit is contained in:
parent
81fc29874f
commit
d510f39b4c
14 changed files with 69 additions and 64 deletions
|
|
@ -2,6 +2,7 @@ use super::ContextualUserFragment;
|
|||
use codex_protocol::protocol::EPIPHANY_STATE_CLOSE_TAG;
|
||||
use codex_protocol::protocol::EPIPHANY_STATE_OPEN_TAG;
|
||||
use codex_protocol::protocol::EpiphanyThreadState;
|
||||
use codex_protocol::protocol::render_epiphany_state;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub(crate) struct EpiphanyStateInstructions {
|
||||
|
|
@ -11,7 +12,7 @@ pub(crate) struct EpiphanyStateInstructions {
|
|||
impl EpiphanyStateInstructions {
|
||||
pub(crate) fn from_state(state: &EpiphanyThreadState) -> Self {
|
||||
Self {
|
||||
text: epiphany_core::render_epiphany_state(state),
|
||||
text: render_epiphany_state(state),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2983,6 +2983,7 @@ pub use epiphany_state_model::EpiphanyScratchPad;
|
|||
pub use epiphany_state_model::EpiphanyStateItem;
|
||||
pub use epiphany_state_model::EpiphanySubgoal;
|
||||
pub use epiphany_state_model::EpiphanyThreadState;
|
||||
pub use epiphany_state_model::render_epiphany_state;
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, TS)]
|
||||
pub struct CompactedItem {
|
||||
|
|
|
|||
Reference in a new issue