@blade-hq/agent-react 2610.0.0-beta.4 → 2610.0.0-beta.41
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 +82 -3
- package/dist/components/AgentLoopBlock.d.ts +1 -4
- package/dist/components/AskUserQuestionBlock.d.ts +9 -0
- package/dist/components/AssistantTurnBlock.d.ts +20 -6
- package/dist/components/ChatInput.d.ts +4 -1
- package/dist/components/ChatSurface.d.ts +12 -1
- package/dist/components/ConnectionBanner.d.ts +1 -1
- package/dist/components/ContextCard.d.ts +20 -0
- package/dist/components/MarkdownContent.d.ts +2 -0
- package/dist/components/MessageList.d.ts +8 -1
- package/dist/components/PlanUpdateBlock.d.ts +31 -0
- package/dist/components/SessionMemoryToggle.d.ts +19 -0
- package/dist/components/ToolCallBlock.d.ts +4 -2
- package/dist/components/UserMessageBubble.d.ts +1 -1
- package/dist/components/WhatIfUserBubble.d.ts +7 -0
- package/dist/components/display-utils.d.ts +10 -0
- package/dist/context.d.ts +1 -0
- package/dist/embed/entry.d.ts +24 -0
- package/dist/hooks/use-agent-session.d.ts +5 -0
- package/dist/hooks/use-message-pin.d.ts +22 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +2567 -857
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-computer-command.d.ts +34 -0
- package/dist/lib/utils.d.ts +3 -1
- package/dist/lib/whatif-prompt.d.ts +18 -0
- package/dist/style.css +91 -1
- package/dist/style.full.css +92 -2
- package/package.json +2 -2
- package/public-api.md +527 -7
package/public-api.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
|
|
4
4
|
> 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
|
|
5
5
|
|
|
6
|
-
共
|
|
6
|
+
共 238 个公开声明。
|
|
7
7
|
|
|
8
8
|
## `acceptedPostChatFollowupCompletesLatestRun` (function)
|
|
9
9
|
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
acceptedPostChatFollowupCompletesLatestRun: (events: RawEvent[], updates: ProjectionUpdate[]) => boolean
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
## `acknowledgeTurnEvents` (function)
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
acknowledgeTurnEvents: (acknowledge?: () => void) => void
|
|
18
|
+
```
|
|
19
|
+
|
|
14
20
|
## `ActiveCompactionState` (interface)
|
|
15
21
|
|
|
16
22
|
```ts
|
|
@@ -52,6 +58,12 @@ slots: ChatViewSlots | undefined
|
|
|
52
58
|
theme: "light" | "dark" | undefined
|
|
53
59
|
```
|
|
54
60
|
|
|
61
|
+
## `AgentComputerLaunchOutcome` (type)
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
export type AgentComputerLaunchOutcome = "pending" | "succeeded" | "failed" | "unknown"
|
|
65
|
+
```
|
|
66
|
+
|
|
55
67
|
## `AgentLoopInfo` (interface)
|
|
56
68
|
|
|
57
69
|
```ts
|
|
@@ -66,18 +78,23 @@ toolCallId: string
|
|
|
66
78
|
append: (text: string) => void
|
|
67
79
|
attach: (label: string, data: unknown) => void
|
|
68
80
|
attachApp: (options: AttachAppOptions) => Promise<AppCliAttachment | null>
|
|
81
|
+
cancelQueued: (id: number) => Promise<boolean>
|
|
69
82
|
compact: () => Promise<Record<string, unknown>>
|
|
70
83
|
countFiles: (dirPath?: string) => Promise<number>
|
|
71
84
|
dispose: () => void
|
|
72
85
|
downloadFile: (filePath: string, downloadName?: string) => Promise<void>
|
|
73
86
|
exitReplay: () => Promise<void>
|
|
74
87
|
getState: () => SessionState
|
|
88
|
+
hasOlderHistory: boolean
|
|
75
89
|
insertText: (text: string) => void
|
|
76
90
|
isDisposed: boolean
|
|
77
91
|
listDir: (dirPath?: string) => Promise<FileEntry[]>
|
|
92
|
+
listQueue: () => Promise<Array<{ id: number; message: string; }>>
|
|
93
|
+
loadOlderHistory: (options?: { beforeCommit?: () => void; }) => Promise<void>
|
|
78
94
|
off: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => void
|
|
79
95
|
on: <K extends keyof AgentSessionEvents>(name: K, handler: (event: AgentSessionEvents[K]) => void) => () => void
|
|
80
96
|
onCommand: (action: string, handler: CommandHandler) => () => void
|
|
97
|
+
queue: (content: string) => Promise<boolean>
|
|
81
98
|
send: (content: MessageContent, options?: SendOptions) => Promise<boolean>
|
|
82
99
|
sessionId: string
|
|
83
100
|
setReplaySpeed: (speed: ReplaySpeed) => Promise<void>
|
|
@@ -111,7 +128,7 @@ sessionUpdated: { intent?: string; status?: SessionStatus; model?: string | null
|
|
|
111
128
|
taskListUpdated: { tasks: unknown[]; }
|
|
112
129
|
toolCall: { toolCall: ToolCallInfo; turn: TurnProjection; }
|
|
113
130
|
toolPreview: { toolCallId: string; type: "resource-html" | "resource-uri"; content: string; title: string; }
|
|
114
|
-
toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; }
|
|
131
|
+
toolResult: { toolCall: ToolCallInfo; turn: TurnProjection; source: "live" | "bootstrap_replay" | "reconnect_replay"; }
|
|
115
132
|
workspaceChanged: { filePath?: string; }
|
|
116
133
|
```
|
|
117
134
|
|
|
@@ -155,6 +172,7 @@ tool_name: string | null | undefined
|
|
|
155
172
|
|
|
156
173
|
```ts
|
|
157
174
|
custom: Record<number, string>
|
|
175
|
+
note: string | undefined
|
|
158
176
|
selections: Record<number, number[]>
|
|
159
177
|
```
|
|
160
178
|
|
|
@@ -239,6 +257,7 @@ statusText: string
|
|
|
239
257
|
auth: AuthResource
|
|
240
258
|
blob: (method: HttpMethod, path: string) => Promise<Blob>
|
|
241
259
|
buildAuthedUrl: (path: string) => string
|
|
260
|
+
computers: ComputersResource
|
|
242
261
|
fetch: (method: HttpMethod, path: string, init?: BladeFetchInit, isRetry?: boolean) => Promise<Response>
|
|
243
262
|
formData: (method: HttpMethod, path: string, form: FormData, options?: { expectOk?: boolean; onUploadProgress?: (progress: UploadProgress) => void; }) => Promise<Response>
|
|
244
263
|
hasToken: () => boolean
|
|
@@ -268,7 +287,6 @@ baseUrl: string
|
|
|
268
287
|
fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
|
|
269
288
|
onRefreshSuccess: (() => void | Promise<void>) | undefined
|
|
270
289
|
socketToken: string | (() => string | null | undefined) | undefined
|
|
271
|
-
streamTokens: boolean | undefined
|
|
272
290
|
token: string | (() => string | null | undefined) | undefined
|
|
273
291
|
tokenStorage: TokenStorageMode | undefined
|
|
274
292
|
```
|
|
@@ -292,6 +310,12 @@ client: BladeClient
|
|
|
292
310
|
buildMessageContent: (text: string, attachments: Array<{ kind: "file"; name: string; uploadedPath?: string; textContent?: string | null; mimeType?: string; }>) => MessageContent
|
|
293
311
|
```
|
|
294
312
|
|
|
313
|
+
## `canToggleComputer` (function)
|
|
314
|
+
|
|
315
|
+
```ts
|
|
316
|
+
canToggleComputer: (computer: SessionComputer) => boolean
|
|
317
|
+
```
|
|
318
|
+
|
|
295
319
|
## `ChatCompletionTool` (interface)
|
|
296
320
|
|
|
297
321
|
```ts
|
|
@@ -299,12 +323,19 @@ function: { name: string; description?: string; parameters?: Record<string, unkn
|
|
|
299
323
|
type: "function"
|
|
300
324
|
```
|
|
301
325
|
|
|
326
|
+
## `chatErrorForDisplay` (function)
|
|
327
|
+
|
|
328
|
+
```ts
|
|
329
|
+
chatErrorForDisplay: (message: string, developer?: boolean) => string
|
|
330
|
+
```
|
|
331
|
+
|
|
302
332
|
## `ChatMessage` (interface)
|
|
303
333
|
|
|
304
334
|
```ts
|
|
305
335
|
blocks: ContentBlock[] | undefined
|
|
306
336
|
compaction: CompactionInfo | undefined
|
|
307
337
|
content: MessageContent
|
|
338
|
+
context: ContextProjectionData | undefined
|
|
308
339
|
duration_ms: number | undefined
|
|
309
340
|
entry_id: string | undefined
|
|
310
341
|
kind: string | undefined
|
|
@@ -312,6 +343,7 @@ loop_name: string | undefined
|
|
|
312
343
|
memory_refs: MemoryRefInfo[] | undefined
|
|
313
344
|
parent_id: string | null | undefined
|
|
314
345
|
reasoning: string | undefined
|
|
346
|
+
render_id: string | undefined
|
|
315
347
|
role: "error" | "user" | "assistant" | "tool"
|
|
316
348
|
status: "streaming" | "completed" | "paused" | "failed" | "interrupted" | undefined
|
|
317
349
|
timestamp: string | undefined
|
|
@@ -366,6 +398,12 @@ footer: ReactNode
|
|
|
366
398
|
header: ReactNode
|
|
367
399
|
```
|
|
368
400
|
|
|
401
|
+
## `classifyAgentComputerLaunchOutcome` (function)
|
|
402
|
+
|
|
403
|
+
```ts
|
|
404
|
+
classifyAgentComputerLaunchOutcome: (toolCall: { status?: string; result?: unknown; }) => AgentComputerLaunchOutcome
|
|
405
|
+
```
|
|
406
|
+
|
|
369
407
|
## `ClientProjectionBuilder` (class)
|
|
370
408
|
|
|
371
409
|
```ts
|
|
@@ -375,6 +413,12 @@ reset: () => void
|
|
|
375
413
|
seedSequence: (maxSeq: number) => void
|
|
376
414
|
```
|
|
377
415
|
|
|
416
|
+
## `collectMemoryRefs` (function)
|
|
417
|
+
|
|
418
|
+
```ts
|
|
419
|
+
collectMemoryRefs: (messages: ChatMessage[]) => MemoryRefInfo[]
|
|
420
|
+
```
|
|
421
|
+
|
|
378
422
|
## `CommandEnvelope` (interface)
|
|
379
423
|
|
|
380
424
|
```ts
|
|
@@ -407,6 +451,49 @@ tokens_before: number | null | undefined
|
|
|
407
451
|
trigger: "auto" | "manual" | "forced_retry" | null | undefined
|
|
408
452
|
```
|
|
409
453
|
|
|
454
|
+
## `computerDaemonVersion` (function)
|
|
455
|
+
|
|
456
|
+
```ts
|
|
457
|
+
computerDaemonVersion: (computer: SessionComputer) => string
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
## `computerOS` (function)
|
|
461
|
+
|
|
462
|
+
```ts
|
|
463
|
+
computerOS: (computer: SessionComputer) => ComputerOS
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
## `ComputerOS` (type)
|
|
467
|
+
|
|
468
|
+
```ts
|
|
469
|
+
export type ComputerOS = "macos" | "windows" | "linux" | "unknown"
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
## `computerPlatformLabel` (function)
|
|
473
|
+
|
|
474
|
+
```ts
|
|
475
|
+
computerPlatformLabel: (computer: SessionComputer) => string
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
## `ComputersResource` (class)
|
|
479
|
+
|
|
480
|
+
```ts
|
|
481
|
+
list: (sessionId: string) => Promise<SessionComputerList>
|
|
482
|
+
setEnabled: (sessionId: string, computer: string, enabled: boolean) => Promise<SessionComputer>
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
## `computerState` (function)
|
|
486
|
+
|
|
487
|
+
```ts
|
|
488
|
+
computerState: (computer: SessionComputer) => ComputerState
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
## `ComputerState` (type)
|
|
492
|
+
|
|
493
|
+
```ts
|
|
494
|
+
export type ComputerState = "primary" | "enabled" | "offline" | "idle"
|
|
495
|
+
```
|
|
496
|
+
|
|
410
497
|
## `connectEmbedded` (function)
|
|
411
498
|
|
|
412
499
|
```ts
|
|
@@ -423,6 +510,7 @@ export type ConnectionStatus = "connecting" | "connected" | "reconnecting" | "di
|
|
|
423
510
|
|
|
424
511
|
```ts
|
|
425
512
|
content: unknown
|
|
513
|
+
delivery_id: string | null | undefined
|
|
426
514
|
display_name: string | null | undefined
|
|
427
515
|
tool_call_id: string | null | undefined
|
|
428
516
|
tool_name: string | null | undefined
|
|
@@ -435,6 +523,95 @@ type: "text" | "thinking" | "tool_use" | "tool_result" | "tool_ui" | "tool_bridg
|
|
|
435
523
|
contentPreview: (content: MessageContent, maxLen?: number) => string
|
|
436
524
|
```
|
|
437
525
|
|
|
526
|
+
## `ContextAction` (type)
|
|
527
|
+
|
|
528
|
+
```ts
|
|
529
|
+
export type ContextAction = "published" | "retained" | "removed"
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
## `ContextCard` (function)
|
|
533
|
+
|
|
534
|
+
```ts
|
|
535
|
+
ContextCard: ({ context, className }: ContextCardProps) => JSX.Element
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
## `ContextCardProps` (interface)
|
|
539
|
+
|
|
540
|
+
```ts
|
|
541
|
+
className: string | undefined
|
|
542
|
+
context: ContextProjectionData
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
## `ContextDisplayState` (interface)
|
|
546
|
+
|
|
547
|
+
```ts
|
|
548
|
+
detail: string
|
|
549
|
+
isRemoved: boolean
|
|
550
|
+
summary: string
|
|
551
|
+
title: string
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
## `ContextGroupCard` (function)
|
|
555
|
+
|
|
556
|
+
```ts
|
|
557
|
+
ContextGroupCard: ({ contexts, className }: ContextGroupCardProps) => JSX.Element | null
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
## `ContextGroupCardProps` (interface)
|
|
561
|
+
|
|
562
|
+
```ts
|
|
563
|
+
className: string | undefined
|
|
564
|
+
contexts: readonly ContextProjectionData[]
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
## `ContextGroupDisplayState` (interface)
|
|
568
|
+
|
|
569
|
+
```ts
|
|
570
|
+
count: number
|
|
571
|
+
summary: string
|
|
572
|
+
title: string
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
## `contextProjectionData` (function)
|
|
576
|
+
|
|
577
|
+
```ts
|
|
578
|
+
contextProjectionData: (fields: ContextProjectionFields) => ContextProjectionData | null
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
## `ContextProjectionData` (interface)
|
|
582
|
+
|
|
583
|
+
```ts
|
|
584
|
+
context_action: ContextAction
|
|
585
|
+
context_key: string
|
|
586
|
+
context_kind: string
|
|
587
|
+
context_name: string
|
|
588
|
+
context_order: number
|
|
589
|
+
context_revision: string
|
|
590
|
+
display_summary: string | null | undefined
|
|
591
|
+
display_title: string | null | undefined
|
|
592
|
+
sources: ContextSourceInfo[]
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
## `ContextProjectionFields` (interface)
|
|
596
|
+
|
|
597
|
+
```ts
|
|
598
|
+
context_action: ContextAction | null | undefined
|
|
599
|
+
context_key: string | null | undefined
|
|
600
|
+
context_kind: string | null | undefined
|
|
601
|
+
context_name: string | null | undefined
|
|
602
|
+
context_order: number | null | undefined
|
|
603
|
+
context_revision: string | null | undefined
|
|
604
|
+
display_summary: string | null | undefined
|
|
605
|
+
display_title: string | null | undefined
|
|
606
|
+
sources: ContextSourceInfo[] | null | undefined
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
## `ContextSourceInfo` (type)
|
|
610
|
+
|
|
611
|
+
```ts
|
|
612
|
+
export type ContextSourceInfo = Record<string, unknown>
|
|
613
|
+
```
|
|
614
|
+
|
|
438
615
|
## `createInitialSessionState` (function)
|
|
439
616
|
|
|
440
617
|
```ts
|
|
@@ -444,6 +621,7 @@ createInitialSessionState: (sessionId: string) => SessionState
|
|
|
444
621
|
## `CreateSessionRequest` (interface)
|
|
445
622
|
|
|
446
623
|
```ts
|
|
624
|
+
agent_runtime_id: string | null | undefined
|
|
447
625
|
biz_role_id: string | null | undefined
|
|
448
626
|
compaction_ratio: number | null | undefined
|
|
449
627
|
daemon_id: string | null | undefined
|
|
@@ -454,7 +632,7 @@ intent: string | undefined
|
|
|
454
632
|
memory_enabled: boolean | null | undefined
|
|
455
633
|
model: string | null | undefined
|
|
456
634
|
primary_skill_id: string | null | undefined
|
|
457
|
-
runtime_type: "sandbox" | "daemon" | null | undefined
|
|
635
|
+
runtime_type: "sandbox" | "daemon" | "native" | null | undefined
|
|
458
636
|
session_solution_asset_id: string | null | undefined
|
|
459
637
|
solution_id: string | undefined
|
|
460
638
|
solution_ref: PublishedSolutionRef | undefined
|
|
@@ -476,6 +654,12 @@ path: string | undefined
|
|
|
476
654
|
token: string | (() => string | null | undefined) | undefined
|
|
477
655
|
```
|
|
478
656
|
|
|
657
|
+
## `CurrentPlanPanel` (function)
|
|
658
|
+
|
|
659
|
+
```ts
|
|
660
|
+
CurrentPlanPanel: ({ messages, running, revealRevision, sessionId, className, }: { messages: ChatMessage[]; running?: boolean; revealRevision?: number; sessionId?: string; className?: string; }) => JSX.Element | null
|
|
661
|
+
```
|
|
662
|
+
|
|
479
663
|
## `DEFAULT_REPLAY_SPEED` (const)
|
|
480
664
|
|
|
481
665
|
```ts
|
|
@@ -499,6 +683,12 @@ allowedOrigins: string[]
|
|
|
499
683
|
iframe: HTMLIFrameElement | undefined
|
|
500
684
|
```
|
|
501
685
|
|
|
686
|
+
## `EMPTY_PLATFORM_ENDPOINTS` (const)
|
|
687
|
+
|
|
688
|
+
```ts
|
|
689
|
+
EMPTY_PLATFORM_ENDPOINTS: PlatformEndpoints
|
|
690
|
+
```
|
|
691
|
+
|
|
502
692
|
## `ExchangeCodeParams` (interface)
|
|
503
693
|
|
|
504
694
|
```ts
|
|
@@ -600,6 +790,18 @@ export type FollowupInteractionEvent =
|
|
|
600
790
|
artifactKind: "file"
|
|
601
791
|
```
|
|
602
792
|
|
|
793
|
+
## `getContextDisplayState` (function)
|
|
794
|
+
|
|
795
|
+
```ts
|
|
796
|
+
getContextDisplayState: (context: ContextProjectionData) => ContextDisplayState
|
|
797
|
+
```
|
|
798
|
+
|
|
799
|
+
## `getContextGroupDisplayState` (function)
|
|
800
|
+
|
|
801
|
+
```ts
|
|
802
|
+
getContextGroupDisplayState: (contexts: readonly ContextProjectionData[]) => ContextGroupDisplayState
|
|
803
|
+
```
|
|
804
|
+
|
|
603
805
|
## `getFileParts` (function)
|
|
604
806
|
|
|
605
807
|
```ts
|
|
@@ -612,6 +814,12 @@ getFileParts: (content: MessageContent) => FileContentPart[]
|
|
|
612
814
|
getImageParts: (content: MessageContent) => ImageUrlContentPart[]
|
|
613
815
|
```
|
|
614
816
|
|
|
817
|
+
## `getPlanUpdateDisplayState` (function)
|
|
818
|
+
|
|
819
|
+
```ts
|
|
820
|
+
getPlanUpdateDisplayState: (messages: ChatMessage[]) => PlanUpdateDisplayState
|
|
821
|
+
```
|
|
822
|
+
|
|
615
823
|
## `getTextContent` (function)
|
|
616
824
|
|
|
617
825
|
```ts
|
|
@@ -654,12 +862,24 @@ export type GlobalSearchResultItem =
|
|
|
654
862
|
| GlobalSearchFileResult
|
|
655
863
|
```
|
|
656
864
|
|
|
865
|
+
## `groupAdjacentContextRuns` (function)
|
|
866
|
+
|
|
867
|
+
```ts
|
|
868
|
+
groupAdjacentContextRuns: (kinds: readonly (string | null)[]) => readonly (readonly number[])[]
|
|
869
|
+
```
|
|
870
|
+
|
|
657
871
|
## `groupMessagesByLoop` (function)
|
|
658
872
|
|
|
659
873
|
```ts
|
|
660
874
|
groupMessagesByLoop: (messages: ChatMessage[]) => MessageGroup[]
|
|
661
875
|
```
|
|
662
876
|
|
|
877
|
+
## `hasChatRunEvent` (function)
|
|
878
|
+
|
|
879
|
+
```ts
|
|
880
|
+
hasChatRunEvent: (events: RawEvent[]) => boolean
|
|
881
|
+
```
|
|
882
|
+
|
|
663
883
|
## `HeadlessResource` (class)
|
|
664
884
|
|
|
665
885
|
```ts
|
|
@@ -668,6 +888,15 @@ runInSession: { <T = unknown>(sessionId: string, prompt: string, options: Headle
|
|
|
668
888
|
runWithSession: { <T = unknown>(prompt: string, options: HeadlessRunOptions & { schema: JsonSchemaObject; }): Promise<HeadlessRunInSessionResult<T>>; (prompt: string, options?: HeadlessRunOptions): Promise<HeadlessRunInSessionResult<string>>; }
|
|
669
889
|
```
|
|
670
890
|
|
|
891
|
+
## `HistoricalCommand` (interface)
|
|
892
|
+
|
|
893
|
+
```ts
|
|
894
|
+
action: string
|
|
895
|
+
deliveryId: string
|
|
896
|
+
payload: unknown
|
|
897
|
+
toolCallId: string | undefined
|
|
898
|
+
```
|
|
899
|
+
|
|
671
900
|
## `ImageUrlContentPart` (interface)
|
|
672
901
|
|
|
673
902
|
```ts
|
|
@@ -696,6 +925,18 @@ direction: "host-to-agent"
|
|
|
696
925
|
payload: unknown
|
|
697
926
|
```
|
|
698
927
|
|
|
928
|
+
## `isAgentComputerCommand` (function)
|
|
929
|
+
|
|
930
|
+
```ts
|
|
931
|
+
isAgentComputerCommand: (command: string) => boolean
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
## `isAgentComputerToolCall` (function)
|
|
935
|
+
|
|
936
|
+
```ts
|
|
937
|
+
isAgentComputerToolCall: (argumentsJson: string | null | undefined) => boolean
|
|
938
|
+
```
|
|
939
|
+
|
|
699
940
|
## `isCommandEnvelope` (function)
|
|
700
941
|
|
|
701
942
|
```ts
|
|
@@ -705,7 +946,7 @@ isCommandEnvelope: (value: unknown) => value is CommandEnvelope
|
|
|
705
946
|
## `isHiddenInternalMessage` (function)
|
|
706
947
|
|
|
707
948
|
```ts
|
|
708
|
-
isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content"
|
|
949
|
+
isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">, options?: { includeLegacyForkContext?: boolean; }) => boolean
|
|
709
950
|
```
|
|
710
951
|
|
|
711
952
|
## `isInboundEnvelope` (function)
|
|
@@ -714,6 +955,12 @@ isHiddenInternalMessage: (message: Pick<ChatMessage, "role" | "content">) => boo
|
|
|
714
955
|
isInboundEnvelope: (value: unknown) => value is InboundEnvelope
|
|
715
956
|
```
|
|
716
957
|
|
|
958
|
+
## `isPlanUpdateTool` (function)
|
|
959
|
+
|
|
960
|
+
```ts
|
|
961
|
+
isPlanUpdateTool: (toolCall: Pick<ToolCallInfo, "name">) => boolean
|
|
962
|
+
```
|
|
963
|
+
|
|
717
964
|
## `latestPostChatFollowup` (function)
|
|
718
965
|
|
|
719
966
|
```ts
|
|
@@ -736,6 +983,13 @@ export enum LayoutType {
|
|
|
736
983
|
}
|
|
737
984
|
```
|
|
738
985
|
|
|
986
|
+
## `LiveRevisionState` (interface)
|
|
987
|
+
|
|
988
|
+
```ts
|
|
989
|
+
byTurnId: ReadonlyMap<string, number>
|
|
990
|
+
current: number
|
|
991
|
+
```
|
|
992
|
+
|
|
739
993
|
## `LlmAdvancedSettings` (interface)
|
|
740
994
|
|
|
741
995
|
```ts
|
|
@@ -818,6 +1072,20 @@ id: string
|
|
|
818
1072
|
name: string
|
|
819
1073
|
```
|
|
820
1074
|
|
|
1075
|
+
## `loadPlatformEndpoints` (function)
|
|
1076
|
+
|
|
1077
|
+
```ts
|
|
1078
|
+
loadPlatformEndpoints: (options?: LoadPlatformEndpointsOptions) => Promise<PlatformEndpoints>
|
|
1079
|
+
```
|
|
1080
|
+
|
|
1081
|
+
## `LoadPlatformEndpointsOptions` (interface)
|
|
1082
|
+
|
|
1083
|
+
```ts
|
|
1084
|
+
baseUrl: string | undefined
|
|
1085
|
+
fetchImpl: { (input: RequestInfo | URL, init?: RequestInit): Promise<Response>; (input: string | URL | Request, init?: RequestInit): Promise<Response>; } | undefined
|
|
1086
|
+
timeoutMs: number | undefined
|
|
1087
|
+
```
|
|
1088
|
+
|
|
821
1089
|
## `LoginOptions` (interface)
|
|
822
1090
|
|
|
823
1091
|
```ts
|
|
@@ -864,6 +1132,12 @@ id: number
|
|
|
864
1132
|
skill_name: string | null | undefined
|
|
865
1133
|
```
|
|
866
1134
|
|
|
1135
|
+
## `MemoryRefsHint` (function)
|
|
1136
|
+
|
|
1137
|
+
```ts
|
|
1138
|
+
MemoryRefsHint: ({ refs }: { refs: MemoryRefInfo[]; }) => JSX.Element
|
|
1139
|
+
```
|
|
1140
|
+
|
|
867
1141
|
## `MessageContent` (type)
|
|
868
1142
|
|
|
869
1143
|
```ts
|
|
@@ -889,6 +1163,8 @@ baseUrl: string | undefined
|
|
|
889
1163
|
default: string
|
|
890
1164
|
defaultServiceModel: string | undefined
|
|
891
1165
|
models: ModelOption[]
|
|
1166
|
+
unavailableModelIds: string[] | undefined
|
|
1167
|
+
unavailableProviderIds: string[] | undefined
|
|
892
1168
|
```
|
|
893
1169
|
|
|
894
1170
|
## `ModelOption` (interface)
|
|
@@ -905,6 +1181,12 @@ serviceModelId: string | undefined
|
|
|
905
1181
|
list: () => Promise<ModelCatalog>
|
|
906
1182
|
```
|
|
907
1183
|
|
|
1184
|
+
## `normalizeAdjacentUrlFormatting` (function)
|
|
1185
|
+
|
|
1186
|
+
```ts
|
|
1187
|
+
normalizeAdjacentUrlFormatting: (value: string) => string
|
|
1188
|
+
```
|
|
1189
|
+
|
|
908
1190
|
## `normalizeMessageContent` (function)
|
|
909
1191
|
|
|
910
1192
|
```ts
|
|
@@ -935,6 +1217,26 @@ content: string
|
|
|
935
1217
|
label: string
|
|
936
1218
|
```
|
|
937
1219
|
|
|
1220
|
+
## `ParsedWhatIfPrompt` (interface)
|
|
1221
|
+
|
|
1222
|
+
```ts
|
|
1223
|
+
fromStep: number | null
|
|
1224
|
+
quotes: WhatIfQuote[]
|
|
1225
|
+
userText: string
|
|
1226
|
+
```
|
|
1227
|
+
|
|
1228
|
+
## `parsePlanUpdate` (function)
|
|
1229
|
+
|
|
1230
|
+
```ts
|
|
1231
|
+
parsePlanUpdate: (argumentsJson: string) => PlanUpdateData | null
|
|
1232
|
+
```
|
|
1233
|
+
|
|
1234
|
+
## `parseWhatIfPrompt` (function)
|
|
1235
|
+
|
|
1236
|
+
```ts
|
|
1237
|
+
parseWhatIfPrompt: (text: string) => ParsedWhatIfPrompt | null
|
|
1238
|
+
```
|
|
1239
|
+
|
|
938
1240
|
## `PatchEnvelope` (interface)
|
|
939
1241
|
|
|
940
1242
|
```ts
|
|
@@ -945,6 +1247,55 @@ sequence: number
|
|
|
945
1247
|
turn_id: string
|
|
946
1248
|
```
|
|
947
1249
|
|
|
1250
|
+
## `pickCurrentPlanStep` (function)
|
|
1251
|
+
|
|
1252
|
+
```ts
|
|
1253
|
+
pickCurrentPlanStep: (plan: PlanUpdateData["plan"]) => PlanUpdateData["plan"][number] | null
|
|
1254
|
+
```
|
|
1255
|
+
|
|
1256
|
+
## `PLAN_AUTO_COLLAPSE_MS` (const)
|
|
1257
|
+
|
|
1258
|
+
```ts
|
|
1259
|
+
PLAN_AUTO_COLLAPSE_MS: 5000
|
|
1260
|
+
```
|
|
1261
|
+
|
|
1262
|
+
## `PlanStepStatus` (type)
|
|
1263
|
+
|
|
1264
|
+
```ts
|
|
1265
|
+
export type PlanStepStatus = "pending" | "in_progress" | "completed"
|
|
1266
|
+
```
|
|
1267
|
+
|
|
1268
|
+
## `PlanUpdateBlock` (function)
|
|
1269
|
+
|
|
1270
|
+
```ts
|
|
1271
|
+
PlanUpdateBlock: ({ toolCall, running, autoReveal, }: { toolCall: ToolCallInfo; running?: boolean; autoReveal?: boolean; }) => JSX.Element | null
|
|
1272
|
+
```
|
|
1273
|
+
|
|
1274
|
+
## `PlanUpdateData` (interface)
|
|
1275
|
+
|
|
1276
|
+
```ts
|
|
1277
|
+
plan: { step: string; status: PlanStepStatus; }[]
|
|
1278
|
+
```
|
|
1279
|
+
|
|
1280
|
+
## `PlanUpdateDisplayState` (interface)
|
|
1281
|
+
|
|
1282
|
+
```ts
|
|
1283
|
+
current: ToolCallInfo | null
|
|
1284
|
+
updating: boolean
|
|
1285
|
+
```
|
|
1286
|
+
|
|
1287
|
+
## `PlatformEndpoints` (interface)
|
|
1288
|
+
|
|
1289
|
+
```ts
|
|
1290
|
+
services: Partial<Record<"agent" | "os" | "hub" | "oauth" | "llmGateway" | "gitea" | "tile", string>>
|
|
1291
|
+
```
|
|
1292
|
+
|
|
1293
|
+
## `PlatformServiceName` (type)
|
|
1294
|
+
|
|
1295
|
+
```ts
|
|
1296
|
+
export type PlatformServiceName = (typeof PLATFORM_SERVICE_NAMES)[number]
|
|
1297
|
+
```
|
|
1298
|
+
|
|
948
1299
|
## `PostChatFollowup` (interface)
|
|
949
1300
|
|
|
950
1301
|
```ts
|
|
@@ -975,6 +1326,12 @@ bizRoleId: string | undefined
|
|
|
975
1326
|
kind: "prepared"
|
|
976
1327
|
```
|
|
977
1328
|
|
|
1329
|
+
## `prependOlder` (function)
|
|
1330
|
+
|
|
1331
|
+
```ts
|
|
1332
|
+
prependOlder: (current: TurnProjection[], page: TurnProjection[]) => TurnProjection[]
|
|
1333
|
+
```
|
|
1334
|
+
|
|
978
1335
|
## `PrimarySkillParallelMode` (interface)
|
|
979
1336
|
|
|
980
1337
|
```ts
|
|
@@ -1017,6 +1374,24 @@ payload: Record<string, unknown>
|
|
|
1017
1374
|
type: string
|
|
1018
1375
|
```
|
|
1019
1376
|
|
|
1377
|
+
## `reconcileHistoricalUserTurns` (function)
|
|
1378
|
+
|
|
1379
|
+
```ts
|
|
1380
|
+
reconcileHistoricalUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
|
|
1381
|
+
```
|
|
1382
|
+
|
|
1383
|
+
## `reconcileOptimisticUserTurns` (function)
|
|
1384
|
+
|
|
1385
|
+
```ts
|
|
1386
|
+
reconcileOptimisticUserTurns: (currentTurns: TurnProjection[], incomingTurns: TurnProjection[]) => TurnProjection[]
|
|
1387
|
+
```
|
|
1388
|
+
|
|
1389
|
+
## `replaceWindow` (function)
|
|
1390
|
+
|
|
1391
|
+
```ts
|
|
1392
|
+
replaceWindow: (current: TurnProjection[], page: TurnProjection[], liveRevisionAtStart: number, liveRevisions: LiveRevisionState) => TurnProjection[]
|
|
1393
|
+
```
|
|
1394
|
+
|
|
1020
1395
|
## `ReplayBar` (function)
|
|
1021
1396
|
|
|
1022
1397
|
```ts
|
|
@@ -1089,6 +1464,12 @@ speed: ReplaySpeed | undefined
|
|
|
1089
1464
|
status: "replay" | "autonomous" | undefined
|
|
1090
1465
|
```
|
|
1091
1466
|
|
|
1467
|
+
## `resolveServiceUrl` (function)
|
|
1468
|
+
|
|
1469
|
+
```ts
|
|
1470
|
+
resolveServiceUrl: (endpoints: PlatformEndpoints, name: PlatformServiceName, path?: string) => string | null
|
|
1471
|
+
```
|
|
1472
|
+
|
|
1092
1473
|
## `ResultFeedback` (interface)
|
|
1093
1474
|
|
|
1094
1475
|
```ts
|
|
@@ -1160,6 +1541,7 @@ SDK_VERSION: string
|
|
|
1160
1541
|
|
|
1161
1542
|
```ts
|
|
1162
1543
|
askUserAnswer: Record<string, unknown> | undefined
|
|
1544
|
+
kbIds: number[] | undefined
|
|
1163
1545
|
mode: string | undefined
|
|
1164
1546
|
model: string | undefined
|
|
1165
1547
|
replayDecision: "keep_replay" | "continue_replay" | undefined
|
|
@@ -1167,6 +1549,33 @@ thinkingOverride: boolean | undefined
|
|
|
1167
1549
|
whatif: { from_step: number; quotes: Array<Record<string, unknown>>; deprecate_entry_ids: string[]; } | undefined
|
|
1168
1550
|
```
|
|
1169
1551
|
|
|
1552
|
+
## `SessionComputer` (interface)
|
|
1553
|
+
|
|
1554
|
+
```ts
|
|
1555
|
+
agent_runtimes: unknown[] | undefined
|
|
1556
|
+
allowed_paths: string[] | undefined
|
|
1557
|
+
arch: string | null | undefined
|
|
1558
|
+
blade_home: string | null | undefined
|
|
1559
|
+
created_at: string
|
|
1560
|
+
daemon_version: string | null | undefined
|
|
1561
|
+
enabled: boolean
|
|
1562
|
+
home: string | null | undefined
|
|
1563
|
+
hostname: string | null | undefined
|
|
1564
|
+
id: string
|
|
1565
|
+
is_primary: boolean
|
|
1566
|
+
label: string
|
|
1567
|
+
last_seen_at: string | null | undefined
|
|
1568
|
+
online: boolean
|
|
1569
|
+
os: string | null | undefined
|
|
1570
|
+
workspace: string | null | undefined
|
|
1571
|
+
```
|
|
1572
|
+
|
|
1573
|
+
## `SessionComputerList` (interface)
|
|
1574
|
+
|
|
1575
|
+
```ts
|
|
1576
|
+
computers: SessionComputer[]
|
|
1577
|
+
```
|
|
1578
|
+
|
|
1170
1579
|
## `SessionConfig` (interface)
|
|
1171
1580
|
|
|
1172
1581
|
```ts
|
|
@@ -1178,6 +1587,12 @@ memoryEnabled: boolean | undefined
|
|
|
1178
1587
|
model: string | undefined
|
|
1179
1588
|
```
|
|
1180
1589
|
|
|
1590
|
+
## `SessionConnectOptions` (interface)
|
|
1591
|
+
|
|
1592
|
+
```ts
|
|
1593
|
+
setup: ((session: AgentSession) => void) | undefined
|
|
1594
|
+
```
|
|
1595
|
+
|
|
1181
1596
|
## `SessionContextStats` (interface)
|
|
1182
1597
|
|
|
1183
1598
|
```ts
|
|
@@ -1198,6 +1613,8 @@ solution: SolutionDefinition | undefined
|
|
|
1198
1613
|
## `SessionDetail` (interface)
|
|
1199
1614
|
|
|
1200
1615
|
```ts
|
|
1616
|
+
agent_runtime_id: string | null | undefined
|
|
1617
|
+
ba_version: string | null | undefined
|
|
1201
1618
|
biz_role_id: string | null | undefined
|
|
1202
1619
|
bound_skill_id: string | null | undefined
|
|
1203
1620
|
created_at: string
|
|
@@ -1222,6 +1639,7 @@ primary_skill_id: string | null | undefined
|
|
|
1222
1639
|
primary_skill_snapshot: PrimarySkillSnapshot | null | undefined
|
|
1223
1640
|
replay_state: ReplayState | null | undefined
|
|
1224
1641
|
runtime_type: string | null | undefined
|
|
1642
|
+
sandbox_version: string | null | undefined
|
|
1225
1643
|
shared: boolean | undefined
|
|
1226
1644
|
solution: Solution | null | undefined
|
|
1227
1645
|
solution_id: string | null | undefined
|
|
@@ -1247,7 +1665,7 @@ tools_tokens: number | null | undefined
|
|
|
1247
1665
|
## `SessionHub` (class)
|
|
1248
1666
|
|
|
1249
1667
|
```ts
|
|
1250
|
-
connect: (sessionId: string) => Promise<AgentSession>
|
|
1668
|
+
connect: (sessionId: string, options?: SessionConnectOptions) => Promise<AgentSession>
|
|
1251
1669
|
disconnect: () => void
|
|
1252
1670
|
disposeAll: () => void
|
|
1253
1671
|
getConnection: () => ConnectionStatus
|
|
@@ -1290,11 +1708,35 @@ SessionInfo = type({
|
|
|
1290
1708
|
"disable_tools?": "string[]",
|
|
1291
1709
|
"runtime_type?": "string | null",
|
|
1292
1710
|
"daemon_id?": "string | null",
|
|
1711
|
+
"agent_runtime_id?": "string | null",
|
|
1293
1712
|
"workspace_path?": "string | null",
|
|
1713
|
+
"ba_version?": "string | null",
|
|
1714
|
+
"sandbox_version?": "string | null",
|
|
1294
1715
|
"match?": "unknown",
|
|
1295
1716
|
})
|
|
1296
1717
|
```
|
|
1297
1718
|
|
|
1719
|
+
## `SessionMemoryToggle` (function)
|
|
1720
|
+
|
|
1721
|
+
```ts
|
|
1722
|
+
SessionMemoryToggle: ({ sessionId, enabled, client: clientProp, disabled, label, className, labelClassName, inputClassName, onSaved, onError, }: SessionMemoryToggleProps) => JSX.Element
|
|
1723
|
+
```
|
|
1724
|
+
|
|
1725
|
+
## `SessionMemoryToggleProps` (interface)
|
|
1726
|
+
|
|
1727
|
+
```ts
|
|
1728
|
+
className: string | undefined
|
|
1729
|
+
client: BladeClient | undefined
|
|
1730
|
+
disabled: boolean | undefined
|
|
1731
|
+
enabled: boolean
|
|
1732
|
+
inputClassName: string | undefined
|
|
1733
|
+
label: string | undefined
|
|
1734
|
+
labelClassName: string | undefined
|
|
1735
|
+
onError: ((error: unknown) => void) | undefined
|
|
1736
|
+
onSaved: ((sessionId: string, enabled: boolean) => void) | undefined
|
|
1737
|
+
sessionId: string
|
|
1738
|
+
```
|
|
1739
|
+
|
|
1298
1740
|
## `SessionPortMapping` (interface)
|
|
1299
1741
|
|
|
1300
1742
|
```ts
|
|
@@ -1356,7 +1798,9 @@ getSessionCheckpoints: (sessionId: string, init?: RequestInit) => Promise<{ node
|
|
|
1356
1798
|
getSessionContextStats: (sessionId: string, init?: RequestInit) => Promise<SessionContextStats>
|
|
1357
1799
|
getSessionHistory: (sessionId: string, init?: RequestInit) => Promise<SessionHistory>
|
|
1358
1800
|
getSessionTasks: (sessionId: string) => Promise<Task[]>
|
|
1801
|
+
getSessionTurnCommands: (sessionId: string) => Promise<HistoricalCommand[]>
|
|
1359
1802
|
getSessionTurns: (sessionId: string) => Promise<TurnProjection[]>
|
|
1803
|
+
getSessionTurnsPage: (sessionId: string, options?: { limit?: number; before?: string; }) => Promise<SessionTurnsPage>
|
|
1360
1804
|
getSharedSession: (token: string) => Promise<TurnProjection[]>
|
|
1361
1805
|
importSession: (file: File, name?: string, solutionOverride?: string | null | ImportSessionOptions) => Promise<{ session_id: string; }>
|
|
1362
1806
|
listBackgroundTasks: (sessionId: string, init?: RequestInit) => Promise<BackgroundTask[]>
|
|
@@ -1397,8 +1841,10 @@ askAnswers: Record<string, AskUserAnswerData>
|
|
|
1397
1841
|
connection: ConnectionStatus
|
|
1398
1842
|
errorMessage: string | null
|
|
1399
1843
|
isStreaming: boolean
|
|
1844
|
+
loadingOlder: boolean
|
|
1400
1845
|
messages: ChatMessage[]
|
|
1401
1846
|
mode: "planning" | "executing" | null
|
|
1847
|
+
nextBefore: string | null
|
|
1402
1848
|
replay: ReplaySnapshot | null
|
|
1403
1849
|
sessionId: string
|
|
1404
1850
|
status: "completed" | "failed" | "interrupted" | "running" | "created" | "waiting_for_input" | null
|
|
@@ -1414,6 +1860,14 @@ SessionStatus = type(
|
|
|
1414
1860
|
)
|
|
1415
1861
|
```
|
|
1416
1862
|
|
|
1863
|
+
## `SessionTurnsPage` (interface)
|
|
1864
|
+
|
|
1865
|
+
```ts
|
|
1866
|
+
currentMode: "planning" | "executing"
|
|
1867
|
+
nextBefore: string | null
|
|
1868
|
+
turns: TurnProjection[]
|
|
1869
|
+
```
|
|
1870
|
+
|
|
1417
1871
|
## `ShareLinkResult` (interface)
|
|
1418
1872
|
|
|
1419
1873
|
```ts
|
|
@@ -1506,6 +1960,12 @@ export type SolutionDefinition =
|
|
|
1506
1960
|
export type SolutionRef = ExistingSolutionRef | PreparedSolutionAsset
|
|
1507
1961
|
```
|
|
1508
1962
|
|
|
1963
|
+
## `sortComputers` (function)
|
|
1964
|
+
|
|
1965
|
+
```ts
|
|
1966
|
+
sortComputers: (computers: SessionComputer[]) => SessionComputer[]
|
|
1967
|
+
```
|
|
1968
|
+
|
|
1509
1969
|
## `Task` (type)
|
|
1510
1970
|
|
|
1511
1971
|
```ts
|
|
@@ -1604,13 +2064,26 @@ archived_count: number | null | undefined
|
|
|
1604
2064
|
archived_files: ArchivedFileInfo[] | null | undefined
|
|
1605
2065
|
archived_tool_calls: ArchivedToolCallInfo[] | null | undefined
|
|
1606
2066
|
blocks: ContentBlock[]
|
|
2067
|
+
client_render_id: string | null | undefined
|
|
2068
|
+
client_request_id: string | null | undefined
|
|
1607
2069
|
compaction_id: string | null | undefined
|
|
2070
|
+
context_action: ContextAction | null | undefined
|
|
2071
|
+
context_content: unknown
|
|
2072
|
+
context_key: string | null | undefined
|
|
2073
|
+
context_kind: string | null | undefined
|
|
2074
|
+
context_name: string | null | undefined
|
|
2075
|
+
context_order: number | null | undefined
|
|
2076
|
+
context_revision: string | null | undefined
|
|
1608
2077
|
context_window: number | undefined
|
|
2078
|
+
display_summary: string | null | undefined
|
|
2079
|
+
display_title: string | null | undefined
|
|
1609
2080
|
duration_ms: number | undefined
|
|
1610
2081
|
failure_reason: string | null | undefined
|
|
1611
2082
|
fallback_applied: boolean | null | undefined
|
|
2083
|
+
first_token_delivery_ms: number | null | undefined
|
|
2084
|
+
first_token_ms: number | null | undefined
|
|
1612
2085
|
id: string
|
|
1613
|
-
kind: "message" | "compaction" | undefined
|
|
2086
|
+
kind: "message" | "context" | "compaction" | undefined
|
|
1614
2087
|
loop_id: string
|
|
1615
2088
|
memory_refs: MemoryRef[] | null | undefined
|
|
1616
2089
|
model: string | null | undefined
|
|
@@ -1619,8 +2092,10 @@ post_chat_followup: PostChatFollowup | null | undefined
|
|
|
1619
2092
|
role: "user" | "assistant" | "system"
|
|
1620
2093
|
saved_ratio: number | null | undefined
|
|
1621
2094
|
sequence: number
|
|
2095
|
+
sources: ContextSourceInfo[] | null | undefined
|
|
1622
2096
|
started_at: string | null | undefined
|
|
1623
2097
|
status: "streaming" | "completed" | "paused" | "failed" | "interrupted"
|
|
2098
|
+
stream_duration_ms: number | null | undefined
|
|
1624
2099
|
summary_full: string | null | undefined
|
|
1625
2100
|
summary_preview: string | null | undefined
|
|
1626
2101
|
tokens_after: number | null | undefined
|
|
@@ -1667,6 +2142,7 @@ useAgentSession: (sessionId?: string, options?: UseAgentSessionOptions) => UseAg
|
|
|
1667
2142
|
|
|
1668
2143
|
```ts
|
|
1669
2144
|
createOptions: CreateSessionRequest | undefined
|
|
2145
|
+
onSessionConnected: ((session: AgentSession) => () => void) | undefined
|
|
1670
2146
|
onSessionCreated: ((sessionId: string) => void) | undefined
|
|
1671
2147
|
```
|
|
1672
2148
|
|
|
@@ -1701,6 +2177,29 @@ send: (text: string) => Promise<boolean>
|
|
|
1701
2177
|
stop: () => void
|
|
1702
2178
|
```
|
|
1703
2179
|
|
|
2180
|
+
## `useMessagePin` (function)
|
|
2181
|
+
|
|
2182
|
+
```ts
|
|
2183
|
+
useMessagePin: ({ targetKey, pinTarget, layoutKey, getScrollElement, getContentElement, getTargetElement, getTargetScrollTop, getSpacerHeight, setSpacerHeight, stopAutoScroll, scrollToBottom, margin, }: UseMessagePinOptions) => { release: () => void; isActive: () => boolean; }
|
|
2184
|
+
```
|
|
2185
|
+
|
|
2186
|
+
## `UseMessagePinOptions` (interface)
|
|
2187
|
+
|
|
2188
|
+
```ts
|
|
2189
|
+
getContentElement: (() => HTMLElement | null) | undefined
|
|
2190
|
+
getScrollElement: () => HTMLElement | null
|
|
2191
|
+
getSpacerHeight: () => number
|
|
2192
|
+
getTargetElement: () => HTMLElement | null
|
|
2193
|
+
getTargetScrollTop: ((scroll: HTMLElement) => number | null) | undefined
|
|
2194
|
+
layoutKey: string | undefined
|
|
2195
|
+
margin: number | undefined
|
|
2196
|
+
pinTarget: boolean
|
|
2197
|
+
scrollToBottom: () => void
|
|
2198
|
+
setSpacerHeight: (height: number) => void
|
|
2199
|
+
stopAutoScroll: () => void
|
|
2200
|
+
targetKey: string | null
|
|
2201
|
+
```
|
|
2202
|
+
|
|
1704
2203
|
## `useReplay` (function)
|
|
1705
2204
|
|
|
1706
2205
|
```ts
|
|
@@ -1735,3 +2234,24 @@ token: string
|
|
|
1735
2234
|
username: string
|
|
1736
2235
|
```
|
|
1737
2236
|
|
|
2237
|
+
## `WhatIfQuote` (interface)
|
|
2238
|
+
|
|
2239
|
+
```ts
|
|
2240
|
+
label: string
|
|
2241
|
+
snapshot: string
|
|
2242
|
+
stepNumber: number | null
|
|
2243
|
+
```
|
|
2244
|
+
|
|
2245
|
+
## `WhatIfUserBubble` (function)
|
|
2246
|
+
|
|
2247
|
+
```ts
|
|
2248
|
+
WhatIfUserBubble: ({ parsed, onQuoteClick }: WhatIfUserBubbleProps) => JSX.Element
|
|
2249
|
+
```
|
|
2250
|
+
|
|
2251
|
+
## `WhatIfUserBubbleProps` (interface)
|
|
2252
|
+
|
|
2253
|
+
```ts
|
|
2254
|
+
onQuoteClick: ((stepNumber: number) => void) | undefined
|
|
2255
|
+
parsed: ParsedWhatIfPrompt
|
|
2256
|
+
```
|
|
2257
|
+
|