@langgraph-js/ui 1.0.0 → 1.2.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/src/chat/chat.css CHANGED
@@ -1,361 +1,403 @@
1
- .chat-container {
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- position: relative;
6
- }
7
-
8
- .chat-sidebar {
9
- background-color: #f5f5f5;
10
- border-right: 1px solid #e0e0e0;
11
- display: flex;
12
- flex-direction: column;
13
- }
14
-
15
- .history-header {
16
- padding: 16px;
17
- border-bottom: 1px solid #e0e0e0;
18
- display: flex;
19
- justify-content: space-between;
20
- align-items: center;
21
- }
22
-
23
- .history-header h3 {
24
- margin: 0;
25
- font-size: 16px;
26
- color: #333;
27
- }
28
-
29
- .close-button {
30
- background: none;
31
- border: none;
32
- font-size: 20px;
33
- cursor: pointer;
34
- color: #666;
35
- }
36
-
37
- .history-list {
38
- flex: none;
39
- width: 280px;
40
- overflow-y: auto;
41
- /* padding: 8px; */
42
- border-right: 1px solid #e0e0e0;
43
- }
44
-
45
- .history-item {
46
- padding: 12px;
47
- margin-bottom: 8px;
48
- background-color: white;
49
- cursor: pointer;
50
- transition: background-color 0.2s;
51
- }
52
-
53
- .history-item:hover {
54
- background-color: #e8e8e8;
55
- }
56
-
57
- .history-item.active {
58
- background-color: #e3f2fd;
59
- border-left: 3px solid #2196f3;
60
- }
61
-
62
- .history-title {
63
- font-size: 14px;
64
- color: #333;
65
- margin-bottom: 4px;
66
- }
67
-
68
- .history-time {
69
- font-size: 12px;
70
- color: #666;
71
- }
72
-
73
- .chat-main {
74
- overflow: hidden;
75
- flex: 1;
76
- display: flex;
77
- flex-direction: column;
78
- }
79
-
80
- .chat-header {
81
- padding: 16px;
82
- border-bottom: 1px solid #e0e0e0;
83
- display: flex;
84
- justify-content: flex-end;
85
- gap: 0.5rem;
86
- }
87
-
88
- .history-button {
89
- padding: 8px 16px;
90
- background-color: #f0f0f0;
91
- border: 1px solid #e0e0e0;
92
- border-radius: 4px;
93
- cursor: pointer;
94
- font-size: 14px;
95
- color: #333;
96
- }
97
-
98
- .history-button:hover {
99
- background-color: #e0e0e0;
100
- }
101
-
102
- .chat-messages {
103
- flex: 1;
104
- overflow-y: auto;
105
- padding: 1rem;
106
- display: flex;
107
- flex-direction: column;
108
- gap: 1rem;
109
- }
110
-
111
- .message {
112
- display: flex;
113
- max-width: 80%;
114
- }
115
-
116
- .message.human {
117
- margin-left: auto;
118
- }
119
-
120
- .message.ai {
121
- margin-right: auto;
122
- }
123
-
124
- .message-content {
125
- padding: 0.75rem 1rem;
126
- border-radius: 8px;
127
- border: 1px solid #e5e7eb;
128
- display: flex;
129
- flex-direction: column;
130
- gap: 0.5rem;
131
- }
132
-
133
- .message-text {
134
- word-break: break-word;
135
- }
136
-
137
- .message-meta {
138
- display: flex;
139
- align-items: center;
140
- gap: 0.75rem;
141
- font-size: 0.75rem;
142
- color: #6b7280;
143
- margin-top: 0.25rem;
144
- }
145
-
146
- .message-time {
147
- font-family: monospace;
148
- }
149
-
150
- .token-info {
151
- display: flex;
152
- gap: 0.5rem;
153
- align-items: center;
154
- }
155
-
156
- .token-item {
157
- display: flex;
158
- align-items: center;
159
- gap: 0.25rem;
160
- background-color: #ffffff;
161
- padding: 0.125rem 0.375rem;
162
- border-radius: 4px;
163
- font-family: monospace;
164
- }
165
-
166
- .token-emoji {
167
- font-size: 0.875rem;
168
- }
169
-
170
- .message.human .message-content {
171
- background-color: #3b82f6;
172
- color: white;
173
- border-color: #3b82f6;
174
- }
175
-
176
- .message.human .message-meta {
177
- color: rgba(255, 255, 255, 0.8);
178
- }
179
-
180
- .message.ai .message-content {
181
- background-color: #f3f4f6;
182
- color: #1f2937;
183
- }
184
-
185
- .message.tool {
186
- width: 100%;
187
- max-width: 100%;
188
- }
189
-
190
- .tool-message {
191
- width: 100%;
192
- border: 1px solid #e5e7eb;
193
- border-radius: 8px;
194
- overflow: hidden;
195
- }
196
-
197
- .tool-header {
198
- display: flex;
199
- align-items: center;
200
- justify-content: space-between;
201
- padding: 0.5rem 1rem;
202
- background-color: #f9fafb;
203
- border-bottom: 1px solid #e5e7eb;
204
- cursor: pointer;
205
- }
206
-
207
- .tool-header:hover {
208
- background-color: #f3f4f6;
209
- }
210
-
211
- .tool-title {
212
- font-weight: 500;
213
- color: #374151;
214
- }
215
-
216
- .tool-content {
217
- padding: 1rem;
218
- }
219
-
220
- .tool-input {
221
- background-color: #f9fafb;
222
- padding: 0.75rem;
223
- border-radius: 4px;
224
- margin-bottom: 0.5rem;
225
- font-family: monospace;
226
- white-space: pre-wrap;
227
- word-break: break-all;
228
- }
229
-
230
- .tool-output {
231
- background-color: #ffffff;
232
- padding: 0.75rem;
233
- border-radius: 4px;
234
- font-family: monospace;
235
- border: 1px solid #e5e7eb;
236
- margin-bottom: 0.5rem;
237
- }
238
-
239
- .chat-input {
240
- border-top: 1px solid #e5e7eb;
241
- padding: 0 1rem 1rem 1rem;
242
- background-color: #ffffff;
243
- }
244
- .chat-input-header {
245
- display: flex;
246
- align-items: center;
247
- justify-content: space-between;
248
- padding: 0.5rem 1rem;
249
- }
250
- .input-container {
251
- display: flex;
252
- gap: 0.5rem;
253
- }
254
-
255
- .input-textarea {
256
- flex: 1;
257
- padding: 0.75rem;
258
- border: 1px solid #e5e7eb;
259
- border-radius: 8px;
260
- resize: none;
261
- font-size: 0.875rem;
262
- line-height: 1.25rem;
263
- }
264
-
265
- .input-textarea:focus {
266
- outline: none;
267
- border-color: #3b82f6;
268
- }
269
-
270
- .send-button {
271
- padding: 0.5rem 1rem;
272
- background-color: #3b82f6;
273
- color: white;
274
- border: none;
275
- border-radius: 8px;
276
- cursor: pointer;
277
- font-weight: 500;
278
- transition: all 0.2s;
279
- }
280
-
281
- .send-button:hover {
282
- background-color: #2563eb;
283
- }
284
-
285
- .send-button:disabled {
286
- background-color: #93c5fd;
287
- cursor: not-allowed;
288
- }
289
-
290
- .send-button.interrupt {
291
- background-color: #ef4444;
292
- }
293
-
294
- .send-button.interrupt:hover {
295
- background-color: #dc2626;
296
- }
297
-
298
- .collapsed .tool-content {
299
- display: none;
300
- }
301
-
302
- .expand-icon {
303
- transition: transform 0.2s;
304
- }
305
-
306
- .collapsed .expand-icon {
307
- transform: rotate(-90deg);
308
- }
309
-
310
- .loading-indicator {
311
- padding: 12px 16px;
312
- margin: 8px 0;
313
- background-color: #f5f5f5;
314
- border-radius: 8px;
315
- color: #666;
316
- font-size: 14px;
317
- text-align: center;
318
- animation: pulse 1.5s infinite;
319
- display: flex;
320
- align-items: center;
321
- justify-content: center;
322
- gap: 12px;
323
- }
324
-
325
- .interrupt-button {
326
- padding: 4px 12px;
327
- background-color: #ef4444;
328
- color: white;
329
- border: none;
330
- border-radius: 4px;
331
- cursor: pointer;
332
- font-size: 12px;
333
- transition: background-color 0.2s;
334
- }
335
-
336
- .interrupt-button:hover {
337
- background-color: #dc2626;
338
- }
339
-
340
- @keyframes pulse {
341
- 0% {
342
- opacity: 0.6;
343
- }
344
- 50% {
345
- opacity: 1;
346
- }
347
- 100% {
348
- opacity: 0.6;
349
- }
350
- }
351
-
352
- .error-message {
353
- padding: 12px 16px;
354
- margin: 8px 0;
355
- background-color: #fee2e2;
356
- border: 1px solid #fecaca;
357
- border-radius: 8px;
358
- color: #dc2626;
359
- font-size: 14px;
360
- text-align: center;
361
- }
1
+ @import url("https://unpkg.com/github-markdown-css/github-markdown.css");
2
+
3
+ .chat-container {
4
+ display: flex;
5
+ height: 100vh;
6
+ width: 100%;
7
+ position: relative;
8
+ }
9
+
10
+ .chat-sidebar {
11
+ background-color: #f5f5f5;
12
+ border-right: 1px solid #e0e0e0;
13
+ display: flex;
14
+ flex-direction: column;
15
+ }
16
+
17
+ .history-header {
18
+ padding: 16px;
19
+ border-bottom: 1px solid #e0e0e0;
20
+ display: flex;
21
+ justify-content: space-between;
22
+ align-items: center;
23
+ }
24
+
25
+ .history-header h3 {
26
+ margin: 0;
27
+ font-size: 16px;
28
+ color: #333;
29
+ }
30
+
31
+ .close-button {
32
+ background: none;
33
+ border: none;
34
+ font-size: 20px;
35
+ cursor: pointer;
36
+ color: #666;
37
+ }
38
+
39
+ .history-list {
40
+ flex: none;
41
+ width: 280px;
42
+ overflow-y: auto;
43
+ /* padding: 8px; */
44
+ border-right: 1px solid #e0e0e0;
45
+ }
46
+
47
+ .history-item {
48
+ padding: 12px;
49
+ margin-bottom: 8px;
50
+ background-color: white;
51
+ cursor: pointer;
52
+ transition: background-color 0.2s;
53
+ }
54
+
55
+ .history-item:hover {
56
+ background-color: #e8e8e8;
57
+ }
58
+
59
+ .history-item.active {
60
+ background-color: #e3f2fd;
61
+ border-left: 3px solid #2196f3;
62
+ }
63
+
64
+ .history-title {
65
+ font-size: 14px;
66
+ color: #333;
67
+ margin-bottom: 4px;
68
+ }
69
+
70
+ .history-time {
71
+ font-size: 12px;
72
+ color: #666;
73
+ }
74
+
75
+ .chat-main {
76
+ overflow: hidden;
77
+ flex: 1;
78
+ display: flex;
79
+ flex-direction: column;
80
+ }
81
+
82
+ .chat-header {
83
+ padding: 16px;
84
+ border-bottom: 1px solid #e0e0e0;
85
+ display: flex;
86
+ justify-content: flex-end;
87
+ gap: 0.5rem;
88
+ }
89
+
90
+ .history-button {
91
+ padding: 8px 16px;
92
+ background-color: #f0f0f0;
93
+ border: 1px solid #e0e0e0;
94
+ border-radius: 4px;
95
+ cursor: pointer;
96
+ font-size: 14px;
97
+ color: #333;
98
+ }
99
+
100
+ .history-button:hover {
101
+ background-color: #e0e0e0;
102
+ }
103
+
104
+ .chat-messages {
105
+ flex: 1;
106
+ overflow-y: auto;
107
+ padding: 1rem;
108
+ display: flex;
109
+ flex-direction: column;
110
+ gap: 1rem;
111
+ }
112
+
113
+ .message {
114
+ display: flex;
115
+ max-width: 80%;
116
+ }
117
+
118
+ .message.human {
119
+ margin-left: auto;
120
+ }
121
+
122
+ .message.ai {
123
+ margin-right: auto;
124
+ }
125
+
126
+ .message-content {
127
+ padding: 0.75rem 1rem;
128
+ border-radius: 8px;
129
+ border: 1px solid #e5e7eb;
130
+ display: flex;
131
+ flex-direction: column;
132
+ gap: 0.5rem;
133
+ max-width: 100%;
134
+ }
135
+
136
+ .message-text {
137
+ word-break: break-word;
138
+ line-height: 1.5;
139
+ }
140
+
141
+ .message-image {
142
+ margin: 0.5rem 0;
143
+ }
144
+
145
+ .message-image img {
146
+ max-width: 100%;
147
+ border-radius: 4px;
148
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
149
+ }
150
+
151
+ .message-audio {
152
+ margin: 0.5rem 0;
153
+ }
154
+
155
+ .message-audio audio {
156
+ width: 100%;
157
+ max-width: 300px;
158
+ }
159
+
160
+ .message-meta {
161
+ display: flex;
162
+ align-items: center;
163
+ gap: 0.75rem;
164
+ font-size: 0.75rem;
165
+ color: #6b7280;
166
+ margin-top: 0.25rem;
167
+ }
168
+
169
+ .message-time {
170
+ font-family: monospace;
171
+ }
172
+
173
+ .token-info {
174
+ display: flex;
175
+ gap: 0.5rem;
176
+ align-items: center;
177
+ }
178
+
179
+ .token-item {
180
+ display: flex;
181
+ align-items: center;
182
+ gap: 0.25rem;
183
+ background-color: #ffffff;
184
+ padding: 0.125rem 0.375rem;
185
+ border-radius: 4px;
186
+ font-family: monospace;
187
+ }
188
+
189
+ .token-emoji {
190
+ font-size: 0.875rem;
191
+ }
192
+
193
+ .message.human .message-content {
194
+ background-color: #3b82f6;
195
+ color: white;
196
+ border-color: #3b82f6;
197
+ }
198
+
199
+ .message.human .message-meta {
200
+ color: rgba(255, 255, 255, 0.8);
201
+ }
202
+
203
+ .message.ai .message-content {
204
+ color: #1f2937;
205
+ }
206
+
207
+ .message.tool {
208
+ width: 100%;
209
+ max-width: 100%;
210
+ }
211
+
212
+ .tool-message {
213
+ width: 100%;
214
+ border: 1px solid #e5e7eb;
215
+ border-radius: 8px;
216
+ overflow: hidden;
217
+ }
218
+
219
+ .tool-header {
220
+ display: flex;
221
+ align-items: center;
222
+ justify-content: space-between;
223
+ padding: 0.5rem 1rem;
224
+ background-color: #f9fafb;
225
+ border-bottom: 1px solid #e5e7eb;
226
+ cursor: pointer;
227
+ }
228
+
229
+ .tool-header:hover {
230
+ background-color: #f3f4f6;
231
+ }
232
+
233
+ .tool-title {
234
+ font-weight: 500;
235
+ color: #374151;
236
+ }
237
+
238
+ .tool-content {
239
+ padding: 1rem;
240
+ }
241
+
242
+ .tool-input {
243
+ background-color: #f9fafb;
244
+ padding: 0.75rem;
245
+ border-radius: 4px;
246
+ margin-bottom: 0.5rem;
247
+ font-family: monospace;
248
+ white-space: pre-wrap;
249
+ word-break: break-all;
250
+ }
251
+
252
+ .tool-output {
253
+ background-color: #ffffff;
254
+ padding: 0.75rem;
255
+ border-radius: 4px;
256
+ font-family: monospace;
257
+ border: 1px solid #e5e7eb;
258
+ margin-bottom: 0.5rem;
259
+ }
260
+
261
+ .chat-input {
262
+ border-top: 1px solid #e5e7eb;
263
+ padding: 0.5rem 1rem 1rem 1rem;
264
+ background-color: #ffffff;
265
+ }
266
+ .chat-input-header {
267
+ display: flex;
268
+ align-items: center;
269
+ gap: 0.5rem;
270
+ margin-bottom: 0.5rem;
271
+ }
272
+ .input-container {
273
+ display: flex;
274
+ gap: 0.5rem;
275
+ }
276
+
277
+ .input-textarea {
278
+ flex: 1;
279
+ padding: 0.75rem;
280
+ border: 1px solid #e5e7eb;
281
+ border-radius: 8px;
282
+ resize: none;
283
+ font-size: 0.875rem;
284
+ line-height: 1.25rem;
285
+ }
286
+
287
+ .input-textarea:focus {
288
+ outline: none;
289
+ border-color: #3b82f6;
290
+ }
291
+
292
+ .send-button {
293
+ padding: 0.5rem 1rem;
294
+ background-color: #3b82f6;
295
+ color: white;
296
+ border: none;
297
+ border-radius: 8px;
298
+ cursor: pointer;
299
+ font-weight: 500;
300
+ transition: all 0.2s;
301
+ }
302
+
303
+ .send-button:hover {
304
+ background-color: #2563eb;
305
+ }
306
+
307
+ .send-button:disabled {
308
+ background-color: #93c5fd;
309
+ cursor: not-allowed;
310
+ }
311
+
312
+ .send-button.interrupt {
313
+ background-color: #ef4444;
314
+ }
315
+
316
+ .send-button.interrupt:hover {
317
+ background-color: #dc2626;
318
+ }
319
+
320
+ .collapsed .tool-content {
321
+ display: none;
322
+ }
323
+
324
+ .expand-icon {
325
+ transition: transform 0.2s;
326
+ }
327
+
328
+ .collapsed .expand-icon {
329
+ transform: rotate(-90deg);
330
+ }
331
+
332
+ .loading-indicator {
333
+ padding: 12px 16px;
334
+ margin: 8px 0;
335
+ background-color: #f5f5f5;
336
+ border-radius: 8px;
337
+ color: #666;
338
+ font-size: 14px;
339
+ text-align: center;
340
+ animation: pulse 1.5s infinite;
341
+ display: flex;
342
+ align-items: center;
343
+ justify-content: center;
344
+ gap: 12px;
345
+ }
346
+
347
+ .interrupt-button {
348
+ padding: 4px 12px;
349
+ background-color: #ef4444;
350
+ color: white;
351
+ border: none;
352
+ border-radius: 4px;
353
+ cursor: pointer;
354
+ font-size: 12px;
355
+ transition: background-color 0.2s;
356
+ }
357
+
358
+ .interrupt-button:hover {
359
+ background-color: #dc2626;
360
+ }
361
+
362
+ @keyframes pulse {
363
+ 0% {
364
+ opacity: 0.6;
365
+ }
366
+ 50% {
367
+ opacity: 1;
368
+ }
369
+ 100% {
370
+ opacity: 0.6;
371
+ }
372
+ }
373
+
374
+ .error-message {
375
+ padding: 12px 16px;
376
+ margin: 8px 0;
377
+ background-color: #fee2e2;
378
+ border: 1px solid #fecaca;
379
+ border-radius: 8px;
380
+ color: #dc2626;
381
+ font-size: 14px;
382
+ text-align: center;
383
+ }
384
+
385
+ .markdown-body p {
386
+ text-align: left;
387
+ }
388
+
389
+ .edit-params-button {
390
+ padding: 6px 12px;
391
+ background-color: #f0f0f0;
392
+ border: 1px solid #e0e0e0;
393
+ border-radius: 4px;
394
+ cursor: pointer;
395
+ font-size: 0.8rem;
396
+ color: #333;
397
+ white-space: nowrap;
398
+ }
399
+
400
+ .edit-params-button:hover {
401
+ background-color: #e0e0e0;
402
+ }
403
+