@blade-hq/agent-react 2612.0.0-beta.8 → 2612.0.0-beta.9

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.
@@ -6085,11 +6085,12 @@ function prepareAccount(client) {
6085
6085
  accountPreparation.set(client, { token: client.token, ready });
6086
6086
  return ready;
6087
6087
  }
6088
- async function getPluginSuggestionItems(client, session, query) {
6088
+ async function getPluginSuggestionItems(client, session, query, pendingPlugins = []) {
6089
+ if (!session && pendingPlugins.length === 0) return [];
6089
6090
  const path = session ? `/api/sessions/${encodeURIComponent(session)}/plugin-tools/mentions` : "/api/plugin-mentions/mentions";
6090
6091
  try {
6091
6092
  if (!session) await prepareAccount(client);
6092
- const data = await client.json("POST", path, { arguments: { query, cursor: "" } });
6093
+ const data = await client.json("POST", path, { arguments: { query, cursor: "" }, ...!session ? { plugin_selection: pendingPlugins } : {} });
6093
6094
  return [...data.items.map((item) => ({ ...item, kind: "plugin", name: item.label })), ...data.errors.map((message) => ({ kind: "pluginError", message }))];
6094
6095
  } catch {
6095
6096
  return [{ kind: "pluginError", message: "\u63D2\u4EF6\u6761\u76EE\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 @ \u91CD\u8BD5" }];
@@ -26931,4 +26932,4 @@ lucide-react/dist/esm/lucide-react.js:
26931
26932
  * See the LICENSE file in the root directory of this source tree.
26932
26933
  *)
26933
26934
  */
26934
- //# sourceMappingURL=chunk-MERN5XEM.js.map
26935
+ //# sourceMappingURL=chunk-HJ7KNUWM.js.map