agent: Preserve thinking blocks between requests (#29055)
Looks like the required backend component of this was deployed. https://github.com/zed-industries/monorepo/actions/runs/14541199197 Release Notes: - N/A --------- Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Agus Zubiaga <hi@aguz.me> Co-authored-by: Richard Feldman <oss@rtfeldman.com> Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
f737c4d01e
commit
bafc086d27
13 changed files with 236 additions and 68 deletions
|
@ -65,9 +65,14 @@ pub struct LanguageModelCacheConfiguration {
|
|||
pub enum LanguageModelCompletionEvent {
|
||||
Stop(StopReason),
|
||||
Text(String),
|
||||
Thinking(String),
|
||||
Thinking {
|
||||
text: String,
|
||||
signature: Option<String>,
|
||||
},
|
||||
ToolUse(LanguageModelToolUse),
|
||||
StartMessage { message_id: String },
|
||||
StartMessage {
|
||||
message_id: String,
|
||||
},
|
||||
UsageUpdate(TokenUsage),
|
||||
}
|
||||
|
||||
|
@ -302,7 +307,7 @@ pub trait LanguageModel: Send + Sync {
|
|||
match result {
|
||||
Ok(LanguageModelCompletionEvent::StartMessage { .. }) => None,
|
||||
Ok(LanguageModelCompletionEvent::Text(text)) => Some(Ok(text)),
|
||||
Ok(LanguageModelCompletionEvent::Thinking(_)) => None,
|
||||
Ok(LanguageModelCompletionEvent::Thinking { .. }) => None,
|
||||
Ok(LanguageModelCompletionEvent::Stop(_)) => None,
|
||||
Ok(LanguageModelCompletionEvent::ToolUse(_)) => None,
|
||||
Ok(LanguageModelCompletionEvent::UsageUpdate(token_usage)) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue