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