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