@shaxpir/duiduidui-models 1.25.4 → 1.25.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,8 +31,9 @@ export interface ThinkingBlock {
31
31
  thinking: string;
32
32
  }
33
33
  export type ContentBlock = TextBlock | ImageBlock | ToolUseBlock | ToolResultBlock | ThinkingBlock;
34
+ export type CacheTTL = 'ephemeral_5m' | 'ephemeral_1h';
34
35
  export interface CacheBreakpoint {
35
- ttl: 'ephemeral' | 'standard';
36
+ ttl: CacheTTL;
36
37
  created_at: CompactDateTime;
37
38
  expires_at: CompactDateTime;
38
39
  }
@@ -123,7 +124,7 @@ export declare class Chat extends SharedContent {
123
124
  hasUnread(userId: ContentId): boolean;
124
125
  toStub(): ChatStub;
125
126
  appendMessage(message: ChatMessage): void;
126
- setBreakpoint(messageIndex: number, ttl: 'ephemeral' | 'standard'): void;
127
+ setBreakpoint(messageIndex: number, ttl: CacheTTL): void;
127
128
  removeBreakpoint(messageIndex: number): void;
128
129
  clearExpiredBreakpoints(): void;
129
130
  }
@@ -197,7 +197,7 @@ class Chat extends SharedContent_1.SharedContent {
197
197
  if (messageIndex < 0 || messageIndex >= this._messagesView.length)
198
198
  return;
199
199
  const now = shaxpir_common_1.ClockService.getClock().utc();
200
- const durationMinutes = ttl === 'ephemeral' ? 5 : 60;
200
+ const durationMinutes = ttl === 'ephemeral_5m' ? 5 : 60;
201
201
  const expiresAt = shaxpir_common_1.Time.plus(now, durationMinutes, 'minutes');
202
202
  const breakpoint = {
203
203
  ttl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shaxpir/duiduidui-models",
3
- "version": "1.25.4",
3
+ "version": "1.25.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/shaxpir/duiduidui-models"