@blade-hq/agent-kit 0.0.0-placeholder.0 → 0.4.4
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 +66 -3
- package/dist/AskUserQuestionBlock-CjvG_pUY.d.ts +116 -0
- package/dist/SkillStatusBar-DItrW2vv.d.ts +203 -0
- package/dist/blade-client-nOsdVlb1.d.ts +1498 -0
- package/dist/client/index.d.ts +8036 -0
- package/dist/client/index.js +1057 -0
- package/dist/client/index.js.map +1 -0
- package/dist/licenses-Cxl1xGVy.d.ts +16 -0
- package/dist/projection-DIfyh6RK.d.ts +85 -0
- package/dist/react/api/licenses.d.ts +7 -0
- package/dist/react/api/licenses.js +1477 -0
- package/dist/react/api/licenses.js.map +1 -0
- package/dist/react/api/vibe-coding.d.ts +55 -0
- package/dist/react/api/vibe-coding.js +1503 -0
- package/dist/react/api/vibe-coding.js.map +1 -0
- package/dist/react/cards/register.d.ts +2 -0
- package/dist/react/cards/register.js +4367 -0
- package/dist/react/cards/register.js.map +1 -0
- package/dist/react/components/chat/index.d.ts +128 -0
- package/dist/react/components/chat/index.js +11389 -0
- package/dist/react/components/chat/index.js.map +1 -0
- package/dist/react/components/plan/index.d.ts +111 -0
- package/dist/react/components/plan/index.js +3490 -0
- package/dist/react/components/plan/index.js.map +1 -0
- package/dist/react/components/session/index.d.ts +53 -0
- package/dist/react/components/session/index.js +2175 -0
- package/dist/react/components/session/index.js.map +1 -0
- package/dist/react/components/workspace/index.d.ts +35 -0
- package/dist/react/components/workspace/index.js +2886 -0
- package/dist/react/components/workspace/index.js.map +1 -0
- package/dist/react/devtools/bridge-devtools/index.d.ts +36 -0
- package/dist/react/devtools/bridge-devtools/index.js +692 -0
- package/dist/react/devtools/bridge-devtools/index.js.map +1 -0
- package/dist/react/index.d.ts +1283 -0
- package/dist/react/index.js +14299 -0
- package/dist/react/index.js.map +1 -0
- package/dist/session-CDeiO81j.d.ts +128 -0
- package/package.json +73 -7
- package/index.js +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,67 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Blade Agent 前端 SDK
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
`@blade-hq/agent-kit` 是 Blade Agent 的前端 SDK。本期只在仓库内使用和验证,不包含 npm 发布说明。
|
|
4
|
+
|
|
5
|
+
## 子包
|
|
6
|
+
|
|
7
|
+
SDK 通过两个子包暴露能力:
|
|
8
|
+
|
|
9
|
+
- `@blade-hq/agent-kit/client`:纯网络客户端,提供 `BladeClient`、REST 资源方法和强类型 Socket.IO 连接。它不依赖 React,适合 Vue 项目、Node.js 服务端脚本和其他第三方集成。
|
|
10
|
+
- `@blade-hq/agent-kit/react`:React 绑定,提供 Provider、Hooks、Stores、组件和内部业务视图。Blade Agent 自带的 `apps/web` 使用这个子包完成全栈 dogfooding。
|
|
11
|
+
|
|
12
|
+
## 安装
|
|
13
|
+
|
|
14
|
+
仓库内应用通过 pnpm workspace 直接引用:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm install
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
第三方项目未来发布后可安装同一个包,并按需要选择子包入口:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { BladeClient } from "@blade-hq/agent-kit/client"
|
|
24
|
+
import { BladeClientProvider } from "@blade-hq/agent-kit/react"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## 认证
|
|
28
|
+
|
|
29
|
+
SDK 支持 cookie 会话和 Bearer Token 两种模式。
|
|
30
|
+
|
|
31
|
+
首方 Web 应用通常使用 cookie 会话:
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
const client = new BladeClient({ baseUrl: "https://blade.example.com" })
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
这种模式下,REST 请求始终使用 `credentials: "include"`,不会发送 `Authorization`;Socket.IO 连接不发送 token,由浏览器自动携带 cookie。
|
|
38
|
+
|
|
39
|
+
第三方接入使用 Bearer Token。Token 必须在构造 `BladeClient` 时注入,不能在单次方法调用时临时传入:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
const client = new BladeClient({
|
|
43
|
+
baseUrl: "https://blade.example.com",
|
|
44
|
+
token: "sk-blade-xxx",
|
|
45
|
+
})
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
这种模式下,REST 请求仍然携带 cookie,同时额外发送 `Authorization: Bearer sk-blade-xxx`;Socket.IO 连接会发送 `auth: { token: "sk-blade-xxx" }`。当 cookie 和 Bearer Token 同时存在时,由后端按现有规则优先识别 Bearer Token,SDK 不主动二选一。
|
|
49
|
+
|
|
50
|
+
如果 `token` 是空字符串,SDK 按 cookie 会话模式处理,不会发送空的 `Authorization` 或 Socket.IO token。`buildAuthedUrl()` 只会给同一后端域名追加 `?token=...`,用于文件预览等无法自定义请求头的场景;外部绝对 URL 不会被追加 Blade token。
|
|
51
|
+
|
|
52
|
+
## 类型生成
|
|
53
|
+
|
|
54
|
+
SDK 的类型来源以后端为准,生成产物提交到仓库,确保本地安装后可以直接 typecheck。
|
|
55
|
+
|
|
56
|
+
- REST 类型来自 FastAPI 暴露的 `/openapi.json`,由 `openapi-typescript` 生成到 `src/client/types/rest.ts`。
|
|
57
|
+
- Socket.IO 事件类型来自后端 `socket_schemas` 中的 Pydantic schema,生成到 `src/client/types/socket-events.ts`。
|
|
58
|
+
- `src/client/types/index.ts` 提供业务侧常用类型别名,避免应用代码直接依赖冗长的 OpenAPI 路径类型。
|
|
59
|
+
|
|
60
|
+
本地更新类型时,需要先启动后端,再执行:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cd web
|
|
64
|
+
pnpm -F @blade-hq/agent-kit gen:types
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
CI 会重新生成类型并校验 `web/packages/agent-kit/src/client/types/` 没有 diff,用来阻止后端 schema 与前端 SDK 类型漂移。
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { P as PendingQuestionRef, C as ContentBlock } from './projection-DIfyh6RK.js';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
interface TextContentPart {
|
|
5
|
+
type: "text";
|
|
6
|
+
text: string;
|
|
7
|
+
}
|
|
8
|
+
interface ImageUrlContentPart {
|
|
9
|
+
type: "image_url";
|
|
10
|
+
image_url: {
|
|
11
|
+
url: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface FileContentPart {
|
|
15
|
+
type: "file";
|
|
16
|
+
name: string;
|
|
17
|
+
data: string;
|
|
18
|
+
}
|
|
19
|
+
type MessageContentPart = TextContentPart | ImageUrlContentPart | FileContentPart;
|
|
20
|
+
type MessageContent = string | MessageContentPart[];
|
|
21
|
+
interface ToolCallInfo {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
display_name?: string | null;
|
|
25
|
+
arguments: string;
|
|
26
|
+
result?: unknown;
|
|
27
|
+
status?: "pending" | "done" | "error" | "cancelled" | "awaiting_answer";
|
|
28
|
+
duration_ms?: number | null;
|
|
29
|
+
pending_question_ref?: PendingQuestionRef | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface MemoryRefInfo {
|
|
33
|
+
id: number;
|
|
34
|
+
content_preview: string;
|
|
35
|
+
skill_name?: string | null;
|
|
36
|
+
}
|
|
37
|
+
interface CompactionInfo {
|
|
38
|
+
compaction_id: string;
|
|
39
|
+
summary_preview?: string | null;
|
|
40
|
+
summary_full?: string | null;
|
|
41
|
+
archived_count?: number | null;
|
|
42
|
+
archived_files?: ArchivedFileInfo[] | null;
|
|
43
|
+
archived_tool_calls?: ArchivedToolCallInfo[] | null;
|
|
44
|
+
tokens_before?: number | null;
|
|
45
|
+
tokens_after?: number | null;
|
|
46
|
+
saved_ratio?: number | null;
|
|
47
|
+
trigger?: "auto" | "manual" | "forced_retry" | null;
|
|
48
|
+
failure_reason?: string | null;
|
|
49
|
+
fallback_applied?: boolean | null;
|
|
50
|
+
}
|
|
51
|
+
interface ArchivedFileInfo {
|
|
52
|
+
tool_name?: string | null;
|
|
53
|
+
filename?: string | null;
|
|
54
|
+
relative_path?: string | null;
|
|
55
|
+
size_bytes?: number | null;
|
|
56
|
+
}
|
|
57
|
+
interface ArchivedToolCallInfo {
|
|
58
|
+
tool_call_id?: string | null;
|
|
59
|
+
tool_name?: string | null;
|
|
60
|
+
archive_path?: string | null;
|
|
61
|
+
replacement_content?: string | null;
|
|
62
|
+
entry_id?: string | null;
|
|
63
|
+
}
|
|
64
|
+
interface ChatMessage {
|
|
65
|
+
role: "user" | "assistant" | "tool" | "error";
|
|
66
|
+
content: MessageContent;
|
|
67
|
+
reasoning?: string;
|
|
68
|
+
tool_calls?: ToolCallInfo[];
|
|
69
|
+
status?: "streaming" | "completed" | "paused" | "failed" | "interrupted";
|
|
70
|
+
duration_ms?: number;
|
|
71
|
+
timestamp?: string;
|
|
72
|
+
entry_id?: string;
|
|
73
|
+
parent_id?: string | null;
|
|
74
|
+
loop_name?: string;
|
|
75
|
+
/** Entry kind from backend — present for non-message entries like planning_enter/exit */
|
|
76
|
+
kind?: string;
|
|
77
|
+
/** Memory references injected into this turn's context */
|
|
78
|
+
memory_refs?: MemoryRefInfo[];
|
|
79
|
+
/** Raw projection blocks for block-level UI rendering. */
|
|
80
|
+
blocks?: ContentBlock[];
|
|
81
|
+
/** Compaction metadata for compaction turns. */
|
|
82
|
+
compaction?: CompactionInfo;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface OptionItem {
|
|
86
|
+
label: string;
|
|
87
|
+
description: string;
|
|
88
|
+
}
|
|
89
|
+
interface QuestionItem {
|
|
90
|
+
question: string;
|
|
91
|
+
options: OptionItem[];
|
|
92
|
+
multiSelect?: boolean;
|
|
93
|
+
}
|
|
94
|
+
interface SourceLoopInfo {
|
|
95
|
+
loop_name: string;
|
|
96
|
+
description: string;
|
|
97
|
+
}
|
|
98
|
+
interface AskUserQuestionData {
|
|
99
|
+
questions: QuestionItem[];
|
|
100
|
+
source_loop?: SourceLoopInfo | null;
|
|
101
|
+
}
|
|
102
|
+
type AskUserAnswerData = {
|
|
103
|
+
selections: Record<number, number[]>;
|
|
104
|
+
custom: Record<number, string>;
|
|
105
|
+
};
|
|
106
|
+
interface Props {
|
|
107
|
+
data: AskUserQuestionData;
|
|
108
|
+
answered: boolean;
|
|
109
|
+
toolCallId: string;
|
|
110
|
+
sessionStatus: string;
|
|
111
|
+
answerData?: AskUserAnswerData | undefined;
|
|
112
|
+
onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
|
|
113
|
+
}
|
|
114
|
+
declare function AskUserQuestionBlock({ data, answered, toolCallId, sessionStatus, answerData, onAnswer, }: Props): react_jsx_runtime.JSX.Element;
|
|
115
|
+
|
|
116
|
+
export { type AskUserAnswerData as A, type ChatMessage as C, type FileContentPart as F, type ImageUrlContentPart as I, type MessageContent as M, type ToolCallInfo as T, type CompactionInfo as a, AskUserQuestionBlock as b, type MessageContentPart as c, type TextContentPart as d };
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { M as MessageContent, C as ChatMessage, A as AskUserAnswerData } from './AskUserQuestionBlock-CjvG_pUY.js';
|
|
5
|
+
import * as zustand from 'zustand';
|
|
6
|
+
import { M as ModeId, S as SessionInfo, a as SessionStatus } from './session-CDeiO81j.js';
|
|
7
|
+
import { m as BladeClient } from './blade-client-nOsdVlb1.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 把 whatif-rerun 后端组装的 prompt 文本解析成可折叠展示的结构。
|
|
11
|
+
*
|
|
12
|
+
* 当前后端格式(`host/orchestrator/whatif_rerun.py::_compose_whatif_prompt`):
|
|
13
|
+
*
|
|
14
|
+
* 以下消息和 step 产物标记为 deprecated_by_rerun,请基于最新用户假设从 step{N} 开始完整重新推演,不要复用旧结论。
|
|
15
|
+
*
|
|
16
|
+
* [引用]
|
|
17
|
+
* [步骤{n} · {label}]
|
|
18
|
+
* {snapshot markdown…(内部允许空行)}
|
|
19
|
+
* [步骤{m} · {label}]
|
|
20
|
+
* {snapshot markdown…}
|
|
21
|
+
*
|
|
22
|
+
* [用户输入]
|
|
23
|
+
* {用户真正输入的文本}
|
|
24
|
+
*
|
|
25
|
+
* Legacy 格式(历史 session 里没有 `[用户输入]` 标签):
|
|
26
|
+
* …最后一条 snapshot 末尾…
|
|
27
|
+
* <空行>
|
|
28
|
+
* {用户真正输入的文本}
|
|
29
|
+
*
|
|
30
|
+
* Legacy 情况下用"从末尾反向扫描第一段连续空行"做切分。markdown 末尾段落
|
|
31
|
+
* 被误吃的风险可接受——总比让用户完全看不到自己的输入好。
|
|
32
|
+
*/
|
|
33
|
+
interface WhatIfQuote {
|
|
34
|
+
stepNumber: number | null;
|
|
35
|
+
label: string;
|
|
36
|
+
snapshot: string;
|
|
37
|
+
}
|
|
38
|
+
interface ParsedWhatIfPrompt {
|
|
39
|
+
fromStep: number | null;
|
|
40
|
+
quotes: WhatIfQuote[];
|
|
41
|
+
userText: string;
|
|
42
|
+
}
|
|
43
|
+
interface BuildWhatIfPromptInput {
|
|
44
|
+
fromStep: number;
|
|
45
|
+
quotes: Array<{
|
|
46
|
+
stepNumber?: number | null;
|
|
47
|
+
label?: string | null;
|
|
48
|
+
snapshot?: string | null;
|
|
49
|
+
}>;
|
|
50
|
+
userText: string;
|
|
51
|
+
}
|
|
52
|
+
declare function buildWhatIfPrompt({ fromStep, quotes, userText, }: BuildWhatIfPromptInput): string;
|
|
53
|
+
declare function parseWhatIfPrompt(text: string): ParsedWhatIfPrompt | null;
|
|
54
|
+
|
|
55
|
+
interface ClientAwareState {
|
|
56
|
+
_client: BladeClient | null;
|
|
57
|
+
setClient: (client: BladeClient) => void;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare const ATTACHMENT_SIZE_LIMIT_BYTES: number;
|
|
61
|
+
type OversizedFileInfo = {
|
|
62
|
+
name: string;
|
|
63
|
+
size: number;
|
|
64
|
+
};
|
|
65
|
+
declare function formatFileSize(size: number): string;
|
|
66
|
+
declare function splitFilesBySize(files: FileList | File[], limitBytes?: number): {
|
|
67
|
+
accepted: File[];
|
|
68
|
+
rejected: OversizedFileInfo[];
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
interface ChatViewProps {
|
|
72
|
+
sessionId: string;
|
|
73
|
+
renderAttachments?: () => ReactNode;
|
|
74
|
+
onBeforeSend?: (content: MessageContent) => MessageContent;
|
|
75
|
+
onCommand?: (commandId: string) => void | Promise<void>;
|
|
76
|
+
canShareSession?: boolean;
|
|
77
|
+
onResyncSkills?: () => void;
|
|
78
|
+
isResyncingSkills?: boolean;
|
|
79
|
+
}
|
|
80
|
+
declare function ChatView({ sessionId, renderAttachments, onBeforeSend, onCommand, canShareSession, onResyncSkills, isResyncingSkills, }: ChatViewProps): react_jsx_runtime.JSX.Element;
|
|
81
|
+
|
|
82
|
+
type SessionMode = ModeId;
|
|
83
|
+
interface SessionState extends ClientAwareState {
|
|
84
|
+
sessions: SessionInfo[];
|
|
85
|
+
activeSessionId: string | null;
|
|
86
|
+
loading: boolean;
|
|
87
|
+
modes: Record<string, SessionMode>;
|
|
88
|
+
rewindDrafts: Record<string, string>;
|
|
89
|
+
/** Session IDs that were just created and haven't had their first history load yet */
|
|
90
|
+
_freshSessions: Set<string>;
|
|
91
|
+
fetchSessions: () => Promise<void>;
|
|
92
|
+
createSession: (intent?: string) => Promise<string>;
|
|
93
|
+
registerCreatedSession: (session: SessionInfo, mode?: SessionMode) => void;
|
|
94
|
+
upsertSession: (session: SessionInfo) => void;
|
|
95
|
+
isFreshSession: (sessionId: string) => boolean;
|
|
96
|
+
setActiveSession: (id: string) => void;
|
|
97
|
+
clearActiveSession: () => void;
|
|
98
|
+
deleteSession: (id: string) => Promise<void>;
|
|
99
|
+
updateSessionStatus: (sessionId: string, status: SessionStatus) => void;
|
|
100
|
+
updateSessionIntent: (sessionId: string, intent: string) => void;
|
|
101
|
+
/**
|
|
102
|
+
* ship-attack v2:通用增量更新 session 字段。用于 session:updated 等事件
|
|
103
|
+
* 广播"后端刚改了 session 元数据(intent / bound_skill_id / ...)"时,
|
|
104
|
+
* 前端原地 patch sessions 缓存,而不需要重新拉整个列表。
|
|
105
|
+
*/
|
|
106
|
+
patchSession: (sessionId: string, patch: Partial<SessionInfo>) => void;
|
|
107
|
+
pinSession: (sessionId: string, pinned: boolean) => Promise<void>;
|
|
108
|
+
setRewindDraft: (sessionId: string, text: string | null) => void;
|
|
109
|
+
setMode: (sessionId: string, mode: SessionMode) => void;
|
|
110
|
+
togglePlanningMode: (sessionId: string) => void;
|
|
111
|
+
toggleSharing: (sessionId: string) => Promise<void>;
|
|
112
|
+
reset: () => void;
|
|
113
|
+
}
|
|
114
|
+
/** 侧栏等使用 React Query 拉取会话列表时,与 zustand patch 同步失效。 */
|
|
115
|
+
declare function invalidateHomeSidebarSessions(): void;
|
|
116
|
+
declare const useSessionStore: zustand.UseBoundStore<zustand.StoreApi<SessionState>>;
|
|
117
|
+
|
|
118
|
+
interface Props$2 {
|
|
119
|
+
onSend: (message: MessageContent, targetSessionId?: string, model?: string | null) => void;
|
|
120
|
+
onStop: () => void;
|
|
121
|
+
isStreaming: boolean;
|
|
122
|
+
mode?: SessionMode;
|
|
123
|
+
onToggleMode?: () => void;
|
|
124
|
+
renderAttachments?: () => ReactNode;
|
|
125
|
+
onBeforeSend?: (content: MessageContent) => MessageContent;
|
|
126
|
+
/**
|
|
127
|
+
* Creates (or returns) a session to upload pending attachments into when
|
|
128
|
+
* the composer has files but no active session yet. The returned id is
|
|
129
|
+
* used for the upload, and is also passed back to `onSend` so the send
|
|
130
|
+
* path reaches exactly the session the files landed in — independent of
|
|
131
|
+
* whatever the global activeSessionId is at that moment.
|
|
132
|
+
*/
|
|
133
|
+
ensureSession?: (draftText: string) => Promise<string>;
|
|
134
|
+
onCommand?: (commandId: string) => void | Promise<void>;
|
|
135
|
+
canShareSession?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Optional slot rendered directly above the textarea (below any file-pill
|
|
138
|
+
* bar). ship-attack uses this to mount QuoteChipList for R4.
|
|
139
|
+
*/
|
|
140
|
+
slotAboveTextarea?: ReactNode;
|
|
141
|
+
/**
|
|
142
|
+
* Optional external draft channel. When provided, the composer initializes
|
|
143
|
+
* from `value` on mount and mirrors every internal `setInput` call into
|
|
144
|
+
* `setValue`. Intended for ship-attack's cross-view draft sharing (R3.8),
|
|
145
|
+
* not full controlled-input semantics — the tiptap editor remains the
|
|
146
|
+
* source of truth, this is a persistence side-channel.
|
|
147
|
+
*/
|
|
148
|
+
externalDraft?: {
|
|
149
|
+
value: string;
|
|
150
|
+
setValue: (v: string) => void;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Optional external attachments channel. Same mirror semantics as
|
|
154
|
+
* externalDraft. Upload state (pending/uploading/...) is carried on
|
|
155
|
+
* `FileComposerAttachment.status`, so sharing the array is enough.
|
|
156
|
+
*/
|
|
157
|
+
externalAttachments?: {
|
|
158
|
+
value: FileComposerAttachment[];
|
|
159
|
+
setValue: (a: FileComposerAttachment[]) => void;
|
|
160
|
+
};
|
|
161
|
+
/** Tailwind class for the inner max-width wrapper. Defaults to `max-w-3xl`. */
|
|
162
|
+
maxWidthClassName?: string;
|
|
163
|
+
onResyncSkills?: () => void;
|
|
164
|
+
isResyncingSkills?: boolean;
|
|
165
|
+
}
|
|
166
|
+
type FileComposerAttachment = {
|
|
167
|
+
id: string;
|
|
168
|
+
kind: "file";
|
|
169
|
+
name: string;
|
|
170
|
+
size: number;
|
|
171
|
+
mimeType: string;
|
|
172
|
+
status: "pending" | "uploading" | "uploaded" | "failed";
|
|
173
|
+
file?: File;
|
|
174
|
+
uploadedPath?: string;
|
|
175
|
+
textContent?: string | null;
|
|
176
|
+
};
|
|
177
|
+
declare function ChatInput({ onSend, onStop, isStreaming, mode, onToggleMode, renderAttachments, onBeforeSend, ensureSession, onCommand, canShareSession, slotAboveTextarea, externalDraft, externalAttachments, maxWidthClassName, onResyncSkills, isResyncingSkills, }: Props$2): react_jsx_runtime.JSX.Element;
|
|
178
|
+
|
|
179
|
+
interface Props$1 {
|
|
180
|
+
open: boolean;
|
|
181
|
+
onOpenChange: (open: boolean) => void;
|
|
182
|
+
files: OversizedFileInfo[];
|
|
183
|
+
limitBytes?: number;
|
|
184
|
+
}
|
|
185
|
+
declare function FileSizeLimitDialog({ open, onOpenChange, files, limitBytes, }: Props$1): react.ReactPortal | null;
|
|
186
|
+
|
|
187
|
+
interface Props {
|
|
188
|
+
sessionId: string;
|
|
189
|
+
messages: ChatMessage[];
|
|
190
|
+
onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
|
|
191
|
+
sessionStatus?: string;
|
|
192
|
+
onConfirmPlan?: (action: "execute" | "revise", text?: string) => void;
|
|
193
|
+
}
|
|
194
|
+
declare function MessageList({ sessionId, messages: rawMessages, onAnswer, sessionStatus, onConfirmPlan, }: Props): react_jsx_runtime.JSX.Element;
|
|
195
|
+
|
|
196
|
+
declare function SkillStatusBar({ sessionId, onResync, isResyncing, vertical, }: {
|
|
197
|
+
sessionId: string;
|
|
198
|
+
onResync?: () => void;
|
|
199
|
+
isResyncing?: boolean;
|
|
200
|
+
vertical?: boolean;
|
|
201
|
+
}): react_jsx_runtime.JSX.Element;
|
|
202
|
+
|
|
203
|
+
export { ATTACHMENT_SIZE_LIMIT_BYTES as A, type BuildWhatIfPromptInput as B, ChatInput as C, type FileComposerAttachment as F, MessageList as M, type OversizedFileInfo as O, type ParsedWhatIfPrompt as P, SkillStatusBar as S, type WhatIfQuote as W, ChatView as a, FileSizeLimitDialog as b, type ClientAwareState as c, buildWhatIfPrompt as d, formatFileSize as f, invalidateHomeSidebarSessions as i, parseWhatIfPrompt as p, splitFilesBySize as s, useSessionStore as u };
|