@blade-hq/agent-react 2610.0.0-beta.3 → 2610.0.0-beta.30
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.
- package/README.md +38 -2
- package/dist/components/AgentLoopBlock.d.ts +1 -4
- package/dist/components/AskUserQuestionBlock.d.ts +9 -0
- package/dist/components/AssistantTurnBlock.d.ts +17 -5
- package/dist/components/ConnectionBanner.d.ts +1 -1
- package/dist/components/ContextCard.d.ts +7 -0
- package/dist/components/ToolCallBlock.d.ts +4 -2
- package/dist/components/display-utils.d.ts +8 -0
- package/dist/embed/entry.d.ts +12 -0
- package/dist/hooks/use-message-pin.d.ts +22 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1420 -392
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-computer-command.d.ts +34 -0
- package/dist/style.css +77 -1
- package/dist/style.full.css +78 -2
- package/package.json +2 -2
- package/public-api.md +265 -4
package/public-api.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
|
|
4
4
|
> 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
|
|
5
5
|
|
|
6
|
-
共
|
|
6
|
+
共 202 个公开声明。
|
|
7
7
|
|
|
8
8
|
## `acceptedPostChatFollowupCompletesLatestRun` (function)
|
|
9
9
|
|
|
@@ -52,6 +52,12 @@ slots: ChatViewSlots | undefined
|
|
|
52
52
|
theme: "light" | "dark" | undefined
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
## `AgentComputerLaunchOutcome` (type)
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
export type AgentComputerLaunchOutcome = "pending" | "succeeded" | "failed" | "unknown"
|
|
59
|
+
```
|
|
60
|
+
|
|
55
61
|
## `AgentLoopInfo` (interface)
|
|
56
62
|
|
|
57
63
|
```ts
|
|
@@ -155,6 +161,7 @@ tool_name: string | null | undefined
|
|
|
155
161
|
|
|
156
162
|
```ts
|
|
157
163
|
custom: Record<number, string>
|
|
164
|
+
note: string | undefined
|
|
158
165
|
selections: Record<number, number[]>
|
|
159
166
|
```
|
|
160
167
|
|
|
@@ -239,6 +246,7 @@ statusText: string
|
|
|
239
246
|
auth: AuthResource
|
|
240
247
|
blob: (method: HttpMethod, path: string) => Promise<Blob>
|
|
241
248
|
buildAuthedUrl: (path: string) => string
|
|
249
|
+
computers: ComputersResource
|
|
242
250
|
fetch: (method: HttpMethod, path: string, init?: BladeFetchInit, isRetry?: boolean) => Promise<Response>
|
|
243
251
|
formData: (method: HttpMethod, path: string, form: FormData, options?: { expectOk?: boolean; onUploadProgress?: (progress: UploadProgress) => void; }) => Promise<Response>
|
|
244
252
|
hasToken: () => boolean
|
|
@@ -268,7 +276,6 @@ baseUrl: string
|
|
|
268
276
|
fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
|
|
269
277
|
onRefreshSuccess: (() => void | Promise<void>) | undefined
|
|
270
278
|
socketToken: string | (() => string | null | undefined) | undefined
|
|
271
|
-
streamTokens: boolean | undefined
|
|
272
279
|
token: string | (() => string | null | undefined) | undefined
|
|
273
280
|
tokenStorage: TokenStorageMode | undefined
|
|
274
281
|
```
|
|
@@ -292,6 +299,12 @@ client: BladeClient
|
|
|
292
299
|
buildMessageContent: (text: string, attachments: Array<{ kind: "file"; name: string; uploadedPath?: string; textContent?: string | null; mimeType?: string; }>) => MessageContent
|
|
293
300
|
```
|
|
294
301
|
|
|
302
|
+
## `canToggleComputer` (function)
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
canToggleComputer: (computer: SessionComputer) => boolean
|
|
306
|
+
```
|
|
307
|
+
|
|
295
308
|
## `ChatCompletionTool` (interface)
|
|
296
309
|
|
|
297
310
|
```ts
|
|
@@ -299,12 +312,19 @@ function: { name: string; description?: string; parameters?: Record<string, unkn
|
|
|
299
312
|
type: "function"
|
|
300
313
|
```
|
|
301
314
|
|
|
315
|
+
## `chatErrorForDisplay` (function)
|
|
316
|
+
|
|
317
|
+
```ts
|
|
318
|
+
chatErrorForDisplay: (message: string, developer?: boolean) => string
|
|
319
|
+
```
|
|
320
|
+
|
|
302
321
|
## `ChatMessage` (interface)
|
|
303
322
|
|
|
304
323
|
```ts
|
|
305
324
|
blocks: ContentBlock[] | undefined
|
|
306
325
|
compaction: CompactionInfo | undefined
|
|
307
326
|
content: MessageContent
|
|
327
|
+
context: ContextProjectionData | undefined
|
|
308
328
|
duration_ms: number | undefined
|
|
309
329
|
entry_id: string | undefined
|
|
310
330
|
kind: string | undefined
|
|
@@ -312,6 +332,7 @@ loop_name: string | undefined
|
|
|
312
332
|
memory_refs: MemoryRefInfo[] | undefined
|
|
313
333
|
parent_id: string | null | undefined
|
|
314
334
|
reasoning: string | undefined
|
|
335
|
+
render_id: string | undefined
|
|
315
336
|
role: "error" | "user" | "assistant" | "tool"
|
|
316
337
|
status: "streaming" | "completed" | "paused" | "failed" | "interrupted" | undefined
|
|
317
338
|
timestamp: string | undefined
|
|
@@ -366,6 +387,12 @@ footer: ReactNode
|
|
|
366
387
|
header: ReactNode
|
|
367
388
|
```
|
|
368
389
|
|
|
390
|
+
## `classifyAgentComputerLaunchOutcome` (function)
|
|
391
|
+
|
|
392
|
+
```ts
|
|
393
|
+
classifyAgentComputerLaunchOutcome: (toolCall: { status?: string; result?: unknown; }) => AgentComputerLaunchOutcome
|
|
394
|
+
```
|
|
395
|
+
|
|
369
396
|
## `ClientProjectionBuilder` (class)
|
|
370
397
|
|
|
371
398
|
```ts
|
|
@@ -375,6 +402,12 @@ reset: () => void
|
|
|
375
402
|
seedSequence: (maxSeq: number) => void
|
|
376
403
|
```
|
|
377
404
|
|
|
405
|
+
## `collectMemoryRefs` (function)
|
|
406
|
+
|
|
407
|
+
```ts
|
|
408
|
+
collectMemoryRefs: (messages: ChatMessage[]) => MemoryRefInfo[]
|
|
409
|
+
```
|
|
410
|
+
|
|
378
411
|
## `CommandEnvelope` (interface)
|
|
379
412
|
|
|
380
413
|
```ts
|
|
@@ -407,6 +440,25 @@ tokens_before: number | null | undefined
|
|
|
407
440
|
trigger: "auto" | "manual" | "forced_retry" | null | undefined
|
|
408
441
|
```
|
|
409
442
|
|
|
443
|
+
## `ComputersResource` (class)
|
|
444
|
+
|
|
445
|
+
```ts
|
|
446
|
+
list: (sessionId: string) => Promise<SessionComputerList>
|
|
447
|
+
setEnabled: (sessionId: string, computer: string, enabled: boolean) => Promise<SessionComputer>
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
## `computerState` (function)
|
|
451
|
+
|
|
452
|
+
```ts
|
|
453
|
+
computerState: (computer: SessionComputer) => ComputerState
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
## `ComputerState` (type)
|
|
457
|
+
|
|
458
|
+
```ts
|
|
459
|
+
export type ComputerState = "primary" | "enabled" | "offline" | "idle"
|
|
460
|
+
```
|
|
461
|
+
|
|
410
462
|
## `connectEmbedded` (function)
|
|
411
463
|
|
|
412
464
|
```ts
|
|
@@ -435,6 +487,74 @@ type: "text" | "thinking" | "tool_use" | "tool_result" | "tool_ui" | "tool_bridg
|
|
|
435
487
|
contentPreview: (content: MessageContent, maxLen?: number) => string
|
|
436
488
|
```
|
|
437
489
|
|
|
490
|
+
## `ContextAction` (type)
|
|
491
|
+
|
|
492
|
+
```ts
|
|
493
|
+
export type ContextAction = "published" | "retained" | "removed"
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
## `ContextCard` (function)
|
|
497
|
+
|
|
498
|
+
```ts
|
|
499
|
+
ContextCard: ({ context, className }: ContextCardProps) => JSX.Element
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
## `ContextCardProps` (interface)
|
|
503
|
+
|
|
504
|
+
```ts
|
|
505
|
+
className: string | undefined
|
|
506
|
+
context: ContextProjectionData
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
## `ContextDisplayState` (interface)
|
|
510
|
+
|
|
511
|
+
```ts
|
|
512
|
+
detail: string
|
|
513
|
+
isRemoved: boolean
|
|
514
|
+
summary: string
|
|
515
|
+
title: string
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
## `contextProjectionData` (function)
|
|
519
|
+
|
|
520
|
+
```ts
|
|
521
|
+
contextProjectionData: (fields: ContextProjectionFields) => ContextProjectionData | null
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
## `ContextProjectionData` (interface)
|
|
525
|
+
|
|
526
|
+
```ts
|
|
527
|
+
context_action: ContextAction
|
|
528
|
+
context_key: string
|
|
529
|
+
context_kind: string
|
|
530
|
+
context_name: string
|
|
531
|
+
context_order: number
|
|
532
|
+
context_revision: string
|
|
533
|
+
display_summary: string | null | undefined
|
|
534
|
+
display_title: string | null | undefined
|
|
535
|
+
sources: ContextSourceInfo[]
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
## `ContextProjectionFields` (interface)
|
|
539
|
+
|
|
540
|
+
```ts
|
|
541
|
+
context_action: ContextAction | null | undefined
|
|
542
|
+
context_key: string | null | undefined
|
|
543
|
+
context_kind: string | null | undefined
|
|
544
|
+
context_name: string | null | undefined
|
|
545
|
+
context_order: number | null | undefined
|
|
546
|
+
context_revision: string | null | undefined
|
|
547
|
+
display_summary: string | null | undefined
|
|
548
|
+
display_title: string | null | undefined
|
|
549
|
+
sources: ContextSourceInfo[] | null | undefined
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
## `ContextSourceInfo` (type)
|
|
553
|
+
|
|
554
|
+
```ts
|
|
555
|
+
export type ContextSourceInfo = Record<string, unknown>
|
|
556
|
+
```
|
|
557
|
+
|
|
438
558
|
## `createInitialSessionState` (function)
|
|
439
559
|
|
|
440
560
|
```ts
|
|
@@ -444,6 +564,7 @@ createInitialSessionState: (sessionId: string) => SessionState
|
|
|
444
564
|
## `CreateSessionRequest` (interface)
|
|
445
565
|
|
|
446
566
|
```ts
|
|
567
|
+
agent_runtime_id: string | null | undefined
|
|
447
568
|
biz_role_id: string | null | undefined
|
|
448
569
|
compaction_ratio: number | null | undefined
|
|
449
570
|
daemon_id: string | null | undefined
|
|
@@ -454,7 +575,7 @@ intent: string | undefined
|
|
|
454
575
|
memory_enabled: boolean | null | undefined
|
|
455
576
|
model: string | null | undefined
|
|
456
577
|
primary_skill_id: string | null | undefined
|
|
457
|
-
runtime_type: "sandbox" | "daemon" | null | undefined
|
|
578
|
+
runtime_type: "sandbox" | "daemon" | "native" | null | undefined
|
|
458
579
|
session_solution_asset_id: string | null | undefined
|
|
459
580
|
solution_id: string | undefined
|
|
460
581
|
solution_ref: PublishedSolutionRef | undefined
|
|
@@ -499,6 +620,12 @@ allowedOrigins: string[]
|
|
|
499
620
|
iframe: HTMLIFrameElement | undefined
|
|
500
621
|
```
|
|
501
622
|
|
|
623
|
+
## `EMPTY_PLATFORM_ENDPOINTS` (const)
|
|
624
|
+
|
|
625
|
+
```ts
|
|
626
|
+
EMPTY_PLATFORM_ENDPOINTS: PlatformEndpoints
|
|
627
|
+
```
|
|
628
|
+
|
|
502
629
|
## `ExchangeCodeParams` (interface)
|
|
503
630
|
|
|
504
631
|
```ts
|
|
@@ -600,6 +727,12 @@ export type FollowupInteractionEvent =
|
|
|
600
727
|
artifactKind: "file"
|
|
601
728
|
```
|
|
602
729
|
|
|
730
|
+
## `getContextDisplayState` (function)
|
|
731
|
+
|
|
732
|
+
```ts
|
|
733
|
+
getContextDisplayState: (context: ContextProjectionData) => ContextDisplayState
|
|
734
|
+
```
|
|
735
|
+
|
|
603
736
|
## `getFileParts` (function)
|
|
604
737
|
|
|
605
738
|
```ts
|
|
@@ -696,6 +829,18 @@ direction: "host-to-agent"
|
|
|
696
829
|
payload: unknown
|
|
697
830
|
```
|
|
698
831
|
|
|
832
|
+
## `isAgentComputerCommand` (function)
|
|
833
|
+
|
|
834
|
+
```ts
|
|
835
|
+
isAgentComputerCommand: (command: string) => boolean
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
## `isAgentComputerToolCall` (function)
|
|
839
|
+
|
|
840
|
+
```ts
|
|
841
|
+
isAgentComputerToolCall: (argumentsJson: string | null | undefined) => boolean
|
|
842
|
+
```
|
|
843
|
+
|
|
699
844
|
## `isCommandEnvelope` (function)
|
|
700
845
|
|
|
701
846
|
```ts
|
|
@@ -818,6 +963,20 @@ id: string
|
|
|
818
963
|
name: string
|
|
819
964
|
```
|
|
820
965
|
|
|
966
|
+
## `loadPlatformEndpoints` (function)
|
|
967
|
+
|
|
968
|
+
```ts
|
|
969
|
+
loadPlatformEndpoints: (options?: LoadPlatformEndpointsOptions) => Promise<PlatformEndpoints>
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
## `LoadPlatformEndpointsOptions` (interface)
|
|
973
|
+
|
|
974
|
+
```ts
|
|
975
|
+
baseUrl: string | undefined
|
|
976
|
+
fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
|
|
977
|
+
timeoutMs: number | undefined
|
|
978
|
+
```
|
|
979
|
+
|
|
821
980
|
## `LoginOptions` (interface)
|
|
822
981
|
|
|
823
982
|
```ts
|
|
@@ -864,6 +1023,12 @@ id: number
|
|
|
864
1023
|
skill_name: string | null | undefined
|
|
865
1024
|
```
|
|
866
1025
|
|
|
1026
|
+
## `MemoryRefsHint` (function)
|
|
1027
|
+
|
|
1028
|
+
```ts
|
|
1029
|
+
MemoryRefsHint: ({ refs }: { refs: MemoryRefInfo[]; }) => JSX.Element
|
|
1030
|
+
```
|
|
1031
|
+
|
|
867
1032
|
## `MessageContent` (type)
|
|
868
1033
|
|
|
869
1034
|
```ts
|
|
@@ -889,6 +1054,8 @@ baseUrl: string | undefined
|
|
|
889
1054
|
default: string
|
|
890
1055
|
defaultServiceModel: string | undefined
|
|
891
1056
|
models: ModelOption[]
|
|
1057
|
+
unavailableModelIds: string[] | undefined
|
|
1058
|
+
unavailableProviderIds: string[] | undefined
|
|
892
1059
|
```
|
|
893
1060
|
|
|
894
1061
|
## `ModelOption` (interface)
|
|
@@ -945,6 +1112,18 @@ sequence: number
|
|
|
945
1112
|
turn_id: string
|
|
946
1113
|
```
|
|
947
1114
|
|
|
1115
|
+
## `PlatformEndpoints` (interface)
|
|
1116
|
+
|
|
1117
|
+
```ts
|
|
1118
|
+
services: Partial<Record<"agent" | "os" | "hub" | "oauth" | "llmGateway" | "gitea" | "tile", string>>
|
|
1119
|
+
```
|
|
1120
|
+
|
|
1121
|
+
## `PlatformServiceName` (type)
|
|
1122
|
+
|
|
1123
|
+
```ts
|
|
1124
|
+
export type PlatformServiceName = (typeof PLATFORM_SERVICE_NAMES)[number]
|
|
1125
|
+
```
|
|
1126
|
+
|
|
948
1127
|
## `PostChatFollowup` (interface)
|
|
949
1128
|
|
|
950
1129
|
```ts
|
|
@@ -1017,6 +1196,12 @@ payload: Record<string, unknown>
|
|
|
1017
1196
|
type: string
|
|
1018
1197
|
```
|
|
1019
1198
|
|
|
1199
|
+
## `reconcileOptimisticUserTurns` (function)
|
|
1200
|
+
|
|
1201
|
+
```ts
|
|
1202
|
+
reconcileOptimisticUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
|
|
1203
|
+
```
|
|
1204
|
+
|
|
1020
1205
|
## `ReplayBar` (function)
|
|
1021
1206
|
|
|
1022
1207
|
```ts
|
|
@@ -1089,6 +1274,12 @@ speed: ReplaySpeed | undefined
|
|
|
1089
1274
|
status: "replay" | "autonomous" | undefined
|
|
1090
1275
|
```
|
|
1091
1276
|
|
|
1277
|
+
## `resolveServiceUrl` (function)
|
|
1278
|
+
|
|
1279
|
+
```ts
|
|
1280
|
+
resolveServiceUrl: (endpoints: PlatformEndpoints, name: PlatformServiceName, path?: string) => string | null
|
|
1281
|
+
```
|
|
1282
|
+
|
|
1092
1283
|
## `ResultFeedback` (interface)
|
|
1093
1284
|
|
|
1094
1285
|
```ts
|
|
@@ -1160,6 +1351,7 @@ SDK_VERSION: string
|
|
|
1160
1351
|
|
|
1161
1352
|
```ts
|
|
1162
1353
|
askUserAnswer: Record<string, unknown> | undefined
|
|
1354
|
+
kbIds: number[] | undefined
|
|
1163
1355
|
mode: string | undefined
|
|
1164
1356
|
model: string | undefined
|
|
1165
1357
|
replayDecision: "keep_replay" | "continue_replay" | undefined
|
|
@@ -1167,6 +1359,33 @@ thinkingOverride: boolean | undefined
|
|
|
1167
1359
|
whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
|
|
1168
1360
|
```
|
|
1169
1361
|
|
|
1362
|
+
## `SessionComputer` (interface)
|
|
1363
|
+
|
|
1364
|
+
```ts
|
|
1365
|
+
agent_runtimes: unknown[] | undefined
|
|
1366
|
+
allowed_paths: string[] | undefined
|
|
1367
|
+
arch: string | null | undefined
|
|
1368
|
+
blade_home: string | null | undefined
|
|
1369
|
+
created_at: string
|
|
1370
|
+
daemon_version: string | null | undefined
|
|
1371
|
+
enabled: boolean
|
|
1372
|
+
home: string | null | undefined
|
|
1373
|
+
hostname: string | null | undefined
|
|
1374
|
+
id: string
|
|
1375
|
+
is_primary: boolean
|
|
1376
|
+
label: string
|
|
1377
|
+
last_seen_at: string | null | undefined
|
|
1378
|
+
online: boolean
|
|
1379
|
+
os: string | null | undefined
|
|
1380
|
+
workspace: string | null | undefined
|
|
1381
|
+
```
|
|
1382
|
+
|
|
1383
|
+
## `SessionComputerList` (interface)
|
|
1384
|
+
|
|
1385
|
+
```ts
|
|
1386
|
+
computers: SessionComputer[]
|
|
1387
|
+
```
|
|
1388
|
+
|
|
1170
1389
|
## `SessionConfig` (interface)
|
|
1171
1390
|
|
|
1172
1391
|
```ts
|
|
@@ -1198,6 +1417,7 @@ solution: SolutionDefinition | undefined
|
|
|
1198
1417
|
## `SessionDetail` (interface)
|
|
1199
1418
|
|
|
1200
1419
|
```ts
|
|
1420
|
+
agent_runtime_id: string | null | undefined
|
|
1201
1421
|
biz_role_id: string | null | undefined
|
|
1202
1422
|
bound_skill_id: string | null | undefined
|
|
1203
1423
|
created_at: string
|
|
@@ -1290,6 +1510,7 @@ SessionInfo = type({
|
|
|
1290
1510
|
"disable_tools?": "string[]",
|
|
1291
1511
|
"runtime_type?": "string | null",
|
|
1292
1512
|
"daemon_id?": "string | null",
|
|
1513
|
+
"agent_runtime_id?": "string | null",
|
|
1293
1514
|
"workspace_path?": "string | null",
|
|
1294
1515
|
"match?": "unknown",
|
|
1295
1516
|
})
|
|
@@ -1506,6 +1727,12 @@ export type SolutionDefinition =
|
|
|
1506
1727
|
export type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset
|
|
1507
1728
|
```
|
|
1508
1729
|
|
|
1730
|
+
## `sortComputers` (function)
|
|
1731
|
+
|
|
1732
|
+
```ts
|
|
1733
|
+
sortComputers: (computers: SessionComputer[]) => SessionComputer[]
|
|
1734
|
+
```
|
|
1735
|
+
|
|
1509
1736
|
## `Task` (type)
|
|
1510
1737
|
|
|
1511
1738
|
```ts
|
|
@@ -1604,13 +1831,23 @@ archived_count: number | null | undefined
|
|
|
1604
1831
|
archived_files: ArchivedFileInfo[] | null | undefined
|
|
1605
1832
|
archived_tool_calls: ArchivedToolCallInfo[] | null | undefined
|
|
1606
1833
|
blocks: ContentBlock[]
|
|
1834
|
+
client_render_id: string | null | undefined
|
|
1607
1835
|
compaction_id: string | null | undefined
|
|
1836
|
+
context_action: ContextAction | null | undefined
|
|
1837
|
+
context_content: unknown
|
|
1838
|
+
context_key: string | null | undefined
|
|
1839
|
+
context_kind: string | null | undefined
|
|
1840
|
+
context_name: string | null | undefined
|
|
1841
|
+
context_order: number | null | undefined
|
|
1842
|
+
context_revision: string | null | undefined
|
|
1608
1843
|
context_window: number | undefined
|
|
1844
|
+
display_summary: string | null | undefined
|
|
1845
|
+
display_title: string | null | undefined
|
|
1609
1846
|
duration_ms: number | undefined
|
|
1610
1847
|
failure_reason: string | null | undefined
|
|
1611
1848
|
fallback_applied: boolean | null | undefined
|
|
1612
1849
|
id: string
|
|
1613
|
-
kind: "message" | "compaction" | undefined
|
|
1850
|
+
kind: "message" | "context" | "compaction" | undefined
|
|
1614
1851
|
loop_id: string
|
|
1615
1852
|
memory_refs: MemoryRef[] | null | undefined
|
|
1616
1853
|
model: string | null | undefined
|
|
@@ -1619,6 +1856,7 @@ post_chat_followup: PostChatFollowup | null | undefined
|
|
|
1619
1856
|
role: "user" | "assistant" | "system"
|
|
1620
1857
|
saved_ratio: number | null | undefined
|
|
1621
1858
|
sequence: number
|
|
1859
|
+
sources: ContextSourceInfo[] | null | undefined
|
|
1622
1860
|
started_at: string | null | undefined
|
|
1623
1861
|
status: "streaming" | "completed" | "paused" | "failed" | "interrupted"
|
|
1624
1862
|
summary_full: string | null | undefined
|
|
@@ -1701,6 +1939,29 @@ send: (text: string) => Promise<boolean>
|
|
|
1701
1939
|
stop: () => void
|
|
1702
1940
|
```
|
|
1703
1941
|
|
|
1942
|
+
## `useMessagePin` (function)
|
|
1943
|
+
|
|
1944
|
+
```ts
|
|
1945
|
+
useMessagePin: ({ targetKey, pinTarget, layoutKey, getScrollElement, getContentElement, getTargetElement, getTargetScrollTop, getSpacerHeight, setSpacerHeight, stopAutoScroll, scrollToBottom, margin, }: UseMessagePinOptions) => { release: () => void; isActive: () => boolean; }
|
|
1946
|
+
```
|
|
1947
|
+
|
|
1948
|
+
## `UseMessagePinOptions` (interface)
|
|
1949
|
+
|
|
1950
|
+
```ts
|
|
1951
|
+
getContentElement: (() => HTMLElement | null) | undefined
|
|
1952
|
+
getScrollElement: () => HTMLElement | null
|
|
1953
|
+
getSpacerHeight: () => number
|
|
1954
|
+
getTargetElement: () => HTMLElement | null
|
|
1955
|
+
getTargetScrollTop: ((scroll: HTMLElement) => number | null) | undefined
|
|
1956
|
+
layoutKey: string | undefined
|
|
1957
|
+
margin: number | undefined
|
|
1958
|
+
pinTarget: boolean
|
|
1959
|
+
scrollToBottom: () => void
|
|
1960
|
+
setSpacerHeight: (height: number) => void
|
|
1961
|
+
stopAutoScroll: () => void
|
|
1962
|
+
targetKey: string | null
|
|
1963
|
+
```
|
|
1964
|
+
|
|
1704
1965
|
## `useReplay` (function)
|
|
1705
1966
|
|
|
1706
1967
|
```ts
|