pub struct SystemPrompt(/* private fields */);Expand description
The root system prompt, rendered again only when the settings’ crate::lane::PromptMode changes (engineering
mode, alwaysSkills), so the prompt-cache prefix stays stable (session-worker.ts currentSystemPrompt). A
change applies from the next request.
Implementations§
Source§impl SystemPrompt
impl SystemPrompt
pub fn fixed(text: impl Into<String>) -> SystemPrompt
Sourcepub fn current(&self) -> String
pub fn current(&self) -> String
The prompt in the settings’ current mode. A mode whose prompt does not render keeps the last one.
Sourcepub fn child_current(&self, reader: ChildReader, model: &str) -> String
pub fn child_current(&self, reader: ChildReader, model: &str) -> String
A subagent’s prompt in the settings’ current mode, for reader: the root’s, with the subagent’s runtime
guide and the notes of model (the subagent’s own). A fixed prompt is the same for every lane.
Sourcepub fn set_persona(&self, persona: Option<bool>)
pub fn set_persona(&self, persona: Option<bool>)
The session’s persona toggle (None: follow the settings), applied from the next request.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SystemPrompt
impl !UnwindSafe for SystemPrompt
impl Forget for SystemPrompt
impl Freeze for SystemPrompt
impl Move for SystemPrompt
impl Send for SystemPrompt
impl Sync for SystemPrompt
impl Unpin for SystemPrompt
impl UnsafeUnpin for SystemPrompt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more