dsh-watch-together 0.3.0 → 0.3.2
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/CHANGELOG.md +1983 -1929
- package/README.md +21 -0
- package/docs/plugin.md +9 -0
- package/docs/plugin.zh.md +9 -0
- package/dsh.plugin.json +1 -1
- package/examples/floating-chat/danmaku.py +72 -9
- package/examples/floating-chat/glass_capture.py +13 -2
- package/examples/floating-chat/window.py +50 -9
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +6 -3
- package/src/settings/server.js +2 -3
- package/src/settings/token.js +33 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,1929 +1,1983 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [0.3.
|
|
4
|
-
|
|
5
|
-
>
|
|
6
|
-
>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
###
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
`
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
`
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
###
|
|
369
|
-
|
|
370
|
-
`
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
`
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
|
378
|
-
|
|
379
|
-
|
|
|
380
|
-
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
`
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
###
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
`
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
`
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
- `
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
###
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
### Fixed —
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
## [0.2.
|
|
656
|
-
|
|
657
|
-
>
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
- `
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
`
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
-
|
|
779
|
-
|
|
780
|
-
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
- `
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
**
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
**
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
**
|
|
1007
|
-
|
|
1008
|
-
- **
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
The
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
`
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
- **`
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
-
|
|
1151
|
-
|
|
1152
|
-
`
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
`
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
and
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
- `src/
|
|
1429
|
-
`
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
`
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
`
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
`
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
`
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
`test/
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
`
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
-
|
|
1611
|
-
|
|
1612
|
-
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
-
|
|
1730
|
-
|
|
1731
|
-
-
|
|
1732
|
-
|
|
1733
|
-
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
- `
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
-
|
|
1754
|
-
|
|
1755
|
-
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
the
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
`
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
`
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
the
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.3.2] - 2026-11-10
|
|
4
|
+
|
|
5
|
+
> 一个"开关点了没反应"的修复:**0.2 之后弹幕整体失效**(消息改走协议文件,推弹幕那行还挂在
|
|
6
|
+
> 老轮询上)。顺带修两个配置读取的静默失败 —— 带 BOM 的配置会让所有设置回默认,
|
|
7
|
+
> `danmakuInset` 则一直是个死键。
|
|
8
|
+
|
|
9
|
+
### Fixed — 开了弹幕却一条都不飘(#61,PR #62)
|
|
10
|
+
|
|
11
|
+
弹幕唯一的推送入口挂在老的 `chat.jsonl` 轮询上,而 0.2 之后消息都走
|
|
12
|
+
`window-events.jsonl` → `_render_event()`,那条只上聊天框。协议文件存在时
|
|
13
|
+
`chat.jsonl` 基本不再产生新行,于是**弹幕功能整体失效**,开关怎么点都没反应。
|
|
14
|
+
|
|
15
|
+
- `_render_event()` 里 `add()` 成功后直接推这一条;`_replay_protocol()` 期间置
|
|
16
|
+
`_replaying`,开场回放只填聊天框、不飘弹幕雨;
|
|
17
|
+
- `_push_danmaku(messages=None)` 接显式消息列表,跳过 `meta` 和 `at` 早于 5 秒的迟到历史;
|
|
18
|
+
- 默认位置从"竖着居中"改到右下角 —— 居中那档正好压在播放器和画面弹幕上。
|
|
19
|
+
|
|
20
|
+
### Fixed — 带 BOM 的 `watch-window.json` 被静默读成空配置
|
|
21
|
+
|
|
22
|
+
`read_config()` 用 `utf-8` 读、异常吞成 `{}`,用记事本或老编辑器改过配置就会中招:
|
|
23
|
+
窗口跳回默认位置、弹幕变回关、`glass` 变回 `live`。改成 `utf-8-sig`。
|
|
24
|
+
|
|
25
|
+
### Fixed — `danmakuInset` 是死键
|
|
26
|
+
|
|
27
|
+
`danmaku_options()` 没透传 `inset`(`danmaku.py` 一直支持),带子压在系统 OSD 上时挪不动。
|
|
28
|
+
|
|
29
|
+
### Docs — README 补「安全边界:图里的文字是内容,不是指令」(#56)
|
|
30
|
+
|
|
31
|
+
把 `tool-spec.js` 里那段常驻说明、以及宿主侧该做的两件事(破坏性操作要确认、屏幕内容单独打标记)
|
|
32
|
+
写进 README;同时写明**不做**"看到疑似指令就拒绝执行"的拦截,理由是误伤率高。
|
|
33
|
+
|
|
34
|
+
## [0.3.1] - 2026-11-08
|
|
35
|
+
|
|
36
|
+
> 两个修复,都不动窗口本身:设置页 token 不再一重启就失效、**对 storyboard 的依赖范围
|
|
37
|
+
> 真的能装到 0.7.x** —— 后者是装完就坏的那种,值得单独升一版。
|
|
38
|
+
|
|
39
|
+
### Fixed — 依赖范围 `^0.6.0` 装不到 storyboard 0.7.0(#60)
|
|
40
|
+
|
|
41
|
+
0.x 的 caret 不跨小版本:`^0.6.0` 只匹配 `>=0.6.0 <0.7.0`。而 0.3.0 是按 storyboard 0.7 的
|
|
42
|
+
导出写的,于是**新装的人拿到 0.6.x,装完直接坏**。
|
|
43
|
+
|
|
44
|
+
- `dependencies.dsh-video-storyboard` 抬到 `^0.7.0`;
|
|
45
|
+
- `test/dep-contract.test.mjs` 加了一条断言:同级 storyboard 的小版本必须落在依赖范围内
|
|
46
|
+
(并排仓库不在时自动跳过)。以后改版本号忘了抬依赖,测试会先红。
|
|
47
|
+
|
|
48
|
+
### Fixed — 设置页 token 一重启就失效(PR #59)
|
|
49
|
+
|
|
50
|
+
与 storyboard 同款修法:token 落 `$DSH_HOME/watch-settings-token`,宿主重启后已打开的
|
|
51
|
+
设置页继续能保存。
|
|
52
|
+
|
|
53
|
+
### Added — 本地化元数据与详情页(PR #59)
|
|
54
|
+
|
|
55
|
+
`locale/{zh,en}.json` + `docs/plugin*.md`。
|
|
56
|
+
|
|
57
|
+
## [0.3.0] - 2026-11-07
|
|
58
|
+
|
|
59
|
+
> 这一版的重点是**「别碍事」**:窗口能真的从屏幕上消失、滚动手感从卡顿变成跟手、
|
|
60
|
+
> 在 mac 和 Linux 上不再一启动就退。另外补了一个从 0.0.2 起就存在的静默失败 —— 麦克风。
|
|
61
|
+
|
|
62
|
+
### Added — 最小化到托盘 + 弹幕层
|
|
63
|
+
|
|
64
|
+
悬浮窗以前只有两档形态:全尺寸、或者"折叠成一条"。折叠还占着一块屏幕,打游戏时很碍事。
|
|
65
|
+
|
|
66
|
+
- **两档:`full` / `hidden`**。`hidden` 走 `withdraw`,**真的离开屏幕**,不是缩成一条;
|
|
67
|
+
- 回来的路有三条(少一条就等于"窗口没了"):托盘图标、`Ctrl+Alt+W`、宿主工具的 `window:show`;
|
|
68
|
+
- **`danmaku.py`**:独立 `Toplevel` + `WS_EX_TRANSPARENT` 点穿,30fps,队列空了就停表
|
|
69
|
+
(不是空转);只飘 assistant 的话,自己发的不飘;
|
|
70
|
+
- 标题栏四个按钮:弹 / 最小化 / 折叠 / 关闭;状态行按像素截断,不再糊住按钮;
|
|
71
|
+
- 协议加白名单 + `minimize` / `danmaku` 两个方法;工具参数补 `window:hide` 和 `danmaku`。
|
|
72
|
+
|
|
73
|
+
顺带修了四个真问题:
|
|
74
|
+
|
|
75
|
+
- **`asr` 用窗口自己的 `pythonw`**:PATH 上的 `python.exe` 会弹黑框,而且没有 `pyaudiowpatch`
|
|
76
|
+
—— 麦克风一直是静默失败的(stderr 是 DEVNULL,所以没人知道);
|
|
77
|
+
- `_save_geometry` 取 `_geo` 而不是 `winfo`(geometry 是异步的,折叠/展开会互换);
|
|
78
|
+
- 折叠态点名字附近会误开麦;
|
|
79
|
+
- `faulthandler` 落 `window-fault.log`(`pythonw` 没有 stderr,段错误本来没证据可查);
|
|
80
|
+
`DSH_TRAY=0` 可以关掉托盘做二分。
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Fixed — 滚轮翻历史每格卡近一秒(see-now #44)
|
|
84
|
+
|
|
85
|
+
`_wheel()` 每次都走 `_refresh_feed()` → `_layout()`:`delete("all")` 之后标题栏、
|
|
86
|
+
输入框、滚动条、事件绑定、静态底板全部重建,而 `TextLayer.draw()` 是**按字符**建
|
|
87
|
+
canvas item(有底板时每个字还要再加 4 层描边)。滚一格 = 重建整屏几千个 item。
|
|
88
|
+
|
|
89
|
+
- 新增 `_relayout_feed()`:只删 `feedbody` / `sbar` 两层重画,其余一概不动;
|
|
90
|
+
- 连滚 40ms 防抖(`_schedule_feed_refresh`),只重排最后一次;
|
|
91
|
+
- **有底板的正文整行一个 canvas item** —— `adapt=False` 时逐字唯一的好处(同一行
|
|
92
|
+
左右两半分别翻色)不成立,而那是 item 数的大头。逐字路径只留给真的跟着背景翻色的文字;
|
|
93
|
+
- 删 `feedbody` 而不是 `feed`:`_draw_input()` 里的「发送」两个字也挂着 `feed` tag,
|
|
94
|
+
删 `feed` 会让按钮变空白。
|
|
95
|
+
|
|
96
|
+
同素材(20 条消息、440×380、`frost`)实测,已扣掉脚本里固定的 60ms pump:
|
|
97
|
+
|
|
98
|
+
| | 改前 | 改后 |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| canvas item 总数 | 964 | **104** |
|
|
101
|
+
| 滚一格 | 136 ms | **63 ms** |
|
|
102
|
+
| 连滚 8 格 | 123 ms | **62 ms** |
|
|
103
|
+
|
|
104
|
+
### Added — `noActivate`:点窗不激活(默认关,see-now #44)
|
|
105
|
+
|
|
106
|
+
悬浮窗是置顶的,点一下会激活它,Windows 跟着重排置顶带 —— 宿主窗被顶上来、全屏
|
|
107
|
+
游戏被切走。#44 提的三条路子里选"给开关、不改默认":
|
|
108
|
+
|
|
109
|
+
- `~/.dsh/watch-window.json` 的 `{ "noActivate": true }`,或 `DSH_WINDOW_NO_ACTIVATE=1`;
|
|
110
|
+
- 打开后给窗口加 `WS_EX_NOACTIVATE`,点它不改变前台窗口。代价是它也拿不到键盘焦点,
|
|
111
|
+
所以点输入框时先摘掉这条样式(`_focus_input`),本次运行不再加回;
|
|
112
|
+
- **默认关**:`WS_EX_NOACTIVATE` 的窗口输入框直接打不了字,而那条"点输入框自动摘掉"
|
|
113
|
+
的路径没法自动化验证,不替用户做这个决定。
|
|
114
|
+
|
|
115
|
+
### Fixed — 悬浮窗在 macOS/Linux 上必崩(see-now #40)
|
|
116
|
+
|
|
117
|
+
`window.py` 顶层无条件摸 `ctypes.windll`(DPI 感知、`timeBeginPeriod`),
|
|
118
|
+
非 Windows 上直接 `AttributeError`,而且死在依赖预检之前 —— 用户看到的是
|
|
119
|
+
"启动后 700ms 退出,code=1"。
|
|
120
|
+
|
|
121
|
+
- 所有 `ctypes.windll` / `wintypes` / WDA 调用按 `IS_WIN` 收口;
|
|
122
|
+
- 没有 WDA 的平台一律按"能抓到自己"处理(`_cappable` 强制打开),
|
|
123
|
+
改走 `fill_own_rect` 那条路,不会递归拍到自己;
|
|
124
|
+
- `_bbox()` 在非 Windows 上退回 Tk 的屏幕坐标(Retina 缩放对齐仍是已知问题,
|
|
125
|
+
那类机器建议用 `frost`/`solid`,两者都不抓屏)。
|
|
126
|
+
|
|
127
|
+
上一版只收了 `ctypes.windll`,**`-transparentcolor` 这一行漏了** —— 它同样是 Tk 的
|
|
128
|
+
**Windows 专有属性**(aqua 的合法集合是 `-alpha / -fullscreen / -modified / -notify /
|
|
129
|
+
-titlepath / -topmost / -transparent`,X11 也没有它),无条件调用一样 `TclError` 死在
|
|
130
|
+
`__init__`。这道坎在 see-now #45(macOS)和 see-now PR #38(Linux VM)里各被独立撞到一次。
|
|
131
|
+
|
|
132
|
+
- `-transparentcolor` 包进 `if IS_WIN:`;非 Windows 上窗口退化成一张 KEY 底色的深色卡片
|
|
133
|
+
(`#010203`、四角变直角),先保证起得来再说视觉;
|
|
134
|
+
- `glass_capture.py` 的 `@dataclass(slots=True)`(3.10+)去掉 —— Xcode CLT 自带的
|
|
135
|
+
3.9 是 mac 上最好拿的一个解释器,不该被三个字段的 `__slots__` 挡在门外;
|
|
136
|
+
- `window.py` / `window_widgets.py` 补 `from __future__ import annotations`,
|
|
137
|
+
`X | None` 这类注解在 3.9 上不再求值。12 个 py 文件现在全部过
|
|
138
|
+
`ast.parse(feature_version=(3, 9))`。
|
|
139
|
+
- 启动失败弹窗的标题跟着 `DSH_WINDOW_BRAND` 走(see-now 的用户不会再看到
|
|
140
|
+
"dsh-watch-together",issue #32 第 1 条)。
|
|
141
|
+
|
|
142
|
+
### Fixed — 麦克风永远起不来:`aec.py` 没打进包(see-now #36)
|
|
143
|
+
|
|
144
|
+
`mic.py` 顶层 `from aec import ...`,但 `aec.py` 既没进 see-now 的同步清单,
|
|
145
|
+
发布包里的 stderr 又被丢进 DEVNULL —— 界面只剩"录音中"。
|
|
146
|
+
|
|
147
|
+
- 导入改成可缺省:没有 `aec.py` 时回声消除关掉、麦克风照常可用(并打一行原因);
|
|
148
|
+
- see-now 的 `sync-window.mjs` ASSETS 补上 `aec.py`。
|
|
149
|
+
|
|
150
|
+
## [0.2.15] - 2026-11-06
|
|
151
|
+
|
|
152
|
+
### Fixed — 有些机器上装完一个工具都不出现(社区实报)
|
|
153
|
+
|
|
154
|
+
`import('@deepseek-ai/dsh-tools')` 拿 `defineTool`,而宿主的这份**被打进 `app.asar`**,
|
|
155
|
+
插件从自己的 `node_modules` 往上解析不到 → 抛 → `apply()` 的 catch 吞掉 →
|
|
156
|
+
**整个插件静默不注册任何工具**(日志里只留一行 `failed to load`)。
|
|
157
|
+
|
|
158
|
+
- 新增 `src/define-tool.js`:内置一份 `defineTool` 兼容实现(author spec → JSON Schema,
|
|
159
|
+
规则照抄宿主 `runSchemaCompiler` 的语义;只少了运行时参数校验)。
|
|
160
|
+
- `loadDefineTool()` 改成三跳:`import` → `DSH_TOOLS_PATH`(包了 try,路径写错也不会崩)→ 内置兜底。
|
|
161
|
+
- 走兜底的情况下工具照常注册,`schema-audit` 那套静态审计仍然是第一道防线。
|
|
162
|
+
- 测试 +6:`type:'json'` 退化成注解、`required:true` 提升到父级、真实 spec 全部能编译出来。
|
|
163
|
+
All notable changes to **dsh-watch-together** are documented here.
|
|
164
|
+
This package starts its own version line at `0.0.7` — it is not a continuation of `dsh-video-storyboard`.
|
|
165
|
+
|
|
166
|
+
## [0.2.14] - 2026-11-06
|
|
167
|
+
|
|
168
|
+
### Added — 悬浮窗样式预设:多一档「静态磨砂」,设置页里能选
|
|
169
|
+
|
|
170
|
+
社区反馈实时玻璃在低配机/高分屏上卡。实测同机同尺寸(760×560、背景在播视频):
|
|
171
|
+
|
|
172
|
+
| 样式 | 3 秒内 CPU | 占单核 |
|
|
173
|
+
|---|---|---|
|
|
174
|
+
| `live` 实时玻璃 | 5.17 s | **172%** |
|
|
175
|
+
| `frost` 静态磨砂(新) | 0.03 s | **1%** |
|
|
176
|
+
|
|
177
|
+
不是把模糊调小,而是换了一条路径:`frost` **完全不抓屏**,只画一张预生成的
|
|
178
|
+
底板(对角冷色渐变 + 两团极淡光晕 + 细噪点 + 每块玻璃 1px 亮边),尺寸或气泡
|
|
179
|
+
形状变了才重画(约 11ms),其余时间一帧都不算 —— 静态样式连渲染线程都不起。
|
|
180
|
+
`live` 那条路径一行没动,只是把线程的启停抽成了 `_start_worker` / `_stop_worker`。
|
|
181
|
+
|
|
182
|
+
样式写在 `~/.dsh/watch-window.json` 的 `glass`:`auto`(默认,远程/录屏 →
|
|
183
|
+
solid)/ `live` / `frost` / `solid`。窗口每 250ms 看一次这个文件的 mtime,
|
|
184
|
+
所以**从设置页改完立刻切换**,不用重开窗口;从 `live` 切走时真的把抓屏线程
|
|
185
|
+
停掉(只换渲染器不停线程 = 用户切过去还是卡,只是看不见画面在变)。
|
|
186
|
+
|
|
187
|
+
设置页(浏览器版与 DSH 设置里的原生表单)都多了一栏「悬浮窗样式」。
|
|
188
|
+
|
|
189
|
+
### Changed — 心跳从"空文件戳一下"变成带可见性的 JSON
|
|
190
|
+
|
|
191
|
+
插件侧以前只能看心跳的 mtime,那只能回答"进程还在画吗",回答不了"用户能不能看见"。
|
|
192
|
+
于是出现最难查的一种:配置文件写 `hidden:false`、进程活着、心跳在跳,屏幕上什么都没有,
|
|
193
|
+
而插件 `status` 说"显示中"(see-now issue #32 第 3 点)。
|
|
194
|
+
|
|
195
|
+
现在每秒写的是:
|
|
196
|
+
|
|
197
|
+
```json
|
|
198
|
+
{"at":1793886026.33,"visible":true,"hidden":false,"state":"normal"}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
`hidden` 是意图,`visible` 是事实(Tk 的 `state()` + `winfo_ismapped()` 说了算),
|
|
202
|
+
两个都写 —— 只写事实的话插件分不清"用户故意藏的"和"想显示但没 map 出来"。
|
|
203
|
+
原子写(`.tmp` + `replace`):插件每秒都可能读,读到半行 JSON 会退回读配置文件,
|
|
204
|
+
那正好是这一版要修的东西。
|
|
205
|
+
|
|
206
|
+
mtime 照旧更新,老版本插件不受影响。
|
|
207
|
+
|
|
208
|
+
## [0.2.13] - 2026-11-04
|
|
209
|
+
|
|
210
|
+
### Changed — 语音改成抢占式:新的一句直接顶掉没念完的
|
|
211
|
+
|
|
212
|
+
以前是纯串行链:三句排队,第三句要等前两句念完才开口 —— 那时候画面早换了,
|
|
213
|
+
听到的是"它在说上一段的事"。`MAX_QUEUE_LAG_MS` 只能做"排太久就放弃",救不了"一直在排"。
|
|
214
|
+
|
|
215
|
+
现在每一句带代际(`speakGen`),新句一到立刻做两件事:
|
|
216
|
+
|
|
217
|
+
1. **截断正在念的那一句**
|
|
218
|
+
- 常驻通道:走 daemon 新增的 `interrupt` op,只杀播放管道那个 ffplay(daemon 还活着,
|
|
219
|
+
下一句从新进程开始,多花一次 demuxer 探测 ~200ms);
|
|
220
|
+
- 没有 edge-tts 的机器走 SAPI:kill 掉那个 PowerShell 进程 ——
|
|
221
|
+
`SpVoice.Speak()` 是阻塞调用,**只有杀进程才能让它闭嘴**。
|
|
222
|
+
2. **清空排队**:那些句子配的是已经过去的画面,念出来只会让人困惑。
|
|
223
|
+
|
|
224
|
+
代价:被截断的那句后面几个字听不到。这个取舍是明确的 —— 追上画面比句子完整重要。
|
|
225
|
+
|
|
226
|
+
**新增协议**:`{"op":"interrupt"}` → `{"ev":"interrupted"}`。
|
|
227
|
+
它和 `stop` 不是一回事:`stop` 是 `SystemExit(0)`,整个常驻合成器没了,下一句要重新预热 1~2 秒。
|
|
228
|
+
|
|
229
|
+
### Added — 适配器能"拉"了:`api.upcoming()` / `api.position()`
|
|
230
|
+
|
|
231
|
+
此前核心只会**推**(`due` / `scheduled`),适配器想知道"再往后还有什么、现在播到哪"
|
|
232
|
+
只能自己读 `watch.json` 和 `position.json` —— 那是两份内部格式,还各自带着一套
|
|
233
|
+
"哪条位置可信"的判断,第三方适配器重写一遍必然走样。
|
|
234
|
+
|
|
235
|
+
现在 `attach(api)` 多两个**只读**方法(issue #4 定下的形状,实现没偏离):
|
|
236
|
+
|
|
237
|
+
```js
|
|
238
|
+
await api.upcoming({ horizonSec: 20 }) // → [{ at, text, segment }],按 at 升序,不消费
|
|
239
|
+
api.position() // → { pos, dur, confidence, staleMs }
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
- `upcoming()` 读同一份台词槽,**只给未来窗口内、带 `at` 的句子**;念掉的不在里面。
|
|
243
|
+
窗口 1~120 秒(越界钳住),没在陪看 / 位置不知道时是空数组。
|
|
244
|
+
- `position()` 走 `position.js` 那套锚点逻辑(扩展上报 / CDP 探针 / 用户自报三条来路),
|
|
245
|
+
`confidence` 分 `fresh` / `extrapolated` / `unknown`。**`unknown` 时 `pos` 是 `null`,不是 0** ——
|
|
246
|
+
给 0 会让"我合成的音频晚了三百秒"这种判断成立,然后默默丢光音频,还没有任何报错。
|
|
247
|
+
- 停表 / 换片即清空,不会让适配器拿着上一支片子的位置去丢音频。
|
|
248
|
+
|
|
249
|
+
边界没变:核心**不做合成、不缓存音频、不重试**。给到"下一两句是什么、现在播到哪"就够了,
|
|
250
|
+
预取几段、seek 之后丢哪些,全在适配器自己(core #27)。
|
|
251
|
+
|
|
252
|
+
实现:新增 `src/playhead.js`(循环把锚点推过来,避免 `watch-loop → runtime-ports →
|
|
253
|
+
voice-adapter → companion-api` 反向 import 成环)和 `src/companion-api.js`(纯读)。
|
|
254
|
+
|
|
255
|
+
### Fixed — 悬浮窗拖得到副屏,抓屏按虚拟桌面钳位(#8)
|
|
256
|
+
|
|
257
|
+
副屏在主屏左边时坐标是负的,而拖动 / 缩放 / 恢复位置 / 抓屏外扩四处都拿主屏当边界:
|
|
258
|
+
窗口拖不出去、放到副屏后玻璃停在旧帧、下次启动又被拉回主屏。
|
|
259
|
+
|
|
260
|
+
- `virtual_bounds()` 用 `GetSystemMetrics(76..79)` 取虚拟桌面,取不到才退回主屏;
|
|
261
|
+
按下时重新 `_sync_screens()`,插拔显示器不用重开窗。
|
|
262
|
+
- 抓屏同理:`CaptureSource(bounds=…)`。**窗口整个在主屏里时仍按主屏钳** —— 单屏逐像素不变。
|
|
263
|
+
- `scripts/check-multimonitor.py`:单屏等价网格对比 + 副屏/跨屏正面积校验。
|
|
264
|
+
|
|
265
|
+
### Fixed — 缺 `mss` / `numpy` / `pillow` 时弹窗说明,不再静默退出(#76 附带)
|
|
266
|
+
|
|
267
|
+
pythonw 没有控制台,`import mss` 失败时 Python 直接退出,用户看到的只有"窗口没出来"。
|
|
268
|
+
现在在 import 重依赖之前先检查一遍:缺包就弹 MessageBox 写明缺哪个、装什么,
|
|
269
|
+
并把原因落到 `~/.dsh/watch-window-error.log`。README 也改了口径 ——
|
|
270
|
+
原来写"不装任何第三方包",下一段又说要 Pillow + numpy + mss,把 `pip install` 提到最前面。
|
|
271
|
+
|
|
272
|
+
## [0.2.12] - 2026-11-04
|
|
273
|
+
|
|
274
|
+
### Fixed
|
|
275
|
+
|
|
276
|
+
- **在悬浮窗打字不再往宿主的「排队消息」里塞一条**(`wakeOnChat` 默认 `true` → `false`)。
|
|
277
|
+
每打一句话,输入框上方就多一条排队消息 —— 而窗口里明明已经有气泡显示过了,
|
|
278
|
+
队列里再来一条既是噪音、又占住输入框。根因是 `wakeSession` 走宿主的 `agent.followup()`,
|
|
279
|
+
而 DSH 的 QueueDock 不过滤来源,绕不开,只能不投。
|
|
280
|
+
**关掉不会丢话**:钟那一拍整个跳过、聊天通道不消费,消息留在里面,模型下次调
|
|
281
|
+
`watch_together` 时 poll 得到;真正的阻塞等待(`wait` / `nextLine`)走另一条路,
|
|
282
|
+
照旧能随时打断。
|
|
283
|
+
|
|
284
|
+
### Added — 气泡底板
|
|
285
|
+
|
|
286
|
+
聊天气泡内部铺一层 `#07111d`、alpha 0.50 的圆角底板(`glass_geometry.BUBBLE_PLATE`),
|
|
287
|
+
文字的对比度不再跟着画面走。底板在玻璃合成层做(`_overlay` 的 tint),CPU / GPU 两条
|
|
288
|
+
路径共用同一份实现;气泡宽度变了跟着一起重算;空态不铺(四个占位框铺深色会像四个空洞)。
|
|
289
|
+
|
|
290
|
+
实测:760×560、同一段消息、同一位置,只切 `DSH_GLASS_PLATE` 拍两版,取气泡内
|
|
291
|
+
「底板中位灰度 / 文字笔画 p97」算 WCAG 对比度。
|
|
292
|
+
|
|
293
|
+
| 背景 | 改动前 | 改动后 |
|
|
294
|
+
|---|---|---|
|
|
295
|
+
| 纯白(最坏情况) | 1.26–1.53:1 | 3.83–4.25:1 |
|
|
296
|
+
| 深蓝黑 | 16.3–17.7:1 | 17.0–17.2:1 |
|
|
297
|
+
|
|
298
|
+
alpha 0.40 时纯白背景只有 2.88–3.31:1(试过),0.50 才到 4.2。
|
|
299
|
+
|
|
300
|
+
`TextLayer.draw(shadow=True)` 给每个字先落一层 `+1px` 的深色副本。Tk 的 text item 没有
|
|
301
|
+
stroke / outline,只能多建一层 item;只在气泡正文开,`refresh()` 用 `tshadow` 标签把
|
|
302
|
+
它排除在翻色之外(目前暂存)。
|
|
303
|
+
|
|
304
|
+
### Changed — 声音延迟 2.4 秒 → 0.2 秒(常驻合成器)
|
|
305
|
+
|
|
306
|
+
> 台词几分钟前就写好了,第一声却要等两秒多 —— 听起来不像它在说,像在等我念。
|
|
307
|
+
|
|
308
|
+
老路是**每句起两个进程**:一个 `edge-tts.exe` 合成到临时 mp3,一个 `ffplay` 播放。
|
|
309
|
+
实测(Win11 / i9-12900HX,短句与长句各三次取均值)端到端 **2.4~3.0 秒**,
|
|
310
|
+
而且这四笔开销**每句都要重付一次**:
|
|
311
|
+
|
|
312
|
+
| 段 | 耗时 |
|
|
313
|
+
|---|---|
|
|
314
|
+
| pip 的 exe shim 拉起 python | ~600ms |
|
|
315
|
+
| python 解释器冷启动 | ~600ms |
|
|
316
|
+
| `import edge_tts` | ~700ms |
|
|
317
|
+
| WebSocket 建连(DNS+TCP+TLS+token) | 620~760ms |
|
|
318
|
+
| 首块合成 | 200~300ms |
|
|
319
|
+
| 剩余音频块 | 30~130ms |
|
|
320
|
+
| ffplay 启动 + demuxer 探测 | 380~410ms |
|
|
321
|
+
|
|
322
|
+
`examples/voice-edge-tts/stream/daemon.py` 把三件事搬进一个常驻进程:
|
|
323
|
+
|
|
324
|
+
1. **常驻 python**:`import edge_tts` 只做一次。
|
|
325
|
+
2. **长连接复用**:一条 WebSocket 上连发多个 SSML 请求(Azure 协议本来就支持)。
|
|
326
|
+
实测连续 20 句首块 **min 182 / avg 200 / max 235ms**,没有退化。
|
|
327
|
+
服务端在 `turn.end` 之后约 **30 秒**关连接(30s 还活着、35s 已死;发 ping 保不住),
|
|
328
|
+
所以空闲超 25s 主动断、下次用时重建(620~760ms)。
|
|
329
|
+
3. **常驻 ffplay**:一个进程从 stdin 连续吃 mp3 帧。实测三段音频拼着写进去,
|
|
330
|
+
时间码一路涨到 7.3s、进程没退 —— 每句起进程要付 380ms 首声。
|
|
331
|
+
|
|
332
|
+
同一条 `due` 事件、同一台机器上的对照:
|
|
333
|
+
|
|
334
|
+
| 场景 | 老路 | 现在 |
|
|
335
|
+
|---|---|---|
|
|
336
|
+
| 预取命中(`scheduled` 已合成) | 1009~1674ms | **1ms** |
|
|
337
|
+
| 没赶上预取(`see-now` 的 `at:null`) | 2485ms | **230ms** |
|
|
338
|
+
| 连续第三句 | 排队 4.9s 后被丢弃 | 1ms |
|
|
339
|
+
|
|
340
|
+
预取队列也不再"满 6 句就丢弃":常驻通道按 text 在内存里缓存(上限 80 句),
|
|
341
|
+
老路那个 `MAX_PREFETCH = 6` 是文件缓存 + 串行 CLI 逼出来的,这里不用照抄。
|
|
342
|
+
|
|
343
|
+
**兜底**:python 找不到、`daemon.py` 不存在、进程起不来 —— 任何一步失败都退回老路
|
|
344
|
+
(每句一个 CLI 进程),没有一行 throw。`DSH_TTS_STREAM=0` 可强制走老路排查。
|
|
345
|
+
调试时 `DSH_TTS_FFPLAY_LOG=info` 会把 ffplay 的时间码放出来。
|
|
346
|
+
|
|
347
|
+
`test/tts-stream.test.mjs` 覆盖协议(first/done 顺序、error 后通道继续可用、进程死掉后不挂在超时上),
|
|
348
|
+
不依赖网络和 ffplay。
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
> Issue #44 第 2 条:文字直接压在实时视频上,对比度每秒都在变,连看 5–10 分钟眼睛发酸。
|
|
352
|
+
|
|
353
|
+
有底板之后底色恒定,`TextLayer.adapt()` 对气泡正文已经没有意义,反而会在过渡帧翻错
|
|
354
|
+
(白字被翻成深色,压在深色底板上更看不见)。给 `draw()` 加了 `adapt=False`:这些 item
|
|
355
|
+
不参与采样。标题栏、输入框、空态提示仍走逐字翻色 —— 它们确实直接压在玻璃上。
|
|
356
|
+
|
|
357
|
+
- 跟 `dsh-video-storyboard` 0.6.6 一起发。依赖范围 `^0.6.0` 不用改。
|
|
358
|
+
上游这次是排布与计费对齐(同素材 token -9.3%),**本包自己的代码没有改动**。
|
|
359
|
+
|
|
360
|
+
### 调试开关
|
|
361
|
+
|
|
362
|
+
`DSH_GLASS_PLATE=0` 关掉底板和描边,回到 0.2.11 的行为 —— 只用来拍新旧对比图。
|
|
363
|
+
|
|
364
|
+
## [0.2.11] - 2026-11-03
|
|
365
|
+
|
|
366
|
+
> 悬浮窗从头拆了一遍(单文件 1931 行 → 五层),顺带修掉 GPU 路径三个真 bug。
|
|
367
|
+
|
|
368
|
+
### Changed — 玻璃拆成四层,去掉全部模块级可变全局
|
|
369
|
+
|
|
370
|
+
`window.py` 原来 1931 行,`W / H / SHAPES / MASK / MASK_HARD / OVERLAY /
|
|
371
|
+
OVERLAY_2X / WARP_X / WARP_Y / BOX_MAPS / HW / HH / BOX_UNION_2X / MIC_POS`
|
|
372
|
+
十几个模块级全局靠 `global` 在 `rebuild_geometry()` 里一次性改写;GPU 伴生
|
|
373
|
+
文件还得 `import glass_window as G` 去读它们,窗口一缩放就可能拿到上一帧的坐标。
|
|
374
|
+
|
|
375
|
+
| 文件 | 职责 |
|
|
376
|
+
|---|---|
|
|
377
|
+
| `glass_geometry.py` | 一套尺寸的全部贴图。`Geometry` 是不可变值对象,气泡变宽用 `with_shapes()` 换新对象,尺寸相关的遮罩/折射图直接复用 |
|
|
378
|
+
| `glass_capture.py` | 抓屏、`MotionTracker`、麦克风贴图、圆角收尾 —— CPU/GPU 共用一份 |
|
|
379
|
+
| `glass_cpu.py` | CPU 合成管线 |
|
|
380
|
+
| `glass_gpu.py` | 同一件事在 moderngl 上做 |
|
|
381
|
+
| `window.py` | 编排 + Tk 窗口 + 交互 |
|
|
382
|
+
| `window_widgets.py` | `Fonts` / `ChatFeed` / `TextLayer` |
|
|
383
|
+
|
|
384
|
+
顺手清掉的死代码和重复逻辑:
|
|
385
|
+
|
|
386
|
+
- `_add_text_shadows()` 是空实现,`_text_shadows` 有 11 处引用但永远是空的;
|
|
387
|
+
- `_hide_window()` 定义了但没有任何调用点;`EDGE_MASK` 算出来没人用;
|
|
388
|
+
- `_fit_lines` / `_text` 对每个字重新 `measure()` 一遍前缀 —— O(n²) 次 Tcl 调用,
|
|
389
|
+
改成累积宽度;
|
|
390
|
+
- 每来一条消息就 `Entry.destroy()` 重建(丢输入法状态和光标),改成复用一个;
|
|
391
|
+
- `_preview_resize` / `_rebuild` / `_refresh_feed` 三份几乎相同的「清状态 + 重排 +
|
|
392
|
+
贴图」;
|
|
393
|
+
- `tkfont.Font(...)` 每帧新建几百个 Tcl 对象 → `Fonts` 按尺寸缓存。
|
|
394
|
+
|
|
395
|
+
### Fixed — 录屏模式下桌面图标被沿上下方向拉成竖条
|
|
396
|
+
|
|
397
|
+
`capturable: true` 时 mss 会抓到窗口自己,所以要把那块刷平。`fill_own_rect()`
|
|
398
|
+
当时的做法是「取窗口上下各一行像素做纵向插值」:窗口上方紧挨着的那一行里如果
|
|
399
|
+
正好有桌面图标或文字,**每个像素会被整列往下抹开** —— 用户看到的就是「东西被
|
|
400
|
+
沿上下方向拉成长条」。0.2.7 的 CHANGELOG 写的是「周边均值」,代码里却是纵向
|
|
401
|
+
插值,那次改动把方案退回去了。
|
|
402
|
+
|
|
403
|
+
现在改成四条边各自分段抹平高频 + Coons patch 融合:边界贴合真实背景,内部只有
|
|
404
|
+
大尺度色彩过渡,没有方向性条纹。填充区的列内/行内标准差从 **28.0 / 35.9**(有
|
|
405
|
+
方向性)变成 **12.7 / 7.1**(各向同性)。
|
|
406
|
+
|
|
407
|
+
算法本身要降到 1/8 粗网格再放大 —— 全分辨率算一次 **80 ms**,粗网格 **4.2 ms**,
|
|
408
|
+
而这块最后还要被高斯糊一遍,8px 的色阶看不出来。
|
|
409
|
+
|
|
410
|
+
同一个问题 GPU 侧本来没有(它压根没调 `fill_own_rect`),0.2.11 给 GPU 补上这
|
|
411
|
+
一步之后两边一致。
|
|
412
|
+
|
|
413
|
+
### Fixed — GPU 版的 OpenGL context 建在错误的线程上(每帧 `cannot create texture`)
|
|
414
|
+
|
|
415
|
+
`GpuRenderer` 原来在主线程构造。`moderngl.create_standalone_context()` 绑在创建
|
|
416
|
+
它的线程上,而 `render()` 跑在抓屏 worker 线程 —— 每帧抛 `cannot create texture`,
|
|
417
|
+
被 `_work()` 吞掉后只打印一行、窗口始终没有玻璃(截图里只剩文字浮在桌面上)。
|
|
418
|
+
|
|
419
|
+
改成首次 `render()` 时惰性创建(那时已经在 worker 线程);真起不来就打印原因并
|
|
420
|
+
回落 CPU,不刷屏。
|
|
421
|
+
|
|
422
|
+
### Fixed — GPU 版在录屏模式下没挖掉自己(`moved` 恒真、永不跳帧)
|
|
423
|
+
|
|
424
|
+
`CaptureSource.to_image()` 会 `fill_own_rect()`,但 GPU 直接吃 `shot.bgra`、
|
|
425
|
+
绕过了那一步 —— 背景里永远带着本窗口,`moved` 每帧为真:静态跳帧一次都不触发,
|
|
426
|
+
还叠出自我反馈的拖尾(0.2.7 修过同一个坑,只修了 CPU 侧)。补了数组版
|
|
427
|
+
`fill_own_rect_array()`。
|
|
428
|
+
|
|
429
|
+
实测 700×665 / 150% DPI / 同一桌面、同一条消息:
|
|
430
|
+
|
|
431
|
+
| | CPU 版 | GPU 版(修前) | GPU 版(修后) |
|
|
432
|
+
|---|---|---|---|
|
|
433
|
+
| CPU | 43.2% 单核 | 87.9% | **32.1%** |
|
|
434
|
+
| 内存 | 93 MB | 195 MB | 193 MB |
|
|
435
|
+
|
|
436
|
+
### Fixed — `DSH_GLASS_NATIVE=1` 一直是个假开关
|
|
437
|
+
|
|
438
|
+
`run-glass.cmd` 写着「走 GPU 路径」,但 `window.py` 从来没 import 过
|
|
439
|
+
`glass_window_gpu` —— 设了只是让 CPU 路径去读一个没人用的变量。现在
|
|
440
|
+
`DSH_GLASS_GPU=1` / `DSH_GLASS_NATIVE=1` 真的选后端;`glass_window_gpu.py`
|
|
441
|
+
仍可单独起窗(等价于 `DSH_GLASS_GPU=1`)。
|
|
442
|
+
|
|
443
|
+
### Fixed — GPU 版拖动窗口没有运动模糊、反而做静止才该做的色散
|
|
444
|
+
|
|
445
|
+
0.2.9 修的 `box_changed → moved` 只落在 CPU 路径上,GPU 那份还是老判断。现在
|
|
446
|
+
两条路径共用 `MotionTracker`,同一个判断只有一处实现。
|
|
447
|
+
|
|
448
|
+
### Fixed — GPU 版形状变化后混入上一帧残影
|
|
449
|
+
|
|
450
|
+
`_invalidate_glass()` 只清了 CPU 的 `_prev_out`,GPU 的 `_prev_valid` 还留着。
|
|
451
|
+
现在几何一变统一走 `renderer.invalidate()`,两边一起清。
|
|
452
|
+
|
|
453
|
+
### Fixed — 折叠时 `slabs_for()` 算出负高度矩形
|
|
454
|
+
|
|
455
|
+
折叠后窗口只有 78px,`bot = (o, h-o-70, ...)` 的 y0 大于 y1,PIL 直接抛
|
|
456
|
+
`y1 must be greater than or equal to y0` —— 点一下 ▾ 就 traceback。高度不够时
|
|
457
|
+
只返回标题栏那一块。
|
|
458
|
+
|
|
459
|
+
### Performance
|
|
460
|
+
|
|
461
|
+
- 高斯从 PIL `ImageFilter.GaussianBlur` 换成 `cv2.GaussianBlur`(有 OpenCV 时);
|
|
462
|
+
- GPU 首次渲染 **1137 ms → 79 ms**(几何贴图改用 cv2 缩放,不再 PIL 逐通道);
|
|
463
|
+
- 静止时的探针从 60fps 降到 30fps —— 单次 `grab()` 就要 7ms,空转等于白烧
|
|
464
|
+
40% 单核;有变化时 `idle` 立刻归零、下一拍恢复全速;
|
|
465
|
+
- 文字翻色从「每个字 `crop()` + `np.percentile`」改成整帧转一次灰度再切片。
|
|
466
|
+
|
|
467
|
+
### 验证
|
|
468
|
+
|
|
469
|
+
- 视觉:同一背景同一消息,新旧玻璃帧逐像素对比 **均差 0.068、99% 像素差 ≤1**;
|
|
470
|
+
- 交互:折叠 / 展开 / 拖动 / 边缘缩放 / 滚轮 / 改名 / 发送 / 新消息增量 / 关闭
|
|
471
|
+
全部实跑通过(810×625 与 760×560、折叠 78px 三种尺寸);
|
|
472
|
+
- `node scripts/check-syntax.mjs` 56 files ok;`node --test` **317 pass / 0 fail**。
|
|
473
|
+
|
|
474
|
+
## [0.2.10] - 2026-11-03
|
|
475
|
+
|
|
476
|
+
> GPU 路径其实一直是坏的,顺便量了一下它到底省不省。
|
|
477
|
+
|
|
478
|
+
### Fixed — GPU 路径的 GLSL 用了保留字,着色器从来没编译成功过
|
|
479
|
+
|
|
480
|
+
`glass_window_gpu.py` 的 FRAG 里有一行 `vec3 patch = mix(edgep, strong, e);`。
|
|
481
|
+
`patch` 是 GLSL 1.5 起保留的 tessellation 关键字,编译直接失败:
|
|
482
|
+
|
|
483
|
+
```
|
|
484
|
+
GLSL Compiler failed
|
|
485
|
+
ERROR: 0:24: 'patch' : syntax error
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
`_work()` 里那句 `except` 把异常吞掉、每帧打一行 `GPU capture failed, falling back to CPU`,
|
|
489
|
+
然后继续走 CPU —— **所以 `glass_window_gpu.py` 从来没真正跑起来过**,用户能看到的最大线索
|
|
490
|
+
就是一句每帧刷屏的日志。更糟的是它每帧重建一次 program/FBO 又失败,实测内存涨到 **2.3 GB**。
|
|
491
|
+
|
|
492
|
+
改个名(`patch` → `tile`)。修完日志干净、内存 200 MB、画面和 CPU 版一致。
|
|
493
|
+
|
|
494
|
+
### 实测 — GPU 不比 CPU 省(这台机器上)
|
|
495
|
+
|
|
496
|
+
i9-12900HX / RTX 4060 Laptop / 窗口 700×665 / 150% DPI / 静态桌面:
|
|
497
|
+
|
|
498
|
+
| 路径 | CPU(单核) | 内存 |
|
|
499
|
+
|---|---|---|
|
|
500
|
+
| CPU(正常模式) | **49.6%** | 100 MB |
|
|
501
|
+
| GPU(`glass_window_gpu.py`) | 115.6% | 200 MB |
|
|
502
|
+
| CPU(`GLASS_FORCE=1`,调试) | 146% | 111 MB |
|
|
503
|
+
|
|
504
|
+
两边都有静态跳帧,GPU 多出来的是每帧把 BGRA 上传成纹理(约 2.6 MB/帧)+ moderngl 的
|
|
505
|
+
Python 层调用开销;而 CPU 版在这么小的窗口上本来就够快。GPU 路径更适合「窗口很大 + CPU 较弱」,
|
|
506
|
+
不是无脑更优 —— **默认继续用 CPU**。
|
|
507
|
+
|
|
508
|
+
## [0.2.9] - 2026-11-03
|
|
509
|
+
|
|
510
|
+
> 一条根因修得很漂亮的 bug:拖动窗口时的动态模糊。
|
|
511
|
+
|
|
512
|
+
### Fixed — 拖动窗口没有动态模糊(合 PR #49,作者 @ggfgfgf-on,对应 #48)
|
|
513
|
+
|
|
514
|
+
现象是「`GLASS_FORCE=1` 下能看到那种黏黏的拖尾,正常启动看不到」,我一开始以为是
|
|
515
|
+
`_motion_blur` 的衰减公式问题 —— 猜错了。
|
|
516
|
+
|
|
517
|
+
真正的原因在这行:
|
|
518
|
+
|
|
519
|
+
```python
|
|
520
|
+
if self._sig is not None and box == self._sig_bbox and sig.shape == self._sig.shape:
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
拖动窗口时抓取区域 `box = (gl, gt, gr, gb)` 每帧都在变,`box == self._sig_bbox` 永远不成立,
|
|
524
|
+
`moved` 一直是 `False`。于是:
|
|
525
|
+
|
|
526
|
+
- `_motion_blur` 一路乘 0.55 衰减到 0,混合那步一次都不执行;
|
|
527
|
+
- 反而每帧都在做 `apply_chroma(panel, 1.7)`(那是「没在动」时的色散补偿)。
|
|
528
|
+
|
|
529
|
+
`FORCE` 之所以看起来有效,只是因为它跳过静态跳帧、帧数更多,更容易凑出连续可混合的帧 ——
|
|
530
|
+
它并没有修掉这个判断。
|
|
531
|
+
|
|
532
|
+
现在 `_sig_bbox` 已存在且 `box` 变了,就把这一帧标成 `moved = True`:抓取区域变了,
|
|
533
|
+
旧区域的像素本来也不能直接做差,但这确实是运动。静止窗口仍走原来的像素差判断,
|
|
534
|
+
不会变成常驻拖影。和 #42 不冲突 —— `_invalidate_glass()` 会把 `_sig_bbox` 清成 `None`,
|
|
535
|
+
形状变化后的第一帧不会误判成 `box_changed`。
|
|
536
|
+
|
|
537
|
+
### 说明 — 静止画面下没有动态模糊是设计
|
|
538
|
+
|
|
539
|
+
同一轮确认:`if moved` 这层是故意留的,运动模糊不是常驻滤镜。静止时混上一帧只会把文字和边缘
|
|
540
|
+
永久糊一层,还会让 `_motion_blur` 维持在高位,停下后回不到清晰;CPU 每帧做一次 `Image.blend` 也不便宜。
|
|
541
|
+
|
|
542
|
+
想要「低速拖尾」可以做配置项(类似 `motionBlurFloor`,默认 0),但不改默认行为。
|
|
543
|
+
|
|
544
|
+
## [0.2.8] - 2026-11-03
|
|
545
|
+
|
|
546
|
+
> 三个社区 PR(都是 @ggfgfgf-on)+ 一批失效入口的清理。
|
|
547
|
+
|
|
548
|
+
### Fixed — 多 P / 选集页面读错 `<video>`(合 PR #45,对应 #44)
|
|
549
|
+
|
|
550
|
+
旧实现按 `duration` 挑播放器,遇到 B 站多语言版本这种页面,会挑中一个隐藏的 13 分钟长视频,
|
|
551
|
+
上报的 `pos` 直接跳到 13:42,插件判定「换片了」,陪看中断。
|
|
552
|
+
|
|
553
|
+
新逻辑:先排除不可见 / 零尺寸 / `opacity: 0` 的候选,再按在视口里占据的面积排序;
|
|
554
|
+
播放中只加一档权重(不能压过更大的主播放器);认画中画和全屏;整页都不可见才退回全部。
|
|
555
|
+
|
|
556
|
+
### Fixed — 气泡形状变化后不重合成(合 PR #42)
|
|
557
|
+
|
|
558
|
+
静态跳帧只看 `_sig_bbox`,只清 `_sig` 不够。气泡/内框形状变了之后,如果桌面本身静止,
|
|
559
|
+
worker 会一直 `return None`,新遮罩和新色散要等用户动一下鼠标才出现。
|
|
560
|
+
`FORCE` 模式下看不出来,只在真机静置时暴露。
|
|
561
|
+
|
|
562
|
+
### Fixed — `_tick` 每 4ms 重读一次配置(合 PR #47,fixes #46)
|
|
563
|
+
|
|
564
|
+
`not capturable()` 每拍读一次 `watch-window.json` —— `__init__` 早就把结果缓存在
|
|
565
|
+
`self._cappable` 了,这里纯属白花。0.2.7 引入的疏漏,谢谢抓出来。
|
|
566
|
+
|
|
567
|
+
### Fixed — 删掉失效的 `run-glass*.cmd`,并去掉里面的本机绝对路径(#43)
|
|
568
|
+
|
|
569
|
+
玻璃渲染重写之后 `DSH_WATCH_GLASS_TTL/FPS/CHROMA/BLUR/SAT` 和 `DSH_GLASS_ACRYLIC`
|
|
570
|
+
已经没有任何代码读取,但那几个脚本还在设置它们:双击 `run-glass-acrylic.cmd` 以为开了
|
|
571
|
+
亚克力,实际还是普通软件模糊。静默失效比报错更糟。
|
|
572
|
+
|
|
573
|
+
现在只留一个 `run-glass.cmd`,开头列清哪些变量废弃、哪些真正有效;解释器也不再写死
|
|
574
|
+
本机路径(先找 PATH 上的 `pythonw`,再退 `py -3`)—— 这个仓库是公开的。
|
|
575
|
+
|
|
576
|
+
## [0.2.7] - 2026-11-03
|
|
577
|
+
|
|
578
|
+
> 五个社区 PR 一起收(都是 @ggfgfgf-on 提的),外加录屏模式的两个真 bug。
|
|
579
|
+
|
|
580
|
+
### Fixed — 录屏/截图根本拍不到窗口
|
|
581
|
+
|
|
582
|
+
窗口一直开着 `WDA_EXCLUDEFROMCAPTURE`(防截图/直播泄露,这是对的),
|
|
583
|
+
但社区贡献者要调玻璃管线就必须能录。原来只有环境变量 `DSH_GLASS_WDA=0` 一个入口,
|
|
584
|
+
**而插件拉起窗口时不会传环境变量** —— 于是用户在 `~/.dsh/watch-window.json` 里写了
|
|
585
|
+
`"capturable": true` 也没人读,录出来永远是空桌面。
|
|
586
|
+
|
|
587
|
+
现在 `capturable()` 真的读配置:环境变量(临时)→ 配置项(持久)→ 默认排除。
|
|
588
|
+
|
|
589
|
+
### Fixed — 录屏模式下"字一直在闪"、拖尾越滚越浓
|
|
590
|
+
|
|
591
|
+
`capturable: true` 关掉 WDA 之后,**mss 抓背景时把窗口自己也抓进去了**。玻璃拿它当背景
|
|
592
|
+
等于"透过自己看自己",形成反馈回路:背景里带着上一帧的字 → 亮度判据一直抖 → 字色来回翻;
|
|
593
|
+
背景一直在变 → `moved` 一直为真 → 一直混合上一帧 → 越滚越浓的假拖尾(静止画面也在"动")。
|
|
594
|
+
|
|
595
|
+
现在录屏模式下把窗口矩形用**周边均值**刷平(试过按上下边缘插值,相邻列颜色不同会变成
|
|
596
|
+
一根根竖条,更难看)。窗口外 PAD 一圈仍是真背景,边缘透镜照常。
|
|
597
|
+
实测同一位置连续 6 帧:帧差从"每次都在变"降到 **0.00**。
|
|
598
|
+
|
|
599
|
+
### Added — 窗口心跳
|
|
600
|
+
|
|
601
|
+
`<cache>/window-heartbeat`,`_tick` 里每秒最多写一次。宿主那侧靠它区分"进程还在"和
|
|
602
|
+
"窗口真的在画"——只看 pid 的话,pid 被复用或界面卡死时永远认为窗还开着,于是再也不重开。
|
|
603
|
+
|
|
604
|
+
### Fixed — GPU 抓屏越界(合 PR #40,作者 @ggfgfgf-on,fixes #39)
|
|
605
|
+
|
|
606
|
+
GPU 路径的 `capture_gpu()` 有自己一份 `sct.grab()`,没做 `gr-gl/gb-gt` 守卫;
|
|
607
|
+
窗口被拖出屏幕时每帧抛 `Region has zero or negative size`,被 `_work()` 吞掉后背景永久停在旧帧。
|
|
608
|
+
补上和 CPU 路径一样的检查。
|
|
609
|
+
|
|
610
|
+
### Fixed — 台词 `at: null` 被存成第 0 秒(合 PR #38,作者 @ggfgfgf-on)
|
|
611
|
+
|
|
612
|
+
`Number(null) === 0`,显式写 `at: null` 的台词全被当成"第 0 秒",回读时挤在片头。
|
|
613
|
+
|
|
614
|
+
### Fixed — 本机 API 的 CORS 与聊天游标(合 PR #35,作者 @ggfgfgf-on,fixes #33 #34)
|
|
615
|
+
|
|
616
|
+
- 聊天/位置 API 原来对**任意网页**放开 CORS,可被跨站写入;改成只认白名单。
|
|
617
|
+
- `chat.jsonl` 被清短之后,聊天页的游标永久卡在越界位置;改成越界自动归零。
|
|
618
|
+
- 新增 `test/chat-server-guards.test.mjs`。
|
|
619
|
+
|
|
620
|
+
### Fixed — 卸载时没 detach voice adapter(合 PR #31,作者 @ggfgfgf-on,fixes #30)
|
|
621
|
+
|
|
622
|
+
适配器订阅了 speech bus,插件卸载却没退订 —— `speechSubscribers()` 一直 > 0,
|
|
623
|
+
重载后循环误以为"有人会念",模型再也不会被叫醒。
|
|
624
|
+
|
|
625
|
+
### Added — 设置页自动保存(合 PR #32,作者 @ggfgfgf-on)
|
|
626
|
+
|
|
627
|
+
改一项存一项,不用再点保存;顺带补了声音环境变量提示与连接状态。
|
|
628
|
+
|
|
629
|
+
## [0.2.6] - 2026-11-02
|
|
630
|
+
|
|
631
|
+
> 陪看的声音还差最后一步:到点才开始合成。这一轮把"合成"从关键路径上挪开。
|
|
632
|
+
|
|
633
|
+
### Added — `scheduled` 事件(合 PR #36,作者 @ggfgfgf-on)
|
|
634
|
+
|
|
635
|
+
- 循环每一拍把**未来 60 秒内、已经写好且带 `at`** 的台词以 `scheduled` 广播一次(每句一次;
|
|
636
|
+
只在有会出声的订阅者时发)。它不参与"该不该念"的判断,只给适配器时间预合成。
|
|
637
|
+
- `upcomingLines(input, { after, before })`:只读的"未来台词"查询,不消费稿件。
|
|
638
|
+
|
|
639
|
+
### Changed — 示例适配器预合成
|
|
640
|
+
|
|
641
|
+
- `examples/voice-edge-tts`:`speakEdge` 拆成 `synthEdge`(只合成)+ `playEdge`(播放并删临时文件);
|
|
642
|
+
`scheduled` 到达即合成,按 `input|segment|text` 缓存(上限 6 条,满时踢 `at` 最远的一条),
|
|
643
|
+
`due` 优先播缓存。日志多出 `prefetched` / `synth`、`ready Nms`、`wait Nms`。
|
|
644
|
+
- `MAX_QUEUE_LAG_MS` 的计时从 `due` **到达**起算,合成时间本来就算在里面 ——
|
|
645
|
+
预取因此还降低了"排队太久被丢弃"的概率,不只是首声早一点。
|
|
646
|
+
|
|
647
|
+
### Fixed — 评审补丁(`5fa1307`、`bd5b3c7`)
|
|
648
|
+
|
|
649
|
+
- **跨段时缓存 key 对不上**:`dueLine` 跨段挑 `at` 最小的一句,选中上一段的句子时 `due` 报的却是
|
|
650
|
+
当前段,和 `scheduled` 的 `segment` 不一致 → 缓存白做、首声又晚回 0.6~2 秒。
|
|
651
|
+
`dueLine({ meta: true })` 现在多返回 `from`,`speak()` 用它。
|
|
652
|
+
- **`Number(null) === 0`**:没写 `at` 的台词会被当成"at=0"挤进预取窗口;适配器 `prefetch()` 同理,
|
|
653
|
+
6 个槽位被 at=0 占满后永久失效。两处都改成显式判空。
|
|
654
|
+
|
|
655
|
+
## [0.2.5] - 2026-11-02
|
|
656
|
+
|
|
657
|
+
> 0.2.4 里 PR #28 留下的两个 GPU 尾巴,作者当天补了 PR #29 收掉,外加气泡留白微调。
|
|
658
|
+
|
|
659
|
+
### Fixed — GPU 内框边缘(合 PR #29,作者 @ggfgfgf-on)
|
|
660
|
+
|
|
661
|
+
- **底部输入/发送框发黑**:内框边缘原来直接拿 `small` 的 render target 当 sampler,
|
|
662
|
+
贴边小框会采到边界外。现在单独拷一份 blur(1.45) 到 `edgeblur` FBO 再采样
|
|
663
|
+
(注释里写明「直接当 sampler 会触发驱动崩溃」,所以宁可多一次 copy)。
|
|
664
|
+
- **内框边缘的折射/扭曲丢了**:CPU 里 `edge_w=0` 是边缘(取折射样本)、`=1` 是中心
|
|
665
|
+
(取强模糊),Shader 里方向是反的。改成 `mix(edgep, strong, e)` 后恢复。
|
|
666
|
+
|
|
667
|
+
### Changed — 气泡留白
|
|
668
|
+
|
|
669
|
+
- 横向 14→18,纵向 `+4`→`+16`,正文按 `(bh - lines*ls)/2` 垂直居中。
|
|
670
|
+
字不再贴着气泡边,短消息也不会挤成一条。
|
|
671
|
+
|
|
672
|
+
## [0.2.4] - 2026-11-02
|
|
673
|
+
|
|
674
|
+
> 0.2.3 发出去 20 分钟就发了这个 —— 因为它带着一个肉眼可见的毛病:
|
|
675
|
+
> **气泡里的字会一直黑白闪**。另外收了社区 PR #28。
|
|
676
|
+
|
|
677
|
+
### Fixed — 字一直在黑白闪
|
|
678
|
+
|
|
679
|
+
气泡是透明的,背后就是桌面/视频/网页。`_adapt_text` 每 0.12 秒按
|
|
680
|
+
`p50 < 0.50` **硬切**白字 `#f2f8ff` / 深字 `#07111d`,画面一动亮度就在阈值附近
|
|
681
|
+
来回穿 —— 同一段抖动序列 **16 次采样翻 15 次**,肉眼就是"字一直在闪"。
|
|
682
|
+
(这段逻辑 0.2.1 就在,只是 0.2.3 的气泡更透、更容易撞上。)
|
|
683
|
+
|
|
684
|
+
- **滞回**:白的要暗到 0.38 才翻深,深的要亮到 0.62 才翻白,中间的 0.38~0.62 保持现状。
|
|
685
|
+
- **连续两次同向才切**:单帧跳变忽略,最坏 0.24 秒换一次色。
|
|
686
|
+
- 顶部细条同样处理(0.48 硬切 → 0.36/0.60 滞回),并在 `_build_ui` 重建时把
|
|
687
|
+
`_bar_color` 归位,免得条和缓存对不上。
|
|
688
|
+
- 结果:同样 16 次抖动翻 **0 次**;真·明暗切换仍然生效(慢一个采样周期)。
|
|
689
|
+
|
|
690
|
+
### Changed — 玻璃合成管线(合 PR #28,作者 @ggfgfgf-on)
|
|
691
|
+
|
|
692
|
+
- **小框边缘不再硬切**:气泡/输入框边缘原来直接用未模糊的 raw、中心却是
|
|
693
|
+
blur(2.6),中间二值 edge 一刀切,有一圈"割裂"。现在边缘走 blur 1.45 的帧,
|
|
694
|
+
再用 smoothstep 过渡。GPU 侧同步;贴边小框仍从 raw 取(用 warped 会采到边界外
|
|
695
|
+
的黑边,底部输入/发送框会发黑)。
|
|
696
|
+
- **CPU 补齐 GPU 才有的效果**:外缘 R/B 径向色散(2x 合成图上做,索引图按尺寸缓存,
|
|
697
|
+
缩放重建时释放)、上一帧运动混合。GPU 的 `blend` 改成只在检测到移动时混,
|
|
698
|
+
停下立刻干净;移动帧跳过色散,先保住拖动/滚动响应。
|
|
699
|
+
- **麦克风回到玻璃帧合成**(`MIC_POS` / `MIC_LIGHT` / `MIC_DARK`),不再在 Canvas
|
|
700
|
+
上单独建图。这是回退 0.2.3 里 #22 的 Canvas 方案 —— 好处是位置与上游仓库对齐、
|
|
701
|
+
会被玻璃一起处理;代价是依赖合成帧。
|
|
702
|
+
- **消息气泡改成自适应宽高**:按正文实测折行,时间戳移到气泡上方不再进框,
|
|
703
|
+
替掉 #22 的固定 88px 四框。短消息不再撑满整行。
|
|
704
|
+
- 兼容层改动态代理,GPU 能看到缩放/气泡的新坐标;缩放重建时释放色散索引缓存。
|
|
705
|
+
|
|
706
|
+
> 验证:311 测试全绿;清空 `chat.jsonl` 冷启动实跑,1 条短消息 / 4 条混合长度
|
|
707
|
+
> (含多行、超长)都正常渲染,输入/发送框无发黑。
|
|
708
|
+
|
|
709
|
+
## [0.2.3] - 2026-11-02
|
|
710
|
+
|
|
711
|
+
> 主题:**悬浮窗这一轮收口** —— 社区提的 #22 / #23 / #25 / #26 / #27 全部合进来,
|
|
712
|
+
> 核心与 TTS / 悬浮窗之间的依赖收成 `runtime-ports`。
|
|
713
|
+
> 播放位置、台词锚点、语音调度这些**一处没动**;变的只有窗口和它下面那层接口。
|
|
714
|
+
|
|
715
|
+
### Added — 核心只认 runtime-ports(合 PR #22)
|
|
716
|
+
|
|
717
|
+
- 新增 `src/runtime-ports.js`:**唯一**给出 TTS / 悬浮窗适配器的地方。
|
|
718
|
+
`chat-store` / `watch-loop` / `watch-actions` / `input-surface` 不再直接
|
|
719
|
+
`import` `voice.js` / `floating-window.js` / `window-protocol.js`。
|
|
720
|
+
- `installPorts()` / `resetPorts()` / `getTtsPort()` / `getWindowPort()` 从 `public-api` 导出,
|
|
721
|
+
宿主或测试可以注入自己的实现;裸 `import` 仍拿历史默认(speech bus + 内置窗口),
|
|
722
|
+
CLI 和老测试照旧能跑。
|
|
723
|
+
- `test/decoupling.test.mjs` 守这条线:核心模块一旦直接依赖实现就红。
|
|
724
|
+
|
|
725
|
+
### Changed — 悬浮窗气泡与折叠重做(合 PR #22)
|
|
726
|
+
|
|
727
|
+
- **气泡改成「时间头 + 正文折行」**:`_fit_lines()` 按框宽/框高折行,标点不落行首,
|
|
728
|
+
超长截断加省略号;四条气泡统一 88px 并吃满内容宽度,不再为了塞下文字把字号压到 9。
|
|
729
|
+
- **折叠不再重建整窗几何**:只缩窗口 + 只画标题栏。原来 `rebuild_geometry(78)` 会在
|
|
730
|
+
`rounded_mask` 抛 `y1 must be >= y0`,**折叠直接异常**(main 上可复现)。
|
|
731
|
+
- **每 1.8 秒重新置顶一次**:DSH 抢焦点后浮窗不再被压下去。
|
|
732
|
+
- **麦克风改 Canvas 矢量图标**,不再往合成帧上贴第二层;GPU 路径同步去掉。
|
|
733
|
+
- 补三处收尾:空态分支还在用已删掉的 `bh` → 清空 `chat.jsonl` 冷启动直接 `NameError`,
|
|
734
|
+
窗口起不来;标题改回**双击**改名(单击要留给按住拖动);折叠态跳过抓屏,
|
|
735
|
+
否则遮罩尺寸不符会每帧刷一条 `images do not match`。
|
|
736
|
+
|
|
737
|
+
### Fixed
|
|
738
|
+
|
|
739
|
+
- **拖到屏幕外不再花屏**(合 PR #23)—— `_x` / `_y` 只在启动时读一次,拖动后已过期;
|
|
740
|
+
加上越界钳位后仍可能算出 0 或负的抓屏尺寸,`mss` 抛 `Region has zero or negative size`,
|
|
741
|
+
异常在 `_work()` 里被吞掉只打一行的结果是:每帧一条日志、背景永远画不出来。
|
|
742
|
+
现在拖动/缩放分支都钳位,并在抓屏前直接挡掉非正尺寸。
|
|
743
|
+
- **`window` 接口的 hide/show 兼容只返回布尔的实现**(合 PR #25)—— 以前拿返回值当对象解构,
|
|
744
|
+
实现只回 `true` 时 `hide` 变成静默失败。
|
|
745
|
+
- **snapshot 模式不再被 `_tick` 重新打开 WDA**(合 PR #26)—— worker 已暂停,
|
|
746
|
+
下一拍却把 WDA 开回来,窗口再次从截图/录屏里消失,`_snapshot_mode` 等于没做。
|
|
747
|
+
- **折叠不再跳回原位、折叠背景有圆角、标题栏排版收紧**(合 PR #27)——
|
|
748
|
+
`_sync_pos()` 在 `_release` 与 `toggle_collapse` 前同步真实坐标(`_x/_y` 过期会让窗口弹回启动位置);
|
|
749
|
+
折叠态按 78px 重新贴圆角遮罩,不再直接裁 `_last_frame` 留一条硬边;
|
|
750
|
+
`_save_geometry` 存**展开高度**,否则下次启动按 78px 恢复;折叠时 `_tick` 不再消费旧队列,
|
|
751
|
+
避免 560px 的帧贴回 78px 画布闪一下;状态点/名字/计数统一到 y=38 中线,字号 21→16。
|
|
752
|
+
实测对照 main:拖到 (300,220) 折叠后停在 (300,220)、配置写 `760x560+300+220`,
|
|
753
|
+
main 会跳回 (1720,480) 并写 `760x78`。
|
|
754
|
+
|
|
755
|
+
### Docs
|
|
756
|
+
|
|
757
|
+
- **README 挂上赞赏码**(微信,`docs/images/reward-qr.png`)。写法上明确一句:
|
|
758
|
+
打赏**不解锁任何东西**,也不影响这个项目以后的授权方式 —— 它仍然是 Apache-2.0。
|
|
759
|
+
|
|
760
|
+
## [0.2.2] - 2026-11-01
|
|
761
|
+
|
|
762
|
+
只改元数据,不动行为。
|
|
763
|
+
|
|
764
|
+
- `package.json` 补 `dsh.catalog`(category / 中英双语 summary / capabilities)——
|
|
765
|
+
社区插件市场直接读 npm 上带 `dsh-plugin` 关键词的包,每天同步一次、没有提交入口;
|
|
766
|
+
有 `dsh.catalog` 时市场页面展示的是这里写的分类和摘要,没有就退回 npm description。
|
|
767
|
+
|
|
768
|
+
## [0.2.1] - 2026-11-01
|
|
769
|
+
|
|
770
|
+
两项都是从社区审计(#18 / #16)来的,各配了回归用例。
|
|
771
|
+
|
|
772
|
+
### Added — 插件设置页(合 PR #11, closes #10)
|
|
773
|
+
|
|
774
|
+
设置直接渲染在 DSH 插件详情页(`plugins.bundle.config`),不再用 iframe / 内嵌滚动窗口;
|
|
775
|
+
「设置 → 内置插件」的 tab 也还在。
|
|
776
|
+
|
|
777
|
+
- 表单:`browserPort`(共享 `video.json`)、`chatPort`(`watch.json`)、语音适配器(`voice.json`)。
|
|
778
|
+
- **依赖自检**:ffmpeg/ffprobe、Python、`dsh-video-storyboard`、浏览器扩展、悬浮窗脚本;
|
|
779
|
+
缺什么就直接给官方下载入口,已装的显示「已安装」。插件**不会**静默安装或替你执行下载。
|
|
780
|
+
- 修核心包误报:`dsh-video-storyboard/package.json` 不在 `exports` 里,改成解析 `dist` 信息。
|
|
781
|
+
|
|
782
|
+
### Changed — 悬浮窗换成实时捕获管线,模块拆成接口(合 PR #20)
|
|
783
|
+
|
|
784
|
+
- **窗口实现换代**:`examples/floating-chat/window.py` 以 PR #15 的实时捕获管线为底稿重写
|
|
785
|
+
(1454 行,原 3372 行)。每帧抓屏 → 1/4 尺度模糊 → SDF 边缘折射 → 透镜采样 → 合成,
|
|
786
|
+
静帧时整条管线跳过。**依赖变化**:`mss` 和 `numpy` 从可选变必需,缺了窗口起不来。
|
|
787
|
+
- **保留并补齐交互**:双击标题改名、▾ 折叠/展开、系统行(meta)、发送回写、位置保存、
|
|
788
|
+
麦克风图标、滑入动画。输入框仍是"画布上画字 + 2×2 的 Entry 只收 IME/键盘"。
|
|
789
|
+
- **模块解耦**:`src/interfaces.js` 组合识别 / TTS / 悬浮窗三个接口,`handler.js` 与
|
|
790
|
+
`watch-loop.js` 只调接口、不再直接 import 实现(`docs/INTERFACES.zh.md`)。
|
|
791
|
+
- **窗口线协议**:插件写 `window-events.jsonl`、窗口写 `window-outbox.jsonl`,
|
|
792
|
+
Python 侧 `window_protocol.py` 只共享线格式;旧版只写 `chat.jsonl` 时窗口继续兼容。
|
|
793
|
+
|
|
794
|
+
### Fixed — 无音轨视频不再卡在"缺台词"门槛(fixes #18)
|
|
795
|
+
|
|
796
|
+
`noListen` 之前只改了文案,**没有参与 `hasLines`** —— 无可等台词时 `segLines` 为空,
|
|
797
|
+
`hasLines` 恒为 false,于是 `spoken` / `lastDelivered` 都不写,每次调用都落回同一段、
|
|
798
|
+
永远带 `[DELIVERY INCOMPLETE]`。这不是"模型不肯写台词",是状态机不推进。
|
|
799
|
+
|
|
800
|
+
- `noLinesNeeded = Boolean(noListen)` 参与 `hasLines`:没音轨 / 没配 ASR / 连不上 / 这段真静音时,
|
|
801
|
+
画面这一半就算交付完成。
|
|
802
|
+
- 没有台词可等时**不再提示"先取字幕"**(取了也不会有),也不说"本段台词已就绪"。
|
|
803
|
+
- `[听音]` 段补一句"这一段也没有台词可等,用你看见的画面说一句即可,别编对白"。
|
|
804
|
+
- **普通视频的台词门槛保持原样**:有声有字幕但没写台词,仍然 `complete=false`。
|
|
805
|
+
|
|
806
|
+
### Fixed — 叫醒失败不再刷屏,确定性失败不再空等(fixes #16)
|
|
807
|
+
|
|
808
|
+
`no-session-controller`(当前进程没有 DSH 会话控制器)和 `no-session-id` 是**确定性**失败,
|
|
809
|
+
以前每次都要等 800ms 再重试,并且每次都往 `chat.jsonl` 写一条 `[一起看] 叫醒失败`;
|
|
810
|
+
持续故障时悬浮窗会被几十条一样的 meta 刷满。
|
|
811
|
+
|
|
812
|
+
- 这两类失败**不重试**;其他偶发失败仍重试一次。
|
|
813
|
+
- 失败提示按 `(sessionId, reason)` 节流:**60 秒内只显示第一条**,静默期里折叠掉的次数
|
|
814
|
+
在下一次显示时带上("同类失败另有 19 次已折叠")。
|
|
815
|
+
- `no-session-controller` 的提示补一句可行动的说明(从 DSH 里启动,或先关掉陪看循环)。
|
|
816
|
+
|
|
817
|
+
## [0.2.0] - 2026-11-01
|
|
818
|
+
|
|
819
|
+
这一版把悬浮窗的玻璃重做了。三块独立玻璃、底色真正跟着背景走、静帧不空转、
|
|
820
|
+
边缘不再是"放大贴纸"而是把框外画面折进来;同时把「听不到声音」这件事从
|
|
821
|
+
"模型答不上来"变成"能直接说清原因"。
|
|
822
|
+
|
|
823
|
+
### 听不到声音,不再只有一个答案
|
|
824
|
+
|
|
825
|
+
用户反馈(2026-11-01,B 站评论区):「能看视频,但是听不了」「没有音轨」。
|
|
826
|
+
文档里写清楚了要装 ASR,但**运行时没有任何地方告诉用户这件事** —— 模型只能回一句"我听不到",
|
|
827
|
+
用户于是以为插件坏了(同一个问题在评论区被问了十几遍)。
|
|
828
|
+
|
|
829
|
+
- `explainCuesFailure()`:把每种原因翻成**一句能直接说给用户听的话**(没配 ASR / 装了连不上 /
|
|
830
|
+
这份副本没音轨 / 听了但没说话 / 字幕要登录)。`transcriptOnly` 的返回和陪看交付共用这一份文案,
|
|
831
|
+
不再各写一遍。
|
|
832
|
+
- `asrCues` **不再把"没配 key"和"服务连不上"糊成 `asr-empty`**(那是"这片子没人说话",
|
|
833
|
+
一个会误导人的结论)。没配 key 时连请求都不发 —— 以前会照发,401 被吞掉。
|
|
834
|
+
- 陪看交付新增 `[听音]` 段(同一部片子只详说一次,之后一句短的):用户问"你怎么听不到声音"时,
|
|
835
|
+
模型手里终于有依据。**没句子时门槛改成"用画面说一句、别编对白"**,而不是硬逼出一段台词。
|
|
836
|
+
- 修 `findCachedMedia`:拿不到 BV 号时原来会 `return video` —— 返回媒体目录里碰到的**第一个**
|
|
837
|
+
`video.mp4`,于是拿**另一部片子**的音轨去转写。台词全错,而且一句都不报。
|
|
838
|
+
|
|
839
|
+
### 玻璃底色跟着背景走
|
|
840
|
+
|
|
841
|
+
用户原话:「太卡顿,而且刷新很慢……经常是背景换了,液态玻璃还没动,还没变颜色。」
|
|
842
|
+
|
|
843
|
+
根因不在渲染算法,在**缓存永不过期**:整屏截图只在开窗那一刻做一次(`_stage` 的注释还写着
|
|
844
|
+
"之后无论拖到哪儿都是裁一刀"),所以对面视频换场景、桌面换壁纸,这块玻璃永远是开窗时的颜色。
|
|
845
|
+
拖动结束后那个"8 秒才值得重截"的判定也救不了**静止**的窗口 —— 而陪看时窗口恰恰是静止的。
|
|
846
|
+
|
|
847
|
+
现在:
|
|
848
|
+
|
|
849
|
+
- **按 TTL 定时重截**(`DSH_WATCH_GLASS_TTL`,默认 **600ms**,0 = 关掉回到旧行为)。
|
|
850
|
+
- **截屏在子线程**(抓屏 + 1/4 缩放 + 模糊 + 色散 + 提饱和),主线程只做裁片 + 贴图(1~2ms)。
|
|
851
|
+
Tk 对象一个都不在子线程碰 —— 屏幕尺寸、缩放系数都在主线程读好再传。
|
|
852
|
+
- **优先用 `mss` 抓屏**(可选依赖,见 `examples/floating-chat/requirements-glass.txt`):
|
|
853
|
+
整屏 38ms vs ImageGrab 71ms,全管线从 ~200ms 降到 ~98ms,所以 TTL 才敢压到 600ms。
|
|
854
|
+
没装就自动退回 ImageGrab。
|
|
855
|
+
- **新增 `_repaint_glass()`:只换玻璃不动内容**。`_paint()` 末尾会 `_reflow()` 重排所有气泡,
|
|
856
|
+
为了换一层底色付这个代价不值得;现在只 `delete("panel")` 再贴一张。
|
|
857
|
+
- `_glass_busy` 防重入:上一发没回来就跳过这一拍;窗口隐藏/折叠时根本不截。
|
|
858
|
+
|
|
859
|
+
实测(本机 2560×1600 / 150% 缩放,TTL=500ms):3 秒内 6 次截屏,底板时间戳推进 3.3 秒,稳定。
|
|
860
|
+
抓屏基准:mss 38.3ms / ImageGrab 71.0ms;mss 全管线(抓 + 1/4 缩 + 模糊)98.6ms。
|
|
861
|
+
|
|
862
|
+
**依赖**:Pillow + 可选 `mss`(**0.1MB**、纯 Python 无编译)。numpy 不需要。
|
|
863
|
+
|
|
864
|
+
**踩到的坑**:第一版把 `_glass_ttl_start()` 插进了 `poll()` 末尾(那个方法每 200ms 自己再排一次),
|
|
865
|
+
于是每拍都重启一条定时链 —— 实测 3.2 秒触发 16 次、截屏频率飙到 9Hz。加了 `_glass_started` 锁。
|
|
866
|
+
|
|
867
|
+
### 液态玻璃重做(本轮)
|
|
868
|
+
|
|
869
|
+
三块**分离**的玻璃(标题栏 / 主体 / 输入栏,中间 10px 真缝,缝里透出桌面),
|
|
870
|
+
滚动条移到主体右侧外面,不占消息区。
|
|
871
|
+
|
|
872
|
+
- **`WDA_EXCLUDEFROMCAPTURE`**:让窗口从屏幕捕获里消失,于是抓"自己背后"时
|
|
873
|
+
**不用把 `-alpha` 设 0 再恢复** —— 那个来回会逼 DWM 把整个桌面重排两次,
|
|
874
|
+
视频在播时最贵,肉眼就是"松手闪一下"。`DSH_GLASS_WDA=0` 可关(录屏要用)。
|
|
875
|
+
- **静帧跳帧**:用未模糊的原图缩到 48×30 比灰度差,`mean>0.8` 才算动了;
|
|
876
|
+
没动且运动已停 0.3 秒就直接复用上一帧,整条管线(抓屏 17ms + 糊 + 色散)全跳过。
|
|
877
|
+
慢速滚动不会先停一两帧 —— 阈值比"定时到点就重算"灵敏。
|
|
878
|
+
- **边缘折射换成 SDF 法线向外采样**:老做法是"整图放大一点、再按边缘权重把放大版盖回",
|
|
879
|
+
边缘看到的是**自己被放大的内容**,像贴了层凸透镜贴纸。现在沿圆角矩形 signed distance
|
|
880
|
+
field 的梯度法线**向外**取样本,边上一窄条里塞的是**框外**的画面,被压扁折进来。
|
|
881
|
+
- **底板 1/8 → 1/4**:1/8 放大 8 倍时边缘和背景细节都发虚。
|
|
882
|
+
- **文字可读性**:新增 `text_on_glass()`(整段文字 + 右下 1px 深色影子)和
|
|
883
|
+
`on_glass_fill()`(按那个点的背景亮度决定用浅字还是深字)。影子用在气泡正文、
|
|
884
|
+
标题栏名字、系统行、输入槽;翻色用在标题栏名字。
|
|
885
|
+
**没有逐字建 item** —— 玻璃上几十像素内明暗本来就不变,整段取一次样就够,
|
|
886
|
+
长列表滚动时 item 数不翻倍。
|
|
887
|
+
|
|
888
|
+
**依赖**:Pillow + 可选 `mss`;**numpy 也是可选**(只给 SDF 折射用,没装自动退回老折射)。
|
|
889
|
+
|
|
890
|
+
### 参考并移植了上游的 PR
|
|
891
|
+
|
|
892
|
+
- **#13 `feat/liquid-glass-speed`**:O(n²) → O(n) 的追加优化(只 layout 新气泡、resize debounce 70ms、
|
|
893
|
+
Configure 合并到 16ms、after_idle 批量、mtime 缓存、玻璃尺寸没变不重画、拖动只画边框)。
|
|
894
|
+
它的数据是 210 条消息从 14.22s 降到 605ms(23×)。**这次没合**:那个 PR 基于 1314 行的旧
|
|
895
|
+
`window.py`,我们这边已经 2632 行(液态玻璃二版 + 本轮改动),冲突面太大;但思路(尤其
|
|
896
|
+
"玻璃尺寸没变不重画")以后可以逐条移植。
|
|
897
|
+
- **#15 `feat/live-glass-window`**:独立一套 `glass_window.py` / `glass_window_gpu.py`。
|
|
898
|
+
**没有整包拿过来**(它是第二套 UI,切过去会丢掉气泡、meta、入场动画、折叠、改名这些交互),
|
|
899
|
+
而是逐项移植了它的机制:`WDA_EXCLUDEFROMCAPTURE`、静帧跳帧、SDF 法线折射、1/4 底板、
|
|
900
|
+
文字影子与按背景翻色。GPU 合成(moderngl)没有采用 —— 需要额外依赖且仅限 Windows/OpenGL 3.3+。
|
|
901
|
+
|
|
902
|
+
## [0.1.1] - 2026-11-01
|
|
903
|
+
**依赖升到 `dsh-video-storyboard@^0.6.0`。** 分镜从"固定宫格"改成"档位排布"——
|
|
904
|
+
一格 = 一个镜头、格子大小跟切点密度走,`boardOptions()` 返回的参数从
|
|
905
|
+
`cells / sheets / minGap` 换成 `maxFrames / maxSheets / minFrames`。旧的参数名在 0.6.0 里已经不存在,
|
|
906
|
+
所以这一版**必须**配 0.6.0 及以上,不能和 0.5.x 混装。
|
|
907
|
+
|
|
908
|
+
### 台词写完之后不再递整段清单(防剧透)
|
|
909
|
+
|
|
910
|
+
用户反馈"老是剧透后面的"。根因不是提示词不够狠:写台词时必须把整段 5 分钟的清单交出去,
|
|
911
|
+
写完它仍然留在上下文里,模型就会把它当成"我知道后面"的凭据 —— 光说"不许提"压不住真实内容。
|
|
912
|
+
现在台词一就绪就换成一句简报("台词已就绪,清单不再提供"),模型手里真的没有后面的信息。
|
|
913
|
+
|
|
914
|
+
顺带在提示词里加了一句自问:「这句话是不是只有已经看过 xx 秒之后的人才写得出来?」
|
|
915
|
+
不确定的事用"现在"而不是"接下来"。
|
|
916
|
+
|
|
917
|
+
### Liquid glass, second pass — the window was still ugly (2026-11-01, later)
|
|
918
|
+
|
|
919
|
+
Verbatim feedback: "看一下 watch-together 的悬浮窗设计,太丑了现在" — the first liquid-glass pass
|
|
920
|
+
had the vocabulary right and the physics wrong. Five defects, all of them visible in a screenshot:
|
|
921
|
+
|
|
922
|
+
**The corners were not round.** `round_rect` and `squircle_mask` both used a superellipse with
|
|
923
|
+
`n = 5`, and at `n = 5` the curve is within 0.6% of the straight edge until the last few pixels —
|
|
924
|
+
a 22px radius rendered as a near-square corner with a tiny fillet. `squircle_mask` had a second,
|
|
925
|
+
independent bug: the row-solve was inverted (`x` grew from 0 instead of `r`), which cut the corners
|
|
926
|
+
out as *squares*. Both now use `n ≈ 2.2` and solve each row's span directly (O(h) instead of O(w·h),
|
|
927
|
+
and it buys 2× supersampling for free).
|
|
928
|
+
|
|
929
|
+
**The chrome was opaque.** The header was a `tk.Frame` and the composer a second one; Tk widgets
|
|
930
|
+
must have an opaque background, so the top and bottom strips of a "glass" window were dead black.
|
|
931
|
+
Both are now drawn on the canvas (status dot, title, count, `▾`/`✕` as hit-tested canvas items,
|
|
932
|
+
the input well as a rounded polygon). Only the `Entry` stays a real widget — it has to be opaque, so
|
|
933
|
+
it lives inside a deliberate *inset* well.
|
|
934
|
+
|
|
935
|
+
**Bubbles were paper.** Each one was filled with a flat `#3a4459`. They are now cut from the same
|
|
936
|
+
blurred backdrop as the panel (`plate()`), with only a white/blue wash on top — they transmit what
|
|
937
|
+
is behind them.
|
|
938
|
+
|
|
939
|
+
**Tint was global and blue.** One tint for the whole window, and a blue-grey `#171a21`, which fights
|
|
940
|
+
every colourful frame it sits on. Tint is now per-plate and *neutral*: measure that plate's mean
|
|
941
|
+
luminance and solve for "how opaque does the ink need to be to land under 84" (`a = (L-84)/(L-12)`).
|
|
942
|
+
Over a white page it darkens itself; over a dark scene it stays transparent.
|
|
943
|
+
|
|
944
|
+
**The sheen was made of lines.** Diagonals stacked with a 3px step left a visible weave across the
|
|
945
|
+
panel. Every gradient is now computed on a 16×16 canvas and upscaled bicubically.
|
|
946
|
+
|
|
947
|
+
Also added: **dispersion** (warm outside, cool inside, full strength around the whole chamfer and
|
|
948
|
+
stronger at the four corners, because a fillet has curvature everywhere but compound curvature at
|
|
949
|
+
the corners), **edge fading** in the message list (rows fade in/out across a 30px band instead of
|
|
950
|
+
popping at the clip boundary — suppressed on the side that has no more content, otherwise the newest
|
|
951
|
+
message is permanently the faintest), a **200ms entrance** per new bubble (8 frames: 10px rise +
|
|
952
|
+
alpha ramp + text colour lerp), and **smooth scrolling** (5 frames × 16ms) so the fade band has
|
|
953
|
+
something to fade across. The scrollbar moved out into the margin beside the panel.
|
|
954
|
+
|
|
955
|
+
Two long-standing bugs fell out of this: `Meta.paint` ended with a leftover `self.cv.tag_lower("bg")`
|
|
956
|
+
from the pre-canvas version — `Meta` has no `cv`, so the exception aborted `_reflow` mid-list and only
|
|
957
|
+
the newest message was ever visible; and the backdrop image was created after the messages without
|
|
958
|
+
`tag_lower`, so any repaint buried them.
|
|
959
|
+
|
|
960
|
+
### Performance — the glass was re-baked on every frame (2026-11-01, same session)
|
|
961
|
+
|
|
962
|
+
"背景的模糊还是很卡" — measured, not guessed. One panel plate cost **520ms**, a slab 90ms,
|
|
963
|
+
a bubble 28ms. The culprit was `_ring`: it built **two full-size fill masks and subtracted them**,
|
|
964
|
+
and every plate needs five or six rings (rim, soft rim, bottom shade, warm, cool, edge weight), so
|
|
965
|
+
a 665×594 panel spent ~100ms in that one function plus ~15ms per `squircle_mask`.
|
|
966
|
+
|
|
967
|
+
Three fixes, in order of payoff:
|
|
968
|
+
|
|
969
|
+
- **Ring solved per row, no intermediate images.** A ring's row is just two short segments — left
|
|
970
|
+
and right — so the inner and outer x are solved directly (`_ring`), and middle rows are skipped
|
|
971
|
+
entirely. O(h) instead of O(w·h), and no subtraction allocations. 100ms → 3.7ms.
|
|
972
|
+
- **Everything smooth is computed at ¼ scale.** `_corner_weight`, `_edge_weight` and `refract`'s
|
|
973
|
+
bevel weight are soft blobs, not features: build them at 665/4 and upscale bilinearly. Gaussian
|
|
974
|
+
blur cost drops 16×, and the bevel mask (14 rectangle outlines over the full image) went from
|
|
975
|
+
~20ms to ~1ms.
|
|
976
|
+
- **Supersampled masks now downsample with `Image.BOX`** instead of LANCZOS. For an exact 2×
|
|
977
|
+
reduction BOX *is* the 2×2 average — same result, ~4× faster. `squircle_mask` 15ms → 4.9ms.
|
|
978
|
+
|
|
979
|
+
Result: panel 520 → **50ms**, slab 90 → **6.8ms**, bubble 28 → **8ms**; `_paint` with a warm cache
|
|
980
|
+
**1.3ms**, `_reflow` **0.5ms**, cold repaint (backdrop changed) **76ms**, window open **387ms**.
|
|
981
|
+
|
|
982
|
+
Also: the R/B channel-scaled displacement (`chroma_edge`) is now **off by default**
|
|
983
|
+
(`DSH_WATCH_CHROMA_EDGE=1` turns it back on). It cost two full-size channel resizes per plate
|
|
984
|
+
(+18ms) and was invisible — the backdrop is already blurred and inked, so there is no contrast left
|
|
985
|
+
at the rim to disperse. The visible dispersion is the warm-outside/cool-inside tint pair, which stays.
|
|
986
|
+
|
|
987
|
+
Finally, resizing no longer re-bakes: while the resize grip is held the panel is a bilinear scale of
|
|
988
|
+
the last baked plate (1.2ms instead of 50ms), and a precise re-bake happens 300ms after release.
|
|
989
|
+
|
|
990
|
+
### Performance, second pass — the backdrop was recomputed on every mouse release (2026-11-01)
|
|
991
|
+
|
|
992
|
+
"超级卡,绝对不止一两百毫秒" … "拖动根本不会刷新" … "碰到屏幕边缘松手百分百闪一下".
|
|
993
|
+
|
|
994
|
+
Measured, the picture was different from the first pass: `_paint` was already fast (1.3ms warm),
|
|
995
|
+
but **every time a drag or resize settled**, `_refresh_backdrop` cost **165ms** — and during the drag
|
|
996
|
+
the backdrop never updated at all, because refresh was debounced to 420ms after release.
|
|
997
|
+
|
|
998
|
+
What was actually slow, in order of payoff:
|
|
999
|
+
|
|
1000
|
+
- **`_ring` built two full-size fill masks and subtracted them**, and every plate needs five or six
|
|
1001
|
+
rings. Rewritten to solve each row's inner and outer x directly and draw two short segments —
|
|
1002
|
+
O(h), no intermediate allocations. 100ms → 3.7ms per plate. (While rewriting it I dropped the
|
|
1003
|
+
`width` argument on the floor: the band came out as "from the edge to `inset`", which made a
|
|
1004
|
+
1px highlight vanish entirely and pushed the inner shade line onto the rim, darkening it. The
|
|
1005
|
+
tell was "the glass has no edge and looks grey". Fixed by solving both boundaries properly.)
|
|
1006
|
+
- **Everything smooth is now built at ¼ scale and upscaled**: curvature weight, dispersion weight,
|
|
1007
|
+
and the bevel weight in `refract`. They are blobs, not detail. Gaussian cost drops 16×.
|
|
1008
|
+
- **The "light" layers are pure geometry** — sheen, rim, inner shade, warm/cool fringes do not
|
|
1009
|
+
depend on the backdrop at all. They are composed once per size into `_light_overlay` and cached;
|
|
1010
|
+
a re-bake now pays one `alpha_composite` instead of six.
|
|
1011
|
+
- Tint and wash are both flat colours over flat colours, so they are blended into a single colour
|
|
1012
|
+
and applied once. Mean luminance is measured on a 48×48 copy (the mean does not care about
|
|
1013
|
+
resolution). 2× supersampled masks downsample with `Image.BOX` instead of LANCZOS.
|
|
1014
|
+
- **The stage is now one full-screen capture at ¼ resolution**, taken at open while the window is
|
|
1015
|
+
still withdrawn. Any later position is a *crop*, never a re-grab — the old "window + margin"
|
|
1016
|
+
stage ran out of bounds whenever the widget was near a screen edge, and falling out of bounds
|
|
1017
|
+
is exactly the "release → hitch → flash" the user was seeing.
|
|
1018
|
+
- **Dragging refreshes live**: `_live_backdrop()` crops from the stage and `_paint_glass_only()`
|
|
1019
|
+
swaps only the panel and the two slabs — the header, bubbles and composer do not move relative
|
|
1020
|
+
to the window and are not redrawn. Throttled to 30ms (the mouse is 120Hz). Two hidden costs fell
|
|
1021
|
+
out of this: `_window_rect()` calls `update_idletasks()`, which silently ran a *full* repaint on
|
|
1022
|
+
every frame (+17ms), and position-only `<Configure>` events repainted the entire window.
|
|
1023
|
+
- Bubble plates are invalidated by their own counter (`chat_glass_ver`), so a small drag no longer
|
|
1024
|
+
re-bakes six bubbles per frame; only panel/slab caches are dropped.
|
|
1025
|
+
- Edge-of-screen windows now only need to *overlap* the stage, not sit inside it; the off-screen
|
|
1026
|
+
part is cropped short and padded. And a settle within 8s of the last capture does not re-capture
|
|
1027
|
+
at all — the stage is refreshed for free while the window is hidden.
|
|
1028
|
+
|
|
1029
|
+
Numbers (665×594 panel, 150% DPI): a panel plate 520ms → **7.7ms**, slab 90 → **0.9ms**, bubble
|
|
1030
|
+
28 → **0.9ms**; `_paint` warm 1.3ms, `_reflow` 0.5ms; **dragging costs 24–28ms per frame (~38fps)
|
|
1031
|
+
where it used to be frozen**; window open 510ms including the full-screen stage.
|
|
1032
|
+
|
|
1033
|
+
### Fixed — optional services must go through `ctx.get()`
|
|
1034
|
+
|
|
1035
|
+
`ctx?.attachments?.saveImage` looks like a runtime probe but throws in a real host: cordis's `ctx`
|
|
1036
|
+
is a Proxy whose `get` trap **throws** `cannot get property "xxx" without inject` when a service was
|
|
1037
|
+
not declared in `inject`. `?.` only guards `null`/`undefined`, not exceptions.
|
|
1038
|
+
|
|
1039
|
+
All optional-service lookups now go through `serviceOf(ctx, name)` (in `src/timer.js`): it prefers
|
|
1040
|
+
`ctx.get(name)` — cordis's documented way to ask for an optional dependency, returning `undefined`
|
|
1041
|
+
when absent — and only falls back to property access inside a `try`.
|
|
1042
|
+
|
|
1043
|
+
### Liquid-glass window, one stream, and a name you can change (2026-11-01)
|
|
1044
|
+
|
|
1045
|
+
Reported as: the scripted lines (warm amber, with a "台词" label) and the assistant's replies (cool
|
|
1046
|
+
grey, labelled "陪看") read like two different people talking in one stream — and the window itself
|
|
1047
|
+
looked like a plain dark panel.
|
|
1048
|
+
|
|
1049
|
+
**One stream, one look.** `ROLE` now maps `line` and `assistant` to the *same* colours, and the head
|
|
1050
|
+
line shows **only the timestamp** — no "台词", no "陪看". Only the user's own messages keep a tint
|
|
1051
|
+
(so you can still tell which side you are on).
|
|
1052
|
+
|
|
1053
|
+
**Timestamps are wall-clock now** (`HH:MM:SS`), for every role. Scripted lines used to show their
|
|
1054
|
+
playback position (`01:26.0`) while everything else showed local time — two time bases in one
|
|
1055
|
+
stream, so reading it meant converting in your head. Seconds are included because a segment runs
|
|
1056
|
+
2–5 minutes and several messages share the same minute; `HH:MM` alone would make the stamps useless
|
|
1057
|
+
for telling them apart. A message with no `at` gets no head line at all (an empty label still eats
|
|
1058
|
+
a full line of height).
|
|
1059
|
+
|
|
1060
|
+
**Liquid glass.** Three things carry the effect, because tkinter cannot blur what is behind it:
|
|
1061
|
+
|
|
1062
|
+
- **24px+ radius** — and `round_rect` no longer uses `smooth=True`, which renders a 22px radius as
|
|
1063
|
+
roughly 14px (it smooths a polygon rather than following an arc). It now samples each corner arc
|
|
1064
|
+
directly.
|
|
1065
|
+
- **A refractive edge**: a 1px inner highlight along the top, plus an outer border split into a lit
|
|
1066
|
+
upper half and a shadowed lower half — what a real piece of glass does.
|
|
1067
|
+
- **Slight window transparency** (`-alpha 0.975`, `DSH_WATCH_GLASS_ALPHA` to tune, ≥1 disables).
|
|
1068
|
+
The desktop shows through just enough to read as glass without competing with the text.
|
|
1069
|
+
|
|
1070
|
+
Buttons and the input field are **pills** now (`Pill` class + a Canvas-backed field): a square
|
|
1071
|
+
"发送" button next to a 24px-rounded panel was the most obviously un-Apple thing left.
|
|
1072
|
+
|
|
1073
|
+
**The title is editable.** Click the name in the header, type, press Enter — saved as `name` in
|
|
1074
|
+
`~/.dsh/watch-window.json` and restored next launch. Committing uses an explicit `_editing` flag
|
|
1075
|
+
rather than `winfo_ismapped()`, which is still `False` on the frame right after `pack()` and would
|
|
1076
|
+
silently swallow a fast Enter.
|
|
1077
|
+
|
|
1078
|
+
**Fixed:** `meta` entries (wake failures, mic status) were falling through to the assistant bubble
|
|
1079
|
+
style — a screenful of `[一起看] 叫醒失败` rendered as full-size cards. They now use the grey
|
|
1080
|
+
one-line `Meta` row that already existed for exactly this.
|
|
1081
|
+
|
|
1082
|
+
**Fixed:** the saved geometry was clamped against `sw - 120` instead of the window's own width, so a
|
|
1083
|
+
700px-wide window could be restored 580px off the right edge.
|
|
1084
|
+
|
|
1085
|
+
### No more self-made "queued messages", one reminder per interjection, and a hideable window (2026-11-01)
|
|
1086
|
+
|
|
1087
|
+
Reported as three things that turned out to be one root cause plus two design gaps.
|
|
1088
|
+
|
|
1089
|
+
**The queue strip.** `wakeSession` delivers through `agent.followup()`, which lands in the host
|
|
1090
|
+
inbox's `next-turn`. DSH's `QueueDock` renders **every** row of `next-turn` and does not filter by
|
|
1091
|
+
`source.kind` — so the plugin's own instructions showed up in the input box as pending messages the
|
|
1092
|
+
user never typed ("插话栏自动出现"). Two consequences fixed here:
|
|
1093
|
+
|
|
1094
|
+
- **The hangup note no longer goes through `followup`.** Closing the window is still a hangup (clock
|
|
1095
|
+
stops, nothing is rebuilt, no lines are spoken), but the explanation is now written into
|
|
1096
|
+
`watch.json` and handed to the model on its next tool result (`takeHangupNote`). The watch loop
|
|
1097
|
+
already has the model blocked inside an interrupted tool call, so nothing is lost — and the queue
|
|
1098
|
+
strip stays empty. `markHungUp(input, env, note)` carries the text; taking it clears it.
|
|
1099
|
+
- **`[未回应]` is emitted once per interjection.** It used to be appended to *every* tool result
|
|
1100
|
+
until the model answered with `say`, so one message from the user could be read as three separate
|
|
1101
|
+
events ("大肥鱼已经重复了"). `noteInterjected` also no longer restarts the clock when the same
|
|
1102
|
+
sentence arrives twice inside the 3-minute TTL.
|
|
1103
|
+
- **The interjection prompt is two sentences, not a wall of ⚠️.** Same requirements
|
|
1104
|
+
(`say` first, `speakNow`, lines in the same call), a fifth of the length — it is rendered in the
|
|
1105
|
+
queue strip, so its size is user-visible.
|
|
1106
|
+
|
|
1107
|
+
### `window: "hide" | "show"` — put the window away without ending the watch
|
|
1108
|
+
|
|
1109
|
+
Closing the window means "I am done watching". Hiding it does not: the process stays alive, the
|
|
1110
|
+
clock keeps running, lines keep being spoken, nothing is marked as hung up. Reported as
|
|
1111
|
+
"如果有其他功能隐藏悬浮窗会更好".
|
|
1112
|
+
|
|
1113
|
+
- `watch_together({ window: "hide" })` writes `hidden: true` into `~/.dsh/watch-window.json`;
|
|
1114
|
+
`window.py` polls its config every 200 ms (`_sync_visible`) and does `withdraw()` / `deiconify()`.
|
|
1115
|
+
`withdraw` rather than `iconify`: an always-on-top floating window should leave no taskbar entry
|
|
1116
|
+
behind.
|
|
1117
|
+
- `openFloatingWindow` clears `hidden` **before any early return**, so a window that was hidden when
|
|
1118
|
+
the process died does not come back invisible.
|
|
1119
|
+
|
|
1120
|
+
### Two-track prefetch (2026-11-01) — subtitles no longer wait for the pictures
|
|
1121
|
+
|
|
1122
|
+
The picture side is the slow one: a segment costs a download plus a scan (10–20 s, 20–90 s for the
|
|
1123
|
+
first), while the text for the same window arrives in a few seconds (site CC: instant; local ASR
|
|
1124
|
+
RTF 0.019 ≈ 6 s per 5-minute segment). They used to be produced and delivered as one package, so
|
|
1125
|
+
the text sat in the slow batch's shadow. Now they are two independent tracks over the **same**
|
|
1126
|
+
batch table and the **same** look-ahead window.
|
|
1127
|
+
|
|
1128
|
+
- **New subtitle track** (`transcribe` → `dsh-video-storyboard/transcript-pass`). Mirrors the picture
|
|
1129
|
+
track line for line: same `plan.indexAt` / `windowAt`, its own `transcribed` set. "Whoever's window
|
|
1130
|
+
is full stops first" falls out of `find()` returning `undefined` — no extra rule.
|
|
1131
|
+
- **Two-part delivery.** When the text lands before its pictures, it is sent on its own
|
|
1132
|
+
(`[一起来看·台词] 03:00–06:00` + one timestamped sentence per line). When the picture batch
|
|
1133
|
+
arrives later it is built with `omitTranscript`, so the cells carry only times and the sentences are
|
|
1134
|
+
not repeated (measured: 17k vs 26k tokens per 2 hours, +50% when repeated).
|
|
1135
|
+
- **`feedTranscriptLeadMs`** (default 0 = send as soon as it lands). Raise it to ~20000 if the
|
|
1136
|
+
two-part delivery feels chatty and you would rather wait for one combined message.
|
|
1137
|
+
- **`transcriptTrack: false`** turns the whole track off.
|
|
1138
|
+
- **Failures don't sink the loop.** A failed transcription is not marked as done, so the next tick
|
|
1139
|
+
retries; three failures in a row blacklist that segment for 10 minutes (a missing ASR service
|
|
1140
|
+
should not be hit every 2 seconds). The picture track is never blocked by it.
|
|
1141
|
+
- **Cross-track timestamps now share one clock.** `transcribedAt` / blacklist times were stamped with
|
|
1142
|
+
`Date.now()` while the tick compares against the injectable `deps.now()`; the difference was
|
|
1143
|
+
negative by a trillion milliseconds, so the "skip for 10 minutes" and "wait N ms before feeding"
|
|
1144
|
+
gates were both permanently bypassed (feeding never fired at all).
|
|
1145
|
+
|
|
1146
|
+
### Experience pass (2026-11-01) — the minutes spent staring at nothing
|
|
1147
|
+
|
|
1148
|
+
Same code, same contract; what changes is what the user sees (or hears) while waiting.
|
|
1149
|
+
|
|
1150
|
+
- **A slow build now says something.** The first batch of a film needs a download plus a scan
|
|
1151
|
+
(20–90 s) and a tool call cannot speak — so the window stayed empty and the only signal was
|
|
1152
|
+
silence. After 4 s of building (`DSH_WATCH_SLOW_BUILD_MS`) one `meta` line is appended to the
|
|
1153
|
+
stream: 「正在取 03:00–06:00 这一段…」. Fast segments write nothing.
|
|
1154
|
+
- **The measured latency is finally used on the main path.** `latency.js` has been calibrating
|
|
1155
|
+
"read position → result ready" for a while, but only the background clock (`shouldSpeak`) spent it;
|
|
1156
|
+
the blocking call still waited until `segment end - lead`, so on the same machine the clock spoke
|
|
1157
|
+
early and the tool call spoke late. `deliveryState` now uses `lead + aheadSeconds`, while the text
|
|
1158
|
+
still reports `lead` (what is pulled earlier is the work, not the sentence).
|
|
1159
|
+
- **Calibration only counts deliveries.** Not-yet calls take tens of milliseconds and are not samples;
|
|
1160
|
+
recording them dragged the EWMA towards zero (and wrote `latency.json` on every poll).
|
|
1161
|
+
- **The last batch is delivered at the tail.** The final segment's due point is `end - lead`, which for
|
|
1162
|
+
the last batch sits past the end of the film — the position never reaches it, so the user watched
|
|
1163
|
+
the ending and got nothing. Reaching/passing `dur - 1` now counts as due.
|
|
1164
|
+
- **`speech` only lists lines that are still ahead.** It used to echo the whole draft, including the
|
|
1165
|
+
lines the same call had just pruned as past — the model read them as "still going to be spoken".
|
|
1166
|
+
- **Delivery guidance trimmed ~45%** (≈1150 → ≈640 chars). It is resent every batch; the loop/pacing
|
|
1167
|
+
rules already live in the tool description, so only the hard rules stay here: write the lines,
|
|
1168
|
+
no spoilers, one sentence, `say` is the only visible channel.
|
|
1169
|
+
|
|
1170
|
+
### Reading pass over the loop (2026-11-01) — six real bugs, one hot path
|
|
1171
|
+
|
|
1172
|
+
No new features. Everything below was found by reading the code against its own comments and then
|
|
1173
|
+
reproducing it; each fix carries a regression test that fails on the old code.
|
|
1174
|
+
|
|
1175
|
+
- **`lastDelivered: null` was read as batch 0.** A delivery blocked by the "no lines yet" gate writes
|
|
1176
|
+
`lastDelivered: null`, and `Number(null)` is `0` — exactly the first batch's start. That batch then
|
|
1177
|
+
counted as already delivered forever: `wait: true` woke up and answered "already delivered", image
|
|
1178
|
+
and manifest never handed over. Empty now stays `NaN`.
|
|
1179
|
+
- **Same film, two URL forms → the loop restarted.** `samePlan` compared the raw `input` string, but the
|
|
1180
|
+
extension reports `…/BV1g3xN6hEuw/?trackid=…&spm_id_from=…` while the model usually holds the clean
|
|
1181
|
+
link. Every second call therefore looked like a new source, wiping `spoken` and re-waking segments
|
|
1182
|
+
that had already been delivered. It now compares `sessionKey()`.
|
|
1183
|
+
- **`dur: null` became `0 s` on the bridge path.** `Number.isFinite(Number(s.dur))` passes for `null`,
|
|
1184
|
+
so a report without a duration set the baseline to 0; the next real reading (600 s) then differed by
|
|
1185
|
+
more than a second and was judged "video changed" — the clock stopped mid-film. `num()` in
|
|
1186
|
+
`position-bridge.js` and the baseline update now treat empty as empty.
|
|
1187
|
+
- **`waitForVideo` lost the hangup.** The input surface is prepared once (`prepared ??=`), and the
|
|
1188
|
+
early pre-warm for `waitForVideo` passed no arguments — so `input`/`open` never reached it. Without
|
|
1189
|
+
`input` the recorded hangup could not be matched, the window was re-opened, and the call went off to
|
|
1190
|
+
wait for a video instead of returning `[hangup]`.
|
|
1191
|
+
- **`dueLine` rewrote `watch.json` on every tick.** Its `dirty` flag was shared across segments: once one
|
|
1192
|
+
batch had pinned its un-timed lines, every later batch was written back unchanged — a full state write
|
|
1193
|
+
every 2 s for the rest of the film. The flag is per segment now.
|
|
1194
|
+
- **`waitUntil` / `waitForRefill` lied about why they stopped.** Breaking out because the user paused (or
|
|
1195
|
+
the film ended) still produced "waited to the cap". The text now names the real reason.
|
|
1196
|
+
|
|
1197
|
+
Hot path, same area:
|
|
1198
|
+
|
|
1199
|
+
- `cachedCues()` re-read and re-parsed the whole subtitle file on every tick (`dueLine` asks several
|
|
1200
|
+
times per tick). It is memoised on `path + size + mtime` now, and returns the **same array** so that
|
|
1201
|
+
`makeLagFn`'s memo can be keyed on array identity. `makeLagFn` additionally sorts once and looks up
|
|
1202
|
+
by binary search instead of a linear scan of every cue. 2000 cues × 5400 lookups: **66.7 ms → 0.8 ms**
|
|
1203
|
+
(×83), and the disk read/parse per tick is gone.
|
|
1204
|
+
- `lines-util.js` had its own `cacheDir()` that fell back to `~/AppData/Local` on every platform, so on
|
|
1205
|
+
Linux/macOS the subtitle cache landed in a directory that does not exist; it now uses the storyboard's
|
|
1206
|
+
`cacheDir()`. `findCachedMedia()` likewise uses `tmpdir()` instead of `LOCALAPPDATA/Temp`.
|
|
1207
|
+
- Dead exports removed: `plan.starts` (a 513-element array allocated on every `makePlan`),
|
|
1208
|
+
`legacySessionKey`, `wasWritten`, `MATERIAL_PARTS`. The input surface failing to start no longer fails
|
|
1209
|
+
the whole call — it is reported in the result instead.
|
|
1210
|
+
|
|
1211
|
+
Three rounds on 2026-10-31. The through-line: the plugin knew something, and the model (or the user)
|
|
1212
|
+
never found out — plus one window that needed to look like something people want to keep on screen.
|
|
1213
|
+
|
|
1214
|
+
### Long-video recap — merged, but opt-in
|
|
1215
|
+
|
|
1216
|
+
PR #2, after one round of review. Its first shape prepended a 420-character `[前情]` to **every**
|
|
1217
|
+
delivery, partly built from the model's own scripted lines: second-hand context in a package whose
|
|
1218
|
+
contract is "raw material only — never retell what the user just watched", at ~200 tokens per
|
|
1219
|
+
segment, with no evidence it helped.
|
|
1220
|
+
|
|
1221
|
+
What shipped instead: off unless `recap: true` or `DSH_WATCH_RECAP=1` (`recap: false` beats the env
|
|
1222
|
+
var); only **cached subtitle sentences**, never the model's lines; `recapSegments` 1–3 (default 2),
|
|
1223
|
+
`recapMaxChars` 80–1200 (default 420); never reads past the current segment, never trims the live
|
|
1224
|
+
transcript, no ASR, no network. Whether it actually reduces retelling is still **unmeasured** — it
|
|
1225
|
+
stays opt-in until somebody measures it.
|
|
1226
|
+
|
|
1227
|
+
### Observability: `statusOnly` can now answer "why is it slow"
|
|
1228
|
+
|
|
1229
|
+
Promised in issue #4. `pos + reason` says *what* the clock thinks, not *where it is stuck*.
|
|
1230
|
+
|
|
1231
|
+
- `segment { index, from, to, delivered, total }` — which batch, its bounds, how many were delivered
|
|
1232
|
+
this session, how many the film has (`total` is `null` when the duration is unknown). The last batch
|
|
1233
|
+
index is taken at `dur - 1 ms`, because a duration that lands exactly on a boundary would otherwise
|
|
1234
|
+
report one batch too many.
|
|
1235
|
+
- `speech { queued, lastLateSec, busyUntil }` — lines still waiting, how late the previous line was
|
|
1236
|
+
(from `dueLine`'s new `meta: true`, which also keeps the plain-string return for old callers), and
|
|
1237
|
+
when the serial voice engine frees up.
|
|
1238
|
+
- `build { inflight, cached, lastMs }` — which batch is being built, how many are cached, how long the
|
|
1239
|
+
last build took. The cache is passed into the loop for reporting only; it never influences a decision.
|
|
1240
|
+
- `queued` needs a disk read, so it is filled in `statusOnly` only, and a failure there is reported as
|
|
1241
|
+
`speech.queueError` instead of being swallowed (the first version of this swallowed a `ReferenceError`
|
|
1242
|
+
from a missing import and looked exactly like "there are no lines").
|
|
1243
|
+
|
|
1244
|
+
### The floating window, rebuilt
|
|
1245
|
+
|
|
1246
|
+
"这个悬浮窗太丑了" — fair. The old one was a borderless frame with a `Text` widget that painted
|
|
1247
|
+
role-coloured **full-width stripes**, on a window Windows stretched from 96 dpi, reading the whole
|
|
1248
|
+
`chat.jsonl` every 200 ms.
|
|
1249
|
+
|
|
1250
|
+
- **Real bubbles.** Each message is its own rounded card (Canvas background + wrapped Label), sized
|
|
1251
|
+
to its content: script lines in amber with a left rule, the model in slate, the user's own words
|
|
1252
|
+
right-aligned in blue. Above each one, a muted line saying who and when (`台词 04:12.3` for a
|
|
1253
|
+
scripted line, `我 21:16` for chat).
|
|
1254
|
+
- **Per-monitor DPI awareness** before the window exists, and every size/font derived from the real
|
|
1255
|
+
scale factor. Unaware Tk windows are bitmap-stretched at 125/150%, which reads as "blurry and wrong".
|
|
1256
|
+
- **Rounded window** via `-transparentcolor` (Windows only; falls back to square corners), a 1 px
|
|
1257
|
+
border, and a hand-drawn 6 px scrollbar that only appears when the list actually scrolls.
|
|
1258
|
+
- **Does not steal focus.** `focus_force()` at startup meant pressing space to pause the video landed
|
|
1259
|
+
in the chat box; now the entry only takes focus inside the window.
|
|
1260
|
+
- **Does not fight your scrolling.** New lines auto-scroll only if you were already at the bottom.
|
|
1261
|
+
- **Incremental read.** Only the bytes appended since the last tick are parsed, and the first paint
|
|
1262
|
+
replays just the last 60 entries.
|
|
1263
|
+
- Resizable from the bottom-right grip; position and size persist in `~/.dsh/watch-window.json`.
|
|
1264
|
+
|
|
1265
|
+
### Stop when the signal says stop: hangup, dead source, switched video
|
|
1266
|
+
|
|
1267
|
+
Reported as "换片或者我都关浏览器了还在念台词" and "关了悬浮窗 AI 还是会自动调出来,根本不会自动结束".
|
|
1268
|
+
Both were the same shape: the plugin knew the source was gone, and kept talking anyway.
|
|
1269
|
+
|
|
1270
|
+
- **Speech now requires a believable position.** The line queue only fired when the position was
|
|
1271
|
+
`fresh`, or `extrapolated` within `SAFETY_AFTER_MS` (20 s — the normal gap between probes).
|
|
1272
|
+
Before, the only thing excluded was `paused`; `estimate()` happily extrapolates a dead source
|
|
1273
|
+
forward and `pos` stays finite, so closing the browser kept reading lines out for minutes.
|
|
1274
|
+
Nothing is spoken on an `unknown` position, and the position-unknown give-up dropped from
|
|
1275
|
+
10 min to 5 min (the watch should not sit there pretending).
|
|
1276
|
+
- **Closing the floating window is a hangup, treated like an interjection.** The window is the only
|
|
1277
|
+
way to talk mid-watch, so closing it means "I'm done":
|
|
1278
|
+
- the clock stops and **really wakes the model** — `wake:false` (the default) used to silence this
|
|
1279
|
+
too, because it shared the `wake` path with the segment-end reminder. User actions (hangup,
|
|
1280
|
+
video changed, video ended, seek, unreadable position, high-frequency mode) now use a separate
|
|
1281
|
+
always-real channel (`wakeSignal`), and the message says **do not call watch_together again and
|
|
1282
|
+
do not read out any more lines**;
|
|
1283
|
+
- the guard is stored on the loop and can be turned on later (`resumed` path used to freeze it,
|
|
1284
|
+
so a window opened by an earlier call was never guarded);
|
|
1285
|
+
- the next tool call **does nothing at all**: no frame, no clock, no window (`[hangup]` result).
|
|
1286
|
+
`sameWatch` previously required `args.input`, which the model never sends — so every call looked
|
|
1287
|
+
like "a new watch" and re-opened the window the user had just closed.
|
|
1288
|
+
- `wakeWithRetry` called an undefined `note()` in its failure branch (a `ReferenceError` swallowed by
|
|
1289
|
+
the ticker). Real wakes can fail, so it was reachable; now it records into `loop.logs`.
|
|
1290
|
+
|
|
1291
|
+
Tests: 247 pass, +4 in `test/hangup-guard.test.mjs` (dead source sends nothing, live source still
|
|
1292
|
+
speaks, hangup wakes with the right wording, post-hangup call is inert).
|
|
1293
|
+
|
|
1294
|
+
### Interjections: speak first, then look
|
|
1295
|
+
|
|
1296
|
+
Reported as "它一声不吭先去 zoom,回来才说话". The root cause was not the model: a normal reply
|
|
1297
|
+
never reaches the floating window — only `say` does and only `say` is spoken. So "think, then look,
|
|
1298
|
+
then answer" was, from the user's side, complete silence for tens of seconds.
|
|
1299
|
+
|
|
1300
|
+
- One wording, one place (`src/interject.js`) for all five entry points (during a build, during the
|
|
1301
|
+
lookahead fill, during a blocking wait, `waitUntil`, `nextLine`). It now says exactly what to do:
|
|
1302
|
+
`watch_together({ say: "我看一眼", speakNow: true })` — one call, words written before any frame
|
|
1303
|
+
is built. `lines` and `say` can ride in the same call, so "台词优先" no longer means "stay silent".
|
|
1304
|
+
- Unanswered interjections are **tracked**: the next tool result ends with `[未回应] …你还没回`,
|
|
1305
|
+
until a call actually carries `say` (expires after 3 min). Previously the reminder existed only
|
|
1306
|
+
inside the message that woke the model, which it had already scrolled past.
|
|
1307
|
+
- `waitUntil` / `nextLine` called a function that **did not exist** (`chatResult`) — an interjection
|
|
1308
|
+
during either wait threw `ReferenceError` and the tool failed. Defined, and it reuses the same wording.
|
|
1309
|
+
- Waiting for a video to appear returned a result **without `text`**, which the host's `output.schema`
|
|
1310
|
+
requires. That path now returns a proper result.
|
|
1311
|
+
|
|
1312
|
+
### Reply vs. scripted line: 12-second guard
|
|
1313
|
+
|
|
1314
|
+
Reported as "说话和插话的回复离太近,把后面那句改一下". Two lines spoken back to back on a serial
|
|
1315
|
+
TTS chain means the second one either drifts or is dropped by the adapter (queue > 3.5 s → `skipped`).
|
|
1316
|
+
|
|
1317
|
+
- `say` now marks the voice engine busy for its full spoken length (`src/reply-guard.js`), so the
|
|
1318
|
+
loop stops feeding scripted lines while a reply is still playing. Previously only the loop's own
|
|
1319
|
+
lines updated that clock — a reply was invisible to it.
|
|
1320
|
+
- Lines scheduled within 12 s of a reply are **withdrawn from the batch and handed back** to the
|
|
1321
|
+
model (`[lines·太近]`) with instructions to rewrite them around what was just said, or drop them.
|
|
1322
|
+
Withdrawn, not silently deleted: the user asked for "改一下", not "少一句".
|
|
1323
|
+
|
|
1324
|
+
### Switching videos is noticed in ~2 s, not ~15 s
|
|
1325
|
+
|
|
1326
|
+
- The per-tick bridge read (every 2 s) now does the switch / end-of-video / big-jump checks, and
|
|
1327
|
+
keeps the `dur`/`url` baseline up to date. Before, all three lived in the 15-second CDP probe
|
|
1328
|
+
branch only, so a switch could go unnoticed for a quarter of a minute — while the clock kept
|
|
1329
|
+
computing segment boundaries against the old film.
|
|
1330
|
+
- The blocking wait in `watch-run` now compares each read against the film it started with and
|
|
1331
|
+
returns `[video-changed]` immediately. **This was the only reliable path**: the loop's wake goes
|
|
1332
|
+
through `followup()`, which is delivered *after* the current tool call returns — and that call was
|
|
1333
|
+
busy waiting.
|
|
1334
|
+
- `sourceSwitched()` centralises the test, and `Number(null) === 0` is explicitly guarded: a
|
|
1335
|
+
not-yet-known duration used to look like a "0-second film" and stop the watch instantly.
|
|
1336
|
+
|
|
1337
|
+
### Cold start: don't wait a full minute for a video we can already identify
|
|
1338
|
+
|
|
1339
|
+
- The extension only reports while the tab is **visible** — and "一起看" is usually typed in another
|
|
1340
|
+
window. The position went stale after 5 s, the plugin concluded "no video", and sat in the 60 s
|
|
1341
|
+
wait. It now falls back to a **stale** sample (up to 2 min) to identify the film, marks the
|
|
1342
|
+
position `stale`, and lets the next fresh reading correct it.
|
|
1343
|
+
- Automatic waiting (no `waitForVideo`) dropped from 60 s to **20 s**; explicit `waitForVideo: true`
|
|
1344
|
+
stays at 120 s.
|
|
1345
|
+
- `probeBrowser()` is skipped when the extension already reports: one probe is `listTargets`
|
|
1346
|
+
(1.2 s) plus up to 8×1.5 s of CDP round-trips — pure overhead for a `browser:` line the extension
|
|
1347
|
+
just answered. The line now reads `browser: extension reporting <title> playing 03:20`.
|
|
1348
|
+
|
|
1349
|
+
Tests: 243 pass (`node --test`), 6 of them new in `test/interject-reply.test.mjs`.
|
|
1350
|
+
|
|
1351
|
+
## [0.1.0] - 2026-11-01
|
|
1352
|
+
首个发布版本。要求 `dsh-video-storyboard@^0.5.11`(字幕轨用到它的 `./transcript-pass` 子路径)。
|
|
1353
|
+
|
|
1354
|
+
## [0.0.7] — 2026-10-31 (first release)
|
|
1355
|
+
The first published version. One tool, `watch_together`: it follows the user's real playback
|
|
1356
|
+
position, hands the model one storyboard + transcript per segment just before that segment ends,
|
|
1357
|
+
and speaks the scripted lines at the second they belong to.
|
|
1358
|
+
|
|
1359
|
+
**Licence: Apache-2.0** (the package was developed under MIT and switched before the first
|
|
1360
|
+
public release, to match `dsh-video-storyboard`). `LICENSE` is the full text, `NOTICE` states
|
|
1361
|
+
what the project deliberately does **not** do — no hosted video, no uploaded position, no DRM or
|
|
1362
|
+
paywall bypass, no bundled TTS engine.
|
|
1363
|
+
|
|
1364
|
+
### Repo hygiene — the extension's manifest and icons were never committed
|
|
1365
|
+
|
|
1366
|
+
`.gitignore` carried `manifest*.json` and `*.png` (meant for CLI artifacts). Those two rules also
|
|
1367
|
+
swallowed `extension/manifest.json` and `extension/icons/*.png`, so a clone would have shipped an
|
|
1368
|
+
extension **with no manifest** — completely broken, and nothing would have failed until someone tried
|
|
1369
|
+
to load it. Both are now force-added, and the ignore rules are anchored (`/*.png`, `/*.meta.json`) so
|
|
1370
|
+
they can only ever catch files at the repo root. Also: `* cookies*.txt` (a pattern with a space, which
|
|
1371
|
+
never matched anything) is gone, `__pycache__` is out of the npm tarball via a new `.npmignore`, and
|
|
1372
|
+
`npm test` no longer requires the sibling `dsh-video-storyboard` checkout — it falls back to the
|
|
1373
|
+
installed copy, so a clone can run the suite.
|
|
1374
|
+
|
|
1375
|
+
### Docs — one page per service, and the stale one is gone
|
|
1376
|
+
|
|
1377
|
+
`docs/WATCH.zh.md` still explained how to configure things around the **OS media session (SMTC)**,
|
|
1378
|
+
which was deleted a while ago: wrong rationale, wrong `confidence` values, wrong defaults. Deleted.
|
|
1379
|
+
Replaced by [`docs/CONFIG.zh.md`](docs/CONFIG.zh.md): ffmpeg → yt-dlp + cookies → subtitles/ASR →
|
|
1380
|
+
browser extension (9377) → debug port (9333) → voice (`voice.json` + `tts.json`) → floating window →
|
|
1381
|
+
cache locations → a one-page troubleshooting table. Every entry says **what breaks if you skip it**.
|
|
1382
|
+
|
|
1383
|
+
`README.md` got a 30-second start, a "what to configure" table, a corrected parameter table
|
|
1384
|
+
(`depth` is auto-by-time now, `lookahead` was missing), a CLI table that matches the 15 real
|
|
1385
|
+
subcommands, a privacy note for the extension, and a dev section. `docs/VOICE.zh.md` gained
|
|
1386
|
+
`state: 'skipped'` and a correction: `at` is a **playback second**, not a wall-clock timestamp.
|
|
1387
|
+
|
|
1388
|
+
### `doctor` — three levels, because "not configured" is not "broken"
|
|
1389
|
+
|
|
1390
|
+
`FAIL` used to be printed for things that are merely "not set up yet": a missing cookie file (only
|
|
1391
|
+
needed for Bilibili), a closed debug port (the extension is the recommended channel), an extension
|
|
1392
|
+
that is loaded but has no video playing. First-run users read that as "something is broken" and went
|
|
1393
|
+
to reinstall the extension. Now: **OK / WAIT / FAIL**, only `plugin` and `ffmpeg` are fatal, and when
|
|
1394
|
+
the extension has checked in but nothing is playing, `doctor` says `READY — 播个视频就能读到位置`
|
|
1395
|
+
instead of "both position channels are down".
|
|
1396
|
+
|
|
1397
|
+
### Performance — the chat watcher no longer re-reads the whole log every 150 ms
|
|
1398
|
+
|
|
1399
|
+
The blocking-wait loop polls `chat.jsonl` every 150 ms. Each poll re-read `readChat()` and parsed
|
|
1400
|
+
every line, so a two-hour session (thousands of entries) was decoding hundreds of KB several times a
|
|
1401
|
+
second, and getting slower the longer the session ran. `makeChatWatcher()` now keeps a byte offset
|
|
1402
|
+
and reads **only what was appended since last time** (falling back to a full re-read if the file
|
|
1403
|
+
shrank, i.e. it was cleared). Measured on a 5000-line log: **0.061 ms per poll, independent of file
|
|
1404
|
+
size**. `appendChat()` also stopped parsing the whole log to keep `at` monotonic — it reads the last
|
|
1405
|
+
4 KB instead.
|
|
1406
|
+
|
|
1407
|
+
### Tool description — pacing is now a rule the model can follow
|
|
1408
|
+
|
|
1409
|
+
`watch_together`'s description tells the model to keep lines **≥ 6 s apart** and why: speech is
|
|
1410
|
+
serialized, so a denser draft is thinned at runtime (engine busy → next line held; past the late
|
|
1411
|
+
grace → dropped). The three previous rounds of "台词太早 / 太密" all came from the model not knowing
|
|
1412
|
+
this budget.
|
|
1413
|
+
|
|
1414
|
+
### Fixed — speech piled up in the engine queue, and an interjection could no longer break a blocked wait
|
|
1415
|
+
|
|
1416
|
+
Two reports in one message: "吐字太快,台词会挤到一起,只有上一句念完才到下一句,话太密会导致语音越来越
|
|
1417
|
+
滞后" and "悬浮窗插话不能让他从等待中出来 —— 这个功能之前是好的".
|
|
1418
|
+
|
|
1419
|
+
**The voice queue.** `examples/voice-edge-tts` chains every `due` event onto an unbounded serial promise
|
|
1420
|
+
("two lines never overlap"). Lines are now scheduled at the right second, so when they arrive faster
|
|
1421
|
+
than the engine can speak them the chain simply grows: speech drifts further from the picture with
|
|
1422
|
+
every line, and the caption (written on `spoken`) drifts with it.
|
|
1423
|
+
|
|
1424
|
+
- `src/watch-loop.js` — the clock now keeps a **voice budget**: after handing out a line it records
|
|
1425
|
+
`voiceBusyUntil = now + speechSeconds(len)` and will not hand out the next one while the engine is
|
|
1426
|
+
still talking. A line that misses its window by more than the late grace is dropped by `dueLine`
|
|
1427
|
+
as usual: **speak one line less rather than one line later**.
|
|
1428
|
+
- `src/speech.js` — `speechSeconds(chars)`: full spoken duration (`0.35 + chars/5`, 0.8–30 s).
|
|
1429
|
+
`speechLag()` stays as it was — that one answers "when may I start talking", this one answers
|
|
1430
|
+
"how long is the engine busy".
|
|
1431
|
+
- `examples/voice-edge-tts` — safety net: if a queued line has been waiting more than 3.5 s it is
|
|
1432
|
+
**abandoned** (logged) instead of spoken, and the queue empties immediately.
|
|
1433
|
+
- `src/speech-bus.js` / `src/chat-store.js` — a fourth state, `skipped`: the adapter reports that it
|
|
1434
|
+
gave up on a line, and `attachSpeechToChat` cancels the pending fallback timer for it. Without this
|
|
1435
|
+
the 2.5 s fallback would paint a caption for a line that was never spoken.
|
|
1436
|
+
|
|
1437
|
+
**The interjection.** `chat.jsonl` is a **consuming** channel: `poll()` marks a message read. The
|
|
1438
|
+
blocking wait and the watch loop share one watcher, and the loop's handler is `followup()` — which
|
|
1439
|
+
cannot interrupt a session that is sitting inside a tool call (the message is only processed when
|
|
1440
|
+
the turn ends). So whichever polled first decided the outcome, and the loop (every 2 s) sometimes
|
|
1441
|
+
won: the interjection was swallowed, the wait's `poll()` never saw it, and the user's "stop, I have a
|
|
1442
|
+
question" did nothing until the segment ended.
|
|
1443
|
+
|
|
1444
|
+
- `src/interrupt.js` — `enterChatWait()` / `chatWaiterCount()`: whoever is blocking on purpose
|
|
1445
|
+
**owns** the channel. `raceChat()` (storyboard build, prefetch) registers too.
|
|
1446
|
+
- `src/watch-loop.js` — `wakeOnChat` is skipped entirely while `chatWaiterCount() > 0`. The wake path
|
|
1447
|
+
still works when the model is idle (no waiter), which is its whole purpose.
|
|
1448
|
+
- `src/watch-run.js` (the `wait: true` loop), `src/watch-modes.js` (`waitUntil` / `waitForRefill` /
|
|
1449
|
+
`nextLine`), `src/watch-source.js` (`waitForVideo`) — all register as waiters for the duration of
|
|
1450
|
+
their loop.
|
|
1451
|
+
|
|
1452
|
+
Tests: `test/lines-timing.test.mjs` (engine busy → next line is not handed out; the overdue one is
|
|
1453
|
+
dropped), `test/chat.test.mjs` (`skipped` writes nothing, not even the fallback),
|
|
1454
|
+
`test/interject-anywhere.test.mjs` (the loop must not consume while a waiter is active; counter
|
|
1455
|
+
cannot go negative).
|
|
1456
|
+
|
|
1457
|
+
### Fixed — scripted lines came out like a machine gun, and minutes before the picture
|
|
1458
|
+
|
|
1459
|
+
Reported as: "台词出现时间早了很多,而且和机关枪一样突突突一下出来一大堆,时间点都比视频早了".
|
|
1460
|
+
|
|
1461
|
+
The line queue is ordered by `at` (the second of the video this line is *for*) and fired by playback
|
|
1462
|
+
position, so the pacing is only as good as the `at` values. When a line was written **without** `at`
|
|
1463
|
+
(the model wrote prose only), `pinTimes()` decided when it would be said — and it took *the first N
|
|
1464
|
+
subtitle sentence starts of the segment*. Sixteen lines written for a 3-minute segment were therefore
|
|
1465
|
+
all packed into its first 62 seconds (181.6 → 244.2, measured on the live queue), i.e. one every
|
|
1466
|
+
2–3 seconds: the clock ticks every 2 s and hands out at most one line per tick, which is exactly the
|
|
1467
|
+
"machine gun". The last 14 of them ran one to two minutes ahead of the picture they describe.
|
|
1468
|
+
|
|
1469
|
+
- `src/watch-lines.js` `pinTimes()` — each line now aims at its **even share of the segment**
|
|
1470
|
+
(`from + i*size/n`) and snaps to the nearest subtitle start within half a slot, so the queue is
|
|
1471
|
+
spread over the whole segment instead of stacked at its head. Falls back to the even share when no
|
|
1472
|
+
start is close enough, and **never goes backwards** (the old tail fallback could emit 152.8 → 150).
|
|
1473
|
+
- `src/watch-lines.js` `dueLine()` — pinning uses **the segment that line belongs to** (`sizeOf`),
|
|
1474
|
+
not the segment the user happens to be in. With the 1/2/3/4/5-minute ramp, a 60-second slot pinned
|
|
1475
|
+
with a 300-second size put its last lines outside the segment entirely.
|
|
1476
|
+
- `src/watch-lines.js` `saveLines()` — `at` given as **subtitle text** was resolved only against
|
|
1477
|
+
`recallSegments()`, which is a 4-entry in-process cache (empty in a fresh process, and lines are
|
|
1478
|
+
usually written in a different turn). A miss silently became "no `at`", i.e. the head of the
|
|
1479
|
+
segment — the other half of "the line is way too early". Now it reads the on-disk
|
|
1480
|
+
`subs-<key>.json` cache first, then falls back to memory, then to a fuzzy match (≥60 % of the
|
|
1481
|
+
characters), and only then warns.
|
|
1482
|
+
- `src/watch-run.js` — the delivery note pruned "past" lines with `Number(l.at)`, and
|
|
1483
|
+
`Number(null) === 0`: **every line without `at` was judged as second 0 and deleted** at delivery.
|
|
1484
|
+
The note now previews the same pinning the clock will use, so the reported "earliest …" time is the
|
|
1485
|
+
real one, and only lines whose *actual* time has passed are dropped (by text).
|
|
1486
|
+
- `src/watch-run.js` — the note now lists the landing times it will use (`[lines] 落点:…`) and warns
|
|
1487
|
+
when the average gap is under 6 s, instead of leaving the model to guess its own pacing.
|
|
1488
|
+
- `src/watch-loop.js` — with the extension as the position source, the anchor is now re-read **every
|
|
1489
|
+
tick** (a small local JSON, not CDP). Between the 15-second probes the clock extrapolated blindly,
|
|
1490
|
+
so after a pause the lines up to 15 s ahead were spoken **early** — extrapolation is bounded for
|
|
1491
|
+
lateness but nothing guarded earliness.
|
|
1492
|
+
- `src/latency.js` `aheadSeconds()` — returns 0 instead of `NaN` when `ms` is missing. `NaN` made
|
|
1493
|
+
`pos` `NaN`, every comparison false, and `shouldSpeak()` reported "due" for the first unspoken
|
|
1494
|
+
segment at every tick.
|
|
1495
|
+
|
|
1496
|
+
Tests: `test/pin-times.test.mjs` (the 16-line packing regression, monotonic fallback, cues bunched at
|
|
1497
|
+
the head), `test/watch-lines.test.mjs` (per-segment size, `at` from the on-disk subtitle cache),
|
|
1498
|
+
`test/lines-timing.test.mjs` (a stuck video must not speak the next line early).
|
|
1499
|
+
|
|
1500
|
+
### Fixed — the caption appeared before the voice, because it waited on `due` instead of "actually speaking"
|
|
1501
|
+
|
|
1502
|
+
`attachSpeechToChat` wrote a line into `chat.jsonl` the moment `due` fired. But `due` only means
|
|
1503
|
+
"it is time to say this": synthesis still has to happen (edge-tts does a network round trip, then a
|
|
1504
|
+
fresh `ffplay` process — 0.6–2 s even for a short sentence). The floating window polls that file, so
|
|
1505
|
+
the text was already on screen a beat before anything was heard.
|
|
1506
|
+
|
|
1507
|
+
Delaying the voice instead (`speechLag`) would align the two, but push the voice further from the
|
|
1508
|
+
picture, which is the one thing this plugin cannot trade away. So the **caption** moves:
|
|
1509
|
+
|
|
1510
|
+
- `src/speech-bus.js` — a third state, `spoken`, plus `emitSpoken(event)` for engines to report
|
|
1511
|
+
"audio is starting now". The adapter API gains `emitSpoken`.
|
|
1512
|
+
- `src/chat-store.js` — writes on `spoken` when a `voice: true` subscriber exists; still writes on
|
|
1513
|
+
`due` when nobody will speak (the zero-dependency path must not go mute); falls back after
|
|
1514
|
+
`fallbackMs` (2.5 s, `DSH_WATCH_CAPTION_FALLBACK_MS`) for adapters that never report.
|
|
1515
|
+
Pairing is by `at|text`, not by `seq` — `spoken` is a **new** event, so `emitSpeech` gives it a
|
|
1516
|
+
new sequence number.
|
|
1517
|
+
- `examples/voice-edge-tts` — reports `spoken` right before playback starts (i.e. after synthesis).
|
|
1518
|
+
- `examples/floating-chat/window.py` — polls every 200 ms instead of 400 ms; the poll interval is
|
|
1519
|
+
the residual "text lags the voice" gap.
|
|
1520
|
+
|
|
1521
|
+
`test/chat.test.mjs` covers both new paths (waits for `spoken`; falls back when nobody reports, and
|
|
1522
|
+
does not write twice if `spoken` arrives afterwards).
|
|
1523
|
+
|
|
1524
|
+
### Fixed — scripted lines never reached the chat window without a voice engine
|
|
1525
|
+
|
|
1526
|
+
`watch-loop.js` consumed the due line inside `if (speechSubscribers() > 0)`. That helper counts only
|
|
1527
|
+
`voice: true` subscribers (real engines), while `attachSpeechToChat` — the one that writes lines into
|
|
1528
|
+
`chat.jsonl`, which is exactly what the floating window reads — subscribes with `voice: false`.
|
|
1529
|
+
So with no voice adapter, or one that failed to load, a scripted line was **never taken from the
|
|
1530
|
+
queue at all**: not spoken, not displayed, and the queue silently accumulated.
|
|
1531
|
+
|
|
1532
|
+
Display and speaking are two separate things. The line is now handed out at its due moment
|
|
1533
|
+
regardless: `emitSpeech` delivers it to every subscriber, and only a real `voice: true` subscriber
|
|
1534
|
+
counts as "said" (`if (speechSubscribers() > 0) return;` still stops the wake, so nothing changes
|
|
1535
|
+
when a voice engine *is* attached).
|
|
1536
|
+
|
|
1537
|
+
`test/lines-to-chat.test.mjs` covers both sides. The test was checked against the bug: restoring the
|
|
1538
|
+
old condition makes the no-voice case fail while the with-voice case still passes.
|
|
1539
|
+
|
|
1540
|
+
### Changed — `say` no longer reads as "only to answer an interjection"
|
|
1541
|
+
|
|
1542
|
+
It always worked at any moment: it writes the sentence into the shared stream and hands it to
|
|
1543
|
+
whoever listens for speech, exactly like a scripted line. But the description ended with
|
|
1544
|
+
"use it to answer an interjection", which reads as "only after the user speaks". A model follows
|
|
1545
|
+
that literally, so the one path for saying something **unprompted** went unused.
|
|
1546
|
+
|
|
1547
|
+
The description now says any time, and says it explicitly: something in the picture strikes you,
|
|
1548
|
+
the user asks something, a thought lands while waiting for the next batch — plus
|
|
1549
|
+
"do not wait for the user to speak first". It also states the cost, because that is what makes it
|
|
1550
|
+
usable mid-wait: no position read, no frame built, no batch advanced, one round trip.
|
|
1551
|
+
|
|
1552
|
+
`test/say.test.mjs` pins the wiring — parameter → stream (one `assistant` row with `say: true`) →
|
|
1553
|
+
speech event with `origin: 'chat'`, no image, no state advanced. The store layer was already covered
|
|
1554
|
+
by `test/chat.test.mjs`; the uncovered part was the parameter entry itself.
|
|
1555
|
+
|
|
1556
|
+
### Added — an end-to-end test for "talk while the frame is building"
|
|
1557
|
+
|
|
1558
|
+
The mechanism already existed (`raceChat(buildSegment(...))` in `runWatchPass`), and
|
|
1559
|
+
`test/interrupt.test.mjs` covered `raceChat` itself — but the `built.kind === 'interrupted'`
|
|
1560
|
+
branch had **no** coverage. If a refactor ever dropped the wrapper, or `chatWatcherShared()` got
|
|
1561
|
+
replaced with a fresh watcher per call, every existing test would still pass.
|
|
1562
|
+
|
|
1563
|
+
`test/interject-build.test.mjs` builds a segment that takes 1.2 s, writes a user message at 0.2 s,
|
|
1564
|
+
and asserts all four things at once: the call returns before the build finishes, it carries that
|
|
1565
|
+
exact message, it carries no image, and the build still completes into the cache afterwards.
|
|
1566
|
+
|
|
1567
|
+
### Changed — three implicit couplings now have exactly one source each
|
|
1568
|
+
|
|
1569
|
+
A pass over the module boundaries. Same behaviour except the `lead` fix at the end, which was a
|
|
1570
|
+
real bug: the parameter only worked on one of the three paths that used it.
|
|
1571
|
+
|
|
1572
|
+
- **`handler.js` stopped preparing UI.** The floating window, the chat service and the "where do I
|
|
1573
|
+
type" note moved to `input-surface.js` (`createInputSurface()`). `handler` is a router again —
|
|
1574
|
+
three exits: quick action, one pass, start the loop. The `widgetNote` variable no longer travels
|
|
1575
|
+
from the top of the function to the bottom.
|
|
1576
|
+
- **`watch-run.js` has one return shape.** Eleven exits each used to build their own ten-field
|
|
1577
|
+
object; now they all call one `pass()` closure. Adding a field is one edit instead of eleven, and
|
|
1578
|
+
a branch can no longer quietly forget one.
|
|
1579
|
+
- **One segment length.** `watch-state.js` exported `WATCH_SEGMENT = 120` while `batches.js`
|
|
1580
|
+
declared `DEFAULT_SEGMENT = 300`; whichever fallback fired first decided how long a segment was.
|
|
1581
|
+
`batches.js` is now the only source, and `WATCH_SEGMENT` is gone.
|
|
1582
|
+
- **One lead.** The delivery lead was hardcoded in three places: `batches.from()` produced
|
|
1583
|
+
`sayAt = to - 15`, `watch-loop.js` passed `lead: 15` to `shouldSpeak`, and only `watch-run.js`
|
|
1584
|
+
actually read `args.lead`. Segments no longer carry `sayAt`; `shouldSpeak` computes `to - lead`,
|
|
1585
|
+
and `startWatchLoop` takes `lead` from the caller. `lead: 60` now really moves the trigger point
|
|
1586
|
+
(checked against a 300 s segment: at 241 s, `lead=15` stays quiet, `lead=60` fires).
|
|
1587
|
+
|
|
1588
|
+
### Removed — no more auto-launched browsers, no more browser widget
|
|
1589
|
+
|
|
1590
|
+
Both were early paths from before the browser extension existed. Neither could produce a position
|
|
1591
|
+
for the tab the user is actually watching, so both are gone rather than kept as fallbacks.
|
|
1592
|
+
|
|
1593
|
+
- **Auto-launching a browser**: `ensureWatchBrowser()` (`launchBrowser` + `waitForPort`), the
|
|
1594
|
+
`autoLaunch` flag on `runWatchPass`, the `attachOnly` parameter, and the `launchBrowser: true`
|
|
1595
|
+
branch in `~/.dsh/video.json`. The extension already reports `currentTime` every second from the
|
|
1596
|
+
page the user is on; opening a second Edge with its own profile never helped that page. When no
|
|
1597
|
+
position can be read the tool now asks "how far are you" instead of starting a program.
|
|
1598
|
+
- **The browser widget page**: `GET /widget`, `WIDGET_PAGE`, `openWidgetInBrowser()`, `widgetUrl()`,
|
|
1599
|
+
and the `documentPictureInPicture` button in the chat page. The input box is the native tkinter
|
|
1600
|
+
window (`examples/floating-chat/window.py`); the HTML page stays as a read-only fallback at `/`
|
|
1601
|
+
(`chatPageUrl()`), and is never opened automatically.
|
|
1602
|
+
- **Dead parameters**: `wakeOnLinesEmpty` (the handler never passed it, so its 30-line branch in
|
|
1603
|
+
`watch-loop.js` could never run), `title` (nothing in `src/` or in storyboard read it), and
|
|
1604
|
+
`segmentStart()` (every caller uses `plan.segmentAt()`). Parameter count 36 → 34.
|
|
1605
|
+
|
|
1606
|
+
### Fixed — interjections used to get swallowed (four different ways)
|
|
1607
|
+
|
|
1608
|
+
The interjection path was the one place where losing user input was silent: nothing crashed, nothing
|
|
1609
|
+
logged, the words just never arrived. All four ways of losing them are now closed, and each one has
|
|
1610
|
+
a regression test (`test/cli-interrupt.test.mjs` — the CLI had **no** test coverage before this).
|
|
1611
|
+
|
|
1612
|
+
- **Between two `cue` runs.** Every `cue` is a fresh process, and the watcher took "however many
|
|
1613
|
+
lines exist right now" as its baseline — so anything the user typed while the model was thinking,
|
|
1614
|
+
building a segment or replying was never read by anyone. The read position now lives in
|
|
1615
|
+
`<watch>/chat-cursor.json`: a `cue` starts from where the last one stopped, and delivers what it
|
|
1616
|
+
finds the moment it enters the wait. Baseline is persisted as soon as it is established, because a
|
|
1617
|
+
`cue` that hears nothing (the common case) otherwise leaves no cursor for the next one.
|
|
1618
|
+
- **Two messages arriving in the same poll.** Both watchers (chat box and host session file) marked
|
|
1619
|
+
the whole batch as read and reported only the first, so the second was gone. They now consume up
|
|
1620
|
+
to the message they hand over and no further — "reply first, then take the next one".
|
|
1621
|
+
- **Wrong conversation.** `findActiveSessionFile()` took the most recently modified session jsonl
|
|
1622
|
+
across *all* projects, so a chat in another window could interrupt the watch session. It now
|
|
1623
|
+
prefers the project matching the current directory and only falls back to global when that one has
|
|
1624
|
+
no active session.
|
|
1625
|
+
- **The host writing old messages late.** WorkBuddy flushes a user's message into the session file
|
|
1626
|
+
*after* the reply to it. The watcher saw new bytes and treated them as a fresh interjection —
|
|
1627
|
+
interrupting the current turn with the message that started it. Messages whose `timestamp`
|
|
1628
|
+
predates the watcher are now ignored.
|
|
1629
|
+
|
|
1630
|
+
Also in this path: interjections heard via the host input box are appended to the chat stream too
|
|
1631
|
+
(they used to appear only in `cue`'s stdout, so the page showed a stream with a hole in it); the
|
|
1632
|
+
chat page puts the words back in the input box when a send fails instead of losing them; and
|
|
1633
|
+
`POST /api/say` answers `ok:false` for requests it did not write, which is what makes that recovery
|
|
1634
|
+
possible.
|
|
1635
|
+
|
|
1636
|
+
### Fixed — `cue` and `say`
|
|
1637
|
+
|
|
1638
|
+
- `cue` no longer waits forever when the video changes underneath it. It compared against the
|
|
1639
|
+
segment delivery point of the *old* video, and if the new one was shorter, `deliverAt` was a
|
|
1640
|
+
position that would never be reached. It now detects a changed URL or duration and exits with
|
|
1641
|
+
`VIDEO-CHANGED` (pending lines are saved under the old source), and exits with `REWIND` when the
|
|
1642
|
+
user drags the progress bar back more than a minute — the model should hear about that instead of
|
|
1643
|
+
sitting on lines written for a position the user left.
|
|
1644
|
+
- Two `cue` processes can no longer run at once: a state file saying `blocking` with a **live** pid
|
|
1645
|
+
is refused with `BUSY` (exit 1). A dead pid is taken for what it is — the residue of a killed run —
|
|
1646
|
+
and does not block anything. `check` mode is read-only and never takes the lock.
|
|
1647
|
+
- `check` mode no longer leaves `cue-state.json` at `blocking`, which used to make the next run
|
|
1648
|
+
report "last wait was killed externally" for a run that was never waiting.
|
|
1649
|
+
- `say` called edge-tts once by hand and then again inside `speak()` (twice the synthesis, and the
|
|
1650
|
+
manual attempt passed the raw configured voice, so a SAPI-style name like `Huihui` never matched
|
|
1651
|
+
and silently fell back). It now calls `speak()` once, which does the mapping and the fallback.
|
|
1652
|
+
- `voices` was advertised in `help` and crashed with `cmdVoices is not defined` when called. It now
|
|
1653
|
+
lists the SAPI voices plus whether edge-tts is present and which voice is configured — the first
|
|
1654
|
+
place to look when "why am I still hearing the navigation lady" comes up.
|
|
1655
|
+
|
|
1656
|
+
### Added — talk instead of type: a microphone button in the floating window
|
|
1657
|
+
|
|
1658
|
+
`examples/floating-chat/mic.py` is a separate process the window starts from its `麦` button. It
|
|
1659
|
+
listens, cuts what you say into utterances with the Silero VAD already sitting in `models-sherpa/`,
|
|
1660
|
+
transcribes each one, and writes it into the **same** `chat.jsonl` the typing path uses — so a
|
|
1661
|
+
running `cue` picks it up through the interjection cursor and the model answers without anyone
|
|
1662
|
+
typing a character. Measured end to end on this machine (i9-12900HX, int8 paraformer):
|
|
1663
|
+
|
|
1664
|
+
- one model instance ≈ **284 MB** working set, loads in ~2 s
|
|
1665
|
+
- a 3 s utterance transcribes in **0.15 s**; a 45 s one in ~1.2–3.3 s (RTF ≈ 0.05, 20× realtime)
|
|
1666
|
+
- concurrent transcription barely queues: a 3 s short request takes 0.14 s even while a 45 s
|
|
1667
|
+
transcription is running
|
|
1668
|
+
|
|
1669
|
+
**It runs its own model by default** (`--engine local`), which is the answer to "can ASR run twice":
|
|
1670
|
+
yes, and it is cheap. It also means the microphone never waits behind a video transcription. The
|
|
1671
|
+
existing service cannot offer that yet — see the note below. `--engine http` shares port 8000
|
|
1672
|
+
instead, saving 284 MB at the cost of queuing behind long audio.
|
|
1673
|
+
|
|
1674
|
+
**It refuses to hear itself.** The agent speaks through speakers; the microphone hears it; without a
|
|
1675
|
+
guard that gets transcribed as if the user had said it, and the model answers its own line forever.
|
|
1676
|
+
Every utterance is checked against `quiet-until.json` (the same window `say` and `cue` already take
|
|
1677
|
+
before speaking) and dropped if the agent is talking.
|
|
1678
|
+
|
|
1679
|
+
### Added — acoustic echo cancellation, so the microphone hears you and not the computer
|
|
1680
|
+
|
|
1681
|
+
`examples/floating-chat/aec.py`: the microphone picks up whatever the speakers are playing, which
|
|
1682
|
+
means the video's narration gets transcribed as if you had said it. Since neither `speexdsp` nor
|
|
1683
|
+
`webrtc-audio-processing` builds on this machine (no C compiler, no wheels), this is a frequency-domain
|
|
1684
|
+
adaptive filter (overlap-save FDAF, power-normalised NLMS) in numpy — one FFT per 32 ms frame.
|
|
1685
|
+
|
|
1686
|
+
It captures the **loopback** channel (what the computer is playing, auto-detected as the
|
|
1687
|
+
speaker/loopback device, never "stereo mix" — that one can contain the microphone too) and subtracts
|
|
1688
|
+
the estimated echo from the microphone. On top of that, an utterance whose energy drops below
|
|
1689
|
+
`--echo-gate` (default 30 %) after cancellation is discarded outright: that is the hard guarantee
|
|
1690
|
+
that pure-echo segments are never transcribed, whatever the filter is doing.
|
|
1691
|
+
|
|
1692
|
+
Two things that mattered more than the filter itself:
|
|
1693
|
+
|
|
1694
|
+
- **Double-talk detection cannot compare against the echo estimate.** At startup the filter is zero,
|
|
1695
|
+
so the estimate is zero, so "mic > 2 × estimate" is always true, so the filter freezes and never
|
|
1696
|
+
converges (first version: 498 frames frozen, 0 dB). It now compares against the **reference**
|
|
1697
|
+
signal (Geigel-style), which does not depend on the filter's state.
|
|
1698
|
+
- **Measured on a synthetic but honest mixture** (real speech as the video, a different real speech
|
|
1699
|
+
segment as you, through a 150 ms-delayed reverberant echo path):
|
|
1700
|
+
ERLE **13.6 dB** during echo-only passage; the video's words in the transcript went from **25 % →
|
|
1701
|
+
0 %**, and an 8 s passage with nothing but video audio produced **no transcription at all**.
|
|
1702
|
+
|
|
1703
|
+
Tunables: `--dt-ratio` (1.4 — mic peak vs reference peak before the filter freezes), `--taps`
|
|
1704
|
+
(8192 ≈ 512 ms of reverb tail), `--echo-gate`, `--no-aec`, `--loopback`.
|
|
1705
|
+
|
|
1706
|
+
Honest limits: it is a software AEC, not magic. The first second or two of your speech, right as the
|
|
1707
|
+
filter re-converges after you start talking, is where the damage shows (a few characters in the test
|
|
1708
|
+
above). Speaker loudness and room reverb both make it harder. **Headphones remove the problem
|
|
1709
|
+
entirely** — with headphones there is no echo to cancel, and everything above is unnecessary.
|
|
1710
|
+
|
|
1711
|
+
### Added — a browser extension, so you never open a special window again
|
|
1712
|
+
|
|
1713
|
+
Position used to require a browser started with `--remote-debugging-port`, and Chromium 136+ refuses
|
|
1714
|
+
that flag on the default profile — so users had to keep a second, separate browser window open just
|
|
1715
|
+
for watching. That was the whole reason this package felt like it needed a "special browser".
|
|
1716
|
+
|
|
1717
|
+
`extension/` is an MV3 extension that reads `<video>.currentTime` from the page you are actually
|
|
1718
|
+
watching and POSTs it to the plugin's own localhost server (`127.0.0.1:9377/api/position`). After a
|
|
1719
|
+
one-time install it works in **your normal browser**, with your bookmarks and your logins.
|
|
1720
|
+
|
|
1721
|
+
- `src/position-bridge.js` — the receiving end: writes each report to
|
|
1722
|
+
`<cache>/position.json` (temp file + atomic rename) and treats anything older than 5 s as absent.
|
|
1723
|
+
It goes through a file rather than memory because the CLI is a **different process** and has to
|
|
1724
|
+
be able to read it too.
|
|
1725
|
+
- `POST /api/position` and `GET /api/position` on the existing chat server, with CORS and a
|
|
1726
|
+
Private-Network-Access opt-in (a page on https://bilibili.com talking to 127.0.0.1 needs both).
|
|
1727
|
+
- `readPositionOrNull()` now tries the extension report when CDP is not configured or returns
|
|
1728
|
+
nothing, so every existing call site gets the new channel for free.
|
|
1729
|
+
- `doctor` grew an `extension` row and now treats "either channel works" as ready instead of
|
|
1730
|
+
insisting on the debug port.
|
|
1731
|
+
- `docs/BRIDGE.zh.md` — step-by-step install guide written for someone who has never heard of a
|
|
1732
|
+
manifest file, including the eight failure modes people actually hit.
|
|
1733
|
+
- `node watch.mjs install-extension` (and `scripts/install-extension.cmd`) does everything that
|
|
1734
|
+
*can* be automated: copies the extension to `%LOCALAPPDATA%\\dsh-watch-together\\extension` so it
|
|
1735
|
+
survives moving the repo, puts that path on the clipboard, and opens `edge://extensions`.
|
|
1736
|
+
The last three clicks cannot be automated — Chrome 137 removed `--load-extension` from branded
|
|
1737
|
+
builds and extension installs are HMAC-protected, deliberately, because silent install is the
|
|
1738
|
+
malware channel. The guide says so plainly instead of pretending otherwise.
|
|
1739
|
+
- **The extension now says hello on load** (`POST /api/hello`, persisted as `extension.json`).
|
|
1740
|
+
Without it, "extension not installed" and "installed but no video playing" look identical from the
|
|
1741
|
+
outside — both are silence. `doctor` and `bridge` can now tell them apart.
|
|
1742
|
+
- `extension/welcome.html` opens on install/update: the three verification steps, plus what each
|
|
1743
|
+
popup state means. Install is the one moment the user has no idea what to expect.
|
|
1744
|
+
- `install-extension` no longer just prints and quits: it keeps the window open and **watches until
|
|
1745
|
+
the extension proves it is loaded** (`✓ 扩展装上了`), then until a real position arrives
|
|
1746
|
+
(`✅ 全部完成`). One double-click now covers install *and* verification, and the window cannot
|
|
1747
|
+
vanish mid-instruction because it is still polling.
|
|
1748
|
+
- `node watch.mjs install-extension --steps` re-prints just the three clicks without touching any
|
|
1749
|
+
file — for when the window scrolled past or was closed.
|
|
1750
|
+
- `install-extension` now waits for Enter when it has a TTY, so the instructions cannot vanish
|
|
1751
|
+
before being read (running it from an IDE "Run" button has no TTY, which is the common way this
|
|
1752
|
+
happened).
|
|
1753
|
+
- `ensureWatchBrowser(port, url)` now passes the film through: with `launchBrowser: true`, saying
|
|
1754
|
+
"陪我看这个 <link>" opens the dedicated window **at that link** instead of the Bilibili homepage.
|
|
1755
|
+
That is the zero-install path — no extension, no port config, at the cost of watching in that
|
|
1756
|
+
window. Both paths coexist; neither requires the other.
|
|
1757
|
+
- `node watch.mjs bridge` (and `scripts/bridge.cmd`) starts just the position receiver and says
|
|
1758
|
+
"✓ 收到上报" on the first report. Without it, a user who installs the extension and immediately
|
|
1759
|
+
looks at the popup sees "not connected" — because the server only runs during `watch_together`
|
|
1760
|
+
or `watch.mjs chat`, and concludes the install failed.
|
|
1761
|
+
|
|
1762
|
+
### Added — closing the remaining "no one is listening" dead ends
|
|
1763
|
+
|
|
1764
|
+
- **Idle stop now wakes the model too.** Video-ended and video-changed already did; idle ("no movement
|
|
1765
|
+
for two segments") did not — and since the loop is stopped, nothing polls the chat box afterwards,
|
|
1766
|
+
so anything the user said next went nowhere. Now it wakes and says where it stopped.
|
|
1767
|
+
- **Waiting is polled, not slept through.** The 500 ms tick in the blocking wait now uses
|
|
1768
|
+
`sleepWithChat`, so a message is noticed within ~150 ms instead of up to 500 ms later.
|
|
1769
|
+
- **The tool description now tells the model what an interruption is:** a result carrying `chat` means
|
|
1770
|
+
"answer them first, then call again with the same arguments — the wait resumes, nothing is lost, and
|
|
1771
|
+
the image is already in the cache". Without this the model had no way to know.
|
|
1772
|
+
- **`doctor` distinguishes "nobody is receiving" from "extension not connected".** Both look like
|
|
1773
|
+
silence, and the old wording told the user to reinstall the extension — but if no server is running
|
|
1774
|
+
on 9377 the extension cannot report at all, and reinstalling would have changed nothing.
|
|
1775
|
+
- Stale SMTC-era wording removed from the strings the *model* reads (`input`/`cursor`/`title`
|
|
1776
|
+
descriptions, and the `browser:` line), which still talked about the OS media session.
|
|
1777
|
+
|
|
1778
|
+
### Added — you can interrupt almost any wait, and it picks up where it left off
|
|
1779
|
+
|
|
1780
|
+
Every blocking wait in `watch_together` can now be interrupted by a message in the chat box, and in
|
|
1781
|
+
all cases the answer is "reply to them, then call again with the same arguments" — the tool resumes:
|
|
1782
|
+
|
|
1783
|
+
- **Building a segment** (8–10 s, longer with ASR) and **filling the lookahead buffer** (up to 4
|
|
1784
|
+
segments serially, 30 s+) — the most pointless kind of waiting, now interruptible.
|
|
1785
|
+
- **Waiting for the video to appear** (`waitForVideo`, up to 2 min).
|
|
1786
|
+
- **Waiting for a condition** (`waitUntil`) and **waiting for the next line** (`nextLine`).
|
|
1787
|
+
- Waiting to the delivery point and `cue` already listened; they now share one watcher (below).
|
|
1788
|
+
|
|
1789
|
+
The interrupted work is **not cancelled**: the storyboard keeps building in the background and lands
|
|
1790
|
+
in the cache, so the follow-up call returns it immediately instead of rebuilding it.
|
|
1791
|
+
|
|
1792
|
+
New `src/interrupt.js`:
|
|
1793
|
+
- `raceChat(promise)` — polls the chat while a slow promise runs; returns `interrupted` with the
|
|
1794
|
+
message, or `done`. Wakes on whichever happens first (the promise settling, or the next poll tick).
|
|
1795
|
+
The first version slept a fixed 500 ms per tick, which added half a second to *every* build —
|
|
1796
|
+
enough that playback passed the delivery point and the blocking wait returned instantly.
|
|
1797
|
+
- `sleepWithChat(ms)` — sleep that can be cut short by a message.
|
|
1798
|
+
- `chatWatcherShared()` — **one watcher for the whole process.** `makeChatWatcher()` baselines at
|
|
1799
|
+
creation time, so a fresh one per wait silently dropped anything the user said while the model was
|
|
1800
|
+
thinking, in the gap between two waits.
|
|
1801
|
+
|
|
1802
|
+
### Added — it now reacts to what you do mid-video
|
|
1803
|
+
|
|
1804
|
+
Auditing the whole flow against the user's checklist surfaced three gaps where the plugin behaved
|
|
1805
|
+
correctly but **never told the model**, leaving it silent until the user poked it:
|
|
1806
|
+
|
|
1807
|
+
- **Video ended / video changed now wake the model once.** Previously they only stopped the loop, so
|
|
1808
|
+
the model sat blocked on the previous segment with no idea the film was over or had been replaced.
|
|
1809
|
+
- **Large seeks (>60 s, forward or backward) wake the model once** with where the user jumped to and
|
|
1810
|
+
from, with a 3-minute cooldown. Position tracking was already correct — it was the model that had
|
|
1811
|
+
no idea. Rewatching does not re-speak already-spoken segments (no immediate-repeat chatter).
|
|
1812
|
+
- **Only the visible tab reports** (`document.visibilityState`), plus a report on `visibilitychange`.
|
|
1813
|
+
Every tab with a `<video>` reports once per second; with two such tabs open the server received
|
|
1814
|
+
alternating positions and the plugin interpreted it as the user scrubbing wildly.
|
|
1815
|
+
- The simulator can now jump the playhead (`seeks: [{at, to}]`), and there are four new scenario
|
|
1816
|
+
tests covering: video changed wakes once, video ended wakes once, seek forward wakes once, rewatch
|
|
1817
|
+
wakes once and does not re-speak.
|
|
1818
|
+
|
|
1819
|
+
Note the jump check must run **before** the anchor is refreshed — comparing the new reading against
|
|
1820
|
+
the already-updated anchor measures zero. That was the first (failed) version.
|
|
1821
|
+
|
|
1822
|
+
### Fixed
|
|
1823
|
+
|
|
1824
|
+
- **`bin/watch.mjs chat` ran its own copy of the chat server** — an inline `http.createServer` plus
|
|
1825
|
+
duplicated copies of both HTML templates (92 lines). The copies had drifted: it served `/`,
|
|
1826
|
+
`/widget`, `/api/messages`, `/api/say` but **not `/api/position` or `/api/hello`**. So running
|
|
1827
|
+
only `watch.mjs chat` (instead of `bridge`) meant extension reports hit 404 and the CLI path could
|
|
1828
|
+
never read a position. It also never called `attachSpeechToChat()`, so that chat box showed user
|
|
1829
|
+
messages but no script lines. It now uses `startChatServer()` + `attachSpeechToChat()` like the
|
|
1830
|
+
plugin and `bridge` do, and the duplicated templates are deleted.
|
|
1831
|
+
- **`watch.mjs reply` wrote straight to the stream** with `appendChat('assistant', …)`, so the text
|
|
1832
|
+
appeared in the chat box but was never handed to speech subscribers — a TTS adapter stayed silent
|
|
1833
|
+
while the page showed the words. It now uses `appendAssistantSay()`, which writes the stream *and*
|
|
1834
|
+
emits the speech event, matching what `watch_together({say})` does.
|
|
1835
|
+
|
|
1836
|
+
### Fixed
|
|
1837
|
+
|
|
1838
|
+
- **The plugin passed the browser's debug port to `ensureChatSession()`**, so the chat server tried
|
|
1839
|
+
to bind 9333 — the port the browser is already using. The bind failed, the error was swallowed,
|
|
1840
|
+
and the chat box silently never came up in DSH. It now uses the chat port (9377) as intended.
|
|
1841
|
+
This also mattered for the extension: that server is where reports land.
|
|
1842
|
+
|
|
1843
|
+
### Removed — the OS media session (SMTC) backend is gone
|
|
1844
|
+
|
|
1845
|
+
Position used to have two sources: the browser's DevTools port, and Windows' system media controls
|
|
1846
|
+
(read by a bundled `watch_smtc.py`). **SMTC is deleted**, along with everything that only existed
|
|
1847
|
+
because of it:
|
|
1848
|
+
|
|
1849
|
+
- `src/watch-probe.js` (121 lines) and `src/watch_smtc.py` (62 lines)
|
|
1850
|
+
- `src/resolve-playing.js` (153 lines) — it reversed a *title* into a source by searching filenames
|
|
1851
|
+
and then Bilibili. With CDP the page URL is the source, so this whole "guess the film" path is
|
|
1852
|
+
gone (it was also the thing most likely to pick the wrong video)
|
|
1853
|
+
- the `winrt` Python dependency (three packages) and the interpreter search
|
|
1854
|
+
- most of the extrapolation policy in `position.js`: the cap drops 180 s → 60 s, `FRESH_MS`
|
|
1855
|
+
becomes 5 s, and the safety margin now only applies after a *missed* read
|
|
1856
|
+
- `pickSession` / `probePlayback` / `describeStatus` and the `probe` injection point
|
|
1857
|
+
|
|
1858
|
+
Rationale: SMTC's `Position` only refreshes on player events (measured gaps of 143 s and 216 s), so
|
|
1859
|
+
treating it as a live position required extrapolating, and extrapolating over a wrong pause means
|
|
1860
|
+
every later segment is built on a wrong cursor. The benefit — "watch in whatever player you like" —
|
|
1861
|
+
did not survive contact with how it actually behaved.
|
|
1862
|
+
|
|
1863
|
+
What you give up: you now watch inside the dedicated browser window
|
|
1864
|
+
(`scripts/start-edge-debug.cmd`). Chromium 136+ refuses to open a DevTools port on the default
|
|
1865
|
+
profile, so that window necessarily has its own profile and needs a one-time login.
|
|
1866
|
+
|
|
1867
|
+
### Fixed
|
|
1868
|
+
|
|
1869
|
+
- **`loop.built` / `loop.dur` / `loop.sourceUrl` leaked across films.** Starting a second watch
|
|
1870
|
+
session reused the previous film's duration, so the first read of the new film looked like a
|
|
1871
|
+
"video changed" event and stopped the loop immediately; `built` made prefetch skip segments it had
|
|
1872
|
+
built for the old film. Both are now reset when the source changes.
|
|
1873
|
+
- **`startWatchLoop` used `Date.now()` for the anchor while pricing time off its injected clock**,
|
|
1874
|
+
which made every simulated read look minutes old. It now uses the injected clock.
|
|
1875
|
+
- **The CLI's `pos()` never read SMTC at all**, so the CLI was browser-only even while the plugin
|
|
1876
|
+
had a fallback. Moot now that SMTC is gone, but it is why the tool seemed to demand a special
|
|
1877
|
+
browser.
|
|
1878
|
+
|
|
1879
|
+
### Removed — dead code trimmed so there is one decision path
|
|
1880
|
+
|
|
1881
|
+
Two functions that duplicated live logic and were never called in production are gone:
|
|
1882
|
+
|
|
1883
|
+
- `dueDecision` (in `src/timer.js`) — a pure "should I speak now" decision that shadowed
|
|
1884
|
+
`position.shouldSpeak`. Nothing in the loop ever called it; only a test exercised the abandoned
|
|
1885
|
+
design. The "pause too long → stop" intent it carried is now not implemented (see note below).
|
|
1886
|
+
- `depthForBuffer` (in `src/batches.js`) — a count-based lookahead that duplicated `windowFor`,
|
|
1887
|
+
which the loop actually uses (position-based, so the invariant holds at every position, not just
|
|
1888
|
+
at segment starts). Its tests were redundant guards of that same invariant.
|
|
1889
|
+
|
|
1890
|
+
Net: 13 tests removed (8 for `dueDecision`, 5 for `depthForBuffer`); `windowFor`'s existing tests
|
|
1891
|
+
already cover "lookahead ≥ N seconds at every position", so no coverage was lost.
|
|
1892
|
+
|
|
1893
|
+
### Changed — idle auto-stop now also covers a paused-and-abandoned video
|
|
1894
|
+
|
|
1895
|
+
The loop used to only stop itself on "no movement" when the last reading was a *playing* sample
|
|
1896
|
+
(`why === 'recent-refresh'`). A paused video reports a frozen position forever — `estimate` returns
|
|
1897
|
+
`why: 'paused'`, never stale — so pausing and walking away left the loop polling indefinitely. The
|
|
1898
|
+
idle check now also fires on a frozen *paused* position, after the same `2 × segment` grace period,
|
|
1899
|
+
and wakes you with "停了一会儿" so you can resume by calling `watch_together` again.
|
|
1900
|
+
|
|
1901
|
+
### Fixed — voice adapter no longer hard-codes a voice
|
|
1902
|
+
|
|
1903
|
+
`examples/voice-edge-tts/index.mjs` used to fall back to `zh-CN-XiaoxuanNeural` when
|
|
1904
|
+
`~/.dsh/tts.json` had no `voice`. That baked one person's voice into the example, so shipping it
|
|
1905
|
+
would have dragged that choice into everyone's install. It now falls back to the neutral
|
|
1906
|
+
`zh-CN-YunxiNeural` and prints a one-line hint telling you to set `voice` in `~/.dsh/tts.json`
|
|
1907
|
+
(e.g. `"voice": "zh-CN-XiaoxuanNeural"`). Nothing about the voice ships in the package — you mount
|
|
1908
|
+
the adapter via `~/.dsh/voice.json` (or `DSH_VOICE_ADAPTER`) and pick the voice yourself.
|
|
1909
|
+
|
|
1910
|
+
## Earlier — 0.1.0 draft, never published (2026-10-30)
|
|
1911
|
+
|
|
1912
|
+
The first cut as a standalone plugin. It was not published under this number; the version line now
|
|
1913
|
+
starts at 0.0.7, so this section is kept purely as a record of how the feature set got here. The feature existed inside `dsh-video-storyboard` 0.4.x as
|
|
1914
|
+
`src/watch/`; it is now its own package with its own entry point, its own version, and a one-way
|
|
1915
|
+
dependency on `dsh-video-storyboard`.
|
|
1916
|
+
|
|
1917
|
+
### Added
|
|
1918
|
+
|
|
1919
|
+
- **`watch_together`** — watch a video together with a text-only agent. Instead of one whole-film
|
|
1920
|
+
storyboard, it follows the user's **real playback position** and hands over one segment at a time,
|
|
1921
|
+
`lead` seconds before the segment ends. The next segment is built while the user is still watching
|
|
1922
|
+
the current one, so delivery is perceived as instant (4/4 measured deliveries at 0.0 s).
|
|
1923
|
+
- **Ramp-up start.** Segment lengths grow `[60, 120, 180, 240]` → `segment`, so the first line lands
|
|
1924
|
+
around 45 s instead of after a full 5-minute batch. `ramp: []` disables the ladder.
|
|
1925
|
+
- **Double buffering.** `depth: 2` keeps the current batch plus the next one built, and starts the
|
|
1926
|
+
one after that while the user watches.
|
|
1927
|
+
- **Playback position straight from the page.** It reads `<video>.currentTime` over the DevTools
|
|
1928
|
+
protocol, so the value is exact, and the page URL becomes the source (`file:///D:/x.mp4` → local
|
|
1929
|
+
path) — no searching, no downloading, no asking. Never released with the OS media session (SMTC)
|
|
1930
|
+
backend documented below: SMTC's `Position` only refreshes on events, so using it as a live
|
|
1931
|
+
position meant extrapolating, and a wrong position poisons every later segment.
|
|
1932
|
+
- **Honest confidence levels.** The plugin reads every 15 s and extrapolates in between, which is
|
|
1933
|
+
normal and self-correcting. What it refuses to do is keep extrapolating after it has *missed* a
|
|
1934
|
+
read: past 20 s it demands an extra 5 s of margin before speaking, and past 60 s it stops
|
|
1935
|
+
guessing and asks for `cursor` instead.
|
|
1936
|
+
- **The speech seam, with no engine.** `src/speech-bus.js` exposes `onSpeech(handler, { voice })`,
|
|
1937
|
+
`emitSpeech()`, `speechEvents()` and `lastSpeech()`. The plugin ships no engine, no default
|
|
1938
|
+
adapter and no voice parameters; `watch_together` results carry `speech: [{ at, text, state }]`
|
|
1939
|
+
and the loop emits `state: 'due'` when a line is actually due.
|
|
1940
|
+
- **Adapters loaded by path.** `~/.dsh/voice.json` `{ "adapter": "<path or module>" }` (or
|
|
1941
|
+
`DSH_VOICE_ADAPTER`) is `import()`ed once at startup; the module exports `attach(api)` and returns
|
|
1942
|
+
a detach. Nothing is bundled, and a failure only logs a warning.
|
|
1943
|
+
- **`examples/voice-edge-tts/`** — a working adapter (edge-tts → `ffplay` → system-voice fallback).
|
|
1944
|
+
It prints `[voice 03:11.4] <line>` to stderr for every line that comes due; that log, not the
|
|
1945
|
+
audio, is what you want when checking *when* text fires.
|
|
1946
|
+
- **One text stream for the chat box.** `chat.jsonl` carries `line` (scripted), `assistant`
|
|
1947
|
+
(interjection) and `user`, with `say: true` marking the speakable ones.
|
|
1948
|
+
`watch_together({ say: "…" })` is how the model gets its interjection in — the plugin cannot read a
|
|
1949
|
+
normal reply. `attachSpeechToChat()` subscribes with `voice: false`, so a display-only consumer can
|
|
1950
|
+
never silence the loop.
|
|
1951
|
+
- **A localhost chat page** (`/` full view, `/widget` capsule) with an `/api/messages` long-poll and
|
|
1952
|
+
an `/api/say` callback. This is the only channel that actually reaches a blocked `watch_together`
|
|
1953
|
+
call — messages typed into the host's own input box are appended to the session log *after* the
|
|
1954
|
+
blocking call returns (measured: 42 s of polling, 0 bytes written).
|
|
1955
|
+
- **`examples/floating-chat/window.py`** — a real floating window without a browser: frameless,
|
|
1956
|
+
always-on-top, translucent, stdlib tkinter only. Reads the same `chat.jsonl`.
|
|
1957
|
+
- **`bin/watch.mjs`** — a CLI shell for sessions that have no `watch_together` tool. It imports the
|
|
1958
|
+
same `src/`, so behaviour cannot drift from the plugin.
|
|
1959
|
+
|
|
1960
|
+
### Fixed
|
|
1961
|
+
|
|
1962
|
+
- **The CLI imported pre-refactor paths** (`src/browser-time.js`, `src/pipeline.js`, …) that no
|
|
1963
|
+
longer exist, so `bin/watch.mjs` could not even start. All imports now resolve through the
|
|
1964
|
+
`dsh-video-storyboard` package name.
|
|
1965
|
+
|
|
1966
|
+
### Changed
|
|
1967
|
+
|
|
1968
|
+
- `detachAdapters()` no longer reaches into the bus's private subscriber map; it calls
|
|
1969
|
+
`__resetSpeech()` from `speech-bus.js`.
|
|
1970
|
+
- `watch-run.js` imported `./watch.js` twice; merged into one import.
|
|
1971
|
+
|
|
1972
|
+
### Known limits
|
|
1973
|
+
|
|
1974
|
+
- **Speaker separation is not attempted.** Measured on the reference machine: per-sentence cam++
|
|
1975
|
+
embeddings split single-speaker material into 6 speakers; demucs pre-separation made no difference
|
|
1976
|
+
(median similarity 0.62 → 0.61); FunASR's `ClusterBackend` returns "one speaker" outright below 20
|
|
1977
|
+
speech segments — short clips are outside its operating range by design.
|
|
1978
|
+
- **Interjection audio can collide with a line already being spoken.** Windows mixes both SAPI
|
|
1979
|
+
instances, so `say` occupies `quiet-until.json` before speaking and `cue` skips lines inside that
|
|
1980
|
+
window (it skips rather than defers — deferring desynchronises from the picture). The remaining
|
|
1981
|
+
gap is the 3–8 s while a line is mid-speech, which cannot be cut short.
|
|
1982
|
+
- **CRLF-less assumption.** The chat page replaces `__PORT__` in the templates per start; changing
|
|
1983
|
+
the port while a browser tab is already open requires a reload.
|