@langgraph-js/ui 1.1.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,388 +1,403 @@
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 1rem 1rem 1rem;
264
- background-color: #ffffff;
265
- }
266
- .chat-input-header {
267
- display: flex;
268
- align-items: center;
269
- justify-content: space-between;
270
- padding: 0.5rem 1rem;
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
-
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
+