@economic/agents-react 1.1.6 → 1.1.7

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/dist/index.d.mts CHANGED
@@ -214,6 +214,20 @@ type AgentConnectionState = {
214
214
  type: AgentConnectionType;
215
215
  subAgentName?: string;
216
216
  };
217
+ type ChatSummary = {
218
+ name: string;
219
+ title?: string;
220
+ summary?: string;
221
+ created_at: number;
222
+ updated_at: number;
223
+ };
224
+ type MessageRating = {
225
+ message_id: string;
226
+ rating: number;
227
+ comment?: string;
228
+ created_at: number;
229
+ updated_at: number;
230
+ };
217
231
  //#endregion
218
232
  //#region src/useAgent.d.ts
219
233
  interface UseAgentOptions {
@@ -284,17 +298,10 @@ declare function useChat<ToolContext extends Record<string, unknown>>(options: U
284
298
  isToolContinuation: boolean;
285
299
  };
286
300
  rateMessage: (messageId: string, rating: number, comment?: string) => Promise<unknown>;
287
- getMessageRatings: () => Promise<unknown>;
301
+ getMessageRatings: () => Promise<MessageRating[]>;
288
302
  };
289
303
  //#endregion
290
304
  //#region src/useAssistant.d.ts
291
- type ChatSummary = {
292
- name: string;
293
- title?: string;
294
- summary?: string;
295
- created_at: number;
296
- updated_at: number;
297
- };
298
305
  interface UseAssistantOptions<ToolContext extends Record<string, unknown> = Record<string, unknown>> extends Omit<UseChatOptions<ToolContext>, "actorId" | "getInitialMessages"> {}
299
306
  declare function useAssistant<ToolContext extends Record<string, unknown>>(options: UseAssistantOptions<ToolContext>): {
300
307
  currentChatName: string | undefined;
@@ -336,8 +343,8 @@ declare function useAssistant<ToolContext extends Record<string, unknown>>(optio
336
343
  isToolContinuation: boolean;
337
344
  };
338
345
  rateMessage: (messageId: string, rating: number, comment?: string) => Promise<unknown>;
339
- getMessageRatings: () => Promise<unknown>;
346
+ getMessageRatings: () => Promise<MessageRating[]>;
340
347
  };
341
348
  };
342
349
  //#endregion
343
- export { type AgentConnectionState, type AgentConnectionStatus, type AgentConnectionType, type ChatSummary, useAgent, useAssistant, useChat };
350
+ export { type AgentConnectionState, type AgentConnectionStatus, type AgentConnectionType, type ChatSummary, type MessageRating, useAgent, useAssistant, useChat };
package/dist/index.mjs CHANGED
@@ -65,7 +65,7 @@ function useChat(options) {
65
65
  ]);
66
66
  }
67
67
  async function getMessageRatings() {
68
- return agent.call("getMessageRatings");
68
+ return await agent.call("getMessageRatings");
69
69
  }
70
70
  return {
71
71
  status,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@economic/agents-react",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"