@blade-hq/agent-react 2612.0.0-beta.111 → 2612.0.0-beta.113

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.
Files changed (63) hide show
  1. package/README.md +11 -0
  2. package/dist/{McpAppCard-ADVDKC2C.js → McpAppCard-NJEKKEEN.js} +3 -3
  3. package/dist/McpAppFrame-IQK5AOMD.js +9 -0
  4. package/dist/{SessionPluginConfigForm-DWVDFK6A.js → SessionPluginConfigForm-VXONUDM4.js} +2 -2
  5. package/dist/chat/AssistantTurnBlock.d.ts +1 -1
  6. package/dist/chat/AttachmentPreviewDialog.d.ts +1 -6
  7. package/dist/chat/ChatLoadingIndicator.d.ts +2 -1
  8. package/dist/chat/ChatPanel.d.ts +3 -3
  9. package/dist/chat/LightComposer.d.ts +1 -1
  10. package/dist/chat/chat-run.d.ts +4 -0
  11. package/dist/chat/customization.d.ts +1 -2
  12. package/dist/chat/index.d.ts +0 -1
  13. package/dist/chat/message-list-blocks.d.ts +1 -0
  14. package/dist/chat/runtime/actions.d.ts +1 -0
  15. package/dist/chat/runtime/environment.d.ts +1 -1
  16. package/dist/chat.css +1 -1
  17. package/dist/{chunk-MG4RF573.js → chunk-22JUW3EQ.js} +3 -3
  18. package/dist/{chunk-J6BSKVVK.js → chunk-3KJJIH5K.js} +1 -35
  19. package/dist/chunk-3KJJIH5K.js.map +1 -0
  20. package/dist/{chunk-IOIKCFRO.js → chunk-4WFRH7FG.js} +28 -8
  21. package/dist/{chunk-IOIKCFRO.js.map → chunk-4WFRH7FG.js.map} +1 -1
  22. package/dist/{chunk-6XZERPQY.js → chunk-5JDQG2JJ.js} +4 -4
  23. package/dist/{chunk-BEBV7M7V.js → chunk-5XLLPGSU.js} +8798 -9470
  24. package/dist/chunk-5XLLPGSU.js.map +1 -0
  25. package/dist/{chunk-UJ5WH5NK.js → chunk-AZVPNN6K.js} +3 -3
  26. package/dist/{chunk-UJ5WH5NK.js.map → chunk-AZVPNN6K.js.map} +1 -1
  27. package/dist/{chunk-QBQE4TPT.js → chunk-M6SNZHK3.js} +18 -13
  28. package/dist/chunk-M6SNZHK3.js.map +1 -0
  29. package/dist/{chunk-WEOW475M.js → chunk-N2SQZ2HY.js} +5 -5
  30. package/dist/{chunk-PKLEJPUS.js → chunk-VYTLF6JE.js} +12 -13
  31. package/dist/chunk-VYTLF6JE.js.map +1 -0
  32. package/dist/{chunk-PLTQP66W.js → chunk-XLG3BTUA.js} +25 -7
  33. package/dist/chunk-XLG3BTUA.js.map +1 -0
  34. package/dist/components/McpAppFrame.d.ts +2 -0
  35. package/dist/components/use-session-plugin-activation.d.ts +3 -1
  36. package/dist/connectors.js +3 -3
  37. package/dist/embed/entry.d.ts +5 -0
  38. package/dist/index.d.ts +1 -0
  39. package/dist/index.js +8 -8
  40. package/dist/internal.js +192 -21
  41. package/dist/internal.js.map +1 -1
  42. package/dist/questions.js +4 -4
  43. package/dist/rich-input/ChatInput.d.ts +1 -1
  44. package/dist/rich-input/ComposerControls.d.ts +15 -0
  45. package/dist/rich-input.js +91 -72
  46. package/dist/rich-input.js.map +1 -1
  47. package/dist/style.full.css +2 -2
  48. package/dist/tool-details.js +5 -5
  49. package/package.json +2 -2
  50. package/public-api.md +34 -1
  51. package/dist/McpAppFrame-VEOUJL5E.js +0 -9
  52. package/dist/chat/LiteMessageList.d.ts +0 -93
  53. package/dist/chunk-BEBV7M7V.js.map +0 -1
  54. package/dist/chunk-J6BSKVVK.js.map +0 -1
  55. package/dist/chunk-PKLEJPUS.js.map +0 -1
  56. package/dist/chunk-PLTQP66W.js.map +0 -1
  57. package/dist/chunk-QBQE4TPT.js.map +0 -1
  58. /package/dist/{McpAppCard-ADVDKC2C.js.map → McpAppCard-NJEKKEEN.js.map} +0 -0
  59. /package/dist/{McpAppFrame-VEOUJL5E.js.map → McpAppFrame-IQK5AOMD.js.map} +0 -0
  60. /package/dist/{SessionPluginConfigForm-DWVDFK6A.js.map → SessionPluginConfigForm-VXONUDM4.js.map} +0 -0
  61. /package/dist/{chunk-MG4RF573.js.map → chunk-22JUW3EQ.js.map} +0 -0
  62. /package/dist/{chunk-6XZERPQY.js.map → chunk-5JDQG2JJ.js.map} +0 -0
  63. /package/dist/{chunk-WEOW475M.js.map → chunk-N2SQZ2HY.js.map} +0 -0
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  ToolUiCardView,
3
3
  getRenderer
4
- } from "./chunk-PLTQP66W.js";
5
- import "./chunk-6XZERPQY.js";
4
+ } from "./chunk-XLG3BTUA.js";
5
+ import "./chunk-5JDQG2JJ.js";
6
6
  import {
7
7
  formatToolName,
8
8
  getToolDisplayLabel,
9
9
  parsePlanUpdate
10
- } from "./chunk-UJ5WH5NK.js";
10
+ } from "./chunk-AZVPNN6K.js";
11
11
  import "./chunk-FR3ON5R4.js";
12
- import "./chunk-WEOW475M.js";
13
- import "./chunk-J6BSKVVK.js";
12
+ import "./chunk-N2SQZ2HY.js";
13
+ import "./chunk-3KJJIH5K.js";
14
14
  import "./chunk-PR4QN5HX.js";
15
15
 
16
16
  // src/tool-details.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blade-hq/agent-react",
3
- "version": "2612.0.0-beta.111",
3
+ "version": "2612.0.0-beta.113",
4
4
  "description": "Blade Agent React 绑定:BladeProvider、useAgentSession、开箱即用的 ChatView 聊天界面。",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,7 +52,7 @@
52
52
  "access": "public"
53
53
  },
54
54
  "dependencies": {
55
- "@blade-hq/agent-client": "2612.0.0-beta.111",
55
+ "@blade-hq/agent-client": "2612.0.0-beta.113",
56
56
  "@modelcontextprotocol/ext-apps": "2.0.0",
57
57
  "@radix-ui/react-collapsible": "1.1.12",
58
58
  "@tiptap/core": "3.20.4",
package/public-api.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > 本文件由 `scripts/public-api-report.mjs` 生成,请勿手改。
4
4
  > 公共面变更时重新生成本报告,并同步更新 README 对应章节——CI 会校验两者。
5
5
 
6
- 共 51 个公开声明。
6
+ 共 55 个公开声明。
7
7
 
8
8
  ## `AskUserQuestionData` (interface)
9
9
 
@@ -139,6 +139,39 @@ footer: ReactNode
139
139
  header: ReactNode
140
140
  ```
141
141
 
142
+ ## `ComposerAction` (interface)
143
+
144
+ ```ts
145
+ icon: ReactNode
146
+ id: string
147
+ index: number | undefined
148
+ onSelect: () => void
149
+ region: "direct" | "more"
150
+ title: string
151
+ ```
152
+
153
+ ## `ComposerControl` (type)
154
+
155
+ ```ts
156
+ export type ComposerControl = "upload" | "reference" | "voice" | "model" | "mode" | "workspace"
157
+ ```
158
+
159
+ ## `ComposerControlPresentation` (interface)
160
+
161
+ ```ts
162
+ icon: ReactNode
163
+ label: string | undefined
164
+ ```
165
+
166
+ ## `ComposerPlacement` (interface)
167
+
168
+ ```ts
169
+ direct: ComposerControl[]
170
+ extra: ComposerAction[] | undefined
171
+ more: ComposerControl[]
172
+ presentation: Partial<Record<ComposerControl, ComposerControlPresentation>> | undefined
173
+ ```
174
+
142
175
  ## `ConfigConnection` (function)
143
176
 
144
177
  ```ts
@@ -1,9 +0,0 @@
1
- import {
2
- McpAppFrame
3
- } from "./chunk-IOIKCFRO.js";
4
- import "./chunk-J6BSKVVK.js";
5
- import "./chunk-PR4QN5HX.js";
6
- export {
7
- McpAppFrame
8
- };
9
- //# sourceMappingURL=McpAppFrame-VEOUJL5E.js.map
@@ -1,93 +0,0 @@
1
- import { type CitationEntry } from "./lib/citations";
2
- import type { ChatMessage, ToolCallInfo } from "@blade-hq/agent-client/internal";
3
- import type { PostChatFollowup } from "@blade-hq/agent-client/internal";
4
- import type { ResultFeedback as SavedResultFeedback } from "@blade-hq/agent-client/internal";
5
- import { type CompletionNotice } from "@blade-hq/agent-client/internal";
6
- import type { AskUserAnswerData } from "./AskUserQuestionBlock";
7
- type TextRow = {
8
- type: "text";
9
- key: string;
10
- role: "user" | "assistant" | "error";
11
- text: string;
12
- entryIds: string[];
13
- failed?: boolean;
14
- sending?: boolean;
15
- citations?: Record<number, CitationEntry>;
16
- };
17
- type MemoryRefsRow = {
18
- type: "memory-refs";
19
- key: string;
20
- refs: NonNullable<ChatMessage["memory_refs"]>;
21
- };
22
- type FollowupRow = {
23
- type: "followup";
24
- key: string;
25
- followup: PostChatFollowup;
26
- };
27
- type HistoricalFeedbackRow = {
28
- type: "historical-feedback";
29
- key: string;
30
- feedback: SavedResultFeedback;
31
- };
32
- type QuestionRow = {
33
- type: "question";
34
- key: string;
35
- toolCall: ToolCallInfo;
36
- turnBlocks: ChatMessage["blocks"];
37
- };
38
- type ToolDescriptionRow = {
39
- type: "tool-description";
40
- key: string;
41
- description: string;
42
- running: boolean;
43
- };
44
- type ContextGroupRow = {
45
- type: "context-group";
46
- key: string;
47
- contexts: NonNullable<ChatMessage["context"]>[];
48
- };
49
- type ContextDividerRow = {
50
- type: "context-divider";
51
- key: string;
52
- };
53
- type LiteRow = {
54
- type: "background-wakeup";
55
- key: string;
56
- } | {
57
- type: "completion-notice";
58
- key: string;
59
- notice: CompletionNotice;
60
- } | {
61
- type: "named-subagent";
62
- key: string;
63
- tool: ToolCallInfo;
64
- } | {
65
- type: "pack-event";
66
- key: string;
67
- title: string;
68
- } | TextRow | MemoryRefsRow | FollowupRow | HistoricalFeedbackRow | QuestionRow | ToolDescriptionRow | ContextGroupRow | ContextDividerRow;
69
- export declare function buildLiteRows({ messages, followup, sessionMessages, agentLoops, resultFeedbackByEntry, showContexts, }: {
70
- messages: ChatMessage[];
71
- followup: PostChatFollowup | null;
72
- sessionMessages?: ChatMessage[];
73
- agentLoops?: Record<string, {
74
- toolCallId: string;
75
- }>;
76
- resultFeedbackByEntry?: ReadonlyMap<string, SavedResultFeedback>;
77
- showContexts?: boolean;
78
- }): LiteRow[];
79
- export declare function LiteMessageList({ sessionId, messages, followup, isViewer, isLoadingHistory, sessionStatus, isStreaming, resultFeedbackByEntry, onResultFeedbackSaved, onAnswer, onLoadOlder, historyLoadRevision, }: {
80
- sessionId: string;
81
- messages: ChatMessage[];
82
- followup: PostChatFollowup | null;
83
- isViewer: boolean;
84
- isLoadingHistory: boolean;
85
- sessionStatus?: string;
86
- isStreaming?: boolean;
87
- resultFeedbackByEntry?: ReadonlyMap<string, SavedResultFeedback>;
88
- onResultFeedbackSaved?: (feedback: SavedResultFeedback) => void;
89
- onAnswer?: (answer: string, toolCallId: string, answerData: AskUserAnswerData) => void;
90
- onLoadOlder?: (beforeCommit?: () => void) => Promise<boolean>;
91
- historyLoadRevision?: number;
92
- }): import("react/jsx-runtime").JSX.Element;
93
- export {};