Initial implementation of /init (#1822)

Basic /init command that appends an instruction to create AGENTS.md to
the conversation history.
This commit is contained in:
Charlie Weems
2025-08-06 09:10:23 -07:00
committed by GitHub
parent dc468d563f
commit ffe24991b7
6 changed files with 138 additions and 0 deletions

View File

@@ -575,6 +575,16 @@ impl ChatWidget<'_> {
}
}
/// Programmatically submit a user text message as if typed in the
/// composer. The text will be added to conversation history and sent to
/// the agent.
pub(crate) fn submit_text_message(&mut self, text: String) {
if text.is_empty() {
return;
}
self.submit_user_message(text.into());
}
pub(crate) fn token_usage(&self) -> &TokenUsage {
&self.token_usage
}