@tangleai/assistant 0.21.1 → 0.25.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.
- package/CHANGELOG.md +50 -0
- package/package.json +8 -8
- package/src/actions.d.ts +36 -12
- package/src/actions.js +141 -142
- package/src/component.d.ts +8 -8
- package/src/component.js +95 -76
- package/src/controller.d.ts +1 -6
- package/src/controller.js +282 -286
- package/src/index.d.ts +4 -4
- package/src/index.js +4 -4
- package/src/settings.d.ts +2 -2
- package/src/settings.js +8 -7
- package/src/state.d.ts +16 -16
- package/src/state.js +34 -35
- package/src/viewmodel.d.ts +3 -3
- package/src/viewmodel.js +71 -73
- package/src/views.d.ts +21 -21
- package/src/views.js +194 -196
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,55 @@
|
|
|
1
1
|
# @tangleai/assistant
|
|
2
2
|
|
|
3
|
+
## 0.25.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @tangleai/agents@0.25.0
|
|
8
|
+
- @tangleai/context@0.25.0
|
|
9
|
+
- @tangleai/models@0.25.0
|
|
10
|
+
|
|
11
|
+
## 0.24.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- @tangleai/agents@0.24.1
|
|
16
|
+
- @tangleai/context@0.24.1
|
|
17
|
+
- @tangleai/models@0.24.1
|
|
18
|
+
|
|
19
|
+
## 0.24.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- @tangleai/agents@0.24.0
|
|
24
|
+
- @tangleai/context@0.24.0
|
|
25
|
+
- @tangleai/models@0.24.0
|
|
26
|
+
|
|
27
|
+
## 0.23.0
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- @tangleai/agents@0.23.0
|
|
32
|
+
- @tangleai/context@0.23.0
|
|
33
|
+
- @tangleai/models@0.23.0
|
|
34
|
+
|
|
35
|
+
## 0.22.0
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Convert the migrated source, tests, benchmarks and hosts to strict TypeScript,
|
|
40
|
+
with JavaScript and declarations emitted through one release build. Move the
|
|
41
|
+
program pen from `@tangleai/jaren/program` and the Jaren integration barrel to
|
|
42
|
+
`@tangleai/linq/program`, preserving its JSON format and phantom binding types.
|
|
43
|
+
The new `@tangleai/linq` root exposes the program namespace and shared build error.
|
|
44
|
+
|
|
45
|
+
Match the embedder declarations to unknown widths before the first response,
|
|
46
|
+
retain precise ledger result variants, and enforce the refinement-pressure
|
|
47
|
+
instrument's stated 60-second deadline through the chat client's abort signal.
|
|
48
|
+
- Updated dependencies
|
|
49
|
+
- @tangleai/models@0.22.0
|
|
50
|
+
- @tangleai/context@0.22.0
|
|
51
|
+
- @tangleai/agents@0.22.0
|
|
52
|
+
|
|
3
53
|
## 0.21.1
|
|
4
54
|
|
|
5
55
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangleai/assistant",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Reusable assistant state, streaming lifecycle and optional Jaren visual component.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"**/*.css"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tangleai/models": "^0.
|
|
31
|
-
"@tangleai/context": "^0.
|
|
32
|
-
"@tangleai/agents": "^0.
|
|
33
|
-
"@jarenjs/json": "0.
|
|
34
|
-
"@jarenjs/app": "0.
|
|
35
|
-
"@jarenjs/md": "0.
|
|
36
|
-
"@jarenjs/mermaid": "0.
|
|
30
|
+
"@tangleai/models": "^0.25.0",
|
|
31
|
+
"@tangleai/context": "^0.25.0",
|
|
32
|
+
"@tangleai/agents": "^0.25.0",
|
|
33
|
+
"@jarenjs/json": "0.86.0",
|
|
34
|
+
"@jarenjs/app": "0.86.0",
|
|
35
|
+
"@jarenjs/md": "0.86.0",
|
|
36
|
+
"@jarenjs/mermaid": "0.86.0"
|
|
37
37
|
},
|
|
38
38
|
"private": false,
|
|
39
39
|
"files": [
|
package/src/actions.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/** Assistant transitions received from the existing panel. */
|
|
2
|
-
export const ASSISTANT_ACTIONS: {
|
|
2
|
+
export declare const ASSISTANT_ACTIONS: {
|
|
3
3
|
'ai/cancel': {
|
|
4
|
-
patch: {
|
|
4
|
+
patch: ({
|
|
5
5
|
op: string;
|
|
6
6
|
path: string;
|
|
7
7
|
value: string;
|
|
8
|
-
}
|
|
8
|
+
} | {
|
|
9
|
+
op: string;
|
|
10
|
+
path: string;
|
|
11
|
+
value: null;
|
|
12
|
+
})[];
|
|
9
13
|
effects: {
|
|
10
14
|
run: string;
|
|
11
15
|
}[];
|
|
@@ -50,8 +54,8 @@ export const ASSISTANT_ACTIONS: {
|
|
|
50
54
|
path: string;
|
|
51
55
|
value: {
|
|
52
56
|
status: string;
|
|
53
|
-
detail:
|
|
54
|
-
models:
|
|
57
|
+
detail: null;
|
|
58
|
+
models: never[];
|
|
55
59
|
};
|
|
56
60
|
})[];
|
|
57
61
|
};
|
|
@@ -61,8 +65,8 @@ export const ASSISTANT_ACTIONS: {
|
|
|
61
65
|
path: string;
|
|
62
66
|
value: {
|
|
63
67
|
status: string;
|
|
64
|
-
detail:
|
|
65
|
-
models:
|
|
68
|
+
detail: null;
|
|
69
|
+
models: never[];
|
|
66
70
|
};
|
|
67
71
|
}[];
|
|
68
72
|
effects: {
|
|
@@ -110,6 +114,10 @@ export const ASSISTANT_ACTIONS: {
|
|
|
110
114
|
op: string;
|
|
111
115
|
path: string;
|
|
112
116
|
value: string;
|
|
117
|
+
} | {
|
|
118
|
+
op: string;
|
|
119
|
+
path: string;
|
|
120
|
+
value: null;
|
|
113
121
|
} | {
|
|
114
122
|
op: string;
|
|
115
123
|
path: string;
|
|
@@ -156,27 +164,39 @@ export const ASSISTANT_ACTIONS: {
|
|
|
156
164
|
op: string;
|
|
157
165
|
path: string;
|
|
158
166
|
value: string;
|
|
167
|
+
} | {
|
|
168
|
+
op: string;
|
|
169
|
+
path: string;
|
|
170
|
+
value: null;
|
|
159
171
|
})[];
|
|
160
172
|
effects: {
|
|
161
173
|
run: string;
|
|
162
174
|
}[];
|
|
163
175
|
};
|
|
164
176
|
'ai/failed': {
|
|
165
|
-
patch: {
|
|
177
|
+
patch: ({
|
|
166
178
|
op: string;
|
|
167
179
|
path: string;
|
|
168
180
|
value: string;
|
|
169
|
-
}
|
|
181
|
+
} | {
|
|
182
|
+
op: string;
|
|
183
|
+
path: string;
|
|
184
|
+
value: null;
|
|
185
|
+
})[];
|
|
170
186
|
};
|
|
171
187
|
'ai/clear': {
|
|
172
188
|
patch: ({
|
|
173
189
|
op: string;
|
|
174
190
|
path: string;
|
|
175
|
-
value:
|
|
191
|
+
value: never[];
|
|
176
192
|
} | {
|
|
177
193
|
op: string;
|
|
178
194
|
path: string;
|
|
179
195
|
value: string;
|
|
196
|
+
} | {
|
|
197
|
+
op: string;
|
|
198
|
+
path: string;
|
|
199
|
+
value: null;
|
|
180
200
|
})[];
|
|
181
201
|
effects: {
|
|
182
202
|
run: string;
|
|
@@ -214,11 +234,15 @@ export const ASSISTANT_ACTIONS: {
|
|
|
214
234
|
}[];
|
|
215
235
|
};
|
|
216
236
|
'ai/remember': {
|
|
217
|
-
patch: {
|
|
237
|
+
patch: ({
|
|
218
238
|
op: string;
|
|
219
239
|
path: string;
|
|
220
240
|
value: boolean;
|
|
221
|
-
}
|
|
241
|
+
} | {
|
|
242
|
+
op: string;
|
|
243
|
+
path: string;
|
|
244
|
+
value: null;
|
|
245
|
+
})[];
|
|
222
246
|
effects: {
|
|
223
247
|
run: string;
|
|
224
248
|
}[];
|
package/src/actions.js
CHANGED
|
@@ -1,145 +1,144 @@
|
|
|
1
|
-
//@ts-check
|
|
2
1
|
/** Assistant transitions received from the existing panel. */
|
|
3
2
|
export const ASSISTANT_ACTIONS = {
|
|
4
|
-
'ai/cancel': {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
'ai/toggle': {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'ai/settings-toggle': {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'ai/settings-open': {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'ai/setting': {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
'ai/probe': {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
'ai/probe-result': {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
'ai/save-settings': {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'ai/draft': {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
'ai/send': { effects: [{ run: 'ai-send' }] },
|
|
57
|
-
'ai/user': {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
'ai/delta': {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
'ai/reasoning': {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
'ai/activity': {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
'ai/reply': {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
'ai/failed': {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
'ai/clear': {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
'ai/ledger': {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
'ai/goal-draft': {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
'ai/goal-set': { effects: [{ run: 'ai-goal-set' }] },
|
|
121
|
-
'ai/goal-committed': {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
'ai/goal-clear': { effects: [{ run: 'ai-goal-clear' }] },
|
|
132
|
-
'ai/remember': {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
'ai/remembered': {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
3
|
+
'ai/cancel': {
|
|
4
|
+
patch: [
|
|
5
|
+
{ op: 'replace', path: '/ai/status', value: 'idle' },
|
|
6
|
+
{ op: 'replace', path: '/ai/pending', value: '' },
|
|
7
|
+
{ op: 'replace', path: '/ai/activity', value: null },
|
|
8
|
+
],
|
|
9
|
+
effects: [{ run: 'ai-cancel' }],
|
|
10
|
+
},
|
|
11
|
+
'ai/toggle': {
|
|
12
|
+
patch: [{ op: 'replace', path: '/ai/open', value: { $not: '$.ai.open' } }],
|
|
13
|
+
// opening while unconfigured pins the settings form open (see
|
|
14
|
+
// ai-ensure-settings), so it cannot vanish mid-edit as typing
|
|
15
|
+
// makes the configuration valid. The ledger read is what makes a
|
|
16
|
+
// reloaded page show the objective it was left with — the goal
|
|
17
|
+
// lives in storage, not in this tab.
|
|
18
|
+
effects: [{ run: 'ai-ensure-settings' }, { run: 'ai-ledger-read' }],
|
|
19
|
+
},
|
|
20
|
+
'ai/settings-toggle': {
|
|
21
|
+
patch: [{ op: 'replace', path: '/ai/settingsOpen', value: { $not: '$.ai.settingsOpen' } }],
|
|
22
|
+
},
|
|
23
|
+
'ai/settings-open': {
|
|
24
|
+
patch: [{ op: 'replace', path: '/ai/settingsOpen', value: '$payload' }],
|
|
25
|
+
},
|
|
26
|
+
'ai/setting': {
|
|
27
|
+
patch: [
|
|
28
|
+
{
|
|
29
|
+
op: 'add',
|
|
30
|
+
path: { $concat: ['/ai/settings/', '$payload.key'] },
|
|
31
|
+
value: '$event.value',
|
|
32
|
+
},
|
|
33
|
+
// an edited connection voids the last probe verdict
|
|
34
|
+
{ op: 'replace', path: '/ai/probe', value: { status: 'idle', detail: null, models: [] } },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
'ai/probe': {
|
|
38
|
+
patch: [{
|
|
39
|
+
op: 'replace',
|
|
40
|
+
path: '/ai/probe',
|
|
41
|
+
value: { status: 'busy', detail: null, models: [] },
|
|
42
|
+
}],
|
|
43
|
+
effects: [{ run: 'ai-probe' }],
|
|
44
|
+
},
|
|
45
|
+
'ai/probe-result': {
|
|
46
|
+
patch: [{ op: 'replace', path: '/ai/probe', value: '$payload' }],
|
|
47
|
+
},
|
|
48
|
+
'ai/save-settings': {
|
|
49
|
+
patch: [{ op: 'replace', path: '/ai/settingsOpen', value: false }],
|
|
50
|
+
effects: [{ run: 'ai-save-settings' }],
|
|
51
|
+
},
|
|
52
|
+
'ai/draft': {
|
|
53
|
+
patch: [{ op: 'replace', path: '/ai/draft', value: '$event.value' }],
|
|
54
|
+
},
|
|
55
|
+
'ai/send': { effects: [{ run: 'ai-send' }] },
|
|
56
|
+
'ai/user': {
|
|
57
|
+
patch: [
|
|
58
|
+
{ op: 'add', path: '/ai/messages/-', value: { role: 'user', content: '$payload' } },
|
|
59
|
+
{ op: 'replace', path: '/ai/draft', value: '' },
|
|
60
|
+
{ op: 'replace', path: '/ai/pending', value: '' },
|
|
61
|
+
{ op: 'replace', path: '/ai/status', value: 'streaming' },
|
|
62
|
+
{ op: 'replace', path: '/ai/activity', value: null },
|
|
63
|
+
{ op: 'replace', path: '/ai/error', value: null },
|
|
64
|
+
{ op: 'replace', path: '/ai/reasoningChars', value: 0 },
|
|
65
|
+
],
|
|
66
|
+
effects: [{ run: 'ai-persist' }],
|
|
67
|
+
},
|
|
68
|
+
'ai/delta': {
|
|
69
|
+
patch: [{ op: 'replace', path: '/ai/pending', value: { $concat: ['$.ai.pending', '$payload'] } }],
|
|
70
|
+
},
|
|
71
|
+
'ai/reasoning': {
|
|
72
|
+
patch: [{ op: 'replace', path: '/ai/reasoningChars', value: { $add: ['$.ai.reasoningChars', '$payload'] } }],
|
|
73
|
+
},
|
|
74
|
+
'ai/activity': {
|
|
75
|
+
patch: [{ op: 'replace', path: '/ai/activity', value: '$payload' }],
|
|
76
|
+
},
|
|
77
|
+
'ai/reply': {
|
|
78
|
+
patch: [
|
|
79
|
+
{ op: 'add', path: '/ai/messages/-', value: { role: 'assistant', content: '$payload' } },
|
|
80
|
+
{ op: 'replace', path: '/ai/pending', value: '' },
|
|
81
|
+
{ op: 'replace', path: '/ai/status', value: 'idle' },
|
|
82
|
+
{ op: 'replace', path: '/ai/activity', value: null },
|
|
83
|
+
],
|
|
84
|
+
effects: [{ run: 'ai-persist' }],
|
|
85
|
+
},
|
|
86
|
+
'ai/failed': {
|
|
87
|
+
patch: [
|
|
88
|
+
{ op: 'replace', path: '/ai/status', value: 'error' },
|
|
89
|
+
{ op: 'replace', path: '/ai/error', value: '$payload' },
|
|
90
|
+
{ op: 'replace', path: '/ai/pending', value: '' },
|
|
91
|
+
{ op: 'replace', path: '/ai/activity', value: null },
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
'ai/clear': {
|
|
95
|
+
patch: [
|
|
96
|
+
{ op: 'replace', path: '/ai/messages', value: [] },
|
|
97
|
+
{ op: 'replace', path: '/ai/pending', value: '' },
|
|
98
|
+
{ op: 'replace', path: '/ai/status', value: 'idle' },
|
|
99
|
+
{ op: 'replace', path: '/ai/activity', value: null },
|
|
100
|
+
{ op: 'replace', path: '/ai/error', value: null },
|
|
101
|
+
{ op: 'replace', path: '/ai/remembered', value: null },
|
|
102
|
+
],
|
|
103
|
+
// the archived rounds go with the transcript they were cut from:
|
|
104
|
+
// their addresses only ever existed in its synopsis
|
|
105
|
+
effects: [{ run: 'ai-clear-run' }, { run: 'ai-persist' }, { run: 'ai-clear-archive' }],
|
|
106
|
+
},
|
|
107
|
+
'ai/ledger': {
|
|
108
|
+
patch: [
|
|
109
|
+
{ op: 'replace', path: '/ai/goal', value: '$payload.goal' },
|
|
110
|
+
{ op: 'replace', path: '/ai/memories', value: '$payload.memories' },
|
|
111
|
+
{ op: 'replace', path: '/ai/archived', value: '$payload.archived' },
|
|
112
|
+
{ op: 'replace', path: '/ai/persistence', value: '$payload.persistence' },
|
|
113
|
+
{ op: 'replace', path: '/ai/retention', value: '$payload.retention' },
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
'ai/goal-draft': {
|
|
117
|
+
patch: [{ op: 'replace', path: '/ai/goalDraft', value: '$event.value' }],
|
|
118
|
+
},
|
|
119
|
+
'ai/goal-set': { effects: [{ run: 'ai-goal-set' }] },
|
|
120
|
+
'ai/goal-committed': {
|
|
121
|
+
patch: [
|
|
122
|
+
{ op: 'replace', path: '/ai/goal', value: '$payload.goal' },
|
|
123
|
+
{ op: 'replace', path: '/ai/memories', value: '$payload.memories' },
|
|
124
|
+
{ op: 'replace', path: '/ai/archived', value: '$payload.archived' },
|
|
125
|
+
{ op: 'replace', path: '/ai/persistence', value: '$payload.persistence' },
|
|
126
|
+
{ op: 'replace', path: '/ai/retention', value: '$payload.retention' },
|
|
127
|
+
{ op: 'replace', path: '/ai/goalDraft', value: '' },
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
'ai/goal-clear': { effects: [{ run: 'ai-goal-clear' }] },
|
|
131
|
+
'ai/remember': {
|
|
132
|
+
patch: [
|
|
133
|
+
{ op: 'replace', path: '/ai/remembering', value: true },
|
|
134
|
+
{ op: 'replace', path: '/ai/remembered', value: null },
|
|
135
|
+
],
|
|
136
|
+
effects: [{ run: 'ai-remember' }],
|
|
137
|
+
},
|
|
138
|
+
'ai/remembered': {
|
|
139
|
+
patch: [
|
|
140
|
+
{ op: 'replace', path: '/ai/remembering', value: false },
|
|
141
|
+
{ op: 'replace', path: '/ai/remembered', value: '$payload.note' },
|
|
142
|
+
],
|
|
143
|
+
},
|
|
145
144
|
};
|
package/src/component.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { createAssistantController } from './index.ts';
|
|
2
|
+
/** @param node @param [options] */
|
|
3
|
+
export declare function mountAssistant(node: HTMLElement | null, options?: AssistantOptions): {
|
|
3
4
|
controller: {
|
|
4
5
|
effects: {
|
|
5
6
|
[k: string]: (props: any, dispatch: any) => void | Promise<any>;
|
|
@@ -10,13 +11,13 @@ export function mountAssistant(node: HTMLElement | null, options?: AssistantOpti
|
|
|
10
11
|
};
|
|
11
12
|
read: () => any;
|
|
12
13
|
dispatch(action: any, payload?: any, event?: any): void;
|
|
13
|
-
subscribe(listener: any):
|
|
14
|
+
subscribe(listener: any): any;
|
|
14
15
|
/** Presentation updates retain the transcript, request and input node. */
|
|
15
16
|
update(next: AssistantPresentation): void;
|
|
16
17
|
dispose(): any;
|
|
17
18
|
};
|
|
18
|
-
/** @param
|
|
19
|
-
export function createAssistantWidget(options?: AssistantOptions): {
|
|
19
|
+
/** @param [options] */
|
|
20
|
+
export declare function createAssistantWidget(options?: AssistantOptions): {
|
|
20
21
|
mount: (host: any, props: any) => {
|
|
21
22
|
controller: {
|
|
22
23
|
effects: {
|
|
@@ -28,7 +29,7 @@ export function createAssistantWidget(options?: AssistantOptions): {
|
|
|
28
29
|
};
|
|
29
30
|
read: () => any;
|
|
30
31
|
dispatch(action: any, payload?: any, event?: any): void;
|
|
31
|
-
subscribe(listener: any):
|
|
32
|
+
subscribe(listener: any): any;
|
|
32
33
|
/** Presentation updates retain the transcript, request and input node. */
|
|
33
34
|
update(next: AssistantPresentation): void;
|
|
34
35
|
dispose(): any;
|
|
@@ -44,7 +45,7 @@ export type AssistantPresentation = {
|
|
|
44
45
|
capabilities?: string[];
|
|
45
46
|
settingsHint?: string;
|
|
46
47
|
};
|
|
47
|
-
export type AssistantOptions = AssistantPresentation & Partial<Omit<Parameters<typeof createAssistantController>[0],
|
|
48
|
+
export type AssistantOptions = AssistantPresentation & Partial<Omit<Parameters<typeof createAssistantController>[0], 'getApp'>> & {
|
|
48
49
|
settings?: any;
|
|
49
50
|
transcript?: any;
|
|
50
51
|
open?: boolean;
|
|
@@ -52,4 +53,3 @@ export type AssistantOptions = AssistantPresentation & Partial<Omit<Parameters<t
|
|
|
52
53
|
onError?: (error: Error) => void;
|
|
53
54
|
renderMarkdown?: (source: string) => any;
|
|
54
55
|
};
|
|
55
|
-
import { createAssistantController } from './index.js';
|