max-agent-ui 0.0.19 → 0.0.21
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/README.md +13 -9
- package/fesm2022/max-agent-ui.mjs +188 -18
- package/fesm2022/max-agent-ui.mjs.map +1 -1
- package/index.d.ts +67 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,12 +38,17 @@ import { MaxAssistantComponent } from 'max-agent-ui';
|
|
|
38
38
|
Add `MaxAssistantComponent` to the consuming component imports and render:
|
|
39
39
|
|
|
40
40
|
```html
|
|
41
|
-
<max-assistant
|
|
42
|
-
|
|
43
|
-
app="cortex"
|
|
41
|
+
<max-assistant
|
|
42
|
+
app="cortex"
|
|
44
43
|
/>
|
|
45
44
|
```
|
|
46
45
|
|
|
46
|
+
The component uses `/agent-api/v1/chat` through the host application's Angular
|
|
47
|
+
development proxy in development builds. Production builds call the shared
|
|
48
|
+
agent service directly at `https://agent.maxtime.cloud/v1/chat`. The existing
|
|
49
|
+
`assistantApiUrl` input and `MAX_ASSISTANT_CONFIG` option can still override
|
|
50
|
+
this default for tests or exceptional deployments.
|
|
51
|
+
|
|
47
52
|
`MaxAssistantComponent` renders the chat panel directly. It does not include a
|
|
48
53
|
launcher or manage open/close state, so the host application can place it
|
|
49
54
|
inline, in a drawer, or in a dialog. Host-specific header controls can be
|
|
@@ -68,10 +73,9 @@ route, and timezone are sent as request context:
|
|
|
68
73
|
```ts
|
|
69
74
|
providers: [
|
|
70
75
|
{
|
|
71
|
-
provide: MAX_ASSISTANT_CONFIG,
|
|
72
|
-
useFactory: (session: SessionService, router: Router) => ({
|
|
73
|
-
|
|
74
|
-
app: 'cortex',
|
|
76
|
+
provide: MAX_ASSISTANT_CONFIG,
|
|
77
|
+
useFactory: (session: SessionService, router: Router) => ({
|
|
78
|
+
app: 'cortex',
|
|
75
79
|
user: () => ({
|
|
76
80
|
token: session.authToken(),
|
|
77
81
|
version: session.apiVersion()
|
|
@@ -125,7 +129,7 @@ Host apps should provide Angular `HttpClient` for real API calls and include the
|
|
|
125
129
|
For local integration, install the generated tarball and peer UI dependencies in the consuming app:
|
|
126
130
|
|
|
127
131
|
```bash
|
|
128
|
-
npm install C:/Users/Dev100/Documents/Maxtime/Projects/maxtime-ui-library/dist/max-agent-ui/max-agent-ui-0.0.
|
|
132
|
+
npm install C:/Users/Dev100/Documents/Maxtime/Projects/maxtime-ui-library/dist/max-agent-ui/max-agent-ui-0.0.30.tgz primeng primeicons @angular/cdk
|
|
129
133
|
```
|
|
130
134
|
|
|
131
135
|
### Publishing the Library
|
|
@@ -142,7 +146,7 @@ Publish the generated tarball after logging in to npm:
|
|
|
142
146
|
|
|
143
147
|
```bash
|
|
144
148
|
npm login
|
|
145
|
-
npm publish max-agent-ui-0.0.
|
|
149
|
+
npm publish max-agent-ui-0.0.30.tgz
|
|
146
150
|
```
|
|
147
151
|
|
|
148
152
|
## Running unit tests
|