@simfinity/constellation-ui 1.0.2 → 1.0.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.
- package/dist/index.cjs +5 -2
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +5 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -59,8 +59,11 @@ function useConstellationClient() {
|
|
|
59
59
|
const ctx = (0, import_react.useContext)(ConstellationContext);
|
|
60
60
|
if (!ctx) throw new Error("Must be used inside ConstellationProvider");
|
|
61
61
|
return {
|
|
62
|
-
|
|
63
|
-
await ctx.client.
|
|
62
|
+
fetchAvailableTools: async () => {
|
|
63
|
+
return await ctx.client.fetchAvailableTools();
|
|
64
|
+
},
|
|
65
|
+
startSession: async (audio, voice, tools = []) => {
|
|
66
|
+
await ctx.client.startSession(audio, voice, tools);
|
|
64
67
|
ctx.setAudioEnabled(audio);
|
|
65
68
|
},
|
|
66
69
|
endSession: async () => {
|
package/dist/index.d.cts
CHANGED
|
@@ -12,8 +12,7 @@ import { WebClient } from '@simfinity/constellation-client';
|
|
|
12
12
|
* - useConstellationClient()
|
|
13
13
|
* - useConstellationSession()
|
|
14
14
|
*
|
|
15
|
-
* @param client A pre-configured WebClient instance from
|
|
16
|
-
* "@simfinity/constellation-client".
|
|
15
|
+
* @param client A pre-configured WebClient instance from "@simfinity/constellation-client".
|
|
17
16
|
* @param children The DOM descendant components
|
|
18
17
|
*
|
|
19
18
|
* @example
|
|
@@ -83,7 +82,12 @@ declare function ConstellationProvider({ client, children, }: {
|
|
|
83
82
|
* @returns
|
|
84
83
|
* Lifecycle control methods:
|
|
85
84
|
*
|
|
86
|
-
*
|
|
85
|
+
* fetchAvailableTools()
|
|
86
|
+
* - Retrieve the list of tool names & descriptions that the server supports
|
|
87
|
+
* - Tools can be selectively added to a session at creation time
|
|
88
|
+
* - Tools included in a session are added to the model's context and available for it to use
|
|
89
|
+
*
|
|
90
|
+
* startSession(audioEnabled: boolean, voice?: string, tools: string[] = [])
|
|
87
91
|
* - Creates a new persistent session on the server.
|
|
88
92
|
* - Must be called before joinSession().
|
|
89
93
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -12,8 +12,7 @@ import { WebClient } from '@simfinity/constellation-client';
|
|
|
12
12
|
* - useConstellationClient()
|
|
13
13
|
* - useConstellationSession()
|
|
14
14
|
*
|
|
15
|
-
* @param client A pre-configured WebClient instance from
|
|
16
|
-
* "@simfinity/constellation-client".
|
|
15
|
+
* @param client A pre-configured WebClient instance from "@simfinity/constellation-client".
|
|
17
16
|
* @param children The DOM descendant components
|
|
18
17
|
*
|
|
19
18
|
* @example
|
|
@@ -83,7 +82,12 @@ declare function ConstellationProvider({ client, children, }: {
|
|
|
83
82
|
* @returns
|
|
84
83
|
* Lifecycle control methods:
|
|
85
84
|
*
|
|
86
|
-
*
|
|
85
|
+
* fetchAvailableTools()
|
|
86
|
+
* - Retrieve the list of tool names & descriptions that the server supports
|
|
87
|
+
* - Tools can be selectively added to a session at creation time
|
|
88
|
+
* - Tools included in a session are added to the model's context and available for it to use
|
|
89
|
+
*
|
|
90
|
+
* startSession(audioEnabled: boolean, voice?: string, tools: string[] = [])
|
|
87
91
|
* - Creates a new persistent session on the server.
|
|
88
92
|
* - Must be called before joinSession().
|
|
89
93
|
*
|
package/dist/index.js
CHANGED
|
@@ -21,8 +21,11 @@ function useConstellationClient() {
|
|
|
21
21
|
const ctx = useContext(ConstellationContext);
|
|
22
22
|
if (!ctx) throw new Error("Must be used inside ConstellationProvider");
|
|
23
23
|
return {
|
|
24
|
-
|
|
25
|
-
await ctx.client.
|
|
24
|
+
fetchAvailableTools: async () => {
|
|
25
|
+
return await ctx.client.fetchAvailableTools();
|
|
26
|
+
},
|
|
27
|
+
startSession: async (audio, voice, tools = []) => {
|
|
28
|
+
await ctx.client.startSession(audio, voice, tools);
|
|
26
29
|
ctx.setAudioEnabled(audio);
|
|
27
30
|
},
|
|
28
31
|
endSession: async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simfinity/constellation-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"author": "Simfinity",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@simfinity/constellation-client": "^1.0.
|
|
28
|
+
"@simfinity/constellation-client": "^1.0.9"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/react": "^19.2.11",
|