@bitbaum/chatkit 0.12.0 → 0.12.1
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 +5 -0
- package/package.json +1 -1
- package/styles.css +32 -1
package/README.md
CHANGED
|
@@ -114,6 +114,11 @@ const system = `${yourPrompt}\n\n${REPLIES_INSTRUCTION}`; // server side
|
|
|
114
114
|
<ChatThread messages={messages} onReply={send} … />
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
+
Below 40rem the replies are one row that scrolls sideways with a fade, the
|
|
118
|
+
lead reply first and always on screen; wider, they wrap. The Copy · Listen ·
|
|
119
|
+
Share · Retry row under an answer keeps each word on one line and every button
|
|
120
|
+
at the 44px target (0.12.1).
|
|
121
|
+
|
|
117
122
|
That is the whole integration. `ChatThread` takes the `quick_replies` block out
|
|
118
123
|
of every answer (and out of a streaming one before it has finished, so nobody
|
|
119
124
|
watches JSON appear), and shows the buttons under the latest answer only, never
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitbaum/chatkit",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "One chat for every product: a composer with a microphone that always works, a thread that does not fight the reader, messages with copy and retry, and LLM markdown \u2014 the fleet's chat standard as a package.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Cato",
|
package/styles.css
CHANGED
|
@@ -508,15 +508,20 @@
|
|
|
508
508
|
}
|
|
509
509
|
.ck-turn-actions {
|
|
510
510
|
display: flex;
|
|
511
|
+
flex-wrap: wrap;
|
|
511
512
|
gap: 0.25rem;
|
|
512
513
|
margin-top: 0.25rem;
|
|
513
514
|
}
|
|
515
|
+
/* Each action is one word on one line and a full-size target: "Nochmals
|
|
516
|
+
versuchen" broke across two lines at 390px, and the row sat at 36px while
|
|
517
|
+
every other control in the chat is 44. */
|
|
514
518
|
.ck-action {
|
|
515
519
|
display: inline-flex;
|
|
516
520
|
align-items: center;
|
|
517
521
|
gap: 0.375rem;
|
|
518
|
-
min-height:
|
|
522
|
+
min-height: var(--ck-target);
|
|
519
523
|
padding: 0 0.5rem;
|
|
524
|
+
white-space: nowrap;
|
|
520
525
|
border: 0;
|
|
521
526
|
border-radius: var(--ck-radius-sm);
|
|
522
527
|
background: transparent;
|
|
@@ -1077,6 +1082,32 @@ a.ck-source:hover {
|
|
|
1077
1082
|
opacity: 0.5;
|
|
1078
1083
|
cursor: default;
|
|
1079
1084
|
}
|
|
1085
|
+
/* On a phone the replies are ONE row that scrolls sideways, with a fade
|
|
1086
|
+
where it runs on, never a box of pills that wraps into "two and an orphan"
|
|
1087
|
+
wherever the words run out. The lead reply is first, so it is always on
|
|
1088
|
+
screen. From 40rem up there is room for all of them on a line or two. */
|
|
1089
|
+
@media (max-width: 40rem) {
|
|
1090
|
+
.ck-replies {
|
|
1091
|
+
flex-wrap: nowrap;
|
|
1092
|
+
overflow-x: auto;
|
|
1093
|
+
scrollbar-width: none;
|
|
1094
|
+
padding-inline-end: 2.5rem;
|
|
1095
|
+
scroll-padding-inline: 0.5rem;
|
|
1096
|
+
-webkit-overflow-scrolling: touch;
|
|
1097
|
+
-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
|
|
1098
|
+
mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent);
|
|
1099
|
+
}
|
|
1100
|
+
.ck-replies::-webkit-scrollbar {
|
|
1101
|
+
display: none;
|
|
1102
|
+
}
|
|
1103
|
+
.ck-reply {
|
|
1104
|
+
flex: 0 0 auto;
|
|
1105
|
+
max-width: 85vw;
|
|
1106
|
+
overflow: hidden;
|
|
1107
|
+
white-space: nowrap;
|
|
1108
|
+
text-overflow: ellipsis;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1080
1111
|
|
|
1081
1112
|
.ck-spin {
|
|
1082
1113
|
animation: ck-spin 0.9s linear infinite;
|