event-model, client-core, transcript-ui: carry main's LimitReached event
The merge that brought main into rustify added Event::LimitReached to the server's drivers, but on this branch the enum lives in event-model, which the merge left without it, so ai-server (and ui-sandbox.sh) did not build. Definition copied from main's driver.rs; the fold mirrors TranscriptItems.kt's LimitNote; the iris row shows the epoch until P1 brings a time formatter. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
46d3a6fd41
commit
c07d544aeb
3 files changed
+44
No files matched your search
@@ -112,6 +112,13 @@ pub enum TranscriptItem {
|
||||
ClearedNote {
|
||||
seq: u64,
|
||||
},
|
||||
/// The account's usage limit stopped the turn; `resets_at` is epoch
|
||||
/// seconds when the dialect said when it lifts (`LimitNote` in
|
||||
/// `TranscriptItems.kt`).
|
||||
LimitNote {
|
||||
seq: u64,
|
||||
resets_at: Option<f64>,
|
||||
},
|
||||
CompactedNote {
|
||||
seq: u64,
|
||||
pre_tokens: Option<u64>,
|
||||
@@ -131,6 +138,7 @@ impl TranscriptItem {
|
||||
| Self::CommandRow { seq, .. }
|
||||
| Self::Note { seq, .. }
|
||||
| Self::ClearedNote { seq }
|
||||
| Self::LimitNote { seq, .. }
|
||||
| Self::CompactedNote { seq, .. } => *seq,
|
||||
Self::QuestionCard(card) => card.seq,
|
||||
}
|
||||
@@ -525,6 +533,14 @@ pub fn fold_event(items: &[TranscriptItem], entry: &SeqEvent) -> Vec<TranscriptI
|
||||
items.push(TranscriptItem::ClearedNote { seq });
|
||||
items
|
||||
}
|
||||
Event::LimitReached { resets_at } => {
|
||||
let mut items = items.to_vec();
|
||||
items.push(TranscriptItem::LimitNote {
|
||||
seq,
|
||||
resets_at: *resets_at,
|
||||
});
|
||||
items
|
||||
}
|
||||
Event::Compacted {
|
||||
pre_tokens,
|
||||
post_tokens,
|
||||
|
||||
Reference in new issue
Block a user