guideai-app 0.2.6 → 0.2.8
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 +96 -5
- package/dist/GuideAI.js +1 -1
- package/dist/GuideAI.js.map +1 -1
- package/dist/styles/GuideAI.styles.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/TextInput.d.ts +0 -8
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Guide AI
|
|
2
2
|
|
|
3
|
-
A React component that provides AI-powered guidance with voice interaction and element highlighting capabilities.
|
|
3
|
+
A React component that provides AI-powered guidance with voice interaction, text input, and element highlighting capabilities.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -35,6 +35,8 @@ function App() {
|
|
|
35
35
|
| `organizationKey` | `string` | Yes | Your organization key for workflows |
|
|
36
36
|
| `position` | `object` | No | Positioning configuration for the component |
|
|
37
37
|
| `onError` | `function` | No | Error handler callback |
|
|
38
|
+
| `transcript` | `object` | No | Transcript feature configuration |
|
|
39
|
+
| `input` | `object` | No | Input mode configuration (voice/text) |
|
|
38
40
|
|
|
39
41
|
### Position Object
|
|
40
42
|
|
|
@@ -54,9 +56,30 @@ position?: {
|
|
|
54
56
|
}
|
|
55
57
|
```
|
|
56
58
|
|
|
59
|
+
### Transcript Configuration Object
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
transcript?: {
|
|
63
|
+
enabled?: boolean; // Show transcript (default: true)
|
|
64
|
+
showToggleButton?: boolean; // Show transcript toggle (default: true)
|
|
65
|
+
position?: 'right' | 'left' | 'top' | 'bottom'; // Transcript position
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Input Configuration Object
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
input?: {
|
|
73
|
+
enableTextInput?: boolean; // Enable text input (default: true)
|
|
74
|
+
showInputToggle?: boolean; // Show mode toggle button (default: true)
|
|
75
|
+
defaultMode?: 'voice' | 'text'; // Default input mode (default: 'voice')
|
|
76
|
+
placeholder?: string; // Text input placeholder
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
57
80
|
### Examples
|
|
58
81
|
|
|
59
|
-
**
|
|
82
|
+
**Basic usage:**
|
|
60
83
|
```jsx
|
|
61
84
|
<GuideAI
|
|
62
85
|
organizationKey="your-org-key"
|
|
@@ -64,17 +87,76 @@ position?: {
|
|
|
64
87
|
/>
|
|
65
88
|
```
|
|
66
89
|
|
|
67
|
-
**
|
|
90
|
+
**With text input enabled by default:**
|
|
68
91
|
```jsx
|
|
69
92
|
<GuideAI
|
|
70
93
|
organizationKey="your-org-key"
|
|
71
94
|
position={{ top: '20px', right: '20px' }}
|
|
95
|
+
input={{
|
|
96
|
+
defaultMode: 'text',
|
|
97
|
+
placeholder: "Ask me anything..."
|
|
98
|
+
}}
|
|
99
|
+
/>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Full configuration:**
|
|
103
|
+
```jsx
|
|
104
|
+
<GuideAI
|
|
105
|
+
organizationKey="your-organization-key"
|
|
106
|
+
position={{ bottom: '2rem', right: '2rem' }}
|
|
107
|
+
transcript={{
|
|
108
|
+
enabled: true,
|
|
109
|
+
showToggleButton: true
|
|
110
|
+
}}
|
|
111
|
+
input={{
|
|
112
|
+
enableTextInput: true,
|
|
113
|
+
defaultMode: 'voice',
|
|
114
|
+
placeholder: "Type your message..."
|
|
115
|
+
}}
|
|
116
|
+
onError={(error) => console.error(error)}
|
|
72
117
|
/>
|
|
73
118
|
```
|
|
74
119
|
|
|
120
|
+
## Text Input Feature
|
|
121
|
+
|
|
122
|
+
GuideAI now supports both voice and text input modes, giving users flexible ways to interact with the AI assistant.
|
|
123
|
+
|
|
124
|
+
### Features
|
|
125
|
+
|
|
126
|
+
- **Dual Input Modes**: Switch seamlessly between voice and text input
|
|
127
|
+
- **Text Input Interface**: Clean text area integrated into the transcript box
|
|
128
|
+
- **Input Mode Toggle**: Dedicated button to switch between voice and text modes
|
|
129
|
+
- **Real-time Text Chat**: Type messages and receive AI responses instantly
|
|
130
|
+
- **Keyboard Shortcuts**: Press Enter to send messages quickly
|
|
131
|
+
- **Auto-enabled**: Text input is enabled by default for better accessibility
|
|
132
|
+
|
|
133
|
+
### Input Props
|
|
134
|
+
|
|
135
|
+
| Prop | Type | Default | Description |
|
|
136
|
+
|------|------|---------|-------------|
|
|
137
|
+
| `enableTextInput` | boolean | `true` | Enable text input functionality |
|
|
138
|
+
| `showInputToggle` | boolean | `true` | Show the voice/text mode toggle button |
|
|
139
|
+
| `defaultMode` | `'voice' \| 'text'` | `'voice'` | Default input mode when conversation starts |
|
|
140
|
+
| `placeholder` | string | `"Type your message..."` | Placeholder text for the text input field |
|
|
141
|
+
|
|
142
|
+
### How to Use Text Input
|
|
143
|
+
|
|
144
|
+
1. **Start a Conversation**: Click the GuideAI button to begin
|
|
145
|
+
2. **Switch to Text Mode**: Click the toggle button next to the main GuideAI button
|
|
146
|
+
3. **Type Your Message**: Use the text area at the bottom of the transcript box
|
|
147
|
+
4. **Send Message**: Press Enter or click the send button
|
|
148
|
+
5. **Switch Back**: Click the toggle button again to return to voice mode
|
|
149
|
+
|
|
150
|
+
### Accessibility Features
|
|
151
|
+
|
|
152
|
+
- **Keyboard Navigation**: Full keyboard support for text input
|
|
153
|
+
- **Default Enabled**: Text input works out of the box without configuration
|
|
154
|
+
- **Fallback Support**: Automatically enables text mode if microphone access is denied
|
|
155
|
+
- **Visual Indicators**: Clear visual feedback for active input mode
|
|
156
|
+
|
|
75
157
|
## Transcript Feature
|
|
76
158
|
|
|
77
|
-
GuideAI
|
|
159
|
+
GuideAI includes a beautiful transcript interface that displays conversations between users and the AI in a transparent Apple-style box.
|
|
78
160
|
|
|
79
161
|
### Features
|
|
80
162
|
|
|
@@ -108,4 +190,13 @@ The transcript uses modern CSS features including:
|
|
|
108
190
|
- `backdrop-filter: blur()` for the glassmorphism effect
|
|
109
191
|
- CSS animations for smooth transitions
|
|
110
192
|
- Responsive design that adapts to different screen sizes
|
|
111
|
-
- Custom scrollbar styling for a polished look
|
|
193
|
+
- Custom scrollbar styling for a polished look
|
|
194
|
+
|
|
195
|
+
## Migration from Voice-Only Versions
|
|
196
|
+
|
|
197
|
+
If you're upgrading from a voice-only version:
|
|
198
|
+
|
|
199
|
+
- **No Breaking Changes**: Existing implementations continue to work unchanged
|
|
200
|
+
- **Text Input Enabled**: Text input is now available by default
|
|
201
|
+
- **Disable if Needed**: Set `input={{ enableTextInput: false }}` to disable text input
|
|
202
|
+
- **Voice Still Default**: Voice mode remains the default interaction method
|