pygpt-net 2.6.47__py3-none-any.whl → 2.6.49__py3-none-any.whl

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.
Files changed (35) hide show
  1. pygpt_net/CHANGELOG.txt +8 -0
  2. pygpt_net/__init__.py +3 -3
  3. pygpt_net/app_core.py +39 -39
  4. pygpt_net/controller/__init__.py +72 -62
  5. pygpt_net/controller/ctx/common.py +0 -7
  6. pygpt_net/controller/ctx/ctx.py +176 -8
  7. pygpt_net/controller/ctx/extra.py +3 -3
  8. pygpt_net/controller/settings/editor.py +3 -1
  9. pygpt_net/controller/theme/common.py +8 -2
  10. pygpt_net/controller/ui/tabs.py +10 -43
  11. pygpt_net/core/ctx/ctx.py +79 -26
  12. pygpt_net/core/render/web/renderer.py +4 -10
  13. pygpt_net/core/tabs/tabs.py +50 -11
  14. pygpt_net/data/config/config.json +3 -3
  15. pygpt_net/data/config/models.json +3 -3
  16. pygpt_net/data/css/web-blocks.css +256 -270
  17. pygpt_net/data/css/web-chatgpt.css +276 -301
  18. pygpt_net/data/css/web-chatgpt_wide.css +286 -294
  19. pygpt_net/provider/core/config/patch.py +9 -0
  20. pygpt_net/provider/core/ctx/db_sqlite/storage.py +19 -5
  21. pygpt_net/tools/code_interpreter/ui/html.py +176 -31
  22. pygpt_net/tools/code_interpreter/ui/widgets.py +1 -4
  23. pygpt_net/tools/html_canvas/ui/widgets.py +2 -5
  24. pygpt_net/ui/__init__.py +9 -14
  25. pygpt_net/ui/layout/chat/chat.py +2 -2
  26. pygpt_net/ui/layout/ctx/ctx_list.py +71 -1
  27. pygpt_net/ui/widget/lists/base.py +32 -1
  28. pygpt_net/ui/widget/lists/context.py +45 -2
  29. pygpt_net/ui/widget/tabs/body.py +23 -1
  30. pygpt_net/ui/widget/textarea/web.py +85 -45
  31. {pygpt_net-2.6.47.dist-info → pygpt_net-2.6.49.dist-info}/METADATA +10 -2
  32. {pygpt_net-2.6.47.dist-info → pygpt_net-2.6.49.dist-info}/RECORD +35 -35
  33. {pygpt_net-2.6.47.dist-info → pygpt_net-2.6.49.dist-info}/LICENSE +0 -0
  34. {pygpt_net-2.6.47.dist-info → pygpt_net-2.6.49.dist-info}/WHEEL +0 -0
  35. {pygpt_net-2.6.47.dist-info → pygpt_net-2.6.49.dist-info}/entry_points.txt +0 -0
@@ -7,317 +7,381 @@
7
7
  src: url('file:///%fonts%/MonaspaceNeon/MonaspaceNeon-Regular.otf');
8
8
  }}
9
9
  * {{
10
- font-family: 'Lato';
10
+ font-family: 'Lato';
11
11
  }}
12
12
  body {{
13
- word-wrap: break-word;
14
- padding: 6px;
15
- line-height: 1.25;
16
- margin: 4px;
17
- padding: 0;
18
- max-width: 100%;
13
+ word-wrap: break-word;
14
+ padding: 6px;
15
+ line-height: 1.25;
16
+ margin: 4px;
17
+ padding: 0;
18
+ max-width: 100%;
19
19
  }}
20
20
  ::-webkit-scrollbar {{
21
- height: 12px;
22
- width: 12px;
21
+ height: 12px;
22
+ width: 12px;
23
23
  }}
24
24
  ::-webkit-scrollbar-thumb {{
25
- -webkit-border-radius: 1ex;
26
- -webkit-box-shadow: none;
25
+ -webkit-border-radius: 1ex;
26
+ -webkit-box-shadow: none;
27
27
  }}
28
28
  #container {{
29
- will-change: transform, opacity;
29
+ will-change: transform, opacity;
30
30
  }}
31
- .ts {{
32
- display: none;
31
+ #__nodes__ {{
32
+ margin-top: 2rem;
33
33
  }}
34
34
  /* base */
35
35
  a {{
36
- text-decoration: none;
37
- color: #a1b5c4 !important;
36
+ text-decoration: none;
37
+ color: #a1b5c4 !important;
38
38
  }}
39
39
  a:hover {{
40
- cursor: pointer !important;
41
- text-decoration: underline;
40
+ cursor: pointer !important;
41
+ text-decoration: underline;
42
42
  }}
43
43
  p {{
44
- margin-top: 5px;
45
- margin-bottom: 5px;
44
+ margin-top: 5px;
45
+ margin-bottom: 5px;
46
+ }}
47
+ /* lists, code */
48
+ ol,
49
+ ul {{
50
+ list-style-position: outside !important;
51
+ padding-inline-start: 2rem;
52
+ margin: 0 0 0 0;
46
53
  }}
47
54
 
48
- /* images */
49
- .image {{
50
- max-width: 400px;
55
+ li > p:first-child {{
56
+ margin: 0;
57
+ margin-top: -1.25rem;
51
58
  }}
52
59
 
53
- /* cmd */
54
- .cmd {{
55
- font-family: 'Lato';
56
- text-decoration: none;
57
- padding-bottom: 0px;
58
- font-size: 0.9rem;
60
+ li + li {{
61
+ margin-top: .35em;
59
62
  }}
60
63
 
61
- /* lists, code */
62
- ul, ol, .list {{
63
- margin-top: 0px;
64
- margin-bottom: 0px;
64
+ li div:first-child {{
65
+ margin-top: 1rem;
65
66
  }}
66
67
  pre {{
67
- font-family: 'Monaspace Neon';
68
- display: block;
69
- word-wrap: break-word;
70
- white-space: pre-wrap;
71
- text-align: left;
72
- padding: 0;
68
+ font-family: 'Monaspace Neon';
69
+ display: block;
70
+ word-wrap: break-word;
71
+ white-space: pre-wrap;
72
+ text-align: left;
73
+ padding: 0;
73
74
  }}
74
75
  code {{
75
- font-family: 'Monaspace Neon';
76
- word-wrap: break-word;
76
+ font-family: 'Monaspace Neon';
77
+ word-wrap: break-word;
78
+ }}
79
+
80
+ think {{
81
+ border-left: 4px solid silver;
82
+ display: block;
83
+ padding-left: 1rem;
84
+ margin-top: 0;
85
+ padding-top: 0;
86
+ font-size: 0.8rem;
77
87
  }}
88
+
89
+ /* code wrapper */
78
90
  .code-header-wrapper {{
79
- text-align: right;
80
- width: auto;
81
- padding: 10px;
82
- padding-top: 10px;
83
- margin: 0;
84
- font-size: 0.9rem;
91
+ text-align: right;
92
+ width: auto;
93
+ padding: 10px;
94
+ padding-top: 10px;
95
+ margin: 0;
96
+ font-size: 0.9rem;
85
97
  }}
86
98
  .code-header {{
87
- text-align: right;
88
- width: 90%;
89
- padding: 0px;
99
+ text-align: right;
100
+ width: 90%;
101
+ padding: 0px;
90
102
  }}
91
103
  .code-header-lang {{
92
- float: left;
93
- padding-left: .25rem;
94
- padding-top: 4px;
104
+ float: left;
105
+ padding-left: .25rem;
106
+ padding-top: 4px;
95
107
  }}
96
108
  .code-header-copy {{
97
- text-align: right;
98
- text-decoration: none;
99
- font-weight: bold;
100
- display: inline-block;
101
- color: #6e6e6e;
102
- padding-right: .25rem;
109
+ text-align: right;
110
+ text-decoration: none;
111
+ font-weight: bold;
112
+ display: inline-block;
113
+ color: #6e6e6e;
114
+ padding-right: .25rem;
103
115
  }}
104
116
  .code-header-copy img {{
105
- vertical-align: middle;
106
- padding-right: 5px;
117
+ vertical-align: middle;
118
+ padding-right: 5px;
107
119
  }}
108
120
  .code-header-copy:hover {{
109
- text-decoration: none;
110
- cursor: pointer;
121
+ text-decoration: none;
122
+ cursor: pointer;
111
123
  }}
112
124
  .code-header-copy:hover img {{
113
- filter: brightness(130%);
125
+ filter: brightness(130%);
114
126
  }}
115
127
  .code-wrapper {{
116
- padding: 0px;
117
- margin: 0px;
118
- margin-bottom: 1rem;
128
+ padding: 0px;
129
+ margin: 0px;
130
+ margin-bottom: 1rem;
119
131
  }}
120
132
  .code-wrapper pre {{
121
- padding: 0;
122
- padding-bottom: 0;
123
- margin-bottom: 0;
124
- margin-top: 0;
133
+ padding: 0;
134
+ padding-bottom: 0;
135
+ margin-bottom: 0;
136
+ margin-top: 0;
137
+ }}
138
+ .code-wrapper pre code {{
139
+ max-height: 1000px;
140
+ overflow-y: auto;
141
+ padding: 1.5rem;
125
142
  }}
126
143
  .highlight span {{
127
- font-family: 'Monaspace Neon';
144
+ font-family: 'Monaspace Neon';
128
145
  }}
129
146
 
130
147
  /* action icons */
131
148
  .action-icons {{
132
- margin-top: 20px;
149
+ margin-top: 20px;
133
150
  }}
134
151
  .action-icons a {{
135
- text-decoration: none;
152
+ text-decoration: none;
136
153
  }}
137
154
  .action-icons a:hover {{
138
- filter: brightness(120%);
155
+ filter: brightness(120%);
139
156
  }}
140
157
  .action-img {{
141
- width: 20px;
142
- height: 20px;
158
+ width: 20px;
159
+ height: 20px;
143
160
  }}
144
161
  .edit-icon {{
145
- display: inline;
162
+ display: inline;
146
163
  }}
147
164
  .theme-blocks.display-timestamp .ts {{
148
- display: inline;
165
+ display: inline;
149
166
  }}
150
167
 
151
168
  /* message box */
152
169
  .msg-box {{
153
- max-width: 100%;
154
- border-radius: 10px;
155
- padding: 10px;
156
- margin-right: 10px;
170
+ max-width: 100%;
171
+ border-radius: 10px;
172
+ padding: 10px;
173
+ margin-right: 10px;
157
174
  }}
158
175
  .msg-user {{
159
- white-space: pre-wrap;
160
- width: auto;
161
- max-width: 100%;
162
- padding-top: 10px;
163
- padding-bottom: 5px;
164
- padding-left: 10px;
165
- margin-top: 10px;
166
- margin-left: 0px;
167
- margin-bottom: 5px;
176
+ white-space: pre-wrap;
177
+ width: auto;
178
+ max-width: 100%;
179
+ padding-top: 10px;
180
+ padding-bottom: 5px;
181
+ padding-left: 10px;
182
+ margin-top: 10px;
183
+ margin-left: 0px;
184
+ margin-bottom: 5px;
168
185
  }}
169
186
  .msg-bot {{
170
- white-space: pre-wrap;
171
- width: auto;
172
- max-width: 100%;
173
- margin-top: 10px;
174
- margin-bottom: 0px;
175
- padding-bottom: 0px;
176
- }}
177
- .msg-box:not(first-child) {{
178
- margin-top: 20px !important;
179
- }}
180
- .msg-box:first-child {{
181
- margin-top: 0px;
187
+ white-space: pre-wrap;
188
+ width: auto;
189
+ max-width: 100%;
190
+ margin-top: 10px;
191
+ margin-bottom: 0px;
192
+ padding-bottom: 0px;
182
193
  }}
183
194
  .msg-box .name-header.name-bot {{
184
- display: block;
185
- margin-left: -10px;
186
- margin-bottom: 1rem;
187
- color: #cfcfcf;
195
+ display: block;
196
+ margin-left: -10px;
197
+ margin-bottom: 1rem;
198
+ color: #cfcfcf;
188
199
  }}
189
200
  .msg-box .name-header.name-bot .avatar {{
190
- width: 50px;
191
- height: 50px;
192
- border-radius: 50%;
193
- display: inline;
194
- vertical-align: middle;
195
- object-fit: cover;
196
- margin-right: 10px;
201
+ width: 50px;
202
+ height: 50px;
203
+ border-radius: 50%;
204
+ display: inline;
205
+ vertical-align: middle;
206
+ object-fit: cover;
207
+ margin-right: 10px;
197
208
  }}
198
209
  .msg-box .name-header::before {{
199
- content: '';
200
- display: inline-block;
201
- width: 10px;
202
- height: 10px;
203
- border-radius: 50%;
204
- margin-right: 8px;
205
- vertical-align: middle;
210
+ content: '';
211
+ display: inline-block;
212
+ width: 10px;
213
+ height: 10px;
214
+ border-radius: 50%;
215
+ margin-right: 8px;
216
+ vertical-align: middle;
206
217
  }}
207
218
  .msg-extra {{
208
- margin-top: 10px;
209
- margin-bottom: 0px;
210
- color: gray;
219
+ margin-top: 10px;
220
+ margin-bottom: 0px;
221
+ color: gray;
211
222
  }}
212
223
  .msg-extra a {{
213
- color: gray;
224
+ color: gray;
214
225
  }}
215
226
  .msg-user .msg-extra {{
216
- font-weight: bold;
217
- padding-top: 5px;
227
+ font-weight: bold;
228
+ padding-top: 5px;
218
229
  }}
219
230
  .msg-box .msg {{
220
- margin: 0;
221
- padding: 15px;
231
+ margin: 0;
232
+ padding: 15px;
233
+ }}
234
+ .ts {{
235
+ display: none;
236
+ }}
237
+ #_append_output_ .msg-bot {{
238
+ margin-top: 5px !important;
239
+ }}
240
+
241
+ /* images */
242
+ .image {{
243
+ max-width: 400px;
244
+ }}
245
+
246
+ /* cmd */
247
+ .cmd {{
248
+ font-family: 'Lato';
249
+ text-decoration: none;
250
+ padding-bottom: 0px;
251
+ font-size: 0.9rem;
222
252
  }}
223
253
 
224
254
  /* tool output */
225
255
  .tool-output-header {{
226
- margin-top: 15px;
227
- margin-bottom: 10px;
228
- font-weight: bold;
229
- color: gray;
256
+ margin-top: 15px;
257
+ margin-bottom: 10px;
258
+ font-weight: bold;
259
+ color: gray;
230
260
  }}
231
261
  .tool-output .content {{
232
- padding: 10px;
233
- color: gray !important;
234
- font-size: 0.9rem;
262
+ padding: 10px;
263
+ color: gray !important;
264
+ font-size: 0.9rem;
235
265
  }}
236
266
  .tool-output .toggle-cmd-output {{
237
- cursor: pointer;
238
- padding-top: 10px;
239
- display: block;
240
- color: gray;
267
+ cursor: pointer;
268
+ padding-top: 10px;
269
+ display: block;
270
+ color: gray;
241
271
  }}
242
272
 
243
273
  /* extra source */
244
274
  .extra-src-icon {{
245
- padding-right: 2px;
246
- width: 25px;
247
- height: 25px;
248
- vertical-align: middle;
275
+ padding-right: 2px;
276
+ width: 25px;
277
+ height: 25px;
278
+ vertical-align: middle;
249
279
  }}
250
280
  .extra-src-img-box {{
251
- display: inline-block;
252
- text-align: center;
253
- padding: 5px;
254
- margin: 5px;
255
- max-width: 400px;
256
- height: auto;
257
- white-space: pre-wrap;
258
- word-break: break-all !important;
281
+ display: inline-block;
282
+ text-align: center;
283
+ padding: 5px;
284
+ margin: 5px;
285
+ max-width: 400px;
286
+ height: auto;
287
+ white-space: pre-wrap;
288
+ word-break: break-all !important;
259
289
  }}
260
290
  .extra-src-img-box:hover {{
261
- cursor: pointer;
291
+ cursor: pointer;
262
292
  }}
263
293
  .extra-src-img-box .title {{
264
- width: 400px;
265
- overflow: hidden;
266
- white-space: nowrap;
267
- text-overflow: ellipsis;
268
- display: block;
269
- text-align: center;
270
- padding: 0;
271
- margin: 0;
272
- padding-top: 10px;
273
- display: block;
274
- font-size: 0.95rem;
294
+ width: 400px;
295
+ overflow: hidden;
296
+ white-space: nowrap;
297
+ text-overflow: ellipsis;
298
+ display: block;
299
+ text-align: center;
300
+ padding: 0;
301
+ margin: 0;
302
+ padding-top: 10px;
303
+ display: block;
304
+ font-size: 0.95rem;
275
305
  }}
276
306
  .extra-src-img-box .img-outer {{
277
- display: flex;
278
- flex-direction: column;
307
+ display: flex;
308
+ flex-direction: column;
279
309
  }}
280
310
  .extra-src-img-box .img-wrapper {{
281
- position: relative;
282
- overflow: hidden;
283
- border: 1px solid #000;
284
- background: #000;
285
- width: 400px;
286
- height: 280px;
287
- margin: 0;
288
- margin-bottom: 0px !important;
289
- border-radius: 5px;
290
- -webkit-box-shadow: 8px 8px 22px -16px rgba(0, 0, 0, 1);
291
- -moz-box-shadow: 8px 8px 22px -16px rgba(0, 0, 0, 1);
292
- box-shadow: 8px 8px 22px -16px rgba(0, 0, 0, 1);
311
+ position: relative;
312
+ overflow: hidden;
313
+ border: 1px solid #000;
314
+ background: #000;
315
+ width: 400px;
316
+ height: 280px;
317
+ margin: 0;
318
+ margin-bottom: 0px !important;
319
+ border-radius: 5px;
320
+ -webkit-box-shadow: 8px 8px 22px -16px rgba(0, 0, 0, 1);
321
+ -moz-box-shadow: 8px 8px 22px -16px rgba(0, 0, 0, 1);
322
+ box-shadow: 8px 8px 22px -16px rgba(0, 0, 0, 1);
293
323
  }}
294
324
  .extra-src-img-box .img-wrapper:hover {{
295
- border: 1px solid gray;
325
+ border: 1px solid gray;
296
326
  }}
297
327
  .extra-src-img-box img {{
298
- margin-bottom: 2px;
299
- padding-bottom: 0px;
300
- display: block;
301
- width: 100%;
302
- height: 100%;
303
- object-fit: cover;
328
+ margin-bottom: 2px;
329
+ padding-bottom: 0px;
330
+ display: block;
331
+ width: 100%;
332
+ height: 100%;
333
+ object-fit: cover;
334
+ }}
335
+ .extra-src-video-box,
336
+ .video-player {{
337
+ max-width: 400px;
338
+ text-align: left;
304
339
  }}
305
340
 
306
341
  /* common */
307
342
  .toggle-expanded {{
308
- transform: rotateX(180deg);
343
+ transform: rotateX(180deg);
309
344
  }}
310
345
  .append_input {{
311
- margin: 0;
312
- padding: 0;
346
+ margin: 0;
347
+ padding: 0;
313
348
  }}
314
349
  .append_output {{
315
- margin: 0;
316
- padding: 0;
350
+ margin: 0;
351
+ padding: 0;
352
+ }}
353
+ .append_live {{
354
+ font-size: 0.8rem;
355
+ }}
356
+ .hidden {{
357
+ display: block;
358
+ opacity: 0;
359
+ visibility: hidden;
360
+ transition: opacity 0.5s ease, visibility 0.5s ease;
361
+ }}
362
+ .visible {{
363
+ opacity: 1;
364
+ visibility: visible;
365
+ transition: opacity 0.5s ease, visibility 0.5s ease;
317
366
  }}
318
367
  .empty_list {{
319
368
  }}
369
+ .debug {{
370
+ color: orange !important;
371
+ background: #0d1117;
372
+ padding: 10px;
373
+ font-size: 0.9rem;
374
+ }}
320
375
 
376
+ /* loaders */
377
+ @keyframes spin {{
378
+ from {{
379
+ transform: rotate(0deg);
380
+ }}
381
+ to {{
382
+ transform: rotate(360deg);
383
+ }}
384
+ }}
321
385
  .spinner {{
322
386
  display: inline-block;
323
387
  animation: spin 2s linear infinite;
@@ -333,34 +397,6 @@ code {{
333
397
  width: 100% !important;
334
398
  height: 100% !important;
335
399
  }}
336
- think {{
337
- border-left: 4px solid silver;
338
- display: block;
339
- padding-left: 1rem;
340
- margin-top: 0;
341
- padding-top: 0;
342
- font-size: 0.8rem;
343
- }}
344
-
345
- /* anims */
346
- @keyframes spin {{
347
- from {{
348
- transform: rotate(0deg);
349
- }}
350
- to {{
351
- transform: rotate(360deg);
352
- }}
353
- }}
354
-
355
- /* debug */
356
- .debug {{
357
- color: orange !important;
358
- background: #0d1117;
359
- padding: 10px;
360
- font-size: 0.9rem;
361
- }}
362
-
363
- /* loader */
364
400
  .loader-global {{
365
401
  text-align: center;
366
402
  margin-top: 2rem;
@@ -378,22 +414,8 @@ think {{
378
414
  height: 32px;
379
415
  border-width: 5px;
380
416
  }}
381
- .append_live {{
382
- font-size: 0.8rem;
383
- }}
384
- .hidden {{
385
- display: block;
386
- opacity: 0;
387
- visibility: hidden;
388
- transition: opacity 0.5s ease, visibility 0.5s ease;
389
- }}
390
-
391
- .visible {{
392
- opacity: 1;
393
- visibility: visible;
394
- transition: opacity 0.5s ease, visibility 0.5s ease;
395
- }}
396
417
 
418
+ /* tips */
397
419
  .tips {{
398
420
  opacity: 0;
399
421
  transition: opacity 1s ease-in-out;
@@ -403,7 +425,6 @@ think {{
403
425
  min-height: 100%;
404
426
  bottom: 10px;
405
427
  }}
406
-
407
428
  .tips p {{
408
429
  display: block;
409
430
  position: fixed;
@@ -414,39 +435,4 @@ think {{
414
435
  }}
415
436
  .tips.visible {{
416
437
  opacity: 1;
417
- }}
418
-
419
- .extra-src-video-box,
420
- .video-player {{
421
- max-width: 400px;
422
- text-align: left;
423
- }}
424
-
425
- ol,
426
- ul {{
427
- list-style-position: outside !important;
428
- padding-inline-start: 2rem;
429
- margin: 0 0 0 0;
430
- }}
431
-
432
- li > p:first-child {{
433
- margin: 0;
434
- margin-top: -1.25rem;
435
- }}
436
-
437
- li + li {{
438
- margin-top: .35em;
439
- }}
440
-
441
- li div:first-child {{
442
- margin-top: 1rem;
443
- }}
444
-
445
- .code-wrapper pre code {{
446
- max-height: 1000px;
447
- overflow-y: auto;
448
- }}
449
-
450
- #_append_output_ .msg-bot {{
451
- margin-top: 0px !important;
452
438
  }}