@hef2024/llmasaservice-ui 0.17.0 → 0.18.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/README.md +28 -0
- package/docs/CONVERSATION-HISTORY.md +863 -0
- package/docs/CONVERSATION-STARTING.md +815 -0
- package/package.json +1 -1
- package/src/AIAgentPanel.css +20 -1
- package/src/AIAgentPanel.tsx +26 -9
package/README.md
CHANGED
|
@@ -157,6 +157,34 @@ See our storybook documentation showing how to theme, size and use the variaous
|
|
|
157
157
|
|
|
158
158
|
https://predictabilityatscale.github.io/llmasaservice-ui/?path=/docs/chatpanel--docs
|
|
159
159
|
|
|
160
|
+
## Programmatic Conversation Starting (v0.17.0+)
|
|
161
|
+
|
|
162
|
+
Create conversations programmatically with auto-sent prompts using the imperative `startNewConversation` API:
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
import { useRef } from 'react';
|
|
166
|
+
import AIAgentPanel, { AIAgentPanelHandle } from '@hef2024/llmasaservice-ui';
|
|
167
|
+
|
|
168
|
+
const panelRef = useRef<AIAgentPanelHandle>(null);
|
|
169
|
+
|
|
170
|
+
// Quick action button that starts a conversation
|
|
171
|
+
<button onClick={() =>
|
|
172
|
+
panelRef.current?.startNewConversation('Give me a summary')
|
|
173
|
+
}>
|
|
174
|
+
Quick Summary
|
|
175
|
+
</button>
|
|
176
|
+
|
|
177
|
+
<AIAgentPanel ref={panelRef} agents={['agent-id']} customerId="user-123" />
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Perfect for quick actions, contextual help, onboarding flows, and more!
|
|
181
|
+
|
|
182
|
+
**📖 [Read Full Documentation](./docs/CONVERSATION-STARTING.md)** - Complete guide with examples and best practices.
|
|
183
|
+
|
|
184
|
+
## Additional Documentation
|
|
185
|
+
|
|
186
|
+
- **[Conversation History Settings](./docs/CONVERSATION-HISTORY.md)** - Configure conversation history sidebar (show/hide, position, collapse)
|
|
187
|
+
- **[Full API Documentation](./local-dev-docs/AIAGENTPANEL.md)** - Complete props reference and advanced features
|
|
160
188
|
|
|
161
189
|
## License
|
|
162
190
|
This project is licensed under the MIT License.
|