@lumavox/react 0.28.0 → 0.29.0

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.
@@ -134,6 +134,8 @@ export interface AgentControls extends Snapshot {
134
134
  reconnect(): void;
135
135
  /** A new conversation with the same agent. */
136
136
  newSession(): void;
137
+ /** The conversation is over: its report is written now (`Conversation.end`), then it closes. */
138
+ end(): void;
137
139
  close(): void;
138
140
  }
139
141
  export declare function useAgent(target: AgentTarget | null, options?: UseAgentOptions): AgentControls;
package/dist/use-agent.js CHANGED
@@ -419,6 +419,10 @@ export function useAgent(target, options = {}) {
419
419
  current.current?.mute();
420
420
  },
421
421
  reconnect: () => current.current?.reconnect(),
422
+ end() {
423
+ hush();
424
+ current.current?.end();
425
+ },
422
426
  close() {
423
427
  hush();
424
428
  current.current?.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumavox/react",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "React and React Native hooks for Lumavox agents: a conversation that keeps itself connected, sessions, memory and relations, over @lumavox/client.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,7 +29,7 @@
29
29
  "typecheck": "tsc --noEmit && tsc --noEmit -p test"
30
30
  },
31
31
  "dependencies": {
32
- "@lumavox/client": "0.28.0"
32
+ "@lumavox/client": "0.29.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": ">=18"