quikchat 1.1.14 → 1.1.15
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 +67 -11
- package/dist/quikchat.cjs.js +490 -19
- package/dist/quikchat.cjs.js.map +1 -1
- package/dist/quikchat.cjs.min.js +1 -1
- package/dist/quikchat.cjs.min.js.map +1 -1
- package/dist/quikchat.d.ts +194 -0
- package/dist/quikchat.esm.js +490 -19
- package/dist/quikchat.esm.js.map +1 -1
- package/dist/quikchat.esm.min.js +1 -1
- package/dist/quikchat.esm.min.js.map +1 -1
- package/dist/quikchat.umd.js +490 -19
- package/dist/quikchat.umd.js.map +1 -1
- package/dist/quikchat.umd.min.js +1 -1
- package/dist/quikchat.umd.min.js.map +1 -1
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
[](https://opensource.org/licenses/BSD-2-Clause)
|
|
2
|
-
[](https://www.npmjs.com/package/quikchat)
|
|
3
|
-

|
|
1
|
+
[](https://opensource.org/licenses/BSD-2-Clause) [](https://www.npmjs.com/package/quikchat) 
|
|
4
2
|
|
|
5
3
|
# QuikChat
|
|
6
4
|
|
|
@@ -8,7 +6,7 @@
|
|
|
8
6
|
|
|
9
7
|
QuikChat is a lightweight, highly customizable chat interface that integrates seamlessly with any web project. Built with vanilla JavaScript, it provides powerful features for LLM applications, real-time chat, and interactive messaging experiences.
|
|
10
8
|
|
|
11
|
-
**🚀 [Live Demo](https://deftio.github.io/quikchat/examples/example_umd.html) | 📚 [API Reference](API-REFERENCE.md) | 🛠 [Developer Guide](DEVELOPER-GUIDE.md)**
|
|
9
|
+
**🚀 [Live Demo](https://deftio.github.io/quikchat/examples/example_umd.html) | 📚 [API Reference](docs/API-REFERENCE.md) | 🛠 [Developer Guide](docs/DEVELOPER-GUIDE.md)**
|
|
12
10
|
|
|
13
11
|
|
|
14
12
|
|
|
@@ -97,7 +95,65 @@ Download the latest release from [GitHub Releases](https://github.com/deftio/qui
|
|
|
97
95
|
|
|
98
96
|
|
|
99
97
|
|
|
100
|
-
## 🆕 What's New in v1.1.
|
|
98
|
+
## 🆕 What's New in v1.1.15 (In Development)
|
|
99
|
+
|
|
100
|
+
### 🎯 Smart Scroll Behavior
|
|
101
|
+
Improved user experience when reading chat history:
|
|
102
|
+
|
|
103
|
+
```javascript
|
|
104
|
+
// Never auto-scroll (user has full control)
|
|
105
|
+
chat.messageAddNew('New message', 'Bot', 'left', 'assistant', false);
|
|
106
|
+
|
|
107
|
+
// Smart scroll - only scrolls if user is near bottom
|
|
108
|
+
chat.messageAddNew('New message', 'Bot', 'left', 'assistant', 'smart');
|
|
109
|
+
|
|
110
|
+
// Always scroll to new messages (default)
|
|
111
|
+
chat.messageAddNew('New message', 'Bot', 'left', 'assistant', true);
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 🔔 Enhanced Message Callbacks
|
|
115
|
+
Track message modifications for streaming and real-time updates:
|
|
116
|
+
|
|
117
|
+
```javascript
|
|
118
|
+
// Track streaming content as it arrives
|
|
119
|
+
chat.setCallbackonMessageAppend((instance, msgId, content) => {
|
|
120
|
+
console.log(`Streaming: ${content} added to message ${msgId}`);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Monitor message edits
|
|
124
|
+
chat.setCallbackonMessageReplace((instance, msgId, newContent) => {
|
|
125
|
+
console.log(`Message ${msgId} updated`);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// Track deletions
|
|
129
|
+
chat.setCallbackonMessageDelete((instance, msgId) => {
|
|
130
|
+
console.log(`Message ${msgId} deleted`);
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 📚 Powerful History Management
|
|
135
|
+
Efficiently handle large chat histories with pagination and search:
|
|
136
|
+
|
|
137
|
+
```javascript
|
|
138
|
+
// Paginated history retrieval
|
|
139
|
+
const page = chat.historyGetPage(1, 20, 'desc'); // Get newest 20 messages
|
|
140
|
+
console.log(page.messages);
|
|
141
|
+
console.log(page.pagination.hasNext); // Check if more pages exist
|
|
142
|
+
|
|
143
|
+
// Search through history
|
|
144
|
+
const results = chat.historySearch({
|
|
145
|
+
text: 'error',
|
|
146
|
+
userString: 'Support',
|
|
147
|
+
limit: 50
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// Get history metadata
|
|
151
|
+
const info = chat.historyGetInfo();
|
|
152
|
+
console.log(`Total messages: ${info.totalMessages}`);
|
|
153
|
+
console.log(`Memory used: ${info.memoryUsage.estimatedSize} bytes`);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## 📦 Previous Release: v1.1.14
|
|
101
157
|
|
|
102
158
|
### 🏷 Tagged Message System
|
|
103
159
|
Group and control message visibility with powerful tagging:
|
|
@@ -179,7 +235,7 @@ const chat = new quikchat('#chat', handler, {
|
|
|
179
235
|
});
|
|
180
236
|
```
|
|
181
237
|
|
|
182
|
-
**📖 [Complete Theming Guide](DEVELOPER-GUIDE.md#theming-guide)**
|
|
238
|
+
**📖 [Complete Theming Guide](docs/DEVELOPER-GUIDE.md#theming-guide)**
|
|
183
239
|
|
|
184
240
|
|
|
185
241
|
|
|
@@ -218,7 +274,7 @@ streamingAPI.onChunk(chunk => {
|
|
|
218
274
|
});
|
|
219
275
|
```
|
|
220
276
|
|
|
221
|
-
**🛠 [Complete LLM Integration Guide](DEVELOPER-GUIDE.md#llm-integration-best-practices)**
|
|
277
|
+
**🛠 [Complete LLM Integration Guide](docs/DEVELOPER-GUIDE.md#llm-integration-best-practices)**
|
|
222
278
|
|
|
223
279
|
|
|
224
280
|
|
|
@@ -255,7 +311,7 @@ export default {
|
|
|
255
311
|
</script>
|
|
256
312
|
```
|
|
257
313
|
|
|
258
|
-
**⚛️ [Framework Integration Examples](DEVELOPER-GUIDE.md#frontend-framework-integration)**
|
|
314
|
+
**⚛️ [Framework Integration Examples](docs/DEVELOPER-GUIDE.md#frontend-framework-integration)**
|
|
259
315
|
|
|
260
316
|
|
|
261
317
|
|
|
@@ -263,8 +319,8 @@ export default {
|
|
|
263
319
|
|
|
264
320
|
| Document | Description |
|
|
265
321
|
|-|-|
|
|
266
|
-
| **[API Reference](API-REFERENCE.md)** | Complete technical reference for all methods and options |
|
|
267
|
-
| **[Developer Guide](DEVELOPER-GUIDE.md)** | Practical recipes and advanced patterns |
|
|
322
|
+
| **[API Reference](docs/API-REFERENCE.md)** | Complete technical reference for all methods and options |
|
|
323
|
+
| **[Developer Guide](docs/DEVELOPER-GUIDE.md)** | Practical recipes and advanced patterns |
|
|
268
324
|
| **[Examples](examples/)** | Working code examples and demos |
|
|
269
325
|
| **[Live Demo](https://deftio.github.io/quikchat/examples/)** | Interactive examples and showcase |
|
|
270
326
|
|
|
@@ -293,7 +349,7 @@ QuikChat is built for production use with excellent performance characteristics:
|
|
|
293
349
|
- **Scalable**: Handles thousands of messages efficiently
|
|
294
350
|
- **Memory Efficient**: Automatic cleanup and optimization
|
|
295
351
|
|
|
296
|
-
**📊 [Performance Optimization Guide](DEVELOPER-GUIDE.md#performance-optimization)**
|
|
352
|
+
**📊 [Performance Optimization Guide](docs/DEVELOPER-GUIDE.md#performance-optimization)**
|
|
297
353
|
|
|
298
354
|
|
|
299
355
|
|