@super_studio/ecforce-ai-agent-react 0.6.0-canary.1 → 0.6.0-canary.3

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.
@@ -1,11 +1,8 @@
1
- import type { MCP } from "./provider/use-chatbot-frame-handler";
2
1
  export type ChatbotFrameProps = {
3
2
  /** 管理画面上のエージェントID */
4
3
  agentId: string;
5
4
  /** 初期化時のチャットID */
6
5
  initialChatId?: string;
7
- /** エージェントにつなげるMCPの情報 */
8
- mcps?: MCP[];
9
6
  /** アプリ名のメタデータ */
10
7
  appName?: string;
11
8
  /** セッションを取得するための関数 */
@@ -28,7 +25,7 @@ export type ChatbotFrameProps = {
28
25
  url?: string;
29
26
  className?: string;
30
27
  };
31
- export declare function ChatbotFrame({ agentId, appName, initialChatId, mcps, getSession, enabled, url, className, }: ChatbotFrameProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function ChatbotFrame({ agentId, appName, initialChatId, getSession, enabled, url, className, }: ChatbotFrameProps): import("react/jsx-runtime").JSX.Element;
32
29
  export type SessionData = {
33
30
  token: string;
34
31
  expiresAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chatbot-frame.d.ts","sourceRoot":"","sources":["../../src/components/chatbot-frame.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAEhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wBAAwB;IACxB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,iBAAiB;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;QACzB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,OAAO,EACP,aAAa,EACb,IAAI,EACJ,UAAU,EACV,OAAc,EACd,GAAG,EACH,SAAS,GACV,EAAE,iBAAiB,2CAgFnB;AAoBD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;CACzC,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,EAAE,eAAe,sBAuCzD"}
1
+ {"version":3,"file":"chatbot-frame.d.ts","sourceRoot":"","sources":["../../src/components/chatbot-frame.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;QACzB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,OAAO,EACP,aAAa,EACb,UAAU,EACV,OAAc,EACd,GAAG,EACH,SAAS,GACV,EAAE,iBAAiB,2CAkEnB;AAoBD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;CACzC,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,EAAE,eAAe,sBAuCzD"}
package/dist/index.js CHANGED
@@ -202,7 +202,6 @@ function ChatbotFrame({
202
202
  agentId,
203
203
  appName,
204
204
  initialChatId,
205
- mcps,
206
205
  getSession,
207
206
  enabled = true,
208
207
  url,
@@ -222,22 +221,14 @@ function ChatbotFrame({
222
221
  React5.default.useEffect(() => {
223
222
  if (shouldInit && !sentInitRef.current) {
224
223
  init({
225
- mcps,
226
224
  appName,
227
225
  sessionToken
228
226
  });
229
227
  sentInitRef.current = true;
230
- setCurrentMcps(mcps);
231
228
  setCurrentAppName(appName);
232
229
  setCurrentSessionToken(sessionToken);
233
230
  }
234
- }, [enabled, init, mcps, appName, isReady, sessionToken]);
235
- React5.default.useEffect(() => {
236
- if (sentInitRef.current && mcps && JSON.stringify(currentMcps) !== JSON.stringify(mcps)) {
237
- setMcps(mcps);
238
- setCurrentMcps(mcps);
239
- }
240
- }, [mcps]);
231
+ }, [enabled, init, appName, isReady, sessionToken]);
241
232
  React5.default.useEffect(() => {
242
233
  if (sentInitRef.current && appName && currentAppName !== appName) {
243
234
  setCurrentAppName(appName);
package/dist/index.mjs CHANGED
@@ -202,7 +202,6 @@ function ChatbotFrame({
202
202
  agentId,
203
203
  appName,
204
204
  initialChatId,
205
- mcps,
206
205
  getSession,
207
206
  enabled = true,
208
207
  url,
@@ -222,22 +221,14 @@ function ChatbotFrame({
222
221
  React4.useEffect(() => {
223
222
  if (shouldInit && !sentInitRef.current) {
224
223
  init({
225
- mcps,
226
224
  appName,
227
225
  sessionToken
228
226
  });
229
227
  sentInitRef.current = true;
230
- setCurrentMcps(mcps);
231
228
  setCurrentAppName(appName);
232
229
  setCurrentSessionToken(sessionToken);
233
230
  }
234
- }, [enabled, init, mcps, appName, isReady, sessionToken]);
235
- React4.useEffect(() => {
236
- if (sentInitRef.current && mcps && JSON.stringify(currentMcps) !== JSON.stringify(mcps)) {
237
- setMcps(mcps);
238
- setCurrentMcps(mcps);
239
- }
240
- }, [mcps]);
231
+ }, [enabled, init, appName, isReady, sessionToken]);
241
232
  React4.useEffect(() => {
242
233
  if (sentInitRef.current && appName && currentAppName !== appName) {
243
234
  setCurrentAppName(appName);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super_studio/ecforce-ai-agent-react",
3
- "version": "0.6.0-canary.1",
3
+ "version": "0.6.0-canary.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -8,8 +8,6 @@ export type ChatbotFrameProps = {
8
8
  agentId: string;
9
9
  /** 初期化時のチャットID */
10
10
  initialChatId?: string;
11
- /** エージェントにつなげるMCPの情報 */
12
- mcps?: MCP[];
13
11
  /** アプリ名のメタデータ */
14
12
  appName?: string;
15
13
  /** セッションを取得するための関数 */
@@ -37,7 +35,6 @@ export function ChatbotFrame({
37
35
  agentId,
38
36
  appName,
39
37
  initialChatId,
40
- mcps,
41
38
  getSession,
42
39
  enabled = true,
43
40
  url,
@@ -63,28 +60,14 @@ export function ChatbotFrame({
63
60
  React.useEffect(() => {
64
61
  if (shouldInit && !sentInitRef.current) {
65
62
  init({
66
- mcps,
67
63
  appName,
68
64
  sessionToken,
69
65
  });
70
66
  sentInitRef.current = true;
71
- setCurrentMcps(mcps);
72
67
  setCurrentAppName(appName);
73
68
  setCurrentSessionToken(sessionToken);
74
69
  }
75
- }, [enabled, init, mcps, appName, isReady, sessionToken]);
76
-
77
- // mcpsの更新の仕組み
78
- React.useEffect(() => {
79
- if (
80
- sentInitRef.current &&
81
- mcps &&
82
- JSON.stringify(currentMcps) !== JSON.stringify(mcps)
83
- ) {
84
- setMcps(mcps);
85
- setCurrentMcps(mcps);
86
- }
87
- }, [mcps]);
70
+ }, [enabled, init, appName, isReady, sessionToken]);
88
71
 
89
72
  // appNameの更新の仕組み
90
73
  React.useEffect(() => {