@blade-hq/agent-react 2612.0.0-beta.44 → 2612.0.0-beta.45

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.
@@ -117,7 +117,7 @@ import {
117
117
  useSessionSource,
118
118
  useSessionState,
119
119
  useSingleSessionSource
120
- } from "./chunk-42P352DI.js";
120
+ } from "./chunk-NFWNUMB7.js";
121
121
  import {
122
122
  __export
123
123
  } from "./chunk-PR4QN5HX.js";
@@ -50393,4 +50393,4 @@ use-stick-to-bottom/dist/StickToBottom.js:
50393
50393
  js-yaml/dist/js-yaml.mjs:
50394
50394
  (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
50395
50395
  */
50396
- //# sourceMappingURL=chunk-TB2MEMX6.js.map
50396
+ //# sourceMappingURL=chunk-RJPAGSIJ.js.map
@@ -25,6 +25,8 @@ export interface ConnectorPanelProps {
25
25
  onSelectedChange?: (items: PluginConnectorItem[]) => void;
26
26
  /** 宿主注入:电脑分区。参数是搜索词,宿主自己决定怎么过滤。 */
27
27
  renderComputerSection?: (query: string) => ReactNode;
28
+ /** 宿主注入:手机分区,渲染在电脑下面。参数是搜索词。 */
29
+ renderPhoneSection?: (query: string) => ReactNode;
28
30
  /** 宿主注入:外部账号分区(飞书 / GitHub 等固定连接入口)。 */
29
31
  renderExternalAccounts?: (query: string) => ReactNode;
30
32
  /** 宿主注入:底部操作区;不注入就不渲染这一块。 */
@@ -38,4 +40,4 @@ export interface ConnectorPanelProps {
38
40
  * 判定不各写一份。电脑与外部账号由宿主注入——那些入口需要宿主的路由与 CLI
39
41
  * 引导,SDK 不硬编码内部路径,也不替第三方决定跳到哪里。
40
42
  */
41
- export declare function ConnectorPanel({ client, sessionId, pendingPlugins, onPendingPluginsChange, pendingDisabledReason, onPluginsChanged, onSelectedChange, renderComputerSection, renderExternalAccounts, renderFooterActions, className, }: ConnectorPanelProps): import("react/jsx-runtime").JSX.Element;
43
+ export declare function ConnectorPanel({ client, sessionId, pendingPlugins, onPendingPluginsChange, pendingDisabledReason, onPluginsChanged, onSelectedChange, renderComputerSection, renderPhoneSection, renderExternalAccounts, renderFooterActions, className, }: ConnectorPanelProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.js CHANGED
@@ -7,11 +7,11 @@ import {
7
7
  useAgentSession,
8
8
  useReplay,
9
9
  useTopicAssetSubmissionAccess
10
- } from "./chunk-TB2MEMX6.js";
10
+ } from "./chunk-RJPAGSIJ.js";
11
11
  import {
12
12
  BladeProvider,
13
13
  useBladeClient
14
- } from "./chunk-42P352DI.js";
14
+ } from "./chunk-NFWNUMB7.js";
15
15
  import "./chunk-PR4QN5HX.js";
16
16
  export {
17
17
  BladeProvider,
package/dist/internal.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  useTopicAssetSubmissionAccess,
33
33
  useTurnNavigation,
34
34
  useTypewriterReveal
35
- } from "./chunk-TB2MEMX6.js";
35
+ } from "./chunk-RJPAGSIJ.js";
36
36
  import {
37
37
  AccountConnectors,
38
38
  ConnectorPanel,
@@ -40,7 +40,7 @@ import {
40
40
  TRIGGER_ICON_LIMIT,
41
41
  selectionFromItem,
42
42
  triggerSummary
43
- } from "./chunk-S3AC4DZF.js";
43
+ } from "./chunk-GWMFSD6N.js";
44
44
  import {
45
45
  BladeProvider,
46
46
  BrowserConnectionDialog,
@@ -68,7 +68,7 @@ import {
68
68
  useBladeHost,
69
69
  useOptionalBladeClient,
70
70
  useSessionPluginActivation
71
- } from "./chunk-42P352DI.js";
71
+ } from "./chunk-NFWNUMB7.js";
72
72
  import "./chunk-PR4QN5HX.js";
73
73
 
74
74
  // src/internal.ts
@@ -9,7 +9,7 @@ import { type PluginConnectorSelection } from "../components/connector-panel-typ
9
9
  *
10
10
  * 手机端不再隐藏:窄屏下面板宽度受视口约束,入口本身照常可用。
11
11
  */
12
- export declare function ConnectButton({ sessionId, open, onOpenChange, pendingPlugins, onPendingPluginsChange, pendingPluginsDisabledReason, pendingComputers, onPendingComputersChange, onPluginsChanged, variant, }: {
12
+ export declare function ConnectButton({ sessionId, open, onOpenChange, pendingPlugins, onPendingPluginsChange, pendingPluginsDisabledReason, pendingComputers, onPendingComputersChange, pendingPhones, onPendingPhonesChange, onPluginsChanged, variant, }: {
13
13
  sessionId: string | null;
14
14
  /** Menu row for a parent composer action menu; default toolbar icon is unchanged. */
15
15
  variant?: "icon" | "submenu";
@@ -20,5 +20,7 @@ export declare function ConnectButton({ sessionId, open, onOpenChange, pendingPl
20
20
  pendingPluginsDisabledReason?: string | null;
21
21
  pendingComputers?: string[];
22
22
  onPendingComputersChange?: (ids: string[]) => void;
23
+ pendingPhones?: string[];
24
+ onPendingPhonesChange?: (ids: string[]) => void;
23
25
  onPluginsChanged?: () => void;
24
26
  }): import("react/jsx-runtime").JSX.Element;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { BackgroundTask, ConnectionStatus, SessionContextStats } from "@blade-hq/agent-client/internal";
6
6
  import { type InputConnection, type InputDataState, type InputModelCatalog, type InputModelPreferences, type InputSessionSkill, type InputSkillStats } from "../chat/runtime/input-services";
7
- export { type ConnectorComputerSectionProps, type InputConnection, type InputDataState, type InputModelCatalog, type InputModelOption, type InputModelPreferences, type InputSessionSkill, type InputSkillStats, type RichInputServices, RichInputServicesProvider, useRichInputServices, } from "../chat/runtime/input-services";
7
+ export { type ConnectorComputerSectionProps, type ConnectorPhoneSectionProps, type InputConnection, type InputDataState, type InputModelCatalog, type InputModelOption, type InputModelPreferences, type InputSessionSkill, type InputSkillStats, type RichInputServices, RichInputServicesProvider, useRichInputServices, } from "../chat/runtime/input-services";
8
8
  export declare function useModelCatalog(): InputModelCatalog;
9
9
  export declare function useModelPreferences(): InputModelPreferences;
10
10
  /** 连接情况:宿主给了就用宿主的(内置 Web 看全局连接),否则看当前会话。 */
@@ -3,7 +3,7 @@ import {
3
3
  PluginTriggerStack,
4
4
  selectionFromItem,
5
5
  triggerSummary
6
- } from "./chunk-S3AC4DZF.js";
6
+ } from "./chunk-GWMFSD6N.js";
7
7
  import {
8
8
  Archive,
9
9
  BookOpen,
@@ -91,7 +91,7 @@ import {
91
91
  useSessionSkills,
92
92
  useSessionSource,
93
93
  useSkillStats
94
- } from "./chunk-42P352DI.js";
94
+ } from "./chunk-NFWNUMB7.js";
95
95
  import {
96
96
  __commonJS,
97
97
  __require,
@@ -26135,11 +26135,13 @@ function ConnectButton({
26135
26135
  pendingPluginsDisabledReason,
26136
26136
  pendingComputers,
26137
26137
  onPendingComputersChange,
26138
+ pendingPhones,
26139
+ onPendingPhonesChange,
26138
26140
  onPluginsChanged,
26139
26141
  variant = "icon"
26140
26142
  }) {
26141
26143
  const client = useBladeClient();
26142
- const { ConnectorComputerSection, ConnectorAccountsSection } = useRichInputServices();
26144
+ const { ConnectorComputerSection, ConnectorPhoneSection, ConnectorAccountsSection } = useRichInputServices();
26143
26145
  const invalidation = useSessionDataInvalidation();
26144
26146
  const [uncontrolledOpen, setUncontrolledOpen] = useState6(false);
26145
26147
  const isOpen = open ?? uncontrolledOpen;
@@ -26178,6 +26180,16 @@ function ConnectButton({
26178
26180
  closePanel: () => setOpen(false)
26179
26181
  }
26180
26182
  ) : void 0,
26183
+ renderPhoneSection: ConnectorPhoneSection ? (query) => /* @__PURE__ */ jsx16(
26184
+ ConnectorPhoneSection,
26185
+ {
26186
+ sessionId,
26187
+ query,
26188
+ pendingSelection: pendingPhones,
26189
+ onPendingSelectionChange: onPendingPhonesChange,
26190
+ closePanel: () => setOpen(false)
26191
+ }
26192
+ ) : void 0,
26181
26193
  renderExternalAccounts: ConnectorAccountsSection ? (query) => /* @__PURE__ */ jsx16(ConnectorAccountsSection, { query, closePanel: () => setOpen(false) }) : void 0
26182
26194
  }
26183
26195
  );